by TheEterna
Spring Boot Starter: Auto-convert existing REST APIs (@RestController) to MCP Server with zero/low-code. Expose controllers as MCP Tools instantly.
# Add to your Claude Code skills
git clone https://github.com/TheEterna/api2mcp4jLast scanned: 5/30/2026
{
"issues": [],
"status": "PASSED",
"scannedAt": "2026-05-30T17:02:04.806Z",
"npmAuditRan": true,
"pipAuditRan": true
}api2mcp4j is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by TheEterna. Spring Boot Starter: Auto-convert existing REST APIs (@RestController) to MCP Server with zero/low-code. Expose controllers as MCP Tools instantly. It has 105 GitHub stars.
Yes. api2mcp4j passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/TheEterna/api2mcp4j" and add it to your Claude Code skills directory (see the Installation section above).
api2mcp4j is primarily written in Java. It is open-source under TheEterna on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh api2mcp4j against similar tools.
No comments yet. Be the first to share your thoughts!
Zero-to-low code MCP integration for your Spring Boot REST APIs
Turn your existing Spring Boot controllers into an MCP (Model Context Protocol) server in minutes — no @Tool annotations everywhere, no rewriting business logic.
Most MCP integrations require you to:
@Tool / @McpTool annotations to every methodapi2mcp4j changes that.
It automatically scans your existing @RestController / @Service beans and exposes them as MCP tools with minimal configuration — leveraging parsers from:
@Tool / @McpTool (optional)Result: Your current REST APIs become AI-callable tools almost for free.
@ToolScan, @ResourceScan, @PromptScan for fine-grained controlMcpTool annotation (independent of Spring AI @Tool)Note: Project not yet in Maven Central — build from source for now.
# Clone & build
git clone https://github.com/TheEterna/api2mcp4j.git
cd api2mcp4j/server2mcp-starter-webmvc
mvn clean install
<!-- pom.xml -->
<dependency>
<groupId>com.ai.plug</groupId>
<artifactId>server2mcp-starter-webmvc</artifactId>
<version>1.1.4-SNAPSHOT</version> <!-- or latest after build -->
</dependency>
plugin:
mcp:
enabled: true
# Recommended: use multiple parsers for best description quality
parser:
params: SWAGGER3, SWAGGER2, SpringMVC, JACKSON, TOOL # JAVADOC needs extra setup
des: SWAGGER3, SWAGGER2, JAVADOC, TOOL, JACKSON
# 'interface' = auto-register all controller methods (skip @Deprecated)
# 'custom' = only register via @ToolScan / manual
scope: interface
To enable Javadoc parsing in production (bytecode doesn't contain comments):
<!-- pom.xml - package sources -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-java-sources</id>
<phase>prepare-package</phase>
<goals><goal>copy-resources</goal></goals>
<configuration>
<outputDirectory>${project.build.outputDirectory}</outputDirectory>
<resources>
<resource>
<directory>src/main/java</directory>
<includes><include>**/*.java</include></includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
Your MCP endpoint is ready (default /mcp or configured via spring.ai.mcp.* properties).
Use any MCP client (Cursor, custom agent, etc.) to call your original REST methods as tools.
| Feature | api2mcp4j | Spring AI MCP Official | Manual @Tool everywhere |
|---|---|---|---|
| Code changes required | Minimal (config only) | Medium–High | High |
| Auto from existing REST | Yes (controllers) | No | No |
| Parser combinators | Yes (Swagger+Javadoc+…) | Limited | Manual |
| Non-intrusive | ★★★★★ | ★★★ | ★☆ |
| Custom scan annotations | Yes | Partial | No |
| Best for existing projects | Yes | New MCP-first apps | Small prototypes |
Issues, PRs, and stars are very welcome!
The project is young — your feedback can shape its future.
作者的话
这是一个我投入大量心血的个人项目,希望能真正帮助到更多 Spring Boot 开发者快速拥抱 MCP/AI Agent 时代。感谢每一位 star 和使用它的人!
- 语言更流畅、专业、吸引人
你可以直接发给作者,建议他 review 后合并(或作为 PR)。如果需要,我可以再调整语气、加 GIF/demo 图位置提示,或写中文版。