runtime-mcp-connect
runtime-mcp
Der Live-Zustand deiner App — Logs, DB-Schema, Config, Feature-Flags — als MCP-Tools für Coding-Agenten.
Wirf es in deine App. Dein Agent hört auf zu raten.
Wenn opencode, Claude Code oder Cursor deine App debuggen, arbeiten sie blind: veraltete Annahmen über dein Schema, kopierte Log-Fragmente, erfundene Config-Werte.
runtime-mcp schließt diese Lücke. Zwei Zeilen Setup und jeder MCP-fähige Agent kann sehen, was dein laufender Prozess tatsächlich sieht:
Agent: "why is checkout failing?"
├─ get_errors → TypeError at checkout.ts:42, full stack trace
├─ db_query → orders table has no `coupon_id` column
├─ config:// → STRIPE_KEY: [REDACTED], TAX_RATE: 0 ← there it is
└─ "Found it — you renamed the env var."Schnellstart
0 — Installieren:
npm install runtime-mcp runtime-mcp-integrations1 — Deine App instrumentieren (ein Import):
import { runtimeMcp } from 'runtime-mcp';
import { pgAdapter } from 'runtime-mcp-integrations/pg';
await runtimeMcp({
db: pgAdapter(pool),
config: process.env,
flags: myFlagRegistry,
});2 — Den Shim registrieren in deiner .mcp.json:
{
"mcpServers": {
"runtime": { "command": "npx", "args": ["-y", "runtime-mcp-connect"] }
}
}3 — Deine App starten. Fertig. Der Agent verbindet sich automatisch und sieht von da an den Live-Zustand.
Related MCP server: Engineering Intelligence MCP
Was Agenten bekommen
Tools
Tool | Beschreibung |
| Aktuelle Logs · filtern nach Level, Freitext, Zeitfenster |
| Fehlereinträge mit Stack-Traces — erster Anlaufpunkt, wenn etwas schiefgeht |
| Read-only SQL ( |
| Name, Version, PID, Uptime, registrierte Routen |
Ressourcen
Ressource | Beschreibung |
| Live-Config mit durch |
| Feature-Flag-Status pro Umgebung |
| Tabellenübersicht |
| Spalten, Primary Keys, Indizes, Foreign Keys |
Architektur
┌──────────────────────────────┐ ┌─────────────────────────────┐
│ Your App │ │ Agent (opencode/Claude) │
│ │ │ │
│ runtimeMcp({ db, config }) │ │ .mcp.json │
│ ├─ log ring buffer │ │ └─ runtime-mcp-connect │
│ ├─ schema introspection │ │ │ stdio │
│ ├─ config + redaction │◄─────────┼──────────┘ │
│ └─ feature flags │ loopback│ │
│ │ HTTP │ │
│ 127.0.0.1:<port>/mcp │ │ │
│ .runtime-mcp.json ──────────┼─ pid·url·token·(chmod 600) │
└──────────────────────────────┘ └─────────────────────────────┘Warum zwei Komponenten? Agenten starten eigene Prozesse — sie können nicht direkt in deine App hineinschauen. Die Discovery-Datei überbrückt das: Die Library schreibt sie beim Boot, der Shim liest sie bei jedem Aufruf. App mit neuem Port oder Token neu gestartet? Der Shim verbindet sich automatisch neu. Nichts muss neu konfiguriert werden. Nie.
Adapter
npm install runtime-mcp runtime-mcp-integrationsStrukturiertes Logging-Beispiel:
import pino from 'pino';
import { createRuntimeMcpPinoDestination } from 'runtime-mcp-integrations/pino';
const logger = pino(pino.multistream([
pino.destination(1),
createRuntimeMcpPinoDestination(),
]));Kein Logger eingebunden? Console-Capture ist standardmäßig aktiv — console.error und Co. fließen in denselben Puffer.
Sicherheitsmodell
Gedacht für lokale Entwicklung und Staging. Defense in Depth standardmäßig:
Kontrolle | Verhalten |
Loopback-Bindung | Endpoint lauscht nur auf |
Token | Bearer-Token pro App-Start, gespeichert mit chmod 600 in |
Read-only SQL | Allowlist-Parser: Nicht- |
Secret-Redaktion | Password/Token/Key-förmige Schlüssel und bekannte Token-Formate werden zu |
Keine Telemetrie | Null Datenabfluss |
.runtime-mcp.json in die .gitignore aufnehmen.
Warum jetzt
Bestehende Lösung | Einschränkung |
Next.js 16 | Framework-gebunden |
Vercel Runtime Logs MCP | Nur Cloud-Plattform |
Datadog / Sentry / Supabase MCPs | SaaS-Konten; nicht dein lokaler Dev-Prozess |
Jede Plattform baut das nach innen. Niemand hat es generisch gebaut. Das hier ist generisch.
Demo
pnpm install && pnpm -r build
pnpm --filter @runtime-mcp/demo-app devpackages/demo-app ist ein Express + SQLite Store mit zwei absichtlich eingebauten Bugs — ein N+1-Query auf /orders und eine falsch benannte DEMO_TAX_RATE-Env-Var, die die Mehrwertsteuer beim Checkout stillschweigend auf null setzt. Zeig deinen Agenten darauf und frag: "Warum stimmen die Warenkorb-Summen nicht?"
Pakete
Alle Pakete sind auf npm veröffentlicht (v0.1.0):
Paket | npm | Zweck |
In-Process-Registry · Loopback-Endpoint · Discovery · Redaktion | ||
stdio-Shim, den Agenten in | ||
Framework-, Logger- und Datenbank-Adapter | ||
— | Debug-Demo mit eingebauten Bugs (nur im Repo) |
Erfordert Node ≥ 20. ESM.
Entwicklung
pnpm install
pnpm -r build
pnpm test # unit + end-to-end over real HTTP and stdio transportsLive-Log-Tailing über MCP-Ressourcen-Abos
Fastify-/Hono-Adapter
MySQL-/Drizzle-Introspection-Adapter
Python-SDK-Parität (FastAPI / Django)
Multi-Projekt-Workspaces im Connect-Shim
Lizenz
This server cannot be deployed
Maintenance
Related MCP Connectors
- SuperlogOAuthsh.superlog
Open-source agent that observes and fixes your application. Query logs, traces, metrics, incidents.
Deploy local apps, add managed Postgres, and inspect logs from your AI coding agent.
Safe, read-only Postgres and MySQL access for AI agents. Audit log + column-level controls.
- BugTapeOAuthai.bugtape
Production bugs with replay, network, console and stack, ranked for your coding agent to fix.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceGives AI coding assistants live, structured access to running apps' state and UI elements, enabling real-time verification and interaction across web, mobile, and desktop.36-
- AlicenseNot gradedqualityDmaintenanceEnables AI clients to inspect backend systems through structured engineering tools including Git history, Winston logs, OpenAPI contracts, and sandboxed source code.2ISC
- AlicenseNot gradedqualityBmaintenanceEnables coding agents to access live runtime observability data such as logs, deploys, and health metrics for evidence-based incident triage.1MIT
- FlicenseAqualityBmaintenanceProvides AI coding agents with real-time visibility into local development runtime state, enabling them to tail application logs, inspect ports, monitor process metrics, and diagnose network errors.1-