Skip to main content
Glama
yup-21
by yup-21

Crash MCP Server

基于 MCP (Model Context Protocol) 的服务器,用于 系统崩溃转储 (Crash Dump) 分析。

集成 Linux crash 实用程序和 drgn 可编程调试器,提供统一分析接口。

功能特性

  • 统一会话: 同时支持 crashdrgn 引擎

  • 会话去重: 同一 vmcore 自动复用已有会话

  • 命令持久化: 输出自动落盘,支持分页和搜索

  • 远程分析: 通过 SSH 连接远程主机,无需下载 vmcore

  • 多传输模式: Stdio(默认) / SSE(HTTP)

  • 智能架构识别: 自动检测 vmcore 架构并选择对应的 crash 版本

  • 自动编译: 内置 crash 工具编译器,支持多架构和压缩格式

Related MCP server: MCP Server for WinDbg Crash Analysis

安装

前置要求

  • 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 8000

MCP 工具

工具

说明

open_vmcore_session

打开 vmcore 崩溃转储文件进行分析

run_crash_command

执行 crash 命令,支持 PyKdump 扩展

run_drgn_command

执行 drgn Python 代码

close_vmcore_session

关闭当前分析会话

get_command_output

分页获取长命令输出

search_command_output

正则搜索命令输出

run_analysis_script

运行预定义分析脚本 (需配置 DRGN_SCRIPTS_PATH)

list_analysis_scripts

列出可用分析脚本 (需配置 DRGN_SCRIPTS_PATH)

get_crash_info

获取崩溃诊断报告 (需配置 GET_DUMPINFO_SCRIPT)

配置

环境变量

默认值

说明

CRASH_EXTENSION_LOAD

true

是否自动加载扩展

CRASH_MCP_TRUNCATE_LINES

20

输出截断行数

CRASH_MCP_WORKDIR

/tmp/crash-mcp-sessions

会话工作目录

CRASH_MCP_CACHE

true

启用命令缓存

LOG_LEVEL

INFO

日志级别

GET_DUMPINFO_SCRIPT

(空)

自动化诊断脚本命令模板 (如 python3 script.py {vmcore} {vmlinux})

DRGN_SCRIPTS_PATH

(空)

外部 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 --clean

2. 缺少 GMP/MPFR 库

sudo apt-get install libgmp-dev libmpfr-dev

3. 查看所有编译依赖

compile-crash --deps

许可证

MIT License

Available Tools

6 tools
get_sys_infoB

Convenience tool to get system info (runs 'sys' command).

ParametersJSON Schema
NameRequiredDescriptionDefault
session_idNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It states the tool runs a 'sys' command, hinting at execution behavior, but lacks details on permissions, side effects, rate limits, or output format. This is inadequate for a tool that likely interacts with system data.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that clearly states the purpose without unnecessary details. It's front-loaded and wastes no words, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool likely returns system info, the presence of an output schema helps, but the description lacks context on complexity, such as what specific info is retrieved or how it differs from siblings. With no annotations and minimal description, it's adequate but has clear gaps in guiding usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has one parameter (session_id) with 0% description coverage, and the description doesn't mention parameters at all. Since there are no parameters documented in the schema, the baseline is 4, as the description doesn't need to compensate for missing param info but also doesn't add any value regarding parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool gets system info and mentions it runs a 'sys' command, which clarifies the action and resource. However, it doesn't distinguish this from sibling tools like 'list_crash_dumps' or 'run_crash_command', which might also provide system-related information, leaving the scope vague.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. The description mentions it's a 'convenience tool', implying it might be simpler or faster, but it doesn't specify contexts, prerequisites, or exclusions relative to siblings like 'run_drgn_command' for deeper system analysis.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_crash_dumpsB

Scans for crash dumps in the specified directory (recursive).

