> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Muse Code

> Add Spiral to Meta's Muse Code CLI as a remote MCP server: ask Muse to add it, sign in, no API key.

**1. Install Muse Code**

```bash theme={null}
curl -fsSL https://dev.meta.ai/install.sh | bash
```

**2. Ask Muse to add the server**

Start `muse` and ask:

```text theme={null}
Add the Spiral MCP server at https://api.spiral.ai/mcp
```

Muse writes the config and names the server, usually `spiral`.

**3. Sign in**

In your terminal, run:

```bash theme={null}
muse mcp login spiral
```

Use the name Muse chose if it differs. Your browser opens: sign in to Spiral, pick the organization and click
**Authorize**. No API key. The running session picks up the sign-in without a restart.

**4. Check it**

```bash theme={null}
muse mcp list
```

It shows Spiral and its sign-in status. Inside a session, `/mcp` lists the connected servers and their tools.

**5. Try a starter prompt**

```text theme={null}
Find a text-to-image tool, tell me what one image costs, then generate a lighthouse at dawn.
```

> [accordion] Edit the config yourself
>
> Put this in `~/.config/muse/settings.json`, then run `muse mcp login spiral`. The file must include
> `"schema_version": 1`. If it already has a server block (`mcp_servers` or `mcpServers`), add Spiral to that block
> instead of adding a second one:
>
> ```json theme={null}
> {
>   "schema_version": 1,
>   "mcp_servers": {
>     "spiral": {
>       "transport": "streamable_http",
>       "url": "https://api.spiral.ai/mcp",
>       "mode": "optional"
>     }
>   }
> }
> ```
>
> `"mode": "optional"` lets Muse start without Spiral when it cannot reach it.

> [accordion] With an API key instead
>
> Create a key in the [console](https://spiral.ai/start) under **API keys**, keep it in `SPIRAL_API_KEY`, and add
> the header to the Spiral entry. Muse reads the key from your environment:
>
> ```json theme={null}
> {
>   "schema_version": 1,
>   "mcp_servers": {
>     "spiral": {
>       "transport": "streamable_http",
>       "url": "https://api.spiral.ai/mcp",
>       "headers": { "Authorization": "Bearer ${SPIRAL_API_KEY}" },
>       "mode": "optional"
>     }
>   }
> }
> ```

If something does not work, see [Troubleshooting](/docs/mcp-server.md#troubleshooting).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.