Try Bifrost Enterprise free for 14 days.
Request access
[ HTTP MCP ]

How to Use Context7 MCP Server with Bifrost

Provide AI coding assistants with current, version-specific library documentation and code examples through Context7.

[ MCP SERVER SUMMARY ]

Context7 MCP server summary

Context7 pulls up-to-date, version-specific library documentation and code examples into AI coding sessions. Bifrost registers the remote MCP endpoint, injects your API key once, and applies per-key tool policies for resolve-library-id and query-docs.

PropertyDetails
CompanyUpstash
Connection typeHTTP
AuthenticationContext7 API key (recommended)
Package or endpointhttps://mcp.context7.com/mcp
CapabilitiesLibrary ID resolution, Version-specific docs retrieval, Up-to-date code examples
Official documentationContext7 MCP documentation

Before you start

  • Optional Context7 API key from context7.com/dashboard for higher rate limits

What you can do with Context7

  • Stop agents from hallucinating APIs by forcing Context7 docs tools
  • Share one Context7 key across Cursor and Claude Code via Bifrost
  • Monitor docs-fetch volume against rate limits
DocumentationDeveloper Tools

[ HOW TO CONNECT ]

Connect Context7 to Bifrost in three steps

1

Install Bifrost

Start the gateway locally or deploy in your VPC.

npx -y @maximhq/bifrost
2

Add Context7 in MCP Gateway

Open MCP Gateway in the Bifrost dashboard, click New MCP Server, and choose HTTP. Or register via the API below.

• Remote URL: https://mcp.context7.com/mcp.

• Pass CONTEXT7_API_KEY via headers for higher rate limits.

• STDIO package @upstash/context7-mcp is also available if you prefer local.

3

Point clients at Bifrost /mcp

Configure Claude Desktop, Cursor, or Claude Code to use your Bifrost endpoint with a virtual key instead of connecting directly to Context7.

{
  "mcpServers": {
    "bifrost": {
      "url": "http://localhost:8080/mcp",
      "headers": {
        "Authorization": "Bearer vk_your_virtual_key"
      }
    }
  }
}

[ EXAMPLE CONFIG ]

Register Context7 via API

Add this MCP client with a POST to /api/mcp/client. See Connecting to MCP Servers for full options.

curl -X POST http://localhost:8080/api/mcp/client \
  -H "Content-Type: application/json" \
  -d '{
    "name": "context7",
    "connection_type": "http",
    "connection_string": "https://mcp.context7.com/mcp",
    "auth_type": "headers",
    "headers": {
      "CONTEXT7_API_KEY": "env.CONTEXT7_API_KEY"
    },
    "tools_to_execute": [
      "*"
    ]
  }'

[ WHY BIFROST ]

Run Context7 through one governed gateway

Access control

Virtual keys, RBAC, and tool allowlists per team or agent.

Cost governance

Attribute MCP tool spend alongside LLM usage in one view.

Observability

Log every tool call with latency, server, and virtual key metadata.

Credential isolation

Upstream secrets stay in the gateway — not on every laptop.

[ FAQ ]

Common questions

What does the Context7 MCP server do?

Context7 exposes library id resolution, version-specific docs retrieval, up-to-date code examples to MCP-compatible AI clients. Bifrost connects to it as an upstream MCP client and exposes approved tools through one governed /mcp endpoint.

How does Context7 authenticate when used with Bifrost?

Context7 uses Context7 API key (recommended). Store credentials in Bifrost's environment or credential configuration so they stay at the gateway instead of being copied into every AI client.

Can Claude Desktop, Cursor, or Claude Code use Context7 through Bifrost?

Yes. After registering Context7 in Bifrost, point any HTTP MCP-compatible client at the Bifrost /mcp endpoint and authenticate with a virtual key. The client sees only the tools allowed for that key.

[ MCP GATEWAY ]

One gateway for Context7 and every other MCP server

Bifrost MCP Gateway gives you tool-level access control, audit logs, and up to 92% lower token costs when agents orchestrate multiple tools.