loading…
Search for a command to run...
loading…
A local MCP gateway that compresses multiple upstream servers into two tools, search and execute, to minimize model context usage. It provides a compact, code-d
A local MCP gateway that compresses multiple upstream servers into two tools, search and execute, to minimize model context usage. It provides a compact, code-driven interface for discovering and calling tools across various upstream sources on demand.
ThinMCP is an MCP gateway that exposes many upstream MCP servers through a stable two-tool interface:
search()execute()Instead of loading every upstream tool definition into model context, ThinMCP keeps a local catalog, lets the model discover tools on demand, and forwards only the calls it needs to make.
Connecting multiple MCP servers directly to a model increases context size as tool count grows. ThinMCP keeps the model-facing surface area fixed while still allowing access to a large tool ecosystem.
The result is a simpler integration point for clients and a more predictable runtime shape for production deployments.
flowchart LR
A["LLM or MCP Client"] --> B["ThinMCP Gateway"]
B --> C["Local Catalog"]
B --> D["Execution Layer"]
D --> E["Schema Validation"]
E --> F["Upstream MCP Servers"]
G["Sync Process"] --> F
G --> C
G --> H["Snapshots"]
npm install
npm run build
cp config/mcp-sources.example.yaml config/mcp-sources.yaml
Edit config/mcp-sources.yaml, then sync and start:
npm run sync
npm start
HTTP mode:
npm start -- --transport http --port 8787
Validate the setup:
npm run doctor
ThinMCP reads config/mcp-sources.yaml. Each upstream server can use either http or stdio transport.
Minimal example:
servers:
- id: exa
name: Exa MCP
transport: http
url: https://mcp.exa.ai/mcp
auth:
type: bearer_env
env: EXA_API_KEY
allowTools: ["*"]
- id: local-fs
name: Local Filesystem MCP
transport: stdio
command: npx
args:
- -y
- "@modelcontextprotocol/server-filesystem"
- /tmp
cwd: .
allowTools:
- "filesystem.*"
sync:
intervalSeconds: 300
onStart: true
runtime:
codeTimeoutMs: 15000
maxCodeLength: 20000
maxResultChars: 60000
catalog:
dbPath: ../data/thinmcp.db
snapshotDir: ../snapshots
Use allowTools to keep each upstream server scoped to the tools you actually want exposed through the gateway.
Development:
npm run dev
Production build:
npm run build
npm start
HTTP mode:
npm start -- --transport http --host 127.0.0.1 --port 8787
Available HTTP endpoints:
/mcp/healthz/metricsCommon commands:
npm run build
npm run sync
npm run doctor
npm test
THINMCP_RUN_E2E=1 npm run test:e2e
Operational guidance:
allowTools to the smallest useful surface areanpm run sync as part of deployment or startup validation if catalog freshness mattersClient examples are documented in docs/CLIENT_INTEGRATIONS.md.
ISC
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"thinmcp": {
"command": "npx",
"args": []
}
}
}PRs, issues, code search, CI status
Database, auth and storage
Reference / test server with prompts, resources, and tools.
Secure file operations with configurable access controls.