# Factory

Factory's Droid CLI uses `droid mcp add` to register MCP servers. One command points Droid at the Cakewalk gateway. OAuth runs through the in-session `/mcp` interactive manager on first connection.

## Install Method

CLI command. Droid stores the server config in `~/.factory/mcp.json` (user scope) or `.factory/mcp.json` in the project root (project scope, shared via Git).

## Step 1: Run droid mcp add

In your terminal, run:

```bash
droid mcp add cakewalk https://mcp-gateway.getcakewalk.io/mcp --type http
```

Running this command from outside a project directory typically registers at user scope. Running it from inside a project (where `.factory/mcp.json` exists or is created) registers at project scope and can be shared with your team via Git.

## Step 2: Authenticate

Start a Droid session and run:

```
/mcp
```

Droid opens the interactive MCP manager. Select the cakewalk server, follow the browser prompt to authenticate with your Cakewalk account and approve the Connection.

## Verifying It Works

In a Droid session, run `/mcp` to open the manager. The cakewalk server appears with its connection status and the tools it exposes. In Cakewalk, the Factory card on **My Agents** flips to **Connected** after the first agent call.

## Troubleshooting

* **Server missing from /mcp:** confirm the scope. A server added at one project's `.factory/mcp.json` does not appear in another. Re-run `droid mcp add` from the right directory, or add at user scope with no `.factory/mcp.json` present in the current directory.
* **OAuth browser prompt does not appear:** open `/mcp` in Droid and trigger the authentication flow from the interactive manager directly.

## Other Install Paths

You can skip the CLI and edit `~/.factory/mcp.json` (user) or `.factory/mcp.json` (project) directly. The CLI command above produces the same effect; manual edit is the alternative for teams managing config in source control.

## Learn more

* [MCP configuration in Droid](https://docs.factory.ai/cli/configuration/mcp) from Factory.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.cakewalk.security/docs/ai-agent-access/connections-and-integrations/agent-platforms/factory.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