ParametersJSON Schema
NameRequiredDescriptionDefault
search_pathNo/app/crash

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It states the action ('scans') and scope ('recursive'), but doesn't describe what constitutes a crash dump (file extensions, formats), whether it requires permissions, rate limits, output format (though output schema exists), or error handling (e.g., invalid paths). For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero waste. It's front-loaded with the core action and resource, and the parenthetical '(recursive)' adds necessary detail without verbosity. Every word earns its place, making it highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (file scanning), no annotations, and an output schema (which handles return values), the description is partially complete. It covers the purpose and parameter context but lacks behavioral details (e.g., permissions, error handling) and usage guidelines. With output schema existing, it needn't explain return values, but other gaps remain, making it adequate but with clear room for improvement.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds minimal semantics beyond the input schema: it clarifies that 'search_path' is for scanning 'in the specified directory (recursive)'. However, with 0% schema description coverage (schema lacks descriptions for the parameter), the description doesn't fully compensate—it doesn't explain path format, default behavior, or validation rules. With 1 parameter, the baseline is 4, but the description provides only basic context, so a 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('scans for') and resource ('crash dumps') with specific scope ('in the specified directory (recursive)'). It distinguishes from siblings like 'get_sys_info' or 'run_crash_command' by focusing on file discovery rather than system info or command execution. However, it doesn't explicitly differentiate from all siblings (e.g., 'start_session' is clearly different).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., directory existence), when-not-to-use scenarios, or comparisons to sibling tools like 'run_crash_command' for analyzing dumps. The context is implied (scanning for files) but lacks explicit usage rules.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

run_crash_commandC

Runs crash utility command (e.g., sys, bt, log, ps, files, vm, kmem).

ParametersJSON Schema
NameRequiredDescriptionDefault
commandYes
session_idNo
truncateNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool runs commands but lacks critical details: it doesn't specify if this is a read-only or destructive operation, what permissions are required, how output is handled (though an output schema exists), or any rate limits. The examples hint at functionality but don't clarify behavioral traits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose and includes helpful examples. There is no wasted verbiage, making it appropriately sized and easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (running system commands), lack of annotations, and 0% schema description coverage, the description is incomplete. It doesn't address safety, permissions, or parameter meanings beyond command examples. However, the existence of an output schema reduces the need to explain return values, providing some baseline adequacy.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate for undocumented parameters. It only mentions the 'command' parameter through examples (e.g., sys, bt), but provides no context for 'session_id' or 'truncate'. This leaves two of three parameters without semantic explanation, failing to adequately compensate for the low coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Runs') and target ('crash utility command'), and provides specific examples of commands (sys, bt, log, ps, files, vm, kmem). This makes the purpose specific and understandable, though it doesn't explicitly differentiate from sibling tools like 'run_drgn_command'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'run_drgn_command' or 'list_crash_dumps', nor does it mention prerequisites such as needing a session (implied by the session_id parameter). Usage is implied through examples but not explicitly stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

run_drgn_commandC

Runs drgn Python code (e.g., prog.crashed_thread(), prog['variable']).

ParametersJSON Schema
NameRequiredDescriptionDefault
commandYes
session_idNo
truncateNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but only states what the tool does without disclosing behavioral traits. It doesn't mention whether this is read-only or destructive, what permissions are needed, how errors are handled, or any rate limits. The examples hint at functionality but lack operational context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately concise with one sentence and helpful examples. It's front-loaded with the core purpose and wastes no words, though it could benefit from slightly more structure to separate examples from the main statement.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 3 parameters with no schema descriptions, no annotations, and an output schema exists, the description is minimally adequate but incomplete. It covers the basic purpose and provides examples for the 'command' parameter, but doesn't address the other parameters or behavioral aspects, leaving significant gaps for a tool that executes code.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage and 3 parameters, the description adds minimal value beyond the schema. It mentions 'drgn Python code' which relates to the 'command' parameter, but doesn't explain what 'session_id' or 'truncate' do, their formats, or provide examples for them. The description doesn't compensate for the schema's lack of documentation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool 'Runs drgn Python code' which is a clear verb+resource combination, but it doesn't distinguish this from sibling tools like 'run_crash_command' or explain what drgn is. The examples help but don't fully clarify the scope or differentiate from alternatives.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided about when to use this tool versus alternatives like 'run_crash_command' or 'start_session'. The description implies usage for drgn code execution but offers no context about prerequisites, dependencies, or appropriate scenarios.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

