Context7 リモートMCPを Claude にMCP接続する方法(設定手順)
Upstash のリモートMCPサーバーを Claude に約1分でMCP接続。OAuth / 401 の問題は先に OAuth 2.1 デバッガーで確認できます。
Streamable HTTPhttps://mcp.context7.com/mcp
Install in Cursor →
Or add to ~/.cursor/mcp.json:
{
"mcpServers": {
"context7": {
"url": "https://mcp.context7.com/mcp"
}
}
}claude mcp add --transport http context7 https://mcp.context7.com/mcp
Install in VS Code →
Or add to .vscode/mcp.json:
{
"servers": {
"context7": {
"type": "http",
"url": "https://mcp.context7.com/mcp"
}
}
}- Open Settings → Connectors (Integrations) → Add Custom Connector.
- Paste the endpoint URL:
https://mcp.context7.com/mcp - No authentication needed — tools are available immediately.
Bridge the remote endpoint into stdio with mcp-remote in claude_desktop_config.json:
{
"mcpServers": {
"context7": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://mcp.context7.com/mcp"
]
}
}
}Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"context7": {
"serverUrl": "https://mcp.context7.com/mcp"
}
}
}Add to ~/.kiro/settings/mcp.json (or .kiro/settings/mcp.json in your workspace), then reopen Kiro's Agent panel to pick up the server:
{
"mcpServers": {
"context7": {
"url": "https://mcp.context7.com/mcp"
}
}
}Add to ~/.codex/config.toml — Codex reads remote HTTP servers from [mcp_servers.*] tables:
[mcp_servers.context7] url = "https://mcp.context7.com/mcp"
Add to cline_mcp_settings.json (Cline → MCP Servers → Configure), or paste it via Cline's MCP marketplace file:
{
"mcpServers": {
"context7": {
"type": "streamableHttp",
"url": "https://mcp.context7.com/mcp"
}
}
}Add to ~/.gemini/settings.json under mcpServers — httpUrl for Streamable HTTP, url for legacy SSE:
{
"mcpServers": {
"context7": {
"httpUrl": "https://mcp.context7.com/mcp"
}
}
}接続手順
- コネクタ設定を開く — claude.ai → Settings → Connectors で「カスタムコネクタを追加」を選択します。
- リモートエンドポイントを入力 —
https://mcp.context7.com/mcpを Remote MCP Server URL として貼り付けて保存します。 - 認証を完了 — 認証は不要です。Context7 MCP は公開エンドポイントです。
- 検証 — オンライン Inspector に
https://mcp.context7.com/mcpを貼り付け、initialize と tools/list を実行して接続を確認します。
🧰 ツール一覧(2)
| Tool | Safety | Description | Parameters |
|---|---|---|---|
| resolve-library-id ~724 tok | 🟢 Readidempotentopen-world | Resolves a package/product name to a Context7-compatible library ID and returns matching libraries. You MUST call this function before 'Query Documentation' tool to obtain a valid Context7-compatible library ID UNLESS the user explicitly provides a library ID in the format '/org/project' or '/org/project/version' in their query. Each result includes: - Library ID: Context7-compatible identifier (format: /org/project) - Name: Library or package name - Description: Short summary - Code Snippets: Number of available code examples - Source Reputation: Authority indicator (High, Medium, Low, or Unknown) - Benchmark Score: Quality indicator (100 is the highest score) - Versions: List of versions if available. Use one of those versions if the user provides a version in their query. The format of the version is /org/project/version. For best results, select libraries based on name match, source reputation, snippet coverage, benchmark score, and relevance to your use case. Selection Process: 1. Analyze the query to understand what library/package the user is looking for 2. Return the most relevant match based on: - Name similarity to the query (exact matches prioritized) - Description relevance to the query's intent - Documentation coverage (prioritize libraries with higher Code Snippet counts) - Source reputation (consider libraries with High or Medium reputation more authoritative) - Benchmark Score: Quality indicator (100 is the highest score) Response Format: - Return the selected library ID in a clearly marked section - Provide a brief explanation for why this library was chosen - If multiple good matches exist, acknowledge this but proceed with the most relevant one - If no good matches exist, clearly state this and suggest query refinements For ambiguous queries, request clarification before proceeding with a best-guess match. IMPORTANT: Do not call this tool more than 3 times per question. If you cannot find what you need after 3 calls, use the best result you have. | query*: stringlibraryName*: string |
| query-docs ~512 tok | 🟢 Readidempotentopen-world | Retrieves and queries up-to-date documentation and code examples from Context7 for any programming library or framework. You must call 'Resolve Context7 Library ID' tool first to obtain the exact Context7-compatible library ID required to use this tool, UNLESS the user explicitly provides a library ID in the format '/org/project' or '/org/project/version' in their query. Do not call this tool more than 3 times per question. If you know the programming language the user is working in, pass it as `language` so the results match their setup. | libraryId*: stringquery*: stringlanguage: string |