ThinMCP
ThinMCP
ThinMCP ist ein MCP-Gateway, das viele Upstream-MCP-Server über eine stabile Zwei-Tool-Schnittstelle bereitstellt:
search()execute()
Anstatt jede Upstream-Tool-Definition in den Modellkontext zu laden, führt ThinMCP einen lokalen Katalog, lässt das Modell Tools bei Bedarf entdecken und leitet nur die Aufrufe weiter, die tatsächlich getätigt werden müssen.
Warum ThinMCP
Das direkte Verbinden mehrerer MCP-Server mit einem Modell erhöht die Kontextgröße, wenn die Anzahl der Tools wächst. ThinMCP hält die für das Modell sichtbare Oberfläche konstant und ermöglicht dennoch den Zugriff auf ein großes Tool-Ökosystem.
Das Ergebnis ist ein einfacherer Integrationspunkt für Clients und eine vorhersehbarere Laufzeitstruktur für Produktionsbereitstellungen.
Architektur
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"]Hauptfunktionen
Feste Zwei-Tool-Schnittstelle für das Modell
Unterstützung für HTTP- und stdio-Upstream-Server
Lokaler, SQLite-basierter Katalog zur Erkennung
Eingabevalidierung vor der Upstream-Ausführung
Sandbox-Ausführung für Gateway-Tool-Aufrufe
HTTP-Transport mit Health- und Metrics-Endpunkten
Periodische Synchronisierung von Upstream-Tool-Metadaten
Schnellstart
npm install
npm run build
cp config/mcp-sources.example.yaml config/mcp-sources.yamlBearbeiten Sie config/mcp-sources.yaml, synchronisieren Sie dann und starten Sie:
npm run sync
npm startHTTP-Modus:
npm start -- --transport http --port 8787Validieren Sie das Setup:
npm run doctorKonfiguration
ThinMCP liest config/mcp-sources.yaml. Jeder Upstream-Server kann entweder den http- oder stdio-Transport verwenden.
Minimales Beispiel:
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: ../snapshotsVerwenden Sie allowTools, um jeden Upstream-Server auf die Tools zu beschränken, die tatsächlich über das Gateway bereitgestellt werden sollen.
ThinMCP ausführen
Entwicklung:
npm run devProduktions-Build:
npm run build
npm startHTTP-Modus:
npm start -- --transport http --host 127.0.0.1 --port 8787Verfügbare HTTP-Endpunkte:
/mcp/healthz/metrics
Betrieb
Allgemeine Befehle:
npm run build
npm run sync
npm run doctor
npm test
THINMCP_RUN_E2E=1 npm run test:e2eBetriebshinweise:
Bewahren Sie Upstream-Anmeldedaten in Umgebungsvariablen auf
Beschränken Sie
allowToolsauf die kleinstmögliche nützliche OberflächeAktivieren Sie HTTP-Authentifizierung und Ratenbegrenzung, wenn das Gateway über die lokale Entwicklung hinaus bereitgestellt wird
Führen Sie
npm run syncals Teil der Bereitstellung oder Startvalidierung aus, wenn die Aktualität des Katalogs wichtig ist
Client-Integration
Client-Beispiele sind in docs/CLIENT_INTEGRATIONS.md dokumentiert.
Lizenz
ISC
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/VenkatGGG/ThinMCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server