§04 · Reference
agentry-mcp
The same five commands as the CLI, exposed as MCP tools over stdio. New CLI commands surface as new tools automatically — the registry is shared.
-
01 Run it
@openagentry/mcpships a single bin,agentry-mcp, that speaks MCP over stdio. Run it from the workspace directory you want it to operate on.npx -p @openagentry/mcp agentry-mcpThe server resolves
.agentry/workspace.jsonfrom its working directory the same way the CLI does. -
02 Configure your client
Any MCP-aware client that supports stdio servers can drive it. Example: Claude Desktop.
// ~/Library/Application Support/Claude/claude_desktop_config.json { "mcpServers": { "openagentry": { "command": "npx", "args": ["-y", "-p", "@openagentry/mcp", "agentry-mcp"], "cwd": "/abs/path/to/your/workspace" } } }cwdis the workspace root — the directory with.agentry/workspace.json. Without it,agentry_capabilitieswill reportE_NO_WORKSPACE. -
03 The tool set
One tool per CLI command. Tool name is
agentry_<command>. Input schema is{ args: string[] }— the array is forwarded to the CLI dispatcher exactly as if you'd typed it afteragentry.--jsonis always added by the server, so output is always parseable.MCP tool CLI equivalent Purpose agentry_init agentry init Create a new workspace. agentry_version agentry version CLI + protocol versions. agentry_doctor agentry doctor Diagnostic checks. agentry_list agentry list List declared plugins. agentry_capabilities agentry capabilities Load adapters and report what is registered. New commands added to
@openagentry/cliregister themselves with the meta-MCP server automatically — no corresponding change in@openagentry/mcpis needed. -
04 A request, a response
Every tool returns the exact JSON document the CLI would have printed on stdout, wrapped in MCP's standard
content[]envelope. Failures throw an AgentryError with a stable code.// MCP request from the client { "method": "tools/call", "params": { "name": "agentry_capabilities", "arguments": { "args": [] } } } // Response — exactly what agentry capabilities --json prints on stdout. { "content": [{ "type": "text", "text": "{ \"categories\": { ... }, ... }" }] }