Setup Context7 Mcp

NeoLabHQ/context-engineering-kit/skills/setup-context7-mcp

作者 NeoLabHQ23e2428e809d77717f8acc9659c374a3a1fcb93e无许可证收录于 2026年10月9日更新于 2026年10月9日

Guide for setup Context7 MCP server to load documentation for specific technologies.

仅含说明AI & Agents
AI 生成的概览

指导配置 Context7 MCP 服务器,并将推荐的文档库 ID 写入 CLAUDE.md 文件。

功能
该技能引导代理配置 Context7 MCP 服务器,先询问用户配置应放在项目级(共享或个人)还是用户级。它会检查 Context7 是否已可用,若不可用则引导用户查阅项目 README 中适用于其代理和操作系统的安装步骤。随后它在 Context7 中检索与项目所用语言和框架相关的文档,并把推荐的库 ID 写入选定的 CLAUDE.md 文件。
适用场景
当项目希望启用 Context7 MCP,以便代理获取带代码示例的最新库文档时使用。适用于项目初始搭建或入门阶段,需要把文档来源登记到 CLAUDE.md 的场景。
运行要求
需要访问 Context7 MCP 服务器,并在配置过程中联网获取 Context7 的 README。它会读取项目结构以推断所用技术,并写入 CLAUDE.md 或 CLAUDE.local.md 文件。不包含脚本,仅为说明性指令。

User Input:

text
$ARGUMENTS

Guide for setup Context7 MCP server

1. Determine setup context

Ask the user where they want to store the configuration:

Options:

  1. Project level (shared via git) - Configuration tracked in version control, shared with team

    • CLAUDE.md updates go to: ./CLAUDE.md
  2. Project level (personal preferences) - Configuration stays local, not tracked in git

    • CLAUDE.md updates go to: ./CLAUDE.local.md
    • Verify these files are listed in .gitignore, add them if not
  3. User level (global) - Configuration applies to all projects for this user

    • CLAUDE.md updates go to: ~/.claude/CLAUDE.md

Store the user's choice and use the appropriate paths in subsequent steps.

2. Check if Context7 MCP server is already setup

Check whether you have access to Context7 MCP server by making request.

if no, load https://raw.githubusercontent.com/upstash/context7/refs/heads/master/README.md file and guide user through setup process that applicable to agent/operation system.

3. Update CLAUDE.md file

Use the path determined in step 1:

  • Parse user input, if it empty read current project structure and used technologies, if project empty ask user to provide list of languages and frameworks that planned to be used in this project.
  • Search through context7 MCP for relevant technologies documentation
  • Update the appropriate CLAUDE.md file with following content:
markdown
### Use Context7 MCP for Loading Documentation
Context7 MCP is available to fetch up-to-date documentation with code examples.
**Recommended library IDs**:
- `[doc-id]` - short description of documentation

来源与署名

来源:NeoLabHQ/context-engineering-kit位于skills/setup-context7-mcp提交23e2428

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架