Skip to main content
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.

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.

Using the CLI

droid mcp add context7 https://mcp.context7.com/mcp --type http --header "CONTEXT7_API_KEY: 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):
{
  "mcpServers": {
    "context7": {
      "type": "http",
      "url": "https://mcp.context7.com/mcp",
      "headers": {
        "CONTEXT7_API_KEY": "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