Documentation
AI agents (MCP)
grpcprocctl serves the Inspector as MCP tools, so an AI agent can inspect a cluster, read-only unless told otherwise.
grpcprocctl mcp is an MCP server over stdio. Its tools answer what the command line answers and return the same objects its --json prints. The server's instructions explain grpcproc to the agent: what a pid and a label are, what a deep mailbox or a busy process means.
Connecting
For Claude Code:
claude mcp add grpcproc -- grpcprocctl --plaintext --addr 10.0.0.5:9000 mcpFor any client that starts stdio servers from a configuration file:
{
"mcpServers": {
"grpcproc": {
"command": "grpcprocctl",
"args": ["--plaintext", "--addr", "10.0.0.5:9000", "mcp"]
}
}
}The connection flags are grpcprocctl's own: TLS unless --plaintext, --cacert, --cert and --key. --timeout bounds each request a tool makes, and the server reports grpcprocctl's version to the client.
Tools
| Tool | What it answers |
|---|---|
cluster_nodes | Every node the one serving the Inspector knows of, by the members its Membership reports and by links, with each one's links added up (by a metadata key, with group_links_by), and which could not be reached. |
node_info | One node: counts, dead letters, and each link with its traffic, queue and last error. |
list_processes | Processes of a node, filtered by name, label, state or mailbox depth, and sorted: by mailbox, to find backlogs, or by busy time. At most 100 unless asked for more. |
get_process | One process by pid or name, with what it says about itself, waiting a while for a busy one. |
watch_events | A node’s events, collected for a few seconds: spawns, exits with reasons, links, dead letters. |
election | A leader election, as each node that takes part sees it, and who leads. |
cron_jobs | Cron processes and their jobs, on a node or all of them. |
saga_runs | Saga runs by saga and status, a page at a time. |
saga_run | One saga run: the error that stopped it, its waiting signals, and its data when the engine shows it. |
global_names | Who holds a global name, or every name with a prefix, such as room:. |
process_groups | A grpcproc/groups scope’s groups and its other nodes, as one node’s copy has them. |
group_members | One grpcproc/groups group’s members on every node, by pid. |
With grpcprocctl mcp --allow-writes, it also offers the tools that change things:
| Tool | What it does |
|---|---|
exit_process | Asks a process to exit; its supervisor, if any, may restart it. |
set_log_level | Sets one process’s log level, to see more of it without restarting anything. |
move_leader | Has an election’s leader hand over, to a node or to the most up-to-date follower. |
cordon_node, uncordon_node | Keeps a node from leading, to work on its host, or lets it lead again. |
enable_cron_job, disable_cron_job, remove_cron_job | Changes a job of a cron process. |
resume_saga_run | Makes a stuck saga run active again. |
The tools that stop a process, move a leader, cordon a node or remove a job are marked destructive, which a client can use to ask before it lets the agent run one.
Example
Asked why orders are slow, an agent might:
- call
cluster_nodes, and see every node up, and no link failing; - call
list_processesonorders-1sorted by mailbox, and findledger-writerwith 41 messages waiting, the oldest for a second; - call
get_processon it, and readinspect_error: busy for 1.187s: it is inside a handler, on one message; - call
watch_events, and see no exits or dead letters: the process is slow, not failing, so the cause is what that handler waits on.
With writes allowed, it could then raise the log level of the process to see what its handler is doing.
Safety
- Read-only unless told. Without
--allow-writes, the tools that change things are not offered at all. - The Inspector decides too. An Inspector served with
inspect.ReadOnly()refuses every write, whatever the tool; credentials and interceptors guard it as they guard your other services. - Bounded answers. Lists are capped, watches last at most a minute, and every input an agent sends is checked before it reaches a node.