open
A Model Context Protocol (MCP) for numerous third-party software and third-party APIs. Once deployed, this service can offer enhanced support for your AI platform, such as enabling you to use Dofi to complete your platform
claude mcp add --transport stdio changsong-open-mcp-server java -Dspring.ai.mcp.server.stdio=true -jar /path/to/open-mcp-server-1.0-SNAPSHOT.jar juhe.news.api-key=YOUR_API_KEY \ --env JAVA_OPTS="Optional Java options"
How to use
Open-MCP-Server provides a Java-based MCP framework that integrates with various external systems and AI platforms. It supports multiple protocols (HTTP/REST, Dubbo, gRPC, SOAP) and offers features like API testing, automatic code generation, AI assistant capabilities, MCP tool integration, and centralized service/registry management. After starting the server, you can interact with its HTTP APIs for testing and management, generate boilerplate integration code for external APIs, use the AI assistant and MCP tools for dynamic tooling, and manage multiple protocol services through a unified interface.
The server exposes endpoints for API testing (/api/test), code generation (/api/generate) and code download (/api/download), AI assistance (/ai-assistant/*), and multi-protocol service management (/http, dubbo, grpc, soap) as well as registry management. You can also use the MCP toolset to invoke or discover Dubbo services, manage sessions with the AI assistant, and inject or call MCP tools within conversations. This makes it straightforward to connect enterprise data sources with AI workflows and to generate Spring Boot-ready integration code automatically.
How to install
Prerequisites:
- Java (JDK 8+ or 11 recommended)
- Optional: Maven if you’re building from source
- Access to a JVM environment to run the packaged JAR
Installation steps:
-
Acquire the server artifact
- If provided as a JAR: download open-mcp-server-1.0-SNAPSHOT.jar to a desired directory.
- If building from source: clone the repository and run the project build (e.g., maven mvn clean package).
-
Prepare configuration
- Create or update the MCP configuration for mcpServers as shown in the example, e.g.: { "mcpServers": { "open-mcp-server": { "command": "java", "args": [ "-Dspring.ai.mcp.server.stdio=true", "-jar", "/path/to/open-mcp-server-1.0-SNAPSHOT.jar", "juhe.news.api-key=YOUR_API_KEY" ], "env": { "JAVA_OPTS": "Optional Java options" } } } }
-
Run the server
- Ensure Java is installed and accessible in PATH.
- Start the server with the configured command, for example: java -Dspring.ai.mcp.server.stdio=true -jar /path/to/open-mcp-server-1.0-SNAPSHOT.jar juhe.news.api-key=YOUR_API_KEY
-
Verify startup
- Check logs for startup success messages. -Access API endpoints as documented in the README (e.g., /api/test, /api/generate).
-
Optional configuration tweaks
- Adjust MCP server options, registry settings, and API integrations via the provided YAML/JSON configuration sections and the application's Spring properties.
Additional notes
Tips and notes:
- Keep your API keys and credentials externalized and secured; use environment variables or secret management where possible.
- The example uses a single MCP server entry (open-mcp-server). Add more entries under mcpServers as needed for multiple environments or deployments.
- If you enable stdio streaming (spring.ai.mcp.server.stdio), monitor the logs for real-time data flow during AI interactions.
- Ensure network access between the MCP server and any external APIs (REST, Dubbo, gRPC, SOAP) you plan to integrate.
- For the code generation feature, provide the target API URL, package path, and API name; the server will generate DTOs and implementation scaffolds compatible with Spring Boot.
- When using the AI assistant and MCP tools, be mindful of API usage limits and latency for long-running conversations or tool invocations.
- If you encounter port binding or protocol conflicts, review the protocol configuration and ensure the requested services are not already in use by other processes.