How to Use Claude Code and Codex With Meta Muse: Every Setup That Actually Works

TL;DR
You cannot install Claude Code or Codex inside the Meta Muse app, but you can run both agents on Muse Spark 1.3 through the Meta Model API, use Muse Spark from OpenCode Go, and bring your Claude Code and Codex setup into Muse Code.
Short answer: there is no documented way to plug Claude Code or Codex into the Meta Muse personal agent app. What does exist, and what Meta documents itself, is the reverse: you can point Claude Code or Codex at Muse Spark 1.3 through the Meta Model API, so your familiar agent runs on Meta's model. Claude Code connects through Meta's Anthropic-compatible Messages endpoint, and Codex connects through the Responses API. On top of that, OpenCode Go serves the cheaper muse-spark-1.3-contributor and muse-spark-1.2-contributor models, and Meta's own terminal agent, Muse Code, can import your Claude Code and Codex skills, memory, and MCP servers.
This guide covers each of those paths with configs taken from the official docs as of September 28, 2026, plus the one thing people keep asking for that is not a real feature yet.
Official Sources#
| Resource | Link |
|---|---|
| Meta: Use Model API with coding agents | dev.meta.ai/docs/coding-agents |
| Meta: Pricing and rate limits | dev.meta.ai/docs/pricing-rate-limits |
| Meta: Models | dev.meta.ai/docs/models |
| Meta: Muse Code extending (skills, MCP, migrate) | dev.meta.ai/docs/muse-code/extending |
| Meta AI Research: Introducing Muse Spark 1.3 | research.meta.ai/blog/introducing-muse-spark-1-3 |
| Meta AI Research: How We Built Safety Into Muse | research.meta.ai/blog/security-and-safety-for-ai-agents-our-approach-with-muse |
| OpenCode Go docs | opencode.ai/docs/go |
| Claude Code environment variables | code.claude.com/docs/en/env-vars |
What "Meta Muse" Means Today#
"Muse" is now a brand covering several different things, and the answer to "how do I add Claude Code to Muse" depends on which one you mean.
| Name | What it is | Relevant to Claude Code or Codex? |
|---|---|---|
| Muse (the app) | Meta's personal agent, launched September 8, 2026. Each user gets a dedicated cloud VM with a shell and browser; iOS, Android, and web clients connect to it. | No documented coding-agent integration |
| Muse Spark 1.3 | Meta's closed-weight agentic and coding model, released September 2, 2026, with a 1M-token context window | Yes, as the model behind Claude Code or Codex |
| Meta Model API | The hosted API at api.meta.ai with Responses, Chat Completions, and Anthropic-compatible Messages endpoints | Yes, this is the bridge |
| Muse Code | Meta's own terminal coding agent (muse), for macOS, Linux, and Windows | Yes, it imports Claude Code and Codex setups |
| Muse Glimmer | An open-weight 30B model you self-host | Indirectly, through any local provider |
We covered the model line in the Muse Spark 1.1 developer guide and the Muse Code and Spark 1.2 launch. The 1.3 release is about efficiency: Meta says that in its own engineers' comparisons the model used about 20% fewer tool calls and 25% fewer tokens than 1.2. Meta also says 1.3 was "trained across a diverse set of harnesses," which matters here. The 1.2 launch leaned on co-training with Muse Code, so running it in a third-party agent was a real tradeoff. For 1.3, Meta explicitly targets other harnesses.
Path 1: Claude Code on Muse Spark 1.3#
Claude Code speaks the Anthropic Messages format, and the Meta Model API exposes a Messages-compatible endpoint. Meta's coding-agents guide gives this exact environment block:
export ANTHROPIC_BASE_URL="https://api.meta.ai"
export ANTHROPIC_AUTH_TOKEN="$MODEL_API_KEY"
export ANTHROPIC_MODEL="muse-spark-1.3"
export ANTHROPIC_DEFAULT_OPUS_MODEL="muse-spark-1.3"
export ANTHROPIC_DEFAULT_SONNET_MODEL="muse-spark-1.3"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="muse-spark-1.3"
export CLAUDE_CODE_SUBAGENT_MODEL="muse-spark-1.3"
export ENABLE_TOOL_SEARCH="true"
claude
Four details decide whether this works:
- No
/v1on the base URL. Claude Code appends/v1/messagesitself, so the host is justhttps://api.meta.ai. - Use
ANTHROPIC_AUTH_TOKEN, notANTHROPIC_API_KEY. Claude Code sends the auth token asAuthorization: Bearer <key>, which is what Meta expects.ANTHROPIC_API_KEYsends anx-api-keyheader instead. - Pin every alias. Plan Mode, subagents, and background tasks such as commit messages go through the
opus,sonnet, andhaikualiases. Leave one unset and that path tries to reach a Claude model that Meta does not serve. - Turn tool search back on. Claude Code disables MCP tool search by default when
ANTHROPIC_BASE_URLpoints at a non-first-party host.ENABLE_TOOL_SEARCH=truerestores it, and Meta lists MCP server tools as supported on this path.
One side effect from Claude Code's own docs: as of v2.1.196, Remote Control is disabled whenever ANTHROPIC_BASE_URL points anywhere other than api.anthropic.com. If you use Remote Control, keep the Muse setup in a separate shell instead of your profile. A small wrapper function does that:
muse-claude() {
ANTHROPIC_BASE_URL="https://api.meta.ai" \
ANTHROPIC_AUTH_TOKEN="$MODEL_API_KEY" \
ANTHROPIC_MODEL="muse-spark-1.3" \
ANTHROPIC_DEFAULT_OPUS_MODEL="muse-spark-1.3" \
ANTHROPIC_DEFAULT_SONNET_MODEL="muse-spark-1.3" \
ANTHROPIC_DEFAULT_HAIKU_MODEL="muse-spark-1.3" \
CLAUDE_CODE_SUBAGENT_MODEL="muse-spark-1.3" \
ENABLE_TOOL_SEARCH="true" \
claude "$@"
}
Meta's support table for Claude Code lists file edits, shell commands, tool calling, image input, PDF input, and MCP tools. The Messages adapter is stateless, and Claude Code keeps history on the client, so multi-turn sessions work normally. If you are building your own agent rather than using the CLI, the same variables work with the Claude Agent SDK. Meta's agent frameworks guide includes a full query() example.
Path 2: Codex on Muse Spark 1.3#
Codex uses the Responses API, and that is also the surface Meta recommends for multi-step work because it replays reasoning across turns. Add this to ~/.codex/config.toml:
model = "muse-spark-1.3"
model_provider = "meta"
model_reasoning_effort = "high"
model_reasoning_summary = "auto"
model_context_window = 1048576
model_supports_reasoning_summaries = true
model_auto_compact_token_limit = 900000
[model_providers.meta]
name = "Meta Model API"
base_url = "https://api.meta.ai/v1"
env_key = "MODEL_API_KEY"
wire_api = "responses"
Then export your key and run it:
export MODEL_API_KEY="<your-model-api-key>"
codex
codex exec "fix the failing test"
If you are already signed into Codex with an OpenAI account, Meta says to run /logout first so Codex uses the meta provider. To keep this away from your normal Codex setup entirely, point CODEX_HOME at a separate directory and pass the provider inline:
CODEX_HOME=/tmp/codex-modelapi codex \
-m muse-spark-1.3 \
-c 'model_provider="meta"' \
-c 'model_providers.meta.name="Meta Model API"' \
-c 'model_providers.meta.base_url="https://api.meta.ai/v1"' \
-c 'model_providers.meta.env_key="MODEL_API_KEY"' \
-c 'model_providers.meta.wire_api="responses"' \
-c 'model_reasoning_effort="xhigh"'
Two notes. Meta says the max reasoning level is available on Standard-tier muse-spark-1.3 only, not on the Contributor variant. And if you embed Codex through codex app-server instead of the CLI, Meta documents an extra step: Codex's model-list refresh fails against the standard /v1/models response, so you register the model through model_catalog_json. The agent frameworks guide walks through it.
Path 3: OpenCode, Direct or Through OpenCode Go#
OpenCode is where the opencode-go/muse-spark-1.3-contributor model ID comes from. You can use Muse Spark in OpenCode two ways.
Direct to Meta, with any tier. Meta recommends the @ai-sdk/openai adapter because it targets the Responses API and replays encrypted reasoning. Add this to opencode.json:
{
"provider": {
"meta": {
"name": "Meta Model API",
"npm": "@ai-sdk/openai",
"options": { "baseURL": "https://api.meta.ai/v1" },
"models": {
"muse-spark-1.3": {
"name": "muse-spark-1.3",
"reasoning": true,
"limit": { "context": 1048576, "output": 131072 },
"modalities": {
"input": ["text", "image", "pdf", "video"],
"output": ["text"]
},
"options": {
"reasoningEffort": "high",
"reasoningSummary": "auto",
"include": ["reasoning.encrypted_content"]
}
}
}
}
}
}
Store the key with /connect rather than in the file, then restart OpenCode. Meta warns that the simpler @ai-sdk/openai-compatible adapter does not preserve reasoning across turns, which can make the model repeat or contradict itself in long tool loops.
Through OpenCode Go, Contributor tier only. Subscribe to Go, run /connect, pick OpenCode Go, paste the key, and choose opencode-go/muse-spark-1.3-contributor from /models. OpenCode's docs list both Muse models at $0.10 input and $0.20 output per million tokens, with a $60 monthly usage allowance on the $10 Go plan and $120 on the $40 Go Plus plan. OpenCode also flags Muse availability as limited to regions allowed by Meta's Geographic Use Policy. Our OpenCode developer guide covers the rest of the setup.
Path 4: Codex Through OpenCode Go#
OpenCode Go lists Codex as a validated client, and Go serves the Muse Contributor models on its Responses endpoint, https://opencode.ai/zen/go/v1/responses. Codex's wire_api = "responses" is the matching protocol. The combination looks like this:
model = "muse-spark-1.3-contributor"
model_provider = "opencode-go"
[model_providers.opencode-go]
name = "OpenCode Go"
base_url = "https://opencode.ai/zen/go/v1"
env_key = "OPENCODE_GO_API_KEY"
wire_api = "responses"
To be clear about sourcing: neither OpenCode nor Meta publishes this exact file. It combines OpenCode's endpoint table with Codex's documented provider fields, so treat it as a starting point and confirm it with a small task first.
Claude Code through OpenCode Go does not work for Muse. Go serves Muse only on /responses, not on the Anthropic-format /messages endpoint it uses for some other models. For Claude Code, go directly to Meta (Path 1).
Path 5: Bring Claude Code and Codex Into Muse Code#
If what you really want is for Meta's agent to inherit your existing setup, Muse Code handles that natively:
- Skills. Muse Code discovers
~/.claude/skillsand$CODEX_HOME/skills(falling back to~/.codex/skills) by default, and scans repo-local.claude/skillsand.codex/skills. To copy them in explicitly, runmuse skills import --from claudeor--from codex. - Memory and MCP servers. The bundled
/migrateskill imports your Claude Code or Codex memory notes and MCP servers. - Project rules. Muse Code reads
AGENTS.md,CLAUDE.md,.agents/AGENTS.md, and.claude/CLAUDE.mdat each directory level once you trust the workspace.
Install and run it:
curl -fsSL https://dev.meta.ai/install.sh | sh
muse --model muse-spark-1.3
The docs still list muse-spark-1.2 as the default model, so pass --model or switch with /models.
Claude Code as a tool inside Muse Code. Claude Code can run as a stdio MCP server with claude mcp serve, and Muse Code accepts stdio MCP servers in ~/.config/muse/settings.json:
{
"schema_version": 1,
"mcp_servers": {
"claude-code": {
"transport": "stdio",
"command": "claude",
"args": ["mcp", "serve"],
"mode": "optional"
}
}
}
Meta does not document this particular pairing, so read the caveats from both sides. Anthropic says the MCP server exposes Claude Code's tools and leaves per-call confirmation to the client. Meta says MCP tools run outside Muse Code's sandbox. We explain the protocol itself in What is MCP.
Codex cannot be attached the same way. OpenAI has removed codex mcp-server and pointed integrators to the Codex app server, which uses its own JSON-RPC protocol rather than MCP.
What About the Muse App Itself?#
The Muse personal agent runs in a dedicated cloud VM with a shell, a browser, and connectors to services like email and other Meta apps. Meta says Muse "can also write its own custom connectors" for services that have APIs or CLIs. But Meta publishes no Claude Code or Codex connector, and all network egress goes through a Sentinel that the agent cannot override. Installing a third-party coding agent inside a consumer agent VM is not a supported workflow, so we are not publishing steps for it. If Meta ships an official connector or a Muse Code hand-off, this guide will be updated.
Pricing and Limits#
From Meta's pricing page, per million tokens:
| Tier | Models | Input | Cached input | Output | Rate limit |
|---|---|---|---|---|---|
| Standard | muse-spark-1.3, 1.2, 1.1 | $1.25 | $0.15 | $4.25 | 3,000 RPM, 4M TPM |
| Contributor | muse-spark-1.3-contributor, 1.2-contributor | $0.10 | $0.002 | $0.20 | 100 RPM, 3M TPM |
The Contributor tier gives Meta permission to train on your prompts and completions. OpenCode's privacy table marks both Muse Contributor models as used for training and not zero-data-retention. Meta charges no long-context premium, and limits apply per team, not per key. The 100 RPM cap on Contributor is the one to watch: agent loops with parallel subagents can hit it quickly. For deciding where a cheap tier belongs in a mixed setup, see our model routing recipes.
Which Path Should You Pick?#
| Path | Agent | Endpoint | Tiers | Reasoning replay | Sourcing |
|---|---|---|---|---|---|
| 1 | Claude Code | api.meta.ai Messages | Standard, Contributor | Client-side history | Meta-documented |
| 2 | Codex | api.meta.ai/v1 Responses | Standard, Contributor | Yes | Meta-documented |
| 3a | OpenCode | api.meta.ai/v1 Responses | Standard, Contributor | Yes (@ai-sdk/openai) | Meta-documented |
| 3b | OpenCode | OpenCode Go | Contributor only | Yes | OpenCode-documented |
| 4 | Codex | OpenCode Go | Contributor only | Yes | Assembled from both docs |
| 5 | Muse Code | Meta, native | Both | Native | Meta-documented |
- You live in Claude Code and want a cheaper or second-opinion model: use Path 1 with the wrapper function, so your normal Claude setup is untouched.
- You live in Codex: use Path 2 with
CODEX_HOMEisolation. - You already pay for OpenCode Go and your code is not sensitive: Path 3b is the cheapest way to try Muse Spark.
- You want the model at its best: Muse Code with
/migrategives you Meta's own harness without rebuilding your skills. Our Claude Code vs Codex vs Cursor vs OpenCode comparison covers how the harnesses differ.
FAQ#
Can I add Claude Code to the Meta Muse app?#
No. Meta documents no Claude Code or Codex connector for the Muse personal agent. What Meta supports is running Claude Code on Muse Spark through the Anthropic-compatible Messages endpoint at https://api.meta.ai.
What is the model ID for Muse Spark in Claude Code?#
muse-spark-1.3, or muse-spark-1.3-contributor for the discounted tier. Set it on ANTHROPIC_MODEL, all three ANTHROPIC_DEFAULT_*_MODEL aliases, and CLAUDE_CODE_SUBAGENT_MODEL.
Why does Claude Code return auth errors against api.meta.ai?#
The usual cause is using ANTHROPIC_API_KEY, which sends x-api-key. Meta authenticates with a bearer token, so set ANTHROPIC_AUTH_TOKEN instead. Also check that the base URL has no /v1 suffix.
What does opencode-go/muse-spark-1.3-contributor cost?#
$0.10 input, $0.20 output, and $0.002 cached read per million tokens, drawn from your Go plan's monthly allowance: $60 on Go and $120 on Go Plus. Meta may train on that traffic.
Can Codex use Muse Spark's max reasoning level?#
Yes, on Standard-tier muse-spark-1.3 via model_reasoning_effort = "max". Meta says max is not available on the Contributor variant through the Model API.
Does Muse Code read my CLAUDE.md?#
Yes. It checks AGENTS.md, CLAUDE.md, .agents/AGENTS.md, and .claude/CLAUDE.md at each level up to the git root, after you trust the workspace.
Sources#
All fetched September 28, 2026.
Last updated: September 28, 2026
Continue Reading#
- Meta Ships Muse Code and Muse Spark 1.2 - the harness and the Contributor tier's debut
- Meta Muse Spark 1.1 Developer Guide - the original Model API launch and SDK basics
- Muse Glimmer 30B - the open-weight model you can run locally instead
- Claude Code vs Codex vs Cursor vs OpenCode - picking the harness before picking the model
- Model Routing Recipes to Cut AI Spend - where a $0.10 tier fits in a mixed setup
Get the next deep dive like this in your inbox
One email a week on Meta and the rest of the AI dev stack. Free.
Read next on Claude Code
Meta Ships Muse Code and Muse Spark 1.2: A Terminal Agent With a 12x Cheaper Contributor Tier
Meta released Muse Code, a terminal coding agent, and Muse Spark 1.2 on August 5, 2026. The model co-trains with the harness, logs every call to a replay-safe event log, and offers a $0.10/$0.20 contributor tier if Meta may train on your data.
7 min readMeta Muse Spark 1.1 Developer Guide: First Paid Meta API for Agentic Tasks
Meta launches Muse Spark 1.1 through the new Meta Model API - a 1M-token-context model for personal agentic tasks with OpenAI-compatible endpoints, $20 free credits, and pricing that undercuts the competition.
7 min readMuse Glimmer 30B: Meta's Open-Weight Local Agent Model, Benchmarks, and Hardware Reality
Meta open-sourced Muse Glimmer, a 30B Apache 2.0 multimodal agent model that runs in a 24GB envelope at up to 233 tok/s. MCP Atlas 75.5, SWE-Bench Verified 76.0, 131K context. Here is what the numbers actually say.
8 min readTechnical content at the intersection of AI and development. Building with AI agents, Claude Code, and modern dev tools - then showing you exactly how it works.







