runtime-mcp-connect
Captures Express request failures into the runtime error buffer via error middleware, making them available to agents.
Mirrors Pino log output into the runtime log buffer so agents can query application logs.
Provides read-only querying and schema introspection for a PrismaClient-connected Postgres database.
Provides database introspection and read-only SQL querying for node:sqlite DatabaseSync instances.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@runtime-mcp-connectwhy is checkout failing? check recent errors and the orders table schema"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
runtime-mcp
Your app's live runtime state — logs, DB schema, config, feature flags — as MCP tools for coding agents.
Drop it into your app. Your agent stops guessing.
When opencode, Claude Code, or Cursor debug your app today, they work blind: stale guesses about your schema, pasted log fragments, invented config values.
runtime-mcp closes that gap. Two lines of setup and any MCP-speaking agent can query what your running process actually sees:
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."Quickstart
0 — Install:
npm install runtime-mcp runtime-mcp-integrations1 — Instrument your app (one import):
import { runtimeMcp } from 'runtime-mcp';
import { pgAdapter } from 'runtime-mcp-integrations/pg';
await runtimeMcp({
db: pgAdapter(pool),
config: process.env,
flags: myFlagRegistry,
});2 — Register the shim in your project's .mcp.json:
{
"mcpServers": {
"runtime": { "command": "npx", "args": ["-y", "runtime-mcp-connect"] }
}
}3 — Start your app. That's it. The agent connects automatically and sees live state from then on.
What agents get
Tools
Tool | Description |
| Recent logs · filter by level, free-text query, time window |
| Error entries with stack traces — first call when something broke |
| Read-only SQL ( |
| Name, version, PID, uptime, registered routes |
Resources
Resource | Description |
| Live config with secrets replaced by |
| Feature flag states per environment |
| Table inventory |
| Columns, primary keys, indexes, foreign keys |
Architecture
┌──────────────────────────────┐ ┌─────────────────────────────┐
│ 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) │
└──────────────────────────────┘ └─────────────────────────────┘Why two pieces? Agents spawn their own processes — they can't reach into your app. The discovery file bridges them: the library writes it on boot, the shim reads it on every call. App restarted with a new port or token? The shim reconnects automatically. Nothing to reconfigure, ever.
Adapters
npm install runtime-mcp runtime-mcp-integrationsStructured logging example:
import pino from 'pino';
import { createRuntimeMcpPinoDestination } from 'runtime-mcp-integrations/pino';
const logger = pino(pino.multistream([
pino.destination(1),
createRuntimeMcpPinoDestination(),
]));No logger wired up? Console capture is on by default — console.error and friends flow into the same buffer.
Security model
Built for local development and staging. Defense in depth by default:
Control | Behavior |
Loopback bind | Endpoint listens on |
Token auth | Bearer token per app start, stored chmod 600 in |
Read-only SQL | Allowlist parser: non- |
Secret redaction | Password/token/key/auth-shaped keys and known token formats become |
No telemetry | Zero phone-home |
Add .runtime-mcp.json to .gitignore.
Why now
Existing solution | Limitation |
Next.js 16 | Framework-locked |
Vercel runtime logs MCP | Cloud platform only |
Datadog / Sentry / Supabase MCPs | SaaS accounts; not your live dev process |
Every platform is building this inward. Nobody built it generically. This is that.
Demo
packages/demo-app is an Express + SQLite store with two planted bugs — an N+1 query on /orders, and a misnamed DEMO_TAX_RATE env var that silently zeroes checkout tax. Point your agent at it and ask "why are checkout totals wrong?"
pnpm install && pnpm -r build
pnpm --filter @runtime-mcp/demo-app devPackages
All packages are published to npm (v0.1.0):
Package | npm | Purpose |
In-process registry · loopback endpoint · discovery · redaction | ||
stdio shim agents register in | ||
Framework, logger, and database adapters | ||
— | Debugging demo with planted bugs (repo only) |
Requires Node ≥ 20. ESM.
Development
pnpm install
pnpm -r build
pnpm test # unit + end-to-end over real HTTP and stdio transportsLive log tailing via MCP resource subscriptions
Fastify / Hono adapters
MySQL / Drizzle introspection adapters
Python SDK parity (FastAPI / Django)
Multi-project workspaces in the connect shim
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
Read-only bank access for your AI agent. Connects Claude, ChatGPT, Cursor, Gemini, Codex.
Shared, permission-aware company context for AI agents, with provenance, approvals and audit.
Read-only access to Auralogs production logs: search logs, inspect errors, review AI analyses.
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/limjonathan/runtime-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server