start_sessionC

Starts analysis session. Requires vmcore and vmlinux paths. Returns session ID.

ParametersJSON Schema
NameRequiredDescriptionDefault
vmcore_pathYes
vmlinux_pathYes
ssh_hostNo
ssh_userNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states that the tool 'Starts analysis session' and 'Returns session ID', which implies a stateful operation and output format. However, it lacks details on permissions, side effects (e.g., if it consumes resources or locks files), error handling, or session lifecycle implications, which are critical for a tool that initiates analysis.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with two sentences that directly state the purpose, requirements, and return value. Every word earns its place, and it's front-loaded with the core action, making it efficient and easy to parse without any fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (starting a stateful analysis session with 4 parameters), no annotations, and an output schema (which likely covers the session ID return), the description is minimally adequate. It covers the basic purpose and key inputs but lacks depth on behavioral aspects and optional parameters, making it incomplete for safe and effective use without additional context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It mentions 'vmcore and vmlinux paths' for the two required parameters, adding some meaning beyond the schema's bare titles. However, it omits the optional 'ssh_host' and 'ssh_user' parameters entirely, and doesn't explain what these paths represent or their expected formats, leaving significant gaps in parameter understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Starts analysis session') and the resource ('analysis session'), which is specific and understandable. However, it doesn't differentiate from sibling tools like 'run_crash_command' or 'run_drgn_command' which might also involve analysis sessions, leaving some ambiguity about its unique role.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description mentions that it 'Requires vmcore and vmlinux paths', which provides basic prerequisites but no guidance on when to use this tool versus alternatives like 'run_crash_command' or 'stop_session'. There's no explicit when/when-not usage or comparison to siblings, leaving the agent to infer context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

stop_sessionB

Terminates an active session.

ParametersJSON Schema
NameRequiredDescriptionDefault
session_idNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. 'Terminates' implies a destructive mutation, but it doesn't disclose behavioral traits such as whether termination is reversible, what happens to session data, permission requirements, or error conditions (e.g., if session_id is invalid). The description is minimal and lacks critical context for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero waste. It is front-loaded with the core action ('Terminates') and resource ('an active session'), making it easy to scan. Every word earns its place, and there is no redundant or verbose language.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (destructive mutation with 1 parameter) and no annotations, the description is incomplete—it lacks behavioral details and parameter guidance. However, an output schema exists, so return values needn't be explained. The description covers the basic purpose but falls short on usage and transparency, making it minimally adequate but with clear gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the schema provides no parameter descriptions. The description adds no information about the 'session_id' parameter (e.g., what it is, how to obtain it, default behavior if null). However, with only 1 parameter and a default of null, the baseline is 3 as the tool might operate on a current or default session without explicit input.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Terminates an active session' clearly states the action (terminates) and resource (active session). It distinguishes from siblings like 'start_session' (opposite action) and 'get_sys_info' (different resource). However, it doesn't specify what type of session (e.g., debugging, system) or what termination entails beyond the basic verb.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., requires an active session), exclusions (e.g., don't use if session is already stopped), or comparisons to siblings like 'run_crash_command' (which might operate within a session). Usage is implied from the name but not explicitly stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 6 tool updatesv1.0.0
    • Removedanalyze_target
    • Addedrun_drgn_command
    • Removedstart_crash_session
    • Addedstart_session
    • Removedstop_crash_session
    • Addedstop_session
  2. 6 tool updates
    • First observedanalyze_target
    • First observedget_sys_info
    • First observedlist_crash_dumps
    • First observedrun_crash_command
    • First observedstart_crash_session
    • First observedstop_crash_session

TDQS

B3.4/5.0
Disambiguation5/5

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.

Naming Consistency5/5

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.

Tool Count5/5

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.

Completeness4/5

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

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

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/yup-21/crash-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server