| title | Set Up OAuth | ||
|---|---|---|---|
| description | Authenticate with Context7 MCP server using OAuth 2.0 | ||
| product | Context7 | ||
| section | docs | ||
| source_url | https://context7.com/docs/howto/oauth | ||
| fetched | 2026-09-26 | ||
| tags |
|
OAuth is only available for remote HTTP connections. For local MCP connections using stdio transport, use [API key authentication](/howto/api-keys) instead.Authenticate with Context7 MCP server using OAuth 2.0
Context7 MCP server supports OAuth 2.0 authentication for MCP clients that implement the MCP OAuth specification.
| Feature | OAuth | API Keys |
|---|---|---|
| No manual key management | ✅ | ❌ |
| Automatic token refresh | ✅ | ❌ |
| Works with stdio transport | ❌ | ✅ |
To use OAuth, change the endpoint from /mcp to /mcp/oauth in your client configuration:
- "url": "https://mcp.context7.com/mcp"
+ "url": "https://mcp.context7.com/mcp/oauth"- Your MCP client connects to the OAuth endpoint
- You're redirected to Context7 to sign in
- After signing in, you're redirected back to your client
- Your client automatically handles token refresh
OAuth authentication requires your MCP client to support the MCP OAuth specification. If your client doesn't support OAuth, use API key authentication instead.