Crash MCP Server
The Crash MCP Server is a unified platform for analyzing Linux system crash dumps by integrating the crash utility and drgn programmable debugger through an MCP interface.
Core Capabilities:
Crash dump analysis: Analyze system crash dumps (vmcore files) using crash utility commands and drgn Python debugging
Session management: Start, manage, and terminate analysis sessions with automatic deduplication and reuse for the same vmcore
Remote analysis: Connect to remote hosts via SSH to analyze crash dumps without downloading files locally
Command execution: Run crash commands (
sys,bt,log,ps,files,vm,kmem) and drgn Python code for advanced debuggingFile discovery: Recursively scan directories to locate crash dump files
Output management: Persist command outputs to disk with configurable truncation, pagination support, and regex search capabilities
Multi-architecture support: Automatically detect vmcore architecture and compile/use appropriate crash versions (x86_64, ARM64) with support for different compression formats like LZO
Command caching: Cache outputs for improved performance on repeated queries
Dual transport modes: Operate in stdio (default) or SSE/HTTP modes for different deployment scenarios
Configuration flexibility: Customize behavior through environment variables for caching, logging, and output truncation
Provides tools for analyzing Linux system crash dumps through the crash utility, enabling automatic discovery of vmcore files, kernel matching, and execution of crash analysis commands like sys, bt, and ps.
Click on "Deploy 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., "@Crash MCP Server analyze the latest crash dump and show the backtrace"
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.
Crash MCP Server
基于 MCP (Model Context Protocol) 的服务器,用于 系统崩溃转储 (Crash Dump) 分析。
集成 Linux crash 实用程序和 drgn 可编程调试器,提供统一分析接口。
功能特性
统一会话: 同时支持
crash和drgn引擎会话去重: 同一 vmcore 自动复用已有会话
命令持久化: 输出自动落盘,支持分页和搜索
远程分析: 通过 SSH 连接远程主机,无需下载 vmcore
多传输模式: Stdio(默认) / SSE(HTTP)
智能架构识别: 自动检测 vmcore 架构并选择对应的 crash 版本
自动编译: 内置 crash 工具编译器,支持多架构和压缩格式
Related MCP server: WinDbg GUI MCP Server
安装
前置要求
Python 3.10+
crash工具(可通过内置编译器安装)python3-dev(编译 PyKdump 需要)drgn工具(通过 pip 自动安装)
快速安装
chmod +x install.sh && ./install.sh编译 Crash 工具
# 激活虚拟环境
source venv/bin/activate
# 查看依赖安装说明
compile-crash --deps
# 编译 x86_64 版本
compile-crash
# 编译 ARM64 版本(在 x86_64 上分析 ARM64 vmcore)
compile-crash --arch ARM64
# 编译带 PyKdump 支持的版本
compile-crash --pykdump-from-source使用
启动服务器
# Stdio 模式
crash-mcp
# SSE 模式
crash-mcp --transport sse --port 8000MCP 工具
工具 | 说明 |
| 打开 vmcore 崩溃转储文件进行分析 |
| 执行 crash 命令,支持 PyKdump 扩展 |
| 执行 drgn Python 代码 |
| 关闭当前分析会话 |
| 分页获取长命令输出 |
| 正则搜索命令输出 |
| 运行预定义分析脚本 (需配置 |
| 列出可用分析脚本 (需配置 |
| 获取崩溃诊断报告 (需配置 |
配置
环境变量 | 默认值 | 说明 |
|
| 是否自动加载扩展 |
|
| 输出截断行数 |
|
| 会话工作目录 |
|
| 启用命令缓存 |
|
| 日志级别 |
| (空) | 自动化诊断脚本命令模板 (如 |
| (空) | 外部 drgn 脚本搜索路径 (冒号分隔) |
客户端配置
Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"crash-analysis": {
"command": "/path/to/crash-mcp/venv/bin/crash-mcp"
}
}
}示例
# 本地分析
open_vmcore_session("/var/crash/vmcore", "/usr/lib/debug/vmlinux")
run_crash_command("bt")
run_crash_command("sys")
run_drgn_command("prog['init_task'].comm")
# 分页获取长输出
run_crash_command("ps") # 返回 command_id
get_command_output("crash:ps", offset=20, limit=50)
# 搜索输出
search_command_output("crash:bt", "schedule")
# 远程分析
open_vmcore_session("/var/crash/vmcore", "/usr/lib/debug/vmlinux",
ssh_host="server-01", ssh_user="root")常见问题
1. no lzo compression support 错误
vmcore 文件使用 LZO 压缩,但 crash 工具编译时未启用 LZO 支持。
sudo apt-get install liblzo2-dev
compile-crash --clean2. 缺少 GMP/MPFR 库
sudo apt-get install libgmp-dev libmpfr-dev3. 查看所有编译依赖
compile-crash --deps许可证
Available Tools
6 toolsget_sys_infoB
Convenience tool to get system info (runs 'sys' command).
Inputs: session_id. Returns: result
list_crash_dumpsB
Scans for crash dumps in the specified directory (recursive).
Inputs: search_path. Returns: result
run_crash_commandC
Runs crash utility command (e.g., sys, bt, log, ps, files, vm, kmem).
Inputs: command (required), session_id, truncate. Returns: result
run_drgn_commandC
Runs drgn Python code (e.g., prog.crashed_thread(), prog['variable']).
Inputs: command (required), session_id, truncate. Returns: result
start_sessionC
Starts analysis session. Requires vmcore and vmlinux paths. Returns session ID.
Inputs: vmcore_path (required), vmlinux_path (required), ssh_host, ssh_user. Returns: result
stop_sessionB
Terminates an active session.
Inputs: session_id. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool has a clearly distinct purpose with no overlap: get_sys_info retrieves system info, list_crash_dumps scans for dumps, run_crash_command runs crash utility commands, run_drgn_command runs drgn Python code, start_session initiates analysis, and stop_session terminates it. The descriptions make it easy to differentiate between them.
All tool names follow a consistent verb_noun pattern (e.g., get_sys_info, list_crash_dumps, run_crash_command, run_drgn_command, start_session, stop_session). This uniformity makes the tool set predictable and easy to understand.
With 6 tools, the server is well-scoped for crash analysis, covering essential operations like scanning dumps, running commands, managing sessions, and retrieving system info. Each tool earns its place without being excessive or insufficient.
The tool set provides strong coverage for crash analysis, including session management, command execution, and dump scanning. A minor gap exists in lacking tools for more advanced or specific analysis tasks, but core workflows are well-supported.
Maintenance
Related MCP Connectors
Live browser debugging for AI assistants — DOM, console, network via MCP.
MCP-Native LLM Orchestration Agent
Persistent memory, knowledge graph, task management and more for AI agents via MCP.
Cross-tool persistent memory and context for AI assistants over MCP.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables MCP-capable applications to access, manage, and analyze system core dumps through integration with systemd-coredump functionality.19 npm3MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with the WinDbg GUI through the Model Context Protocol using a PyKD-based plugin integration. It supports executing debugger commands, inspecting registers, reading memory, and performing automated crash analysis via natural language.4-
- AlicenseBqualityDmaintenanceEnables AI assistants to control GDB debugger via MCP protocol for local and remote debugging, supporting CTF Pwn, crash analysis, and ELF inspection.131MIT
- AlicenseBqualityCmaintenanceEnables crash dump analysis and kernel debugging by integrating the real crash utility with automatic dump discovery, kernel matching, and session management.7MIT