runtime-mcp-server

runtime-mcp-server

Provides 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.

Category
Visit Server

README

Runtime Diagnostic MCP Server (runtime-mcp-server)

A local Model Context Protocol (MCP) server that provides AI coding agents (like OpenAI Codex CLI) with real-time runtime diagnostics, process monitoring, and log analysis for local development environments.

🎯 Purpose

AI coding agents are great at inspecting static code, but blind to runtime execution state. This server bridges that gap by giving AI agents programmatic, read-only tools to observe running processes, analyze crash logs, inspect active ports, and monitor system resources.

🛠️ Core Tools (v1 Features)

  1. tail_app_logs

    • Description: Reads the most recent lines from an explicitly provided local application log file.
    • Goal: Hands recent stack traces and error output to Codex without manual copy-pasting.
  2. inspect_ports

    • Description: Scans active local network ports (e.g., 3000, 8080) and identifies occupying process IDs (PIDs).
    • Goal: Automatically resolves EADDRINUSE / "Port already in use" errors and can safely signal zombie processes.
  3. get_process_metrics

    • Description: Reports per-core CPU and memory usage for an already-running local process. A process using one fully utilized core reports approximately 100%; multi-threaded processes may exceed 100%.
    • Goal: Helps Codex detect infinite loops, memory leaks, and runaway background scripts in real time.
  4. diagnose_runtime

    • Description: Combines port, process, and log evidence into a single deterministic runtime diagnosis.
    • Goal: Gives Codex a concise health report and evidence-backed next steps for a local application.
  5. capture_network_errors

    • Description: Inspects local failed HTTP/gRPC responses, CORS headers, and status codes.
    • Goal: Pinpoints root causes for broken frontend-to-backend local API connections.

🏗️ Technical Stack

  • Language: TypeScript / Node.js
  • Protocol: Model Context Protocol (MCP) via @modelcontextprotocol/sdk
  • Transport: Standard Input/Output (stdio)
  • System APIs: child_process, fs/promises, psutil / system process utilities

🚀 Getting Started

Install dependencies and compile the TypeScript source:

npm install
npm run build

Run the automated process-metrics tests:

npm test

Start the MCP server:

npm start

The server connects over stdio and currently provides port inspection, explicit log-file reading, live process metrics, and a combined runtime diagnosis tool.

🚀 Codex CLI Integration

Configured in ~/.codex/config.json (or Codex client settings):

{
  "mcpServers": {
    "runtime-diagnostics": {
      "command": "node",
      "args": ["/Users/USERNAME/Documents/Codex/runtime-mcp-server/build/index.js"]
    }
  }
}

📋 Development Roadmap

  • [x] Initialize TypeScript & @modelcontextprotocol/sdk project
  • [x] Implement inspect_ports tool
  • [x] Implement tail_app_logs tool
  • [x] Implement get_process_metrics tool
  • [x] Implement diagnose_runtime tool
  • [ ] Add integration tests with Codex CLI

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured