Bun Runtime Mcp — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Bun Runtime Mcp (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Drop-in MCP server that lets Claude inspect, debug, and hot-fix your running Bun process through conversation.
One line of code. Claude can now see inside your running Bun server — memory, queries, traffic, errors, everything.
import { attachMCP } from 'runtime-mcp';
attachMCP({ port: 3100 }); // that's itYour Bun process now speaks MCP. Connect Claude Desktop, Cursor, or any MCP client and start asking questions about your live app.
Debugging a running app today means adding logging, restarting, and hoping you guessed the right thing to log. LLMs can read your source code, but they can't see your runtime state — the variable values, the open connections, the slow queries, the memory growth.
runtime-mcp fixes that. It exposes your process internals as MCP resources and tools, so the LLM examines the live patient instead of guessing from the chart.
bun add runtime-mcpimport { serve } from 'bun';
import { attachMCP } from 'runtime-mcp';
const server = serve({
port: 3000,
fetch: () => new Response('Hello'),
});
attachMCP({
port: 3100,
bind: { server },
});Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"my-app": {
"url": "http://localhost:3100/sse"
}
}
}Restart Claude Desktop. Ask: "What is this process doing?"
| Resource | URI | Description |
|---|---|---|
| Process info | runtime://process/info | PID, uptime, Bun version, entrypoint, env vars |
| Memory | runtime://process/memory | RSS, heap used/total, external, array buffers |
| Event loop | runtime://process/event-loop | Pending timers, active handles, loop lag |
| HTTP routes | runtime://server/routes | All registered routes, active connections, req/min |
| Request log | runtime://server/requests | Recent HTTP requests with status, duration, bodies |
| Errors | runtime://errors/recent | Uncaught exceptions and unhandled rejections (deduplicated) |
| DB connections | runtime://db/connections | Pool state, recent queries, slow queries |
| Module graph | runtime://modules/graph | Full dependency tree from entrypoint |
| WebSockets | runtime://websockets | Active connections, message counts |
| Variables | runtime://variables/{path} | Inspect any bound variable by dot-path |
| Tool | Description |
|---|---|
inspect | Deep-inspect any reachable object by expression |
eval | Execute JavaScript in the process context |
get_source | Read source files from the running process |
intercept_requests | Capture HTTP traffic matching a glob pattern |
intercept_sql | Capture SQL queries matching a substring |
subscribe_events | Stream real-time events (requests, errors, queries) |
heap_snapshot | Take a V8 heap snapshot, diff against previous |
profile | CPU profile for N milliseconds* |
set_breakpoint | Conditional breakpoints with state capture* |
hot_patch | Replace a module's code at runtime without restart |
shell | Run read-only shell commands in the process cwd |
\Requires node:inspector — not yet available in Bun (tracking issue).*
| Prompt | Description |
|---|---|
debug-endpoint | Systematically debug a specific HTTP endpoint |
find-memory-leak | Snapshot, wait, diff, identify growing allocations |
explain-process | Full overview of what the process is doing right now |
generate-tests | Watch live traffic and generate test cases from it |
optimize-query | Find slow queries, explain plans, suggest fixes |
attachMCP({
// Transport
port: 3100, // MCP server port (default: 3100)
host: 'localhost', // Bind address (default: 'localhost')
// What to expose
bind: { // Objects the LLM can inspect/eval against
server,
db,
config,
},
// Access control
readOnly: false, // Disable eval, hot_patch, shell (default: true in production)
allowedTools: undefined, // Whitelist specific tools
blockedTools: undefined, // Blacklist specific tools
// Observation tuning
requestLog: {
maxSize: 1000, // Ring buffer size
includeBodies: true, // Capture req/res bodies (default: false in production)
},
sqlLog: {
maxSize: 500,
includeParams: true, // Capture query params (default: false in production)
slowThreshold: 500, // Slow query threshold in ms
},
// Remote access (requires auth)
auth: 'your-secret-token', // Required when host !== localhost
});When NODE_ENV=production, runtime-mcp automatically:
readOnly: true — disables eval, hot_patch, shellPass objects to bind to make them accessible to Claude:
import { serve } from 'bun';
import { SQL } from 'bun';
import { attachMCP } from 'runtime-mcp';
const db = new SQL('postgres://localhost/myapp');
const server = serve({ port: 3000, fetch: handleRequest });
const config = { featureFlags: { newCheckout: true }, rateLimit: 100 };
attachMCP({
port: 3100,
bind: { server, db, config },
});runtime-mcp auto-detects:
Everything else is available through inspect and eval by name.
localhost only by defaultauth option (Bearer token)rm, kill, shutdown, etc.)This is a development tool. Treat the MCP port like a debugger port — don't expose it to the internet.
This project was built in a single session using Ralph, an autonomous AI agent loop. A PRD was written, converted to a task list, and Ralph implemented all 22 user stories sequentially — each one adding a resource, tool, or interceptor layer.
MIT
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.