asunil2k/java-mcp-server
3.1
If you are the rightful owner of java-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 document provides a comprehensive overview of a Model Context Protocol (MCP) server, detailing its features, tools, resources, and usage instructions.
Tools
2
Resources
0
Prompts
0
Quick start (Docker Compose)
cp .env.example .env
docker-compose up --build
Server available at http://localhost:4000
Build & Run locally
mvn clean package -DskipTests
java -jar target/mcp-server-0.1.0.jar
RPC examples
Call API tool:
curl -X POST http://localhost:4000/rpc \
-H "Authorization: Bearer demo-key-123" \
-H "Content-Type: application/json" \
-d '{"tool":"call_api","input":{"url":"https://api.github.com"}}'
Call db_query tool (SELECT only):
curl -X POST http://localhost:4000/rpc \
-H "Authorization: Bearer demo-key-123" \
-H "Content-Type: application/json" \
-d '{"tool":"db_query","input":{"sql":"SELECT * FROM userinfo WHERE userid=?","params":[1]}}'