Token导航 LogoToken导航TokenDH.com
研究检索操作浏览器github未标认证来源可访问许可证需确认审计提醒

context7-mcpcontext7 MCP 搜索

Agent Skill

context7-mcp 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

564

周安装

24

GitHub Stars

44

下载量

198
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:context7-mcp(context7 MCP 搜索)
来源仓库:https://github.com/darraghh1/my-claude-setup
仓库路径:skills/context7-mcp
安装命令:
npx skills add https://github.com/darraghh1/my-claude-setup --skill context7-mcp
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/darraghh1/my-claude-setup --skill context7-mcp

简介

context7-mcp 通过 Context7 MCP 服务器获取最新库文档,解决训练数据过时问题。

  • 适用于需要实时准确 API 参考的开发场景,支持数千种流行库的快速检索。
  • 直接调用 mcp__context7__resolve-library-id 工具而非 shell 封装,确保兼容性。
  • 使用前应确认 MCP 服务器已部署并可访问,避免因网络问题导致技能失效。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Context7 Library Documentation

You are an expert at using the Context7 MCP server to retrieve current, accurate library documentation. Context7 provides up-to-date docs for thousands of libraries and frameworks, eliminating outdated training data issues.

Critical: These Are Direct Tool Calls

MCP tools are direct tool calls — exactly like Read, Grep, or Bash. They are NOT CLI commands.

CORRECT — call the tool directly:

Tool: mcp__context7__resolve-library-id
Parameters: { "libraryName": "next.js" }

WRONG — do NOT shell out:

Bash: claude mcp call context7 resolve-library-id ...  # This does not work

All Context7 MCP tools use the mcp__context7__ prefix.

Critical: Always Resolve Library ID First

You must call resolve-library-id before query-docs unless you already have a confirmed /org/project ID from a previous call in this session.

Critical: Output Size Awareness

ToolOutput SizeNotes
resolve-library-idSmallReturns list of matching library IDs
query-docsMedium-LargeDocumentation content — scales with topic breadth. Use specific queries to limit size.

Workflow: Find & Query Documentation

Trigger: User asks about library APIs, framework patterns, configuration options, or "how to do X with Y library"

Steps

  1. Resolve the library ID: resolve-library-id({libraryName: "next.js"}) → returns matching libraries with /org/project IDs
  2. Query documentation with a specific question: query-docs({libraryId: "/vercel/next.js", query: "how to use middleware for authentication"}) → returns relevant documentation sections
  3. Refine if needed (max 3 calls per tool per question): query-docs({libraryId: "/vercel/next.js", query: "middleware matcher config"}) → more specific follow-up

Key Patterns

  • Be specific in queries: "How to set up authentication with JWT in Express.js" beats "auth"
  • Max 3 calls per tool per question — if 3 queries don't answer it, use a different approach
  • One library per query — don't try to query multiple libraries in a single query-docs call
  • Use the full /org/project format for libraryId (e.g., /vercel/next.js, /supabase/supabase)

Decision Tree

User NeedsAction
Docs for a known libraryresolve-library-idquery-docs
Not sure which library to useresolve-library-id with general term, review matches
Already have library ID from this sessionSkip resolve, go straight to query-docs
Library not found in Context7Fall back to tavily-mcp search or WebFetch for official docs site

Common Library IDs

These are frequently used in this project — skip resolve-library-id for these:

LibraryID
Next.js/vercel/next.js
React/facebook/react
Supabase JS/supabase/supabase-js
TanStack Query/tanstack/query
Zod/colinhacks/zod
React Hook Form/react-hook-form/react-hook-form
Tailwind CSS/tailwindlabs/tailwindcss
date-fns/date-fns/date-fns
Radix UI/radix-ui/primitives
Playwright/microsoft/playwright
Vitest/vitest-dev/vitest

Note: If a common ID stops working, re-resolve it — library IDs can change when repos are reorganized.

Troubleshooting

"Library not found"

  1. Try alternate names: "react-query" vs "tanstack query" vs "@tanstack/react-query"
  2. Try the npm package name: "next" vs "next.js"
  3. Try the GitHub org/repo format directly: "vercel/next.js"
  4. Fall back to tavily-mcp search for the official docs URL, then use WebFetch

Query Returns Irrelevant Results

  1. Make your query more specific — include the exact API name or concept
  2. Try rephrasing: "server actions" vs "use server directive" vs "form actions"
  3. Add version context: "Next.js 15 app router middleware" vs just "middleware"

Query Returns Too Much Content

  1. Narrow the query to a specific function or concept
  2. Ask about one feature at a time rather than broad overviews
  3. If output is still large, extract the relevant section and summarize for the user

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.67%
按下载量换算73

Claude

31.21%
按下载量换算62

Cursor

18.23%
按下载量换算36

Gemini CLI

8.61%
按下载量换算17

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills