magus-mcp
Serve MCP over stdio for the agent host that launched it
Synopsis
magus mcp
Description
Serve MCP over stdin and stdout, one JSON-RPC message per line, for the agent host that launched this process. It opens the workspace it is launched in and needs no server and no bearer token: the caller is the local process the host started, admitted with mcp=write, and every tool call is recorded on the activity trail with the stdio credential and the client's name.
Stdout is the protocol wire and carries nothing else; logs and one line saying what is being served go to stderr. It stops when the host closes stdin, or on Ctrl+C.
Register it with an MCP client as a stdio server:
command magus args ["mcp"]
magus server start serves the same tools over Streamable HTTP for one long-lived server shared by several clients; that endpoint takes a connector token (magus config mcp connector create). A target this process runs asks the broker for host capacity like any other run.
Per-client configuration lives in docs/guides/integrations/mcp.md, not in this binary: naming a client here would make a change to its config format a magus release.
Exit status
- 0
- The host closed stdin.
- 1
- The workspace did not load, or reading stdin or writing stdout failed.
- 2
- An argument was given; mcp takes none.
See Also
magus(1), magus-ls(1), magus-describe(1), magus-run(1), magus-x(1), magus-where(1), magus-affected(1), magus-graph(1), magus-query(1), magus-explain(1), magus-path(1), magus-refs(1), magus-watch(1), magus-events(1), magus-status(1), magus-clean(1), magus-shell(1), magus-vcs(1), magus-queue(1), magus-doctor(1), magus-config(1), magus-session(1), magus-memory(1), magus-job(1), magus-notes(1), magus-diff(1), magus-server(1), magus-broker(1), magus-buzz(1), magus-completion(1), magus-man(1), magus-init(1), magus-spell(1), magus-agent(1), magus-self(1), magus-version(1)