api2mcp4j
This is a revolutionary AI MCP plugin with excellent pluggable and encapsulated features. With just a few lines of configuration, it can easily integrate into your Spring boot web program and give it MCP capabilities,inheriting the powerful engineering capabilities of the Spring series framework
claude mcp add --transport stdio theeterna-api2mcp4j java -jar path/to/api2mcp4j.jar \ --env MCP_LOG_LEVEL="INFO" \ --env SPRING_PROFILES_ACTIVE="default" \ --env SPRING_OUTPUT_ANSI_ENABLED="ALWAYS"
How to use
api2mcp4j is a Spring Boot Starter designed for automated integration of MCP (Model Context Protocol) services in Java applications. It exposes MCP tooling and callback mechanisms that allow your Java service to register tools, resources, and prompts, and to participate in MCP-based interactions through the Spring AI framework. The server-side configuration enables automatic MCP interface wiring, with optional annotations like @ToolScan and @ResourceScan to customize what gets registered as MCP tools or resources. You can leverage built-in parsers (Javadoc, Jackson, Swagger, etc.) and extend with custom parsers if needed. Start this server as part of a Spring Boot application and expose MCP interfaces that clients can call via MCP endpoints.
To use its capabilities, integrate the starter into your Spring Boot project, configure the mcp sections in your application.yml or application.properties, and ensure MCP-related beans are discovered by Spring. You can register your own tools via the McpTool mechanism, customize prompts, and register resources by using the provided annotations. Client calls to MCP interfaces will be routed through the registered tools and parsers, enabling automated AI-driven interactions through MCP.
How to install
Prerequisites:
- Java Development Kit (JDK) 17 or newer
- Maven or Gradle build tool
- A compatible MCP SDK version (as required by the project)
- Clone the repository
- git clone https://github.com/theeterna/api2mcp4j.git
- cd api2mcp4j
- Build the project
- Using Maven: mvn clean package -DskipTests
- Using Gradle: ./gradlew clean build -x test
- Run the server
- java -jar path/to/api2mcp4j.jar
- Alternatively, run within your IDE as a Spring Boot application
- Configure MCP in your application
- Add MCP-related configuration to application.yml or application.properties as described in the README (parser params, scope, etc.)
Additional notes
Notes and tips:
- This project targets an MCP setup compatible with Spring AI and MCP SDK snapshots; ensure your MCP SDK version aligns with the project version to avoid compatibility issues.
- If you encounter tool or resource registration issues, verify your @ToolScan, @ResourceScan, and @PromptScan annotations are correctly placed and detected by component scanning.
- When upgrading MCP SDK versions, you may need to recompile and adjust parser configurations if breaking changes are introduced.
- The environment variables shown in the example mcp_config are placeholders; adjust SPRING_PROFILES_ACTIVE, MCP_LOG_LEVEL, and any other settings according to your deployment environment.
- Ensure network connectivity between MCP clients and the server; expose the MCP endpoints through your chosen deployment configuration (e.g., container, VM, or bare metal).
- If you are upgrading from an older server2mcp integration, review the latest documentation linked in the README for any migration notes or breaking changes.
Related MCP Servers
ai-code-helper
2025 年 AI 编程助手实战项目(作者:程序员鱼皮),基于 Spring Boot 3.5 + Java 21 + LangChain4j + AI 构建智能编程学习与求职辅导机器人,覆盖 AI 大模型接入、LangChain4j 核心特性、流式对话、Prompt 工程、RAG 检索增强、向量数据库、Tool Calling 工具调用、MCP 模型上下文协议、Web 爬虫、安全防护、Vue.js 前端开发、SSE 服务端推送等企业级 AI 应用开发技术。帮助开发者掌握 AI 时代必备技能,熟悉 LangChain 框架,提升编程学习效率和求职竞争力,成为企业需要的 AI 全栈开发人才。
sonarqube
SonarQube MCP Server
skillz
An MCP server for loading skills (shim for non-claude clients).
mcp -js
MCP server that exposes YepCode processes as callable tools for AI platforms. Securely connect AI assistants to your YepCode workflows, APIs, and automations.
zerodha
Zerodha MCP Server & Client - AI Agent (w/Agno & w/Google ADK)
WigAI
Bitwig Controller Extension that provides an MCP Server for AI Agent control