This guide explains how to connect to your Spring Boot MCP Proxy from different clients:
- Claude Desktop - Connect AI assistant to your MCP tools
- Postman - Test and register tools via REST API
✅ Spring Boot MCP Proxy running on http://localhost:8081
✅ Target REST API running (e.g., http://localhost:8080)
✅ Node.js and npm installed (for Claude Desktop connection)
✅ Postman installed (for API testing)
This project includes two example REST APIs that you can use to test the MCP proxy:
Purpose: Demonstrates CRUD operations for store entities
Port: http://localhost:8080
Available Endpoints:
GET /stores- List all storesGET /stores/{id}- Get store by IDPOST /stores- Create new storePUT /stores/{id}- Update existing storeDELETE /stores/{id}- Delete store
Example Entity:
{
"id": 1,
"name": "Store A",
"location": "New York City"
}Use Case: Perfect for demonstrating basic CRUD operations with Claude
Purpose: Demonstrates IoT/sensor control and monitoring
Port: http://localhost:8080 (alternative to Store API)
Available Endpoints:
GET /weather- Get current temperaturePOST /weather?temp=<int>- Set target temperature
Example Operations:
- Read weather info
- Update weather info
Use Case: Great for demonstrating IoT control scenarios with Claude
For Store Management API:
cd /path/to/store-api
./mvnw spring-boot:run
# Runs on http://localhost:8080For Temperature Control API:
cd /path/to/temperature-api
./mvnw spring-boot:run
# Runs on http://localhost:8090# Check if npx is available
npx --version
# If not installed, install Node.js from https://nodejs.org/-
Open Claude Desktop Settings
- Launch Claude Desktop application
- Navigate to: Settings → Developer → Local MCP servers
- Click "Edit Config"
-
Add MCP Server Configuration
Add the following configuration to your Claude Desktop config file:
{
"mcpServers": {
"spring-mcp-server": {
"command": "npx",
"args": ["mcp-remote", "http://localhost:8081/sse"]
}
}
}Configuration Breakdown:
"spring-mcp-server"- Name of your MCP server (can be customized)"command": "npx"- Uses npx to run the mcp-remote package"args"- Arguments passed to npx:"mcp-remote"- Package that enables remote MCP connections"http://localhost:8081/sse"- Your MCP proxy SSE endpoint
- Save the configuration file
- Restart Claude Desktop completely (close and reopen)
- Verify connection:
- Look for "spring-mcp-server" with status "running" (blue badge)
- Check that tools are available in Claude
Before Claude can use any tools, you must register them via the REST API:
Option A: Register from Swagger/OpenAPI
curl -X POST "http://localhost:8081/tools/register?baseUrl=http://localhost:8080"Option B: Register Manual Tools
curl -X POST "http://localhost:8081/tools/register/manual" \
-H "Content-Type: application/json" \
-d '[{
"name": "getStoreById",
"description": "Fetch a store by its ID",
"httpMethod": "GET",
"endpoint": "/stores/{id}",
"baseUrl": "http://localhost:8080",
"pathParams": {"id": "integer"}
}]'Once tools are registered, you can interact with Claude naturally:
Example Conversation:
You: Can you fetch store with ID 123?
Claude: I'll use the getStoreById tool to fetch that information.
[Calls: http_localhost_8080_getStoreById with {"id": 123}]
Here's the store information:
- ID: 123
- Name: Store A
- Location: New York City
- Open Postman
- Import Collection:
- Click Import button
- Select the
mcp.postman_collection.jsonfile - Collection "mcp" will be added to your workspace
The collection includes these pre-configured requests:
Request:
POST http://localhost:8081/tools/register?baseUrl=http://localhost:8080Purpose: Automatically discover and register all endpoints from an OpenAPI-enabled REST API
Response Example:
Registered tools from http://localhost:8080, total tools = 5
When to use:
- Quick registration of entire APIs
- APIs with OpenAPI/Swagger documentation at
/v3/api-docs
Request:
POST http://localhost:8081/tools/register/manual
Content-Type: application/json
[
{
"name": "getById",
"description": "Fetch store by id",
"httpMethod": "GET",
"endpoint": "/stores/{id}",
"baseUrl": "http://localhost:8080",
"pathParams": {
"id": "integer"
},
"queryParams": null,
"requestBody": null
},
{
"name": "update_store",
"description": "Update an existing store by ID",
"httpMethod": "PUT",
"endpoint": "/stores/{id}",
"baseUrl": "http://localhost:8080",
"pathParams": {
"id": "integer"
},
"queryParams": {},
"requestBody": {
"type": "object",
"properties": {
"name": { "type": "string" },
"location": { "type": "string" }
},
"required": ["name", "location"]
}
}
]Response Example:
Registered 2 manual tools successfully.
When to use:
- Custom tool definitions
- APIs without OpenAPI documentation
- Fine-grained control over tool parameters
- Specific endpoints from larger APIs
Request:
GET http://localhost:8081/tools/list?baseUrl=http://localhost:8080Purpose: View all registered tools for a specific API base URL
Response Example:
[
"http_localhost_8080_getById",
"http_localhost_8080_update_store",
"http_localhost_8080_createStore",
"http_localhost_8080_deleteStore",
"http_localhost_8080_listStores"
]When to use:
- Verify successful registration
- Check tool names before deletion
- Audit registered tools
Request:
DELETE http://localhost:8081/tools/delete
Content-Type: application/json
[
"http_localhost_8080_getById",
"http_localhost_8080_update_store"
]Response Example:
Deleted tools: [http_localhost_8080_getById, http_localhost_8080_update_store]
When to use:
- Remove outdated tools
- Clean up after testing
- Manage tool lifecycle
1. Start MCP Proxy Server (port 8081)
↓
2. Start Target REST API (port 8080)
↓
3. Test target API directly (verify it's working)
↓
4. Register tools via Postman:
- Option A: POST /tools/register?baseUrl=...
- Option B: POST /tools/register/manual
↓
5. Verify registration:
- GET /tools/list?baseUrl=...
↓
6. Test in Claude Desktop (tools now available)
↓
7. (Optional) Delete tools when done:
- DELETE /tools/delete
┌─────────────────────────────────────────────────────────────┐
│ Claude Desktop │
│ ┌────────────────────────────────────────────────────┐ │
│ │ MCP Configuration (claude_desktop_config.json) │ │
│ │ { │ │
│ │ "mcpServers": { │ │
│ │ "spring-mcp-server": { │ │
│ │ "command": "npx", │ │
│ │ "args": ["mcp-remote", │ │
│ │ "http://localhost:8081/sse"] │ │
│ │ } │ │
│ │ } │ │
│ │ } │ │
│ └────────────────────┬───────────────────────────────┘ │
└─────────────────────────┼───────────────────────────────────┘
│ SSE Connection
│ (MCP Protocol)
↓
┌──────────────────────────────────────────────────────────────┐
│ Spring Boot MCP Proxy (Port 8081) │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ /sse endpoint - MCP Protocol (for Claude) │ │
│ └──────────────────────────────────────────────────────┘ │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ REST API Endpoints (for Postman): │ │
│ │ • POST /tools/register?baseUrl=... │ │
│ │ • POST /tools/register/manual │ │
│ │ • GET /tools/list?baseUrl=... │ │
│ │ • DELETE /tools/delete │ │
│ └──────────────────────────────────────────────────────┘ │
└────────┬─────────────────────────────────────────────────────┘
│ HTTP Requests
│ (Tool Execution)
↓
┌──────────────────────────────────────────────────────────────┐
│ Target REST API (Port 8080) │
│ • GET /stores/{id} │
│ • POST /stores │
│ • PUT /stores/{id} │
│ • DELETE /stores/{id} │
│ • GET /stores │
└──────────────────────────────────────────────────────────────┘
┌────────────────┐
│ Postman │
│ (Testing & │
│ Registration) │
└────────┬───────┘
│ REST API Calls
↓
(Port 8081 Endpoints)
Problem: "spring-mcp-server" shows as stopped or error
✅ Solutions:
- Verify MCP proxy is running:
curl http://localhost:8081/actuator/health - Check npx is installed:
npx --version - Restart Claude Desktop completely
- Check config file syntax (valid JSON)
- Look at Claude Desktop logs (Settings → Developer)
Problem: "No tools available" in Claude
✅ Solutions:
- Tools must be registered first via Postman
- Check registered tools:
GET http://localhost:8081/tools/list?baseUrl=... - After registering, wait 5-10 seconds for Claude to refresh
- Restart Claude Desktop if needed
Problem: Tool execution fails
✅ Solutions:
- Verify target API is running
- Check tool parameters match API requirements
- Review MCP proxy logs:
tail -f mcp.demo.log - Test endpoint directly in Postman first
Problem: Connection refused to localhost:8081
✅ Solutions:
- Verify MCP proxy is running:
curl http://localhost:8081/actuator/health - Check port 8081 is not blocked by firewall
- Verify application.properties has
server.port=8081
Problem: 500 Error when registering from Swagger
✅ Solutions:
- Verify target API has OpenAPI docs:
curl http://localhost:8080/v3/api-docs - Check target API is actually running
- Ensure baseUrl format is correct (no trailing slash)
Problem: Manual tool registration validation error
✅ Solutions:
- Check all required fields are provided
- Ensure requestBody is an object, not primitive
- Verify endpoint starts with
/ - Validate JSON syntax
Step 1: Start Services
# Terminal 1: Start Store API
cd /path/to/store-api
./mvnw spring-boot:run
# Runs on http://localhost:8080
# Terminal 2: Start MCP proxy
cd /path/to/mcp-proxy
./mvnw spring-boot:run
# Runs on http://localhost:8081Step 2: Register Tools (Postman)
POST http://localhost:8081/tools/register?baseUrl=http://localhost:8080Response:
Registered tools from http://localhost:8080, total tools = 5
Step 3: Verify Tools (Postman)
GET http://localhost:8081/tools/list?baseUrl=http://localhost:8080Response:
[
"http_localhost_8080_getStoreById",
"http_localhost_8080_createStore",
"http_localhost_8080_updateStore",
"http_localhost_8080_deleteStore",
"http_localhost_8080_listAllStores"
]Step 4: Configure Claude Desktop Edit config:
{
"mcpServers": {
"spring-mcp-server": {
"command": "npx",
"args": ["mcp-remote", "http://localhost:8081/sse"]
}
}
}Restart Claude Desktop.
Step 5: Use in Claude
You: Show me all stores in the system
Claude: [Calls http_localhost_8080_listAllStores]
Here are all the stores currently in the system:
1. Store A - New York City
2. Store B - Los Angeles
3. Store C - Chicago
You: Update store 2 to change its location to San Francisco
Claude: [Calls http_localhost_8080_updateStore with
{"id": 2, "name": "Store B", "location": "San Francisco"}]
Successfully updated! Store B's location is now San Francisco.
You: Create a new store called "Store D" in Miami
Claude: [Calls http_localhost_8080_createStore with
{"name": "Store D", "location": "Miami"}]
Successfully created! Store D has been added in Miami.
macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
Windows:
%APPDATA%\Claude\claude_desktop_config.json
Linux:
~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"spring-mcp-server": {
"command": "npx",
"args": ["mcp-remote", "http://localhost:8081/sse"]
},
"another-api": {
"command": "npx",
"args": ["mcp-remote", "http://localhost:9000/sse"]
}
}
}Note: You can register multiple MCP servers simultaneously!
✅ DO:
- Register tools once at startup
- Use Swagger registration for full APIs
- Use manual registration for specific endpoints
- Test tools in Postman before using in Claude
- Delete unused tools to keep Claude's tool list clean
❌ DON'T:
- Register duplicate tools
- Leave test tools in production
- Register tools with overly generic names
- Forget to restart Claude after config changes
- MCP proxy runs on localhost by default (secure)
- Don't expose port 8081 to external networks without authentication
- Target APIs should have proper authentication
- Consider adding API key validation for production use
# Start MCP Proxy
cd /path/to/mcp-proxy
./mvnw spring-boot:run
# Stop: Ctrl+C
# Check health
curl http://localhost:8081/actuator/health# Swagger registration
curl -X POST "http://localhost:8081/tools/register?baseUrl=http://localhost:8080"
# Manual registration
curl -X POST "http://localhost:8081/tools/register/manual" \
-H "Content-Type: application/json" \
-d '[{"name":"getStore","httpMethod":"GET","endpoint":"/stores/{id}","baseUrl":"http://localhost:8080","pathParams":{"id":"integer"}}]'
# List tools
curl "http://localhost:8081/tools/list?baseUrl=http://localhost:8080"
# Delete tools
curl -X DELETE "http://localhost:8081/tools/delete" \
-H "Content-Type: application/json" \
-d '["http_localhost_8080_getStore"]'# Edit config (macOS)
open ~/Library/Application\ Support/Claude/claude_desktop_config.json
# Restart Claude Desktop
# Close app completely, then reopenThis guide covered:
✅ Claude Desktop Connection - SSE-based MCP protocol connection
✅ Postman Testing - REST API tool registration and management
✅ Complete Workflow - End-to-end setup and usage
✅ Troubleshooting - Common issues and solutions
✅ Best Practices - Security and usage recommendations
Key Takeaway: Register tools via Postman REST API → Use tools via Claude Desktop MCP connection!