Skip to main content

MCP

ECP (Execution Control Protocol) exposes the same process host the CLI uses as MCP tools. Installed plugins become tools. Meta tools wrap search, describe, validate, run, journals, invoke, and plugin install. There is no per-capability MCP code.
First use installs @executioncontrolprotocol/mcp from npm (oclif.jitPlugins pins "^0.50"). From a source checkout you can still ecp plugins link packages/mcp. ecp mcp serve is the MCP surface. There is no root ecp serve or ecp up.

stdio (default)

stdout is the protocol stream. Do not log to stdout.
--tools meta serves only the closed meta set when a client cannot handle a large capability catalogue. Capabilities stay reachable with ecp_invoke.

HTTP

HTTP binds 127.0.0.1 and requires a bearer token, printed once to stderr at start. Pass that token as Authorization: Bearer <token>.
--host and --port change the bind. Binding beyond loopback requires --allow-remote. Use that only on a trusted network.

Claude Desktop

Add a stdio server that runs the same ecp on your PATH (after you have linked or installed the MCP plugin):
Use --tools meta as an extra arg if the client chokes on the capability list:

Claude Code and other MCP clients

Point the client at ecp mcp serve the same way: stdio command ecp with args mcp serve. The server sees every plugin you already installed for the CLI.

Tool names

Claude clients require ^[a-zA-Z0-9_-]{1,64}$, so names use underscores, not dots. Meta tools (always registered unless you pass --tools meta only): Capability tools are generated from the registry: <extension>_<capability>, sanitized. Names longer than 64 characters are truncated and get a 6-character hash. Example: jsonata_transform. Format plugins show up as format_toon_encode, not root encode / decode. Clients with tool search (Claude Code) load capability tools on demand, so a large catalogue costs nothing up front.

Path or source

ecp_validate and ecp_run accept a workflow file path or inlined Fluent source (for clients that cannot write files). Source is written to a temp *.ecp.ts and compiled through the Node loader, so import rules match the CLI.
Pass events: true on ecp_run to map the CLI --events stream to MCP progress notifications. The result still includes runId.

Live updates

Installing or linking a plugin updates <oclif dataDir>/package.json. The server rebuilds the host and sends notifications/tools/list_changed. New capabilities appear as tools without restarting the client connection. ecp_plugins_install requires confirm: true. Third-party packages also go through the CLI trust hook (the user must approve).

Resources

The server exposes ecp://environment, ecp://capabilities, ecp://policies, ecp://capability/{id}, and ecp://runs/{runId}. Run resources read the journal on disk (.ecp/runs/<runId>/), not an in-memory map.

Next steps