{
  "schemaVersion": "1.0",
  "item": {
    "slug": "context7",
    "name": "Context7 MCP",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/TheSethRose/context7",
    "canonicalUrl": "https://clawhub.ai/TheSethRose/context7",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/context7",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=context7",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "package-lock.json",
      "package.json",
      "query.ts",
      "skill.md",
      "tsconfig.json"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "slug": "context7",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-02T03:19:02.346Z",
      "expiresAt": "2026-05-09T03:19:02.346Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=context7",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=context7",
        "contentDisposition": "attachment; filename=\"context7-1.0.3.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "context7"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/context7"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/context7",
    "agentPageUrl": "https://openagent3.xyz/skills/context7/agent",
    "manifestUrl": "https://openagent3.xyz/skills/context7/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/context7/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Context7 MCP",
        "body": "Context7 provides intelligent documentation search and context for any library, powered by LLMs."
      },
      {
        "title": "Setup",
        "body": "Copy .env.example to .env and add your Context7 API key:\ncp .env.example .env\n\nAdd your API key to .env:\nCONTEXT7_API_KEY=your-api-key-here\n\nGet your key from context7.com/dashboard\n\n\nInstall dependencies:\nnpm install"
      },
      {
        "title": "Usage",
        "body": "Context7 provides two main commands:"
      },
      {
        "title": "Search Command",
        "body": "Search for libraries by name with intelligent LLM-powered ranking:\n\nnpx tsx query.ts search <library_name> <query>\n\n# Examples:\nnpx tsx query.ts search \"nextjs\" \"setup ssr\"\nnpx tsx query.ts search \"react\" \"useEffect cleanup\"\nnpx tsx query.ts search \"better-auth\" \"authentication flow\"\n\nThis calls the Context7 Search API:\n\nGET https://context7.com/api/v2/libs/search?libraryName=<name>&query=<query>\n\nResponse includes:\n\nid: Library ID (e.g., /vercel/next.js)\nname: Display name\ntrustScore: Source reputation (0-100)\nbenchmarkScore: Quality indicator (0-100)\nversions: Available version tags"
      },
      {
        "title": "Context Command",
        "body": "Retrieve intelligent, LLM-reranked documentation context:\n\nnpx tsx query.ts context <owner/repo> <query>\n\n# Examples:\nnpx tsx query.ts context \"vercel/next.js\" \"setup ssr\"\nnpx tsx query.ts context \"facebook/react\" \"useState hook\"\n\nThis calls the Context7 Context API:\n\nGET https://context7.com/api/v2/context?libraryId=<repo>&query=<query>&type=txt\n\nResponse includes:\n\ntitle: Documentation section title\ncontent: Documentation text/snippet\nsource: URL to source page"
      },
      {
        "title": "Quick Reference",
        "body": "# Search for documentation\nnpx tsx query.ts search \"library-name\" \"your search query\"\n\n# Get context from a specific repo\nnpx tsx query.ts context \"owner/repo\" \"your question\""
      },
      {
        "title": "Best Practices",
        "body": "Get the most out of the Context7 API with these best practices:"
      },
      {
        "title": "Optimize Search Relevance",
        "body": "When using the /libs/search endpoint, always include the user's original question in the query parameter. This allows the API to use LLM-powered ranking to find the most relevant library for the specific task, rather than relying on a simple name match.\n\nExample: If a user asks about SSR in Next.js, search with:\n\nlibraryName=nextjs\nquery=setup+ssr\n\nThis ensures the best ranking for the specific task."
      },
      {
        "title": "Use Specific Library IDs",
        "body": "For the fastest and most accurate results with the /context endpoint, provide the full libraryId (e.g., /vercel/next.js). If you already know the library the user is asking about, skipping the search step and calling the context endpoint directly reduces latency."
      },
      {
        "title": "Leverage Versioning",
        "body": "To ensure documentation accuracy for older or specific project requirements, include the version in the libraryId using the /owner/repo/version format. You can find available version tags in the response from the search endpoint."
      },
      {
        "title": "Choose the Right Response Type",
        "body": "Tailor the /context response to your needs using the type parameter:\n\nUse type=json when you need to programmatically handle titles, content snippets, and source URLs (ideal for UI display).\nUse type=txt when you want to pipe the documentation directly into an LLM prompt as plain text."
      },
      {
        "title": "Filter by Quality Scores",
        "body": "When programmatically selecting a library from search results, use the trustScore and benchmarkScore to prioritize high-quality, reputable documentation sources for your users."
      },
      {
        "title": "Find Navigation Pages",
        "body": "Find navigation and other pages in this documentation by fetching the llms.txt file at:\n\nhttps://context7.com/docs/llms.txt"
      },
      {
        "title": "Context7 REST API",
        "body": "Search Endpoint:\n\nGET https://context7.com/api/v2/libs/search\n  ?libraryName=<library_name>\n  &query=<user_query>\n\nContext Endpoint:\n\nGET https://context7.com/api/v2/context\n  ?libraryId=<owner/repo>\n  &query=<user_query>\n  &type=txt|json"
      },
      {
        "title": "Troubleshooting",
        "body": "No results found?\n\nCheck your API key is valid\nVerify the library name is correct (e.g., 'react' not 'React')\n\nAuthentication errors?\n\nEnsure CONTEXT7_API_KEY is set in .env\nCheck your key hasn't expired at context7.com/dashboard"
      },
      {
        "title": "License",
        "body": "MIT"
      }
    ],
    "body": "Context7 MCP\n\nContext7 provides intelligent documentation search and context for any library, powered by LLMs.\n\nSetup\n\nCopy .env.example to .env and add your Context7 API key:\n\ncp .env.example .env\n\n\nAdd your API key to .env:\n\nCONTEXT7_API_KEY=your-api-key-here\n\n\nGet your key from context7.com/dashboard\n\nInstall dependencies:\n\nnpm install\n\nUsage\n\nContext7 provides two main commands:\n\nSearch Command\n\nSearch for libraries by name with intelligent LLM-powered ranking:\n\nnpx tsx query.ts search <library_name> <query>\n\n# Examples:\nnpx tsx query.ts search \"nextjs\" \"setup ssr\"\nnpx tsx query.ts search \"react\" \"useEffect cleanup\"\nnpx tsx query.ts search \"better-auth\" \"authentication flow\"\n\n\nThis calls the Context7 Search API:\n\nGET https://context7.com/api/v2/libs/search?libraryName=<name>&query=<query>\n\n\nResponse includes:\n\nid: Library ID (e.g., /vercel/next.js)\nname: Display name\ntrustScore: Source reputation (0-100)\nbenchmarkScore: Quality indicator (0-100)\nversions: Available version tags\nContext Command\n\nRetrieve intelligent, LLM-reranked documentation context:\n\nnpx tsx query.ts context <owner/repo> <query>\n\n# Examples:\nnpx tsx query.ts context \"vercel/next.js\" \"setup ssr\"\nnpx tsx query.ts context \"facebook/react\" \"useState hook\"\n\n\nThis calls the Context7 Context API:\n\nGET https://context7.com/api/v2/context?libraryId=<repo>&query=<query>&type=txt\n\n\nResponse includes:\n\ntitle: Documentation section title\ncontent: Documentation text/snippet\nsource: URL to source page\nQuick Reference\n# Search for documentation\nnpx tsx query.ts search \"library-name\" \"your search query\"\n\n# Get context from a specific repo\nnpx tsx query.ts context \"owner/repo\" \"your question\"\n\nBest Practices\n\nGet the most out of the Context7 API with these best practices:\n\nOptimize Search Relevance\n\nWhen using the /libs/search endpoint, always include the user's original question in the query parameter. This allows the API to use LLM-powered ranking to find the most relevant library for the specific task, rather than relying on a simple name match.\n\nExample: If a user asks about SSR in Next.js, search with:\n\nlibraryName=nextjs\nquery=setup+ssr\n\nThis ensures the best ranking for the specific task.\n\nUse Specific Library IDs\n\nFor the fastest and most accurate results with the /context endpoint, provide the full libraryId (e.g., /vercel/next.js). If you already know the library the user is asking about, skipping the search step and calling the context endpoint directly reduces latency.\n\nLeverage Versioning\n\nTo ensure documentation accuracy for older or specific project requirements, include the version in the libraryId using the /owner/repo/version format. You can find available version tags in the response from the search endpoint.\n\nChoose the Right Response Type\n\nTailor the /context response to your needs using the type parameter:\n\nUse type=json when you need to programmatically handle titles, content snippets, and source URLs (ideal for UI display).\nUse type=txt when you want to pipe the documentation directly into an LLM prompt as plain text.\nFilter by Quality Scores\n\nWhen programmatically selecting a library from search results, use the trustScore and benchmarkScore to prioritize high-quality, reputable documentation sources for your users.\n\nFind Navigation Pages\n\nFind navigation and other pages in this documentation by fetching the llms.txt file at:\n\nhttps://context7.com/docs/llms.txt\n\nAPI Reference\nContext7 REST API\n\nSearch Endpoint:\n\nGET https://context7.com/api/v2/libs/search\n  ?libraryName=<library_name>\n  &query=<user_query>\n\n\nContext Endpoint:\n\nGET https://context7.com/api/v2/context\n  ?libraryId=<owner/repo>\n  &query=<user_query>\n  &type=txt|json\n\nTroubleshooting\n\nNo results found?\n\nCheck your API key is valid\nVerify the library name is correct (e.g., 'react' not 'React')\n\nAuthentication errors?\n\nEnsure CONTEXT7_API_KEY is set in .env\nCheck your key hasn't expired at context7.com/dashboard\nLicense\n\nMIT"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/TheSethRose/context7",
    "publisherUrl": "https://clawhub.ai/TheSethRose/context7",
    "owner": "TheSethRose",
    "version": "1.0.3",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/context7",
    "downloadUrl": "https://openagent3.xyz/downloads/context7",
    "agentUrl": "https://openagent3.xyz/skills/context7/agent",
    "manifestUrl": "https://openagent3.xyz/skills/context7/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/context7/agent.md"
  }
}