spring -bridge
Spring MCP Bridge is a tool that automatically converts REST endpoints from Spring Boot applications into an MCP (Message Conversation Protocol) server, allowing AI assistants like Claude, Cursor, and other MCP-compatible tools to directly interact with your APIs.
claude mcp add --transport stdio brunosantoslab-spring-mcp-bridge python main.py \ --env SPRING_BASE_URL="http://localhost:8080"
How to use
Spring MCP Bridge automatically scans a Spring Boot project and exposes its REST endpoints as an MCP server. It analyzes controllers, request mappings, and models, then generates a FastAPI-based MCP server along with an MCP schema that clients (like Claude or Cursor) can use to interact with the underlying Spring API. The bridge preserves request and response models and can extract Javadoc or inline documentation to enrich tool descriptions, providing a ready-to-use interface for AI assistants to invoke your API endpoints without writing boilerplate MCP code yourself.
To use it, first generate the MCP server from your Spring project, then run the generated Python application. Once the server is running, you can access the MCP API at the configured port (default 8000) and connect your MCP client to http://localhost:8000. The MCP schema describing all endpoints is available at http://localhost:8000/.well-known/mcp-schema.json, enabling client tooling to discover available methods, parameters, and return types.
How to install
Prerequisites:
- Python 3.8 or newer
- Java Spring Boot project to scan
- git
Install and run:
- Clone the repository and navigate to the generated MCP bridge project (the one that contains main.py after running the scanner).
git clone https://github.com/brunosantos/spring-mcp-bridge.git
cd spring-mcp-bridge
- Ensure you have the Spring Boot project you want to bridge accessible. The bridge scans a local path to your Spring project and outputs an MCP server in a directory such as mcp_server with a main.py file.
# Example (adjust to your environment after running the scanner):
python spring_mcp_bridge.py --project /path/to/your/spring-project --output ./mcp_server --name MyAPI
- Install Python dependencies for the generated MCP server and run it:
cd mcp_server
pip install -r requirements.txt
python main.py
- With the server running, connect an MCP client to http://localhost:8000 and view the documentation at http://localhost:8000/docs. The MCP schema will be available at http://localhost:8000/.well-known/mcp-schema.json.
Additional notes
Tips and considerations:
- The bridge does not implement authentication by default. If your Spring API requires auth, you’ll need to modify the generated handler code or add appropriate headers/tokens.
- The generated MCP server defaults to port 8000. If needed, adjust configuration in main.py (e.g., FastAPI setup) to bind to a different port.
- The SPRING_BASE_URL variable sets the base URL of your Spring Boot application (default http://localhost:8080). Update it to match your deployment.
- The MCP schema and documentation are generated automatically; ensure your Spring project is fully scanned and accessible for accurate mappings.
- If the Spring project uses complex types, review the JSON Schema conversions in the generated server to confirm compatibility with your MCP clients.
Related MCP Servers
falcon
Connect AI agents to CrowdStrike Falcon for automated security analysis and threat hunting
okta
The Okta MCP Server is a groundbreaking tool built by the team at Fctr that enables AI models to interact directly with your Okta environment using the Model Context Protocol (MCP). Built specifically for IAM engineers, security teams, and Okta administrators, it implements the MCP specification to help work with Okta enitities
zerodha
Zerodha MCP Server & Client - AI Agent (w/Agno & w/Google ADK)
alris
Alris is an AI automation tool that transforms natural language commands into task execution.
Helios
An AI IDE secure coding MCP service
rest-to -adapter
A Python library for converting REST API specifications into MCP (Model Context Protocol) tools for AI agents.