Skip to main content
Glama

Context7 MCP server

在 Claude Code 中安装 Context7 MCP server:

claude mcp add --scope user --transport http context7 https://mcp.context7.ai/mcp

重启 Claude Code,然后运行 claude mcp list。你要在列表中看到 context7

同样的命令也可在 context7.ai 上使用。

安装

这条命令就是安装命令。--scope user 会把安装应用到每个项目;去掉该参数则只对当前仓库生效。

API 密钥是可选的(用于速率限制和私有仓库)。在 context7.ai/dashboard 创建一个,然后运行:

claude mcp add --scope user --header "Authorization: Bearer YOUR_API_KEY" --transport http context7 https://mcp.context7.ai/mcp

Claude Desktop, Cursor, VS Code, Windsurf

JSON 配置:在 mcpServers 下添加 context7,类型设为 http,url 设为 https://mcp.context7.ai/mcp。可不改直接使用的文件:examples/claude_desktop_config.jsonexamples/cursor.jsonexamples/vscode.jsonexamples/windsurf.json

Claude Code 插件:plugins/claude/context7。技能:skills/context7-mcp/SKILL.md。MCP 注册清单:server.json

远程 HTTP 与本地 npx:本页面讲的是远程方式。npx ctx7 setupnpx -y @upstash/context7-mcp 是本地/stdio 路径。我使用远程方式,所以不需要再启动一个 Node 进程。

Related MCP server: MCP Framework Documentation Server

用法

当你问某个特定库的问题时,在提示词中加上 use context7

工具

一旦连接成功,你就能用上 Context7 的工具:resolve-library-idquery-docs

故障排查

遇到 context7 mcp not connecting / context7 mcp server not found:运行 claude mcp list。如果列表里没有,说明添加未生效,或者你跳过了重启。如果列表里有但失去连接,通常是因为你在同一“名称下同时添加了 mcp.context7.aimcp.context7.com

遇到 spawn context7-mcp ENOENT:这是本地 stdio 安装,找不到可执行文件。请使用上面的远程 HTTP 命令。

链接

许可证

MIT

A
license - permissive license
Not graded
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • @latest documentation and code examples to 9000+ libraries for LLMs and AI code editors in a singl…

  • Your memory, everywhere AI goes. Build knowledge once, access it via MCP anywhere.

  • Augments MCP Server - A comprehensive framework documentation provider for Claude Code

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/falcon077/context7-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server