MCP Client Service (Gateway)
Central gateway that discovers, registers, and routes tool calls to individual MCP tool servers.
- Tech: Python, FastAPI
- Port: 8000
- Auth:
x-jeen-mcp-service-secretheader
Endpoints
| Method | Path | Auth | Description |
|---|---|---|---|
| GET | /mcp/v1/tools/list-tools | Secret header | List all available tools across all registered servers |
| POST | /mcp/v1/tools/call-tool | Secret header | Execute a tool by name with arguments |
GET /mcp/v1/tools/list-tools
Returns an aggregated list of all tools from all registered MCP servers. Each tool includes its name, description, and input schema (JSON Schema).
POST /mcp/v1/tools/call-tool
Routes a tool call to the correct MCP server based on the tool name.
Request:
{
"name": "search_documents",
"arguments": {
"queries": ["kubernetes pod scheduling"],
"similarityTopK": 10
}
}
Response: Tool-specific result.
How It Works
- Startup: The
ToolRegistryconnects to every configured MCP server and fetches their tool lists - Registration: Each tool name is mapped to its source server in an in-memory registry
- List tools: Returns all tools from the registry
- Call tool: Looks up the tool name in the registry, finds the source server, and forwards the call
Configuration
Development (config.json)
[
{
"name": "demo-server",
"url": "http://127.0.0.1:3001/mcp"
},
{
"name": "mcp-rag-tool",
"url": "http://127.0.0.1:3002/mcp"
}
]
A JSON array where each entry has a name (server identifier) and url (MCP endpoint).
Production
Server configurations are fetched from llm-core via HTTP (GET /services-config/mcp-servers), not from the local config file. The LLM_CORE_URL environment variable must be set.
Transport
Uses the MCP Streamable HTTP transport to communicate with tool servers. The Python mcp SDK v1.8.1 handles connection management.