> ## Documentation index
> Fetch the complete documentation index at: https://upstash-context7-git-ctx7-4280-helm-registry-login-c44ca5.docs7.io/llms.txt
> Ask it with GET https://upstash-context7-git-ctx7-4280-helm-registry-login-c44ca5.docs7.io/ask?q=<keywords or question>. Short keywords rank best.
> Use these to discover all available pages before exploring further.
> Feature requests: https://upstash-context7-git-ctx7-4280-helm-registry-login-c44ca5.docs7.io/resources/feature-requests.md lists what users asked for and how to vote for a request or add one.
> Page rating: `GET https://upstash-context7-git-ctx7-4280-helm-registry-login-c44ca5.docs7.io/feedback?path=/integrations/factory-ai&helpful={true|false}&comment={comment}` records whether this page helped. The `comment` (URL-encoded, at most 500 characters) says what helped, or what was missing or wrong; a `helpful=false` rating needs it. It is anonymous and needs no key. Comments hold no code, secrets or personal data.

# Factory AI

> AI-native software development platform with Droids

[Factory AI](https://factory.ai) is a coding agent platform that uses "Droids" to handle development tasks. By connecting Context7 as an MCP server, Factory Droids can access up-to-date library documentation during coding tasks.

For more details on how Factory AI handles MCP, see the [Factory AI MCP documentation](https://docs.factory.ai/cli/configuration/mcp).

## Setup

There are multiple ways to add Context7 as an MCP server in Factory AI. Replace `YOUR_API_KEY` with your API key from the [Context7 dashboard](https://context7.com/dashboard?tab=settings).

### Using the CLI

```bash
droid mcp add context7 https://mcp.context7.com/mcp --type http --header "Authorization: Bearer YOUR_API_KEY"
```

### Using the MCP Manager

Run the `/mcp` command inside Factory and add Context7 from the interface.

### Using a Configuration File

Add Context7 directly to your `.factory/mcp.json` (project-level) or `~/.factory/mcp.json` (user-level):

```json
{
  "mcpServers": {
    "context7": {
      "type": "http",
      "url": "https://mcp.context7.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}
```

## How It Works

Once connected, Factory Droids will query Context7 for relevant library documentation during coding tasks. This helps Droids:

- Use correct API signatures and patterns from the latest documentation
- Avoid deprecated methods or outdated usage patterns
- Generate implementations aligned with library best practices
- Produce higher-quality code with fewer revision cycles
