mcp-prov
mcp-prov
Lokaler MCP-Proxy in Python, der einen bestehenden MCP-Server in n8n umschließt (die Metrotel-Bereitstellungsinstanz). Er fügt Cache, Logging, zusammengesetztes Diagnose-Tool und eigenen Bearer-Auth hinzu, ohne das Backend anzufassen.
Docker-Hub-Image: metrotel/mcp-prov
🌐 Spricht stdio (Claude Code / eingebettete Clients) oder HTTP (Claude Desktop und andere)
🔐 Isoliert das Upstream-Token: Es verlässt den Client nie
⚡ In-Memory-Cache 60s für idempotente Lesevorgänge (Konfiguration über Umgebungsvariable)
📝 JSON-Lines-Log für jeden Tool-Aufruf (
tool,args,cached,duration_ms,error)🛠 Stellt die 32 Upstream-Tools plus ein zusammengesetztes Tool
diagnostico_completobereit♻️ Initialisiert die Sitzung neu, wenn das Upstream sie schließt (bekannter n8n-MCP-Bug)
🚀 Deployment: Docker / Docker Swarm / Kubernetes / systemd-User-Unit / eigenständiges Python
💾 Volume
/datafür persistente Logs (und zukünftigen Cache)
Warum es existiert
Der in den n8n-Flow von Metrotel eingebettete MCP-Server schließt das Long-Poll-SSE
nach einer Zeit der Inaktivität, und Clients wie mcp-remote beginnen mit
lautstarken Wiederholungsversuchen. Außerdem lebte das Upstream-Token im Klartext in JSON-Konfigurationen.
Dieser Proxy:
Beseitigt das Long-Poll: Jeder Tool-Aufruf öffnet seine eigene HTTP-Anfrage zum Upstream und schließt sie nach Abschluss.
Isoliert das Upstream-Token (
X-Prov-MCP-Key): Es lebt nur in der Env-Datei des Proxys, nicht in Claude-Desktop-/Claude-Code-Konfigurationen.Fügt Cache für sich wiederholende Lesevorgänge hinzu (z. B. dasselbe
contexto_serviciomehrmals innerhalb weniger Minuten).Fügt ein zusammengesetztes Tool hinzu, das mehrere Upstream-Tools verkettet und eine Zusammenfassung zurückgibt – so muss das Modell nicht 3 Aufrufe orchestrieren, wenn es nur einen anfordern kann.
Related MCP server: @qelos/better-mcp
Voraussetzungen
Python 3.10+
uv(empfohlen, oderpip)Netzwerkzugriff auf den Upstream-MCP-Server und den gültigen Header
X-Prov-MCP-Key
Schnellstart
Docker (empfohlen, ohne lokalen Build)
docker run -d --name prov-mcp -p 8767:8767 \
-e PROV_MCP_KEY='pmcc_...' \
-e PROV_MCP_AUTH_TOKEN='pmcp_...' \
-v prov-data:/data \
--restart unless-stopped \
metrotel/mcp-prov:0.2.2Oder mit docker-compose.yml aus dem Repository:
git clone https://github.com/datacenter-metrotel/mcp-prov.git
cd mcp-prov
cp .env.example .env && chmod 600 .env # editá .env
docker compose up -dLog persistent im Volume prov-data (gemountet auf /data/logs):
docker exec prov-mcp tail -f /data/logs/calls.logNativer HTTP-Modus (ohne Docker)
git clone https://github.com/datacenter-metrotel/mcp-prov.git
cd mcp-prov
cp .env.example .env
chmod 600 .env
# editá .env con los valores reales
# Arrancar en foreground
uvx --from . prov-mcp-proxy
# server escuchando en http://0.0.0.0:8767/mcpÜberprüfen:
KEY=$(grep '^PROV_MCP_AUTH_TOKEN=' .env | cut -d= -f2)
curl -sS -L -X POST http://127.0.0.1:8767/mcp \
-H "Authorization: Bearer $KEY" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
--data '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1"}}}'Stdio-Modus (für Claude Code / Cursor oder andere Clients, die den Prozess starten)
export PROV_MCP_KEY='pmcc_...'
export PROV_MCP_TRANSPORT=stdio
uvx --from . prov-mcp-proxyUnd in .mcp.json (Claude Code):
{
"mcpServers": {
"prov": {
"command": "uvx",
"args": ["--from", "/ruta/al/repo", "prov-mcp-proxy"],
"env": { "PROV_MCP_KEY": "${PROV_MCP_KEY}" }
}
}
}Deployment in Kubernetes / Docker Swarm
Kubernetes mit
envFrom.secretRef+PersistentVolumeClaim: siehek8s/README.md.Docker Swarm mit in Raft verschlüsselten Secrets + Volume: siehe
swarm/README.md.
Deployment als systemd-User-Unit
Vorlage in systemd/prov-mcp-proxy.service.example:
mkdir -p ~/.config/systemd/user ~/.config/prov-mcp-proxy
cp systemd/prov-mcp-proxy.service.example ~/.config/systemd/user/prov-mcp-proxy.service
cp .env.example ~/.config/prov-mcp-proxy/env
chmod 600 ~/.config/prov-mcp-proxy/env
# editá ~/.config/prov-mcp-proxy/env con los valores reales
systemctl --user daemon-reload
systemctl --user enable --now prov-mcp-proxy.service
systemctl --user status prov-mcp-proxy.serviceDamit es Neustarts ohne Login überlebt:
sudo loginctl enable-linger $USER.
Verwendung von Claude Desktop
claude_desktop_config.json bearbeiten:
{
"mcpServers": {
"prov": {
"command": "npx",
"args": [
"-y", "mcp-remote",
"http://<HOST_IP>:8767/mcp",
"--allow-http",
"--transport", "http-only",
"--header", "Authorization:Bearer <PROV_MCP_AUTH_TOKEN>"
]
}
}
}Pfade der Konfiguration:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.jsonLinux (Community):
~/.config/Claude/claude_desktop_config.json
Vollständiges Beispiel in examples/claude_desktop_config.example.json.
Umgebungsvariablen
Variable | Erforderlich | Standard | Beschreibung |
| ✅ | — | Header |
| ✅ (wenn | — | Bearer, den MCP-Clients in |
| ❌ |
| Upstream-Endpunkt |
| ❌ |
|
|
| ❌ |
| Bind des HTTP-Listeners |
| ❌ |
| Port |
| ❌ |
| Pfad des Endpunkts |
| ❌ |
| Cache-TTL in Sekunden (0 = aus) |
| ❌ |
| Verzeichnis des JSON-Lines-Logs |
Bereitgestellte Tools
Alle Tools des Upstreams werden unverändert wieder bereitgestellt (zum Zeitpunkt des Schreibens 32), plus ein zusammengesetztes:
diagnostico_completo(service_number)– ruftcontexto_servicio→Topologia→ (wenn das Unterprodukt ISI ist)ISI_Check_IPauf und gibt eine gruppierte Zusammenfassung zurück. Nützlich als „Einstiegspunkt“ für eine schnelle Diagnose eines Dienstes anhand seiner Nummer.
Details zu den Upstream-Tools finden Sie in der Postman-Sammlung in
postman/.
Cache
Tools, die niemals gecacht werden (aktive Effekte oder volatile Daten):
Ping_toolATA_Test_1,ATA_Test_2,ATA_Test_3Gestion_ACSObtener_backup_equipo
Der Rest wird mit konfigurierbarem TTL (Standard 60s) in den Cache aufgenommen. Der Schlüssel enthält Tool-Name + SHA1-Hash der normalisierten Argumente.
Log
Jeder Tool-Aufruf wird in ~/.cache/prov_mcp_proxy/calls.log als eine
JSON-Zeile mit ts, tool, args, cached, duration_ms, error registriert.
Automatische Rotation 5 MB × 3.
Sicherheit
Siehe SECURITY.md. Zusammenfassung:
Bearer im HTTP-Modus obligatorisch (Starlette-Middleware).
Upstream-Token verlässt den Proxy nie.
Env-Datei mit Zugangsdaten mit
chmod 600, außerhalb von Git..envin.gitignore.
Lizenz
MIT – siehe LICENSE.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
MCP server for secureFlows: token-free URL builders and integration-linting tools for AI agents.
Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
Related MCP Servers
- AlicenseAqualityAmaintenanceLocal-first MCP proxy with BM25 tool discovery, quarantine security, Docker isolation, OAuth support, activity logging, and web UI. Routes multiple upstream MCP servers through a single endpoint.9334MIT
- AlicenseAqualityDmaintenanceA stdio MCP proxy that connects to one or more upstream MCP servers and exposes their tools, resources, and prompts through a single endpoint with a configurable middleware pipeline.14163MIT
- AlicenseNot gradedqualityBmaintenanceA standalone MCP server that exposes Rancher-side tools, forwards Authorization headers or uses configured credentials, and supports HTTP and stdio transports.MIT
- AlicenseNot gradedqualityAmaintenanceLifts local stdio MCP servers into remote Streamable HTTP endpoints for cloud-hosted AI clients, with bearer-token auth and tool policy filtering.15MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/datacenter-metrotel/mcp-prov'
If you have feedback or need assistance with the MCP directory API, please join our Discord server