Muse MCP
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Muse MCP
Stdio MCP server that lets any MCP client spawn and drive Muse Code agents on this machine. The server speaks MSP (Muse Session Protocol): newline-delimited JSON-RPC 2.0 to a long-lived muse serve host. Sessions outlive turns. Approvals and user-input prompts arrive as server requests while a turn is live, and the client answers them through tools.
Muse Code stays the billing client. This server never reads, stores, prints, or forwards Muse OAuth tokens, API keys, or ~/.config/muse/auth.json.
Default approval mode is yolo
Spawned sessions default to approval_mode = "yolo". On the wire that is permission profile :unrestricted and approvalMode: allowAll. Tool calls are not held for a person. The shipped ~/.muse-mcp/config.toml has an empty auto_approve list, so nothing is auto-approved by policy unless you add a rule. The sandbox stays on: yolo does not pass --disable-sandbox.
This is the standing posture for agents on your own machine. It is the wrong default for a shared or untrusted workspace. Pass approval_mode: "on-request" (:ask-me) or "judge" (:auto-review) on muse_spawn, or set approval_mode in the config file, when you want a gate.
Related MCP server: cursor-agent-bridge
Why TypeScript
Phase 0 matched the installed CLI (Muse Code 1.4.14) to @muse-code/sdk@1.4.14 on schema fingerprint sha256:c94c3d1f2f51e6424074b9ec43eac3eedcf532d3dcd77351ec1383a87d3049c6. The SDK is the official MSP client, has no runtime dependencies, and already implements framing, initialize, session folds, and the approval handshake. Node on this machine is v24, which runs the sources with --experimental-strip-types, so the server is TypeScript with no compile step. MuseClient is not the seam: session/start.worktree is experimental and only the raw Connection can send it.
Run
Requires Node 20+ and muse on PATH (override with MUSE_MCP_BIN).
npm install
./bin/muse-mcpThe process speaks MCP on stdin/stdout and opens no port. State lives in ~/.muse-mcp/ (MUSE_MCP_HOME):
File | Role |
| Written on first start if missing. |
| Sessions this server started. After a restart, idle and running rows load as |
| Append-only JSONL of requests, decisions, answers, expiries, and refusals. |
One muse serve host is kept per workspace + contributor mode + preset + trust. A crashed host restarts on the next call. Its sessions are marked orphaned and resumed with session/resume when the protocol allows. sessionInUse is returned to the caller and not retried: this server does not attach to a session an interactive TUI already owns, and it only drives sessions it started.
Tools
Tool | What it does |
| Start a session and optionally its first turn. Returns |
| Follow-up turn on a session this server started. |
| Mid-turn input. Requires the running turn id. Idle sessions error and send no frame. |
| Pending approvals and questions: request id, session, kind, payload, age. |
| Answer a pending question ( |
|
|
| One session or all: state, turn, model, workspace, token usage, pending counts. |
| Latest completed turn, final answer text, and a short in-memory event tail. |
| Cancel the current turn. |
| End a session. |
| Send any MSP method with raw params. Credential methods are refused before a frame is written. |
muse_answer and muse_decide take an optional actor of user or orchestrator (default orchestrator). Policy decisions are logged as policy. Unanswered approvals expire to deny and unanswered questions are cancelled after pending_timeout_sec (default 1800). If the MCP client advertises elicitation, pending items are also offered that way. The tools still work when it does not.
muse_spawn arguments: workspace (required, absolute, must exist), prompt or prompt_file, model, reasoning_effort (none|minimal|low|medium|high|xhigh|max|ultra), preset, worktree (off|create|existing) with worktree_base or worktree_path, approval_mode (yolo|on-request|judge), contributor_mode (default false), wait (default false). There is no output_schema argument. MSP has no field for it.
Tool arguments win over environment variables, which win over config.toml.
Env | Effect |
| Muse binary. Default |
| State directory. Default |
| Model when a spawn omits |
| Effort when a spawn omits |
|
|
| Pending-request timeout. |
auto_approve rules are { match = "<regex>", decision = "approve" }. match is tested against one line of tool name, subject kind, command, host, path, and raw args. A hit approves with the once-only choice and is audit-logged as policy.
Streaming
Rich clients can watch turns live instead of polling muse_result. Streaming is opt-in: a client declares the experimental capability muse.stream in its initialize capabilities. A client that does not declare it receives no stream traffic and its tool results are unchanged.
{ "capabilities": { "experimental": { "muse.stream": {} } } }The server sends one notification method, notifications/muse/event, with a plain JSON event object as params:
Field | Meaning |
|
|
| The session the event belongs to. Events cover every session on the connection. |
| Present when the host frame carries one. |
| The host view cursor, verbatim, on item, usage, and turn-completed events ( |
| The full item object on |
| On |
| On |
| On |
| On |
| On |
Client guidance:
Text deltas for one item field are coalesced over 30 ms, so a delta event may carry several host deltas merged. Concatenating a field's delta events in order rebuilds the field, with one exception: if the host surface saturated, the concatenation can fall short.
item-completedcarries the full item and is authoritative. Reconcile from it.A
pendingevent is a signal to callmuse_pending, which stays the source of truth for approval and question payloads. Approvals and questions still arrive through elicitation and the broker exactly as before.A client that cannot keep up loses delta events, never the turn. Sends never block the host, failures are counted in
droppedDeltas, and the first failure per turn is written to the audit log. Theturn-completedevent waits, up to 250 ms, for the turn's in-flight delta sends to settle before its count is stamped; sends that outlive the wait, and the count on aturn-completedwhose own send fails, still land in the cumulativestream_dropped_deltasinmuse_status, which persists across restarts.
Register with Grok Build
User scope writes ~/.grok/config.toml:
grok mcp add muse-mcp -- /path/to/muse-code-mcp/bin/muse-mcpGeneric MCP client
{
"mcpServers": {
"muse-mcp": {
"command": "/path/to/muse-code-mcp/bin/muse-mcp",
"args": []
}
}
}The server makes no Grok-specific calls. The same command works in Cursor or any other stdio MCP client.
Protocol notes
docs/PROTOCOL.md is the source of truth where it disagrees with any summary. Short version:
yolo/on-request/judgeare public names. The wire values are:unrestricted+allowAll,:ask-me+onRequest, and:auto-review+onRequest. Both the profile and the approval mode are always sent. Omitting the profile on this machine produced no approval prompts.Approve selects the once-only
approvedchoice (allow_once). Deny selectsaborton this host and passesreasonwhen that choice accepts feedback.worktreeis the experimentalsession/start.worktreefield.offomits it. On this machine, create and attach against a repository Muse has not marked trusted fail with-32029workspaceNotTrusted.--trust-workspaceloads skills and rules and does not grant that trust. The server returns the host error and does not rungit worktree.--presetand--contributor-modeare host process flags, not session fields. Contributor mode is sent asoffunless the caller sets it.No MSP equivalent, so these
muse execknobs are not exposed:--output-schema,--max-model-steps,--user-input-auto-resolve.muse session-message list --jsonreturnedexternal_agent_ingress_closed.muse_messageis not implemented.
muse_raw refuses methods under account/, mcpServer/oauth, and any method whose name contains login or logout, and writes an audit line with the method name only.
Tests
npm test
npm run typechecknpm test uses a scripted fake muse serve. It does not launch the real CLI.
Live checks against the installed muse are off unless you opt in. They spend model calls:
MUSE_MCP_LIVE=1 node --experimental-strip-types --test --test-timeout=300000 test/live.test.tsLicense
Licensed under the 0BSD license (see LICENSE).
This is an independent project. It is not affiliated with or endorsed by Meta. Muse and Muse Code are trademarks of Meta Platforms, Inc.
This server cannot be deployed
Maintenance
Related MCP Connectors
Start and manage Reason cloud coding agents, projects and sessions from any MCP client.
Hosted MCP memory and agent control plane for durable conversations, jobs, and operations.
- aXDeprecatedio.github.ax-platform
Agent-native collaboration network: orchestrate a team of long-running agents from any MCP client.
Persistent memory and cross-session learning for AI coding assistants (hosted remote MCP).
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables MCP clients to spawn and control Codex CLI and Claude Code sessions on the host machine, with session management and filesystem access.4MIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients like Claude Code to delegate coding tasks to the local Cursor Agent CLI, with persistent per-workspace sessions that resume across calls.12 npmMIT
- FlicenseNot gradedqualityBmaintenanceEnables MCP hosts like Claude Code and Codex to spawn, manage, and interact with persistent, reusable Pi coding-agent sessions, supporting task dispatch, status checks, and session lifecycle control.2 npm-
- AlicenseBqualityBmaintenanceEnables launching and supervising local Codex and Claude Code agent sessions and one-shot tasks, exposing run, list, stop, and output operations over MCP with session-scoped permissions and sandbox controls.2836 npm1MIT