ajaymd/standalone-mcp-server
3.2
If you are the rightful owner of standalone-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
This repository contains a starter Standalone Java MCP Server that handles MCP-style JSON messages over WebSocket and forwards tool requests to a Spring Boot internal API via REST.
Tools
3
Resources
0
Prompts
0
Standalone Java MCP Server
This repository contains a starter Standalone Java MCP Server that accepts MCP-style JSON messages over WebSocket and forwards tool requests to a Spring Boot internal API via REST.
Features
- WebSocket endpoint:
/mcp/ws - ToolManager with example tools:
query_db,read_logs,call_service - SpringBootProxyClient to call protected internal APIs (
X-API-KEY) - Configurable via
application.yml
Run locally
- Build:
mvn clean package - Run:
java -jar target/standalone-java-mcp-server-0.1.0.jar - Connect a WebSocket client to
ws://localhost:8081/mcp/ws
Example message
{
"id": "req-1",
"tool": "read_logs",
"input": { "path": "/var/log/app.log" }
}
Next steps
- Add authentication (mTLS or OAuth)
- Add tool allowlist & RBAC
- Add tests and CI (GitHub Actions)