Skip to content

Latest commit

 

History

History
54 lines (40 loc) · 1.91 KB

oauth.md

File metadata and controls

54 lines (40 loc) · 1.91 KB
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
context7
docs

Set Up OAuth

Authenticate with Context7 MCP server using OAuth 2.0

OAuth is only available for remote HTTP connections. For local MCP connections using stdio transport, use [API key authentication](/howto/api-keys) instead.

Context7 MCP server supports OAuth 2.0 authentication for MCP clients that implement the MCP OAuth specification.

Why Use OAuth?

Feature OAuth API Keys
No manual key management ✅ ❌
Automatic token refresh ✅ ❌
Works with stdio transport ❌ ✅

Configuration

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"

How It Works

  1. Your MCP client connects to the OAuth endpoint
  2. You're redirected to Context7 to sign in
  3. After signing in, you're redirected back to your client
  4. Your client automatically handles token refresh
**Authentication required after setup.** Most clients won't authenticate automatically. After adding the OAuth endpoint, you'll need to explicitly authenticate through your client's MCP settings. For example, in Claude Code run `/mcp`, select the server, and choose "Authenticate".

Client Support

OAuth authentication requires your MCP client to support the MCP OAuth specification. If your client doesn't support OAuth, use API key authentication instead.