Pacemaker MCP
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., "@Pacemaker MCP show the current cluster status"
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.
Pacemaker MCP
Model Context Protocol (MCP) server that exposes Pacemaker pcs commands as safe, guardrailed tools over stdio. It connects to a target cluster node via SSH using your OpenSSH config (Host alias; optional sudo) and runs read-only status queries and controlled operations. Ideal for using Pacemaker safely from MCP-aware clients like Cursor or Claude.
Features
Pacemaker tools:
pcs_cluster_status,pcs_node_status,pcs_resource_list.Logs access:
pcs_logs_common,pcs_logs_tail,pcs_logs_journalctlfor Pacemaker/Corosync troubleshooting.Key-based auth via OpenSSH config: uses your
~/.ssh/configHost alias; optionalsudo.Configurable: JSON/YAML config file or environment variables for alias and options.
Requirements
Node.js >= 18
Access to a Pacemaker cluster node over SSH
Setup (from scratch)
# 1) Install dependencies
npm install
# 2) Build the server (emits dist/index.js)
npm run build
# 3) (Optional) Verify locally with MCP Inspector
npx @modelcontextprotocol/inspector@latest node $(pwd)/dist/index.jsYou can also run directly with Node:
node dist/index.jsConfigure connection (single method)
Use your OpenSSH config (e.g., ~/.ssh/config) with a Host alias, and reference that alias. This is the only connection method used by the server.
Set a Host entry in your OpenSSH config file:
Host my-cluster
HostName cluster-node.example.com
User ec2-user
IdentityFile ~/.ssh/id_rsa
Port 22If you use a bastion, either define it with ProxyJump or a ProxyCommand (both are supported):
Host my-cluster
HostName 10.1.30.239
User root
IdentityFile ~/.ssh/aws-instance_rsa
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
# Option A (preferred): use a Host alias for the bastion
# ProxyJump bastion
# Option B: ProxyCommand (will be auto-translated)
ProxyCommand ssh -W %h:%p bastion -i ~/.ssh/aws-bastion_rsa -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null
Host bastion
HostName bastion.example.com
User ec2-user
IdentityFile ~/.ssh/aws-bastion_rsaThen either:
Provide alias per-call as args:
sshConfigHost: "my-cluster"(and optionallysshConfigPathif not~/.ssh/config)Or put it in your Pacemaker MCP config file (JSON/YAML) via
PACEMAKER_MCP_CONFIG:
default:
sshConfigHost: my-cluster
# sshConfigPath: /absolute/path/to/ssh_config # optional, defaults to ~/.ssh/config
sudo: trueNotes:
This server reads connection parameters exclusively from the OpenSSH alias (HostName, User, Port, IdentityFile).
If your ssh config has
StrictHostKeyChecking nofor the alias, unknown host keys will be accepted unless overridden.ProxyCommand lines like
ssh -W %h:%p <jump> -i <key> ...are supported; they are treated as a single-hop ProxyJump automatically.If
IdentityFileis not set, the SSH agent (SSH_AUTH_SOCK) is used if available.If
Useris not set, your local username is used by default.
Configuration sources (last-wins per field):
Config file from
PACEMAKER_MCP_CONFIG(or default search paths)Environment variables (e.g.,
PACEMAKER_SSH_CONFIG_HOST,PACEMAKER_USE_SUDO)Per-tool arguments (
sshConfigHost,sshConfigPath,sudo)
Use with MCP clients
Cursor
Build so
dist/index.jsexists:npm run buildAdd the server to your global Cursor MCP config (macOS:
~/.cursor/mcp.json). Use absolute paths.
{
"mcpServers": {
"pacemaker-mcp-server": {
"command": "node",
"args": ["/absolute/path/to/pcs_mcp/dist/index.js"],
"env": {
"PACEMAKER_SSH_CONFIG_HOST": "my-cluster",
"PACEMAKER_USE_SUDO": "true"
}
}
}
}Restart Cursor after saving.
Claude Desktop
Build
dist/index.js:npm run buildAdd the server to
~/Library/Application Support/Claude/claude_desktop_config.json(macOS), then restart Claude. Use absolute paths.
{
"mcpServers": {
"pacemaker-mcp-server": {
"command": "node",
"args": ["/absolute/path/to/pcs_mcp/dist/index.js"],
"env": {
"PACEMAKER_MCP_CONFIG": "/absolute/path/to/pacemaker.yaml",
"PACEMAKER_SSH_CONFIG_HOST": "my-cluster",
"PACEMAKER_USE_SUDO": "false",
"PACEMAKER_SSH_READY_TIMEOUT_MS": "30000"
}
}
}
}Notes:
Prefer absolute paths in
argsand file-based env likePACEMAKER_MCP_CONFIG.Configure connection via OpenSSH Host alias; set the alias through env or your MCP config file.
For production, prefer key-based SSH and passwordless
sudoifsudois required.
Troubleshooting
Handshake timeout:
Set
PACEMAKER_SSH_DEBUG=trueand retry; inspect logs for where it stalls (jump vs target vs auth).Increase
PACEMAKER_SSH_READY_TIMEOUT_MS(e.g.,30000).Verify your alias works in a terminal:
ssh my-cluster 'echo ok'.If using a bastion, ensure
ProxyJumpor a correctProxyCommandis defined and keys are accessible.If host key checks block you in dev/test, set
StrictHostKeyChecking noandUserKnownHostsFile /dev/nullin your SSH config or setPACEMAKER_INSECURE_ACCEPT_UNKNOWN_HOST_KEYS=true.
Available tools (examples)
pcs_cluster_status: returnspcs cluster statuspcs_node_status: returnspcs status nodespcs_resource_list: returnspcs resource configpcs_logs_common: tail common log files and optionally journal; e.g., last 200 lines of Pacemaker/Corosync logsargs:
{ "lines": 200, "includeJournal": true }
pcs_logs_tail: tail specific log filesargs:
{ "paths": ["/var/log/pacemaker/pacemaker.log", "/var/log/cluster/corosync.log"], "lines": 500 }
pcs_logs_journalctl: read journal for units (defaults to pacemaker and corosync)args:
{ "units": ["pacemaker", "corosync"], "lines": 300, "since": "2 hours ago", "priority": "warning", "grep": "fail|error" }
Each tool accepts a cluster name from config or sshConfigHost/sshConfigPath, and sudo.
Security considerations
Prefer key-based SSH; avoid passwords when possible.
Set
PACEMAKER_INSECURE_ACCEPT_UNKNOWN_HOST_KEYS=falsein production.Only use
sudoif required by your environment.
Development
npm run typecheck
npm run build
# Run from TS directly (dev):
npm run devOpen with MCP Inspector (from dist output):
npx @modelcontextprotocol/inspector@latest node $(pwd)/dist/index.jsSee CONTRIBUTING.md for PR guidelines.
License
MIT. See LICENSE.
Available Tools
26 toolspcs_cluster_startC
Start the cluster stack on the node via 'pcs cluster start'.
Inputs: sudo, cluster, timeoutMs, sshConfigHost, +1 more.
pcs_cluster_statusA
Displays high-level cluster state using 'pcs cluster status'. Useful for quick health checks: shows whether Pacemaker is running, node membership, fencing/stonith state, and manager health.
Inputs: host, port, sudo, cluster, +5 more.
pcs_cluster_stopC
Stop the cluster stack on the node via 'pcs cluster stop'.
Inputs: sudo, cluster, timeoutMs, sshConfigHost, +1 more.
pcs_constraint_listA
List all constraints via 'pcs constraint config' including ordering and colocation.
Inputs: sudo, cluster, timeoutMs, sshConfigHost, +1 more.
pcs_logs_commonC
Retrieve common Pacemaker/Corosync logs and optional journal snippets.
Inputs: sudo, lines, cluster, timeoutMs, +3 more.
pcs_logs_journalctlB
Read journal logs via journalctl; defaults to pacemaker and corosync units.
Inputs: grep, sudo, lines, since, +7 more.
pcs_logs_tailA
Tail last N lines from one or more log file paths. Skips missing files.
Inputs: paths (required), sudo, lines, cluster, +3 more.
pcs_node_standbyB
Put a node in standby (no resources run there) via 'pcs node standby []'.
Inputs: node, sudo, cluster, timeoutMs, +2 more.
pcs_node_statusB
Shows node states using 'pcs status nodes'. Lists each node and whether it is online/offline, standby, maintenance, or otherwise unavailable.
Inputs: host, port, sudo, cluster, +5 more.
pcs_node_unstandbyB
Bring a node out of standby via 'pcs node unstandby []'.
Inputs: node, sudo, cluster, timeoutMs, +2 more.
pcs_property_listA
List cluster properties via 'pcs property list --all' for tuning and defaults.
Inputs: sudo, cluster, timeoutMs, sshConfigHost, +1 more.
pcs_resource_banB
Ban a resource from a node via 'pcs resource ban [lifetime]'.
Inputs: node (required), resource (required), sudo, cluster, +4 more.
pcs_resource_cleanupC
Run cleanup on a resource (or all) via 'pcs resource cleanup []'.
Inputs: sudo, cluster, resource, timeoutMs, +2 more.
pcs_resource_clearC
Clear temporary constraints and failures for a resource via 'pcs resource clear '.
Inputs: resource (required), sudo, cluster, timeoutMs, +2 more.
pcs_resource_configA
Show the configured definition for a specific resource via 'pcs resource config '. Includes agent, parameters, operations, and meta-attributes for that resource only.
Inputs: resource (required), sudo, cluster, timeoutMs, +2 more.
pcs_resource_disableB
Disable a resource or all resources via 'pcs resource disable ' or '--all'.
Inputs: all, sudo, cluster, resource, +3 more.
pcs_resource_enableB
Enable a resource or all resources via 'pcs resource enable ' or '--all'.
Inputs: all, sudo, cluster, resource, +3 more.
pcs_resource_listC
Shows full resource configuration using 'pcs resource config'. Includes agents, parameters, operations, meta-attributes, groups, and ordering/colocation metadata for troubleshooting and audits.
Inputs: host, port, sudo, cluster, +5 more.
pcs_resource_moveB
Create a temporary location constraint via 'pcs resource move []'.
Inputs: resource (required), node, sudo, cluster, +3 more.
pcs_resource_restartB
Restart a resource via 'pcs resource restart ' or all resources if omitted (agent-dependent).
Inputs: sudo, cluster, resource, timeoutMs, +2 more.
pcs_resource_unbanC
Remove a ban for a resource via 'pcs resource unban []'.
Inputs: resource (required), node, sudo, cluster, +3 more.
pcs_statusA
Overall cluster status via 'pcs status': summarizes nodes, resources, failures, and constraints.
Inputs: sudo, cluster, timeoutMs, sshConfigHost, +1 more.
pcs_status_fullA
Full cluster configuration and runtime details via 'pcs status --full'. Includes nodes, resources, failures, options, constraints, and history useful for audits and deep troubleshooting.
Inputs: sudo, cluster, timeoutMs, sshConfigHost, +1 more.
pcs_status_resourcesA
Resource runtime state via 'pcs status resources': shows which resources are started/stopped and on which nodes.
Inputs: sudo, cluster, timeoutMs, sshConfigHost, +1 more.
pcs_status_xmlA
Cluster status in XML via 'pcs status xml' for programmatic parsing and deeper diagnostics.
Inputs: sudo, cluster, timeoutMs, sshConfigHost, +1 more.
pcs_stonith_showC
Show stonith/fencing devices via 'pcs stonith show' including configuration and parameters.
Inputs: sudo, cluster, timeoutMs, sshConfigHost, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 26 tools
There are many overlapping status/read tools: pcs_status, pcs_status_full, pcs_status_xml, pcs_cluster_status, pcs_status_resources, pcs_resource_list, and pcs_resource_config all expose related cluster or resource information. Agents would have difficulty choosing between them without reading descriptions closely, and several boundaries are unclear.
All tools share a pcs_ prefix, but the naming pattern is mixed: some use object_verb (pcs_cluster_start, pcs_resource_enable), others use verb-like object suffixes (pcs_status_resources, pcs_status_xml), and list/show are used inconsistently. It is readable but not predictable enough for reliable selection.
26 tools is excessive for the apparent scope, especially given redundant status variants and multiple log retrieval tools that could be consolidated. Many of the tools overlap heavily, so the count feels bloated rather than well-scoped.
The server covers inspection and some operational actions like enabling, disabling, moving, and banning resources, but it lacks configuration CRUD: no resource create/delete/update, no constraint creation/deletion, no property changes, and no stonith device management. This creates significant gaps for a tool set claiming to manage a Pacemaker cluster.
Maintenance
Related MCP Connectors
MCP server for mandates, delegation, policy-gated execution, credential grants, and audit.
SSH client, server management and one remote MCP URL for your machines, with human approvals.
Related MCP Servers
- AlicenseBqualityCmaintenanceA server that enables secure interaction with remote SSH hosts through standardized MCP interface, providing functions like listing hosts, executing commands, and transferring files using native SSH tools.7558 npm105MIT
- AlicenseBqualityBmaintenanceA secure SSH MCP server that enables execution of read-only diagnostic commands over SSH, preventing modifications to remote systems.63450 PyPI8AGPL 3.0
- AlicenseNot gradedqualityDmaintenanceA secure SSH-based MCP server for diagnosing remote servers. It allows AI agents to execute read-only commands and read files automatically, while requiring user confirmation for write operations.MIT
- AlicenseNot gradedqualityDmaintenanceSSH-based MCP server that enables remote execution of SSH commands, file transfers, and secure server management via the MCP protocol.ISC