← 返回
未分类 中文

Morrow Context7

Look up current, accurate documentation and code examples for any library or framework using context7-mcp. Use when an agent needs to know how to use a libra...
使用 context7-mcp 查找任何库或框架的最新文档和代码示例。当代理需要了解如何使用某个库时使用。
timesandplaces timesandplaces 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 288
下载
💾 0
安装
1
版本
#latest

概述

context7

Look up live, accurate documentation for any library via the context7-mcp server. Prevents hallucinated APIs by fetching real, indexed documentation at query time.

When to Use

Use this skill any time you need accurate, current details about a library — method signatures, config schemas, integration examples, version-specific behaviour. context7 indexes 5000+ libraries including OpenClaw, LangChain, Next.js, Supabase, FastAPI, and more.

Do not rely on training data alone for library-specific questions; use this skill instead.

How context7-mcp Works

context7-mcp is a Model Context Protocol (MCP) server that queries context7.com for indexed documentation. It exposes two tools:

  • resolve-library-id — resolve a library name to its context7 library ID
  • query-docs — fetch documentation snippets for a specific library + query

The server runs via npx -y @upstash/context7-mcp with no auth required.

Workflow

Step 1: Resolve the library ID

Call resolve-library-id with the library name and your task as the query. Pick the result with the highest Benchmark Score and Source Reputation: High or Medium that matches your intent.

resolve-library-id(
  libraryName: "openclawai",
  query: "how to configure mcp.servers"
)

Use the returned library ID (format: /org/project) in step 2.

Step 2: Fetch documentation

Call query-docs with the library ID and a specific, task-focused query. Narrow queries return better results than broad ones.

query-docs(
  libraryId: "/websites/openclaw_ai",
  query: "mcp.servers configuration add local stdio process"
)

Step 3: Apply the result

Use the returned code snippets and prose directly. They come with source URLs — cite them when precision matters.

Tips

  • Narrow queries beat broad ones. "How to authenticate with JWT in Express" beats "authentication".
  • Try multiple queries if the first result is shallow — rephrase around what you actually need to do.
  • Use the source URL in results to fetch more context with web_fetch if a snippet is incomplete.
  • Call resolve-library-id once per library per session — cache the ID rather than resolving it repeatedly.
  • Don't call either tool more than 3 times per question — if 3 calls haven't found it, use the best result you have.

OpenClaw MCP Integration

If context7-mcp is configured as an OpenClaw MCP server, the tools (resolve-library-id, query-docs) appear natively in your tool surface without running a subprocess. Apply the same workflow — the tool names and arguments are identical.

To check if it's configured: run /mcp show and look for context7.

To configure it (operator slash command):

/mcp set context7="{\"command\":\"npx\",\"args\":[\"-y\",\"@upstash/context7-mcp\"]}"

Manual Testing

To verify context7-mcp works on your system:

echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1"}}}
{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}' \
  | npx -y @upstash/context7-mcp 2>/dev/null | grep '"name"'

Expected output includes resolve-library-id and query-docs.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-07 12:33 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-agent

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,450 📥 329,570
ai-agent

self-improving agent

pskoett
记录自身发现以实现自我改进的技能
★ 4,175 📥 945,998
ai-agent

Find Skills

root
帮助用户发现和安装智能体技能,当用户询问如「如何做X」、「找X的技能」、「有能做...的吗」等问题时
★ 1,528 📥 582,693