runtime-mcp
Connects to local SQLite databases in read-only mode and extracts live schema information, including tables, column types, primary and foreign keys, indexes, and row counts, so AI agents can work from verified database structure instead of assumptions.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
๐ runtime-mcp: Live Runtime MCP Bridge for AI Agents
Eliminate environment and runtime hallucinations.
runtime-mcpbridges the gap between static code analysis and live application runtime. It transparently inspects live SQLite schemas, intercepts live HTTP errors (4xx/5xx) through an async local reverse proxy, extracts log stack traces, and serves an instant, compact state snapshot to Antigravity, Claude Code, and Cursor via the Model Context Protocol (MCP).
๐ The Problem
Modern AI coding agents (Claude, Cursor, Antigravity) are exceptional at reading static code, but they are completely blind to your application's actual runtime state:
Database Hallucinations: Because migrations are often complex or out-of-sync, agents frequently invent non-existent database columns, missing types, or incorrect foreign keys.
Copy-Paste Friction: When an API returns a
500 Internal Server Error, you have to manually copy payloads, headers, and terminal stack traces back into chat.Stale Context: Agents suggest code changes based on assumptions rather than verified ground-truth runtime state.
Related MCP server: Alma Atlas
โก The Solution
runtime-mcp acts as a zero-overhead live telemetry sidecar for your local development stack:
โโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Browser / Frontend โ โโโโโโ> โ runtime-mcp tap (:8090) โ โโโโโ> โโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโ โ (Captures 4xx/5xx failures) โ โ Local App (:3000) โ
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโ
โ
.runtime_state.json
โ
โโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโ
โ AI Assistant โ <====== โ runtime-mcp serve (MCP) โ
โ (Antigravity/Claude) โ stdio โ - get_live_db_schema() โ <โโโโโ SQLite DB (?mode=ro)
โโโโโโโโโโโโโโโโโโโโโโโโ โ - get_recent_http_errors() โ
โ - get_runtime_snapshot() โ <โโโโโ App Logs (*.log)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโDatabaseSchemaTap: Connects to your local SQLite database in read-only URI mode (
?mode=ro). Extracts real tables, column types, primary/foreign keys, indexes, and row counts into an ultra-compact, hallucination-resistant Markdown schema.HttpTap: An asynchronous local reverse proxy (
asyncio+httpx) listening on:8090(or custom port) and forwarding to your backend (:3000,:8000, etc.). Automatically captures requests and deep response bodies for4xx/5xxfailures into a thread-safe ring buffer.LogTailTap: Automatically tails your application log file and parses Python (
Traceback (most recent call last)...) and Node.js (Error: ... at ...) stack traces, as well asERRORandCRITICALlog events.Zero-Latency State Store: Synchronizes runtime events between the CLI proxy process and the MCP server process using an atomic, cross-platform file buffer (
.runtime_state.json).
๐ Quickstart
1. Installation
Requires Python 3.14+:
# Clone the repository
git clone https://github.com/your-username/runtime-mcp.git
cd runtime-mcp
# Create and activate virtual environment
python3 -m venv .venv
# macOS / Linux
source .venv/bin/activate
# Windows (PowerShell)
# .venv\Scripts\Activate.ps1
# Install in editable mode
pip install -e .2. Run the Live Traffic Tap
Start the interceptor proxy, binding your backend port, database, and log file:
# macOS / Linux / Windows
python -m src.cli tap --listen 8090 --target 3000 --db ./app.db --log ./app.logNow, point your frontend or API client to http://localhost:8090 instead of 3000. All requests pass through transparently with minimal latency, and all errors are captured in real-time.
3. Check the Runtime Snapshot in Terminal
At any time, inspect the current runtime snapshot directly in your terminal:
python -m src.cli snapshot --db ./app.db --log ./app.log4. Run the MCP Server
Launch the FastMCP server over standard I/O:
python -m src.cli serve๐ค AI Agent Integration (MCP Configuration)
Add runtime-mcp to your AI assistant's MCP configuration.
For Google Antigravity & Claude Code & Cursor
Add this block to your mcpServers configuration file:
Antigravity:
~/.gemini/antigravity/mcp_config.jsonor project settingsClaude Code / Desktop:
claude_desktop_config.jsonCursor:
.cursor/mcp.json
{
"mcpServers": {
"runtime-mcp": {
"command": "python",
"args": [
"-m",
"src.cli",
"serve",
"--state-file",
"/absolute/path/to/project/.runtime_state.json"
],
"env": {
"PYTHONPATH": "/absolute/path/to/runtime-mcp"
}
}
}
}Tip for Windows users: Use forward slashes or escaped backslashes for paths (e.g.
C:/Users/name/projects/runtime-mcp/.runtime_state.json).
๐ ๏ธ MCP Tools Reference
Once connected, your AI assistant gains access to three live tools:
Tool | Parameters | Description |
|
| Returns verified SQLite table definitions, column types, keys, and row counts in compact Markdown. |
|
| Returns recent HTTP 4xx/5xx failures, response payloads, request bodies, and latency. |
| none | Generates a single, consolidated report combining environment telemetry, live DB schema, network failures, and log stack traces. |
๐ป CLI Commands Reference
All commands can be invoked either via runtime-mcp <command> or python -m src.cli <command>:
tap
Starts the live HTTP proxy tap and monitors DB / logs:
runtime-mcp tap [OPTIONS]
Options:
-l, --listen INTEGER Port to listen on [default: 8090]
-t, --target TEXT Target backend port or URL (e.g. 3000 or http://localhost:3000) [default: 3000]
-d, --db TEXT Path to local SQLite database file
--log TEXT Path to application log file
--state-file TEXT Path to state file for persistence [default: .runtime_state.json]snapshot
Prints the current verified runtime state in terminal with Rich formatting:
runtime-mcp snapshot [OPTIONS]
Options:
-d, --db TEXT Path to local SQLite database file
--log TEXT Path to application log file
--state-file TEXT Path to state file [default: .runtime_state.json]serve
Runs the FastMCP server over stdio for IDE and AI agent connections:
runtime-mcp serve [OPTIONS]
Options:
--state-file TEXT Path to state file [default: .runtime_state.json]๐งช Running Tests
The test suite covers SQLite schema extraction, read-only enforcement, async HTTP proxying, status 500 interception, log stack trace parsing, and direct MCP tool execution:
pytest -v๐ License
This project is open-source software licensed under the MIT License.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogโฆ
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP observability. Query live traffic, errors, duration, and alerts from your AI agent.
Query application logs, traces, and metrics from your AI coding assistant via Foam's MCP server.
Persistent memory, knowledge graph, task management and more for AI agents via MCP.
An agent-native database over MCP: shared, validated, structured records in every AI chat.
Related MCP Servers
AlicenseNot gradedqualityBmaintenanceProvides AI agents with a live architecture model of a codebase, enabling queries for root cause analysis, blast radius, and dependency traversal through MCP tools.255 npm34Apache 2.0- AlicenseNot gradedqualityDmaintenanceEnables AI agents to query live schema, lineage, and query-context across data warehouses, dbt projects, orchestration systems, and BI tools via MCP tools.Apache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to investigate production incidents by exposing service health, logs, and deployment data through MCP tools.5 npmISC
- AlicenseNot gradedqualityDmaintenanceExposes a live application's runtime state to coding agents, including logs, DB schema, config, and feature flags, with read-only SQL and secret redaction.MIT