@taskjp/server-systemd-coredump v0.1.1
@taskjp/server-systemd-coredump
A Model Context Protocol (MCP) server for interacting with systemd-coredump functionality. This enables MCP-capable applications to access, manage, and analyze system core dumps.
Prerequisites
- Node.js 18+ and npm
- systemd-coredump must be installed and configured on the system
coredumpctl
command-line utility must be available- For stack trace functionality:
gdb
must be installed
Installation
Global Installation (recommended for CLI usage)
npm install -g @taskjp/server-systemd-coredump
Local Installation (for use in a project)
npm install @taskjp/server-systemd-coredump
Usage
As an MCP Server
- Add the server to your MCP configuration file:
"systemd-coredump": {
"command": "node",
"args": ["node_modules/@taskjp/server-systemd-coredump/build/index.js"],
"disabled": false,
"autoApprove": []
}
If installed globally:
"systemd-coredump": {
"command": "systemd-coredump-server",
"args": [],
"disabled": false,
"autoApprove": []
}
- Connect to it using any MCP client or language model.
Testing with MCP Inspector
Use the MCP Inspector to test the server directly:
npx @modelcontextprotocol/inspector node_modules/@taskjp/server-systemd-coredump/build/index.js
Or if installed globally:
npx @modelcontextprotocol/inspector systemd-coredump-server
Available Tools
The server provides the following tools:
list_coredumps: List available coredumps in the system
- Optional parameter:
onlyPresent
(boolean) - When true, only returns coredumps with COREFILE=="present"
- Optional parameter:
get_coredump_info: Get detailed information about a specific coredump
- Required parameter:
id
(string) - ID of the coredump
- Required parameter:
extract_coredump: Extract a coredump to a file
- Required parameters:
id
(string) - ID of the coredumpoutputPath
(string) - Path where to save the extracted coredump
- Required parameters:
get_coredump_config: Get the current core dump configuration of the system
set_coredump_enabled: Enable or disable core dump generation
- Required parameter:
enabled
(boolean) - Whether to enable or disable core dumps
- Required parameter:
get_stacktrace: Get stack trace from a coredump using GDB
- Required parameter:
id
(string) - ID of the coredump
- Required parameter:
Available Resources
The server exposes two types of resources:
Coredump Information
- URI format:
coredump:///<id>
- Returns JSON with detailed coredump information
- URI format:
Stack Traces
- URI format:
stacktrace:///<id>
- Returns a formatted stack trace from the coredump
- URI format:
Where <id>
is the unique identifier for a coredump in the format: <timestamp>-<pid>
.
Note on Permissions
Some operations may require elevated privileges, especially when extracting or removing coredumps. Ensure the user running the MCP server has appropriate permissions to access system coredumps.
License
MIT