1. Conduid
  2. Developer Tools
  3. Api2mcp4j
MCP server · Developer Tools

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

Unclaimed Apache-2.0 last commit 8 months ago frameworkmcpmavenjavaagentmcp-serverdevtoolsaimulti-agent-systems
71Good

Scored 3 hours ago · breakdown

About Api2mcp4j

Api2mcp4j is an MCP server published by TheEterna in the Developer Tools category: 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. It has been installed 0 times through Conduid.

The repository has 96 stars and 13 forks, with the last commit 8 months ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues (0) before depending on it in production.

Install

Install
npx api2mcp4j

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

Ask AI about Api2mcp4j

Powered by Claude · Grounded in docs

I know everything about Api2mcp4j. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ·README presentNot checked yet.
  • ·License declaredNot checked yet.
  • ·Tests presentNot checked yet.
  • ·Dependencies pinnedNot checked yet.
  • ·No dynamic code executionNot checked yet.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

Releases

v1.0.1v1.0.1
v0.0.1-Basic-Function-Integrationv0.0.1-Basic-Function-Integration

README

api2mcp4j

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.

GitHub stars License Java Spring Boot

✨ Why api2mcp4j?

Most MCP integrations require you to:

  • Add @Tool / @McpTool annotations to every method
  • Duplicate or heavily refactor code
  • Maintain separate tool descriptions

api2mcp4j changes that.

It automatically scans your existing @RestController / @Service beans and exposes them as MCP tools with minimal configuration — leveraging parsers from:

  • Swagger/OpenAPI (v2 & v3)
  • Javadoc
  • Spring MVC metadata
  • Jackson
  • Spring AI native descriptions
  • Custom @Tool / @McpTool (optional)

Result: Your current REST APIs become AI-callable tools almost for free.

🔥 Key Features

  • Non-intrusive — No need to change business code (like MyBatis-Plus enhances MyBatis)
  • Auto-discovery — Scans controllers/services and registers methods as MCP tools
  • Multi-parser support — Smartly combines descriptions & parameter info from Swagger, Javadoc, etc.
  • Custom annotations@ToolScan, @ResourceScan, @PromptScan for fine-grained control
  • Isolated MCP tool system — Uses McpTool annotation (independent of Spring AI @Tool)
  • Full MCP SDK compatibility — Supports latest MCP Java SDK features (callbacks, resources, prompts)
  • Easy debugging — Works great with Cursor, Continue, or any MCP client

Quick Start (≈ 5 minutes)

1. Add dependency

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>

2. Enable in application.yml

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

3. (Optional) Javadoc parser setup

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>

4. Start your app → Test

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.

Comparison with Alternatives

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

Best Use Cases

  • Expose internal management system APIs to AI agents quickly
  • Build multi-agent systems by turning microservices into MCP tools
  • Prototype AI features on top of production REST services
  • Avoid duplicating logic between REST and MCP endpoints

Documentation & Roadmap

Contributing

Issues, PRs, and stars are very welcome!
The project is young — your feedback can shape its future.

License

Apache License 2.0


作者的话
这是一个我投入大量心血的个人项目,希望能真正帮助到更多 Spring Boot 开发者快速拥抱 MCP/AI Agent 时代。感谢每一位 star 和使用它的人!

- 语言更流畅、专业、吸引人

你可以直接发给作者,建议他 review 后合并(或作为 PR)。如果需要,我可以再调整语气、加 GIF/demo 图位置提示,或写中文版。

README mirrored from the source repository 3 hours ago. The original is authoritative.

Questions

About Api2mcp4j

How do I install Api2mcp4j?

Run npx api2mcp4j, then add the server to your MCP client's configuration. Conduid has recorded 0 installs, so the command is known to work with current clients.

Is Api2mcp4j safe to use with an AI agent?

Its trust score is 71 out of 100 (good). It passes 0 of 1 static security checks; the failures are listed above. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Api2mcp4j still maintained?

The last commit was 8 months ago, with 0 open issues. That's long enough that you should check whether the maintainer is responding to issues before depending on it.