Libdocs

io.github.CloudCorpRecords由 GitHub 帳號 CloudCorpRecords 發布v0.1.0更新於 Nov 7, 2026

Resolve library names and fetch current, version-specific documentation via Context7.

已驗證STDIO僅桌面知識與記憶開發者工具

概覽

AI 產生的概覽

本機 MCP 伺服器,將套件名稱解析為 Context7 套件 ID,並抓取最新、對應版本的說明文件與程式碼範例,供編碼助理使用。

可以做什麼
  • 將套件名稱解析為 Context7 相容的套件 ID,並回傳標題、描述與信任度等資料
  • 依套件 ID 取得該套件的最新說明文件與程式碼範例,可指定主題並限制 token 預算
  • 將未知 ID、限流、主機無法連線等查詢失敗以工具錯誤回報
適用情境
適合助理在撰寫或審查依賴第三方套件的程式碼時,需要取得最新且對應版本的說明文件,而非依賴可能過時的訓練知識。也適合希望在回答前先查閱套件 API 的編碼代理。
執行需求
以本機 stdio 程序執行,可透過 npx 或 Docker 映像啟動。需要能連線至 Context7 服務的網路。選用環境變數 CONTEXT7_API_KEY 設定後會以 Bearer 權杖送出;不設定也能無金鑰執行,無需註冊。
安裝前請注意
若設定 CONTEXT7_API_KEY,該憑證會以 Bearer 權杖形式傳送給 Context7 服務。套件名稱、套件 ID 以及查詢的主題都會傳送給該第三方服務。低於服務最低值 10000 的 token 預算會被提高到 10000。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Libdocs,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

libdocs

libdocs answers the question every coding agent runs into: what does the current version of this library actually do? You give it a library name, it finds the library's Context7-compatible ID, and then it pulls the up-to-date documentation and code examples for that library — optionally focused on one topic and capped at a token budget you pick. It works from the command line or as an MCP server for agents.

An API key is optional. When CONTEXT7_API_KEY is set, libdocs sends it as a Bearer token; when it is not set, requests simply go out without one. There is no sign-up step to get started.

Install

bash
npx @reneturcios/libdocs resolve "next.js"

Or run the container image:

bash
docker run -i ghcr.io/cloudcorprecords/libdocs

The container defaults to the MCP server (see below). Pass CLI arguments to use it as a CLI instead.

CLI

bash
# Find the Context7-compatible IDs for a library namelibdocs resolve "next.js"libdocs resolve react
# Fetch documentation for an exact library IDlibdocs docs /vercel/next.jslibdocs docs /vercel/next.js --topic routing --tokens 20000
libdocs --version

Exit codes: 0 on success, 1 when a lookup fails (the error names the problem, including the HTTP status when the service answers with one), 2 for usage errors.

Token budgets below the service minimum of 10000 are raised to 10000, matching the upstream behaviour.

MCP server

One bin serves both faces. The mcp subcommand starts a stdio MCP server:

bash
npx -y @reneturcios/libdocs mcp

MCP client configuration:

json
{  "mcpServers": {    "libdocs": {      "command": "npx",      "args": ["-y", "@reneturcios/libdocs", "mcp"],      "env": {        "CONTEXT7_API_KEY": "your-key-if-you-have-one"      }    }  }}

The env block is optional — leave it out entirely to run keyless.

Tools

ToolInputWhat it returns
resolve-library-idlibraryName (string, required)The matching libraries, each with its title, Context7-compatible library ID, description, and the token, snippet, and trust figures the service reports.
get-library-docscontext7CompatibleLibraryID (string, required), tokens (number, optional), topic (string, optional)The library's documentation and code examples as plain text, focused on topic when one is given.

Resolution talks to the service's search endpoint; documentation is fetched per library ID in plain-text mode. Lookup failures (unknown IDs, rate limits, unreachable hosts) are reported as tool errors.

Development

bash
npm installnpm run build   # tsc -> dist/npm test        # node test runner over test/*.test.ts, no network (fake fetch fixtures)npm run dev     # run the CLI from source via tsx

License

MIT — see LICENSE.

來源:README.md,提交 bcd2961

工具

2

resolve-library-id

Resolve a library name into a Context7-compatible library ID, returning the matching libraries.

輸入參數libraryName必填

get-library-docs

Fetch current documentation and code examples for a library using its Context7-compatible library ID.

輸入參數topictokenscontext7CompatibleLibraryID必填

版本歷史

1
  1. v0.1.0最新Oct 31, 2026

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分