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

# Factory Droid

> Add Spiral to Droid, Factory's coding agent CLI, as a remote MCP server: one command, sign in, no API key.

**1. Add the server**

```bash theme={null}
droid mcp add spiral https://api.spiral.ai/mcp --type http
```

Droid saves it to your user config, `~/.factory/mcp.json`, so it works in every project.

**2. Sign in**

Start `droid`, type `/mcp`, select **spiral** and authenticate it. Sign in to Spiral in the browser and click
**Authorize**. No API key.

**3. Check it**

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

Spiral shows as **connected**. **needs authentication** means the sign-in did not finish: run `/mcp` again.

**4. 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] With an API key instead
>
> Create a key under **API keys** in the [console](https://spiral.ai/start) and keep it in the `SPIRAL_API_KEY`
> environment variable. Add Spiral to `~/.factory/mcp.json` with the key as a header and OAuth turned off:
>
> ```json theme={null}
> {
>   "mcpServers": {
>     "spiral": {
>       "type": "http",
>       "url": "https://api.spiral.ai/mcp",
>       "headers": {
>         "Authorization": "Bearer ${SPIRAL_API_KEY}"
>       },
>       "oauth": false
>     }
>   }
> }
> ```
>
> Droid fills in `${SPIRAL_API_KEY}` from your shell when it connects, so the key never sits in the file. Never put it
> in a project's `.factory/mcp.json`: that file is committed to the repository.

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.