mcpField
L
libdocs

libdocs

Local
github.com/CloudCorpRecordsDeveloper Tools0Updated 2w ago

About libdocs

libdocs is a CLI and MCP server for coding agents that resolves library names to Context7-compatible IDs and retrieves current, version-specific documentation and examples. Results can be narrowed by topic and token budget.

Key features

  1. 01Resolve library names to IDs
  2. 02Fetch current library documentation
  3. 03Retrieve code examples
  4. 04Focus results by topic
  5. 05Set a token budget

Use cases

  1. 01Look up documentation for a named library
  2. 02Check version-specific APIs while coding
  3. 03Retrieve examples focused on a topic

MCP support

Its stdio MCP server provides tools to resolve library names to Context7-compatible IDs and fetch documentation with optional topic and token limits.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"cloudcorprecords-libdocs": {
"command": "npx",
"args": [
"-y",
"@reneturcios/libdocs"
]
}
}
}
Run commandnpx -y @reneturcios/libdocs

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@reneturcios/libdocs0.1.0
ocighcr.io/cloudcorprecords/libdocs:0.1.0

Tools

2

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
libraryNamestringYesName of the library to resolve into a Context7-compatible library ID.

Details

From the project 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

npx @reneturcios/libdocs resolve "next.js"

Or run the container image:

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

# Find the Context7-compatible IDs for a library name
libdocs resolve "next.js"
libdocs resolve react

# Fetch documentation for an exact library ID
libdocs docs /vercel/next.js
libdocs 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:

npx -y @reneturcios/libdocs mcp

MCP client configuration:

{
  "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

npm install
npm 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.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.