runtime-mcp-server
Runtime Diagnostic MCP Server (runtime-mcp-server)
一个本地 Model Context Protocol (MCP) 服务器,为 AI 编程代理(如 OpenAI Codex CLI)提供本地开发环境的实时运行时诊断、进程监控和日志分析。
🎯 目的
AI 编程代理擅长检查静态代码,但对运行时执行状态视而不见。本服务器通过为 AI 代理提供可编程的、只读的工具,使其能够观察运行中的进程、分析崩溃日志、检查活跃端口并监控系统资源,从而弥合了这一差距。
Related MCP server: Harbor MCP Server
🛠️ 核心工具(v1 特性)
tail_app_logs描述: 读取并追踪活跃后台开发服务器(
npm run dev、python、docker)最新的 stdout/stderr 流或崩溃日志。目标: 自动将原始堆栈跟踪直接交给 Codex,无需手动复制粘贴。
inspect_ports描述: 扫描活跃的本地网络端口(例如 3000、8080),并识别占用端口的进程 ID(PID)。
目标: 自动解决
EADDRINUSE/ “端口已被占用”错误,并能安全地向僵尸进程发送信号。
get_process_metrics描述: 监控特定本地应用进程的 CPU 和内存使用情况。
目标: 帮助 Codex 实时检测无限循环、内存泄漏和失控的后台脚本。
capture_network_errors描述: 检查本地失败的 HTTP/gRPC 响应、CORS 响应头以及状态码。
目标: 定位前后端本地 API 连接故障的根本原因。
🏗️ 技术栈
语言: TypeScript / Node.js
协议: Model Context Protocol (MCP),基于
@modelcontextprotocol/sdk传输层: 标准输入/输出(
stdio)系统 API:
child_process、fs/promises、psutil/ 系统进程工具
🚀 快速开始
安装依赖并编译 TypeScript 源码:
npm install
npm run build启动 MCP 服务器:
npm start初始服务器通过 stdio 连接,并已做好添加诊断工具的准备。
🚀 Codex CLI 集成
在 ~/.codex/config.json(或 Codex 客户端设置)中进行配置:
{
"mcpServers": {
"runtime-diagnostics": {
"command": "node",
"args": ["/Users/USERNAME/Documents/Codex/runtime-mcp-server/build/index.js"]
}
}
}📋 开发路线图
初始化 TypeScript 与
@modelcontextprotocol/sdk项目实现
inspect_ports工具实现
tail_app_logs工具实现
get_process_metrics工具使用 Codex CLI 添加集成测试
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Tools
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceGives AI agents real-time access to system metrics, process management, and container orchestration.
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to discover, configure, and manage local development servers. Provides tools for app registration, port allocation, lifecycle control, and log access without manual config editing.338MIT
- AlicenseNot gradedqualityCmaintenanceEnables LLM clients to inspect local dev environments—Docker container health, pnpm workspace integrity, and stuck process detection—without manual terminal copy-pasting.MIT
- AlicenseAqualityBmaintenanceProvides AI coding agents with structured, evidence-based diagnostics about the local development environment, detecting tech stack, runtime mismatches, dependency state, services, ports, and Git status without exposing secrets or using network calls.10Apache 2.0
Related MCP Connectors
The watchdog for unattended AI agents: agent health, alerts, run reports with evidence and cost.
Live browser debugging for AI assistants — DOM, console, network via MCP.
AI agent run monitoring with incident replay and SLA receipts.
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/becketthayes/runtime-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server