lockdocs
OfficialUse this MCP server to resolve exact project dependency versions and query version-exact docs and API references locally.
resolve: list pinned dependency versions from lockfiles and whether docs are available locally, with optional package filtering and transitive dependency search.docs: search READMEs, changelogs, docs folders, and API references for the exact installed version, returning cited sections within a token budget; supports package filtering and offline mode.api: return exact signatures and doc comments for symbols, including overloads and members of classes/interfaces/structs/traits.Supports npm, PyPI, crates.io, and Go projects; reads installed/cached files and can fetch upstream docs on first use unless offline.
Pro feature:
upgrade_toreports API changes between the pinned version and a target version, limited to called symbols with call sites.Core use needs no account or API key; every tool can take a project root.
Provides documentation and API signatures for npm packages pinned in JavaScript lockfiles, reading from installed node_modules and supporting npm, pnpm, yarn, and bun lockfiles.
Provides documentation and API signatures for Python packages installed in the virtualenv, using versions from uv, poetry, pdm, Pipfile, or requirements lockfiles.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@lockdocs how do I reject unknown keys with the zod we use?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
lockdocs
Exact-version library docs from your lockfile — local, offline, no rate limits.
Reads your lockfile. Answers from the docs and type declarations of the exact version you installed. npm · PyPI · crates.io · Go. MCP server + CLI in one Rust binary. No account, no API key. MIT.
Lockdocs Pro adds private package docs (npm, PyPI, Cargo, Go, GitHub Enterprise, GitLab, Bitbucket) and lockdocs upgrade impact reports for US$120/year.
npx -y @sylphx/lockdocs setup
Docs · Playground · Pro, US$120/yr · Quickstart · Tools · Benchmarks · Compare · How it works
A real terminal: one question, two installs. pydantic 1.10.18 answers BaseModel.dict() (pydantic/main.py:427), pydantic 2.9.2 answers model_dump() (pydantic/main.py:352). It opens with Next.js 14 vs 15 cookies().
See it work
Ask for the exact signature of BaseModel.model_dump in a project that pins pydantic 2.9.2 (the run in the demo above):
$ lockdocs api BaseModel.model_dump --tokens 300
pydantic@2.9.2 · pypi · .venv/lib/python3.12/site-packages · pinned in uv.lock
### pydantic.main.BaseModel.model_dump (method) — pydantic@2.9.2 pydantic/main.py:352
def model_dump(self, *, mode: Literal['json', 'python'] | str = 'python', include: IncEx | None = None, …) -> dict[str, Any]
Usage docs: https://docs.pydantic.dev/2.9/concepts/serialization/#modelmodel_dump
Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.The same call in a pydantic 1 project answers that pydantic 1.10.18 has no model_dump, and shows the closest documentation instead.
Related MCP server: context
Quickstart
npx -y @sylphx/lockdocs setup # add lockdocs to Claude Code, Codex, Cursor, VS Code, Claude Desktop, Windsurf, Gemini CLIThat's it. Using Claude Code only? claude mcp add lockdocs -- npx -y @sylphx/lockdocs mcp. setup detects the clients you have, writes their MCP config, and prints every change. Run it again and nothing changes. Then ask your agent something like "Use lockdocs: how do I reject unknown keys with the zod we use?"
Per-client and manual steps are in the agent setup guide. To confirm that Cursor or Claude Code cites the version in your lockfile, follow Up-to-date docs for Cursor and Claude Code.
You can also install or run the CLI from PyPI:
pip install lockdocs
lockdocs --version
uvx lockdocs --version # run without installing the CLI globallyFrom a terminal, inside any project:
npx -y @sylphx/lockdocs zod "reject unknown keys" # docs for the zod version in your lockfile
npx -y @sylphx/lockdocs api axum::Router::route # exact signature + doc comment
npx -y @sylphx/lockdocs resolve # every pinned version, and whether its docs are here
npx -y @sylphx/lockdocs fetch # add upstream docs at each version's git tagAfter upgrading Lockdocs, rerun npx -y @sylphx/lockdocs fetch from your project directory to refresh cached upstream docs. See the fetch guide.
Cursor and VS Code, one click
Requires Node 18+. Confirm the install in your editor, open your project, and enable the server. Both links run npx -y @sylphx/lockdocs mcp locally; no API key is needed.
For VS Code from a terminal:
code --add-mcp '{"name":"lockdocs","command":"npx","args":["-y","@sylphx/lockdocs","mcp"]}'Or add the server to .cursor/mcp.json:
{
"mcpServers": {
"lockdocs": {
"command": "npx",
"args": [
"-y",
"@sylphx/lockdocs",
"mcp"
]
}
}
}For .vscode/mcp.json, use the VS Code servers format:
{
"servers": {
"lockdocs": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@sylphx/lockdocs",
"mcp"
]
}
}
}{
"mcpServers": {
"lockdocs": { "command": "npx", "args": ["-y", "@sylphx/lockdocs", "mcp"] }
}
}Claude Code: claude mcp add lockdocs -- npx -y @sylphx/lockdocs mcp
Claude Code plugin: /plugin marketplace add SylphxAI/lockdocs, then /plugin install lockdocs@lockdocs
Codex (~/.codex/config.toml):
[mcp_servers.lockdocs]
command = "npx"
args = ["-y", "@sylphx/lockdocs", "mcp"]The server answers for the client's workspace root (or its working directory, or LOCKDOCS_ROOT). Every tool also takes root.
Why
Your agent writes code against the library version it remembers, not the one you installed. So it calls .dict() on a pydantic 2 model, cookies() without await on Next.js 15, and /:id routes on axum 0.8. Hosted doc servers help, but they guess the version from the prompt, cap free usage, and cannot see your private packages.
lockdocs takes the version question off the table:
Exact version, zero config. It reads
package-lock.json,pnpm-lock.yaml,yarn.lock,bun.lock,Cargo.lock,uv.lock,poetry.lock,Pipfile.lock,requirements*.txtandgo.mod. No library IDs, no "use v14" in the prompt.Docs that ship with the code. READMEs, changelogs and
docs/folders, plus the API reference in the package itself:.d.tsdeclarations with JSDoc, Python docstrings and stubs, rustdoc comments, Go doc comments. If it is installed, it is documented, including your private and internal packages.Offline and unlimited after caching. Package files are read from
node_modules, your virtualenv,~/.cargo/registryand the Go module cache. The optional model downloads once (129 MB, kept as 32 MB). Use--offline(orLOCKDOCS_OFFLINE=1) to prohibit all downloads;LOCKDOCS_EMBED=0disables only the model. No account or hosted query quota. First-use upstream requests reveal the public repository and version being fetched, not your question or project files.Upstream docs on first use. Packages like Next.js, Django and FastAPI ship no docs. Queries automatically add public GitHub docs at the immutable commit resolved from your pinned release tag, anonymously and with bounded downloads.
--no-fetchorLOCKDOCS_FETCH=0opts out; cached docs still work offline. Failures are reported alongside local answers, never replaced with latest-version docs.Meaning, not just words. Hybrid retrieval: BM25 fused with a small local embedding model (downloaded once, 32 MB on disk), plus API redirects from deprecation notes ("use
model_validateinstead").Small, cited answers. Packed into a token budget (1,200 by default), every section cited as
package@version path:line.
What your agent gets
Three tools, cheap enough to call before every unfamiliar API:
Tool | Ask it | Returns |
| "Which zod do we use?" | Pinned versions from every lockfile, direct vs transitive, and where their docs are (or what to install) |
| "How do I reject unknown keys?" (optionally | The most relevant README, changelog and API sections of the installed version, within budget, each cited |
|
| The exact signature and doc comment, overloads, members of a class/interface/struct/trait, and other matches |
Arguments and responses for each tool: MCP tools reference.
Ecosystems
Ecosystem | Versions from | Docs read from | API reference |
npm |
|
|
|
PyPI |
|
| Docstrings and signatures from |
crates.io |
|
| Public items with rustdoc ( |
Go |
|
| Exported funcs, methods, types, interface methods with doc comments; package docs |
Legacy copies bundled inside a package (zod/v3 inside zod 4, pydantic/v1 inside pydantic 2) rank below the current API.
Upstream docs on first use
The first docs or api query adds the selected dependencies' public release-tag docs once: it finds the GitHub repository in the package's own metadata and the git tag of your pinned version, resolves that tag to an immutable commit, and downloads only its docs folders (Markdown, MDX, reStructuredText, docs examples). It does not use ambient GitHub credentials or download major-version website docs by default. Previously opted-in docs-site caches are preserved and their provenance stays visible. lockdocs fetch remains available to prewarm docs and explicitly add major-version docs sites. Answers then cite next@15.1.0 upstream:docs/01-app/.../cookies.mdx:12. See Upstream docs and fetching.
Not installed? Fetch the exact version (opt-in)
Registry package downloads remain opt-in; default upstream enrichment uses installed package metadata (plus the one-time embedding model download). If a pinned package is not installed (a fresh clone, CI, a lockfile you are reviewing), it says so and tells you how to install it. Pass --fetch (or set LOCKDOCS_FETCH=1, or lockdocs setup --fetch) to let it download exactly that version from the registry (npm tarball, PyPI wheel or sdist, crates.io .crate, Go module proxy zip) into its cache. Fetched answers say fetched from registry.npmjs.org. You can also ask for a version you do not use: lockdocs npm:zod@4.1.5 "strict object" --fetch.
Benchmarks
105 questions whose correct answer depends on the version, over 15 libraries (zod, Next.js, React Router, pydantic, axum, tokio, Tailwind CSS, ESLint, Prisma, React, Vite, Express, SQLAlchemy, Django, FastAPI), each asked in a real project with that version installed. An answer passes when it contains the version-correct API and none of the other version's. Same questions and grader against Context7's anonymous API, on a GitHub-hosted runner (run):
correct | older majors | newer majors | tokio | held-out | median tokens | median latency | |
lockdocs, default first use | 70/105 | 28/45 | 38/55 | 4/5 | 10/18 | 894 | 185 ms |
lockdocs + | 96/105 | 38/45 | 53/55 | 5/5 | 16/18 | 880 | 58 ms |
Context7 (anonymous) | 77/105 | 19/45 | 53/55 | 5/5 | 15/18 | 908 | 2,583 ms |
Where versions matter most, lockdocs wins by 2x (38/45 vs 19/45 on older majors). Context7 often answers with the newest API (pydantic 1 questions get pydantic 2 answers).
Tied on the newest majors (53/55 each) and on tokio (5/5 each); ahead on held-out questions (16/18 vs 15/18), which were written before the ranking changes they measure and not used for tuning.
Faster, fewer tokens, no quota. Median 58 ms per question after
lockdocs fetch(185 ms on first use), a fresh CLI process each time. Context7's hosted API took a median 2,583 ms in the earlier runs its reused answers come from.
Method, questions, per-question results and scripts: benchmark page and bench/.
The same 105 questions are also asked through Sylphx Search — our platform's web search, whose technical-documentation vertical is the hosted index for docs that never ship inside a package — with bench/cloud.py. Local and cloud answer one corpus with one grader, so lockdocs and Sylphx Search are one index format and one ranking rather than two products.
How it compares
lockdocs | Context7 | docs-mcp-server | Ref | |
Where docs come from | Your installed packages | Hosted index of public repos and sites | Sites and repos you scrape into a local index | Hosted index |
Which version | Exact, from your lockfile | Chosen by library ID or prompt; a few indexed versions per library | The version you scraped | Mostly latest |
Per-library setup | None | None | Scrape each library (and version) | None |
Private / internal packages | Yes, if installed | Paid plans | Yes, if you scrape them | Private GitHub repos and PDFs you connect (plan limits) |
API reference from types and doc comments |
| Doc snippets | Doc pages | Doc pages |
Works offline | Yes | No | After scraping | No |
Limits | None | Anonymous | None | 200 free credits once, then from $19/month |
Account / API key | No | Optional | Optional (embeddings) | Yes |
License | MIT | MIT client, hosted service | MIT | Proprietary |
Context7 knows many sites and guides that never ship inside a package, so for a question whose answer lives only on a docs website, it can do better. lockdocs is for the other case: when the version matters, when you are offline or rate-limited, and when the package is yours. They combine well.
Lockdocs vs Context7 compares the two feature by feature and cites the Context7 README revision it checked. To see the difference in your own Next.js project, run the cookies lookup in Context7 alternative for exact-version docs.
How it works
Resolve. Parse every lockfile in the project (and monorepo roots above it) into exact
(ecosystem, name, version)triples, marking direct dependencies.Locate. Find each package's files on disk and check the installed version against the lockfile. Drift is reported, never hidden.
Extract. Split READMEs, changelogs and doc folders into heading-scoped sections; parse
.d.ts, Python, Rust and Go sources with tree-sitter into symbols with signatures, doc comments and qualified paths (z.object,tokio::task::spawn,pydantic.main.BaseModel.model_dump).Index and cache. BM25 (identifier-aware tokenizer, light stemming, a small programming synonym table) plus one embedding per entry from a static model2vec model, cached on disk by package, version and source, so each version is indexed once, ever.
Answer. Fuse keyword and embedding scores, apply docs signals and deprecation redirects, then pack results into the token budget with citations.
Typical costs on a GitHub-hosted runner: indexing every declaration in Next.js 15 (7,700 symbols) takes about 0.4 s, zod 4 about 0.05 s, once per version; a query then takes 5-20 ms.
CLI
lockdocs <package> [question] Docs for the version this project pins (no question: overview)
lockdocs resolve [filter] Pinned versions and where their docs are
lockdocs docs <question> Search all direct dependencies (--pkg to focus)
lockdocs api <symbol> Exact signature + doc comment
lockdocs fetch [package...] Once: upstream docs at each version's tag, missing packages, the model
lockdocs index [package] Build indexes ahead of time
lockdocs cache [clean] Show or delete the cache
lockdocs upgrade <pkg> <ver> Pro: API changes from the pinned version to <ver>, with your call sites
lockdocs login [--no-browser] Connect the CLI to your Pro account
lockdocs setup Configure MCP clients (--client a,b --dry-run --remove --fetch)
lockdocs mcp MCP server on stdio
Options: -C/--root <dir>, --pkg <package>, --tokens <n>, --fetch, --no-fetch, --offline, --jsonPrebuilt binaries for macOS (arm64, x64), Linux glibc (x64, arm64) and Windows x64 ship through npm; each GitHub release has them too. From source: cargo install --git https://github.com/SylphxAI/lockdocs lockdocs.
Pro
Everything above is free, under MIT. Pro adds two things for teams. Private sources: lockdocs reads your internal packages and docs from the private npm, PyPI, Cargo and Go registries and the GitHub Enterprise, GitLab and Bitbucket hosts you already use, with the credentials your .npmrc, uv, pip, Cargo, Go and git already hold, each sent only to its own host, inside the same resolve, docs and api tools and lockdocs fetch. And the upgrade report (lockdocs upgrade next 15.0.0, or upgrade_to in the docs tool): which APIs you call were removed, renamed or deprecated between your pinned version and the target, with your call sites.
Get Lockdocs Pro for US$120/year. Once Pro is active, connect your terminal by signing in with the same account and approving the CLI in your browser:
lockdocs loginUse --no-browser to print the approval URL instead of opening it automatically. The CLI saves your licence locally and checks it offline. In CI, you can provide a valid Pro licence token through the LOCKDOCS_LICENCE_TOKEN secret environment variable.
Privacy
lockdocs reads files on your machine and answers over stdio. Network use: the embedding model once from huggingface.co (pinned revision, SHA-256 checked; LOCKDOCS_EMBED=0 or --offline skips it), and anonymous GitHub requests (git tag lookup and one codeload.github.com tarball, not the rate-limited REST API; a repository whose archive is too large or whose download fails is read file by file through the REST API instead) for public docs at the resolved release commit on first query. --fetch / lockdocs fetch also access public registries and major-version docs-site repositories; only these explicit fetches may use GITHUB_TOKEN / GH_TOKEN, and only on api.github.com (never on git, codeload or raw downloads; private repositories are not supported). Upstream requests disclose the repository, version and file paths, not your question, lockfile or project files. --no-fetch / LOCKDOCS_FETCH=0 disables query package/docs downloads; --offline / LOCKDOCS_OFFLINE=1 prohibits all downloads. The cache lives in your OS cache directory (LOCKDOCS_CACHE overrides it).
Open-source README visuals
The AI-friendliness badge above is generated locally by
repomap's agent-readiness score.
Run npx -y @sylphx/repomap score in your repository to get the checks, suggested
fixes and a badge snippet. The score is a heuristic, not a security audit or a
certification. Scoring does not upload your source; only publish a score for a
private repository if you intend to make that score public.
GitHub data cards are served by the open-source Mark service. Here is this public repository's card:
[](https://github.com/SylphxAI/lockdocs)Replace username and repo with your public repository. No user token is
needed. See Mark's card options and self-hosting instructions.
Also from Sylphx
Built by Sylphx.
Anymd: Local-first MCP server that converts PDFs, Office documents and other files to Markdown.
Repomap: Local-first MCP server for navigating a codebase: symbol search, call paths and change impact.
skills: Battle-tested agent skills for Claude Code and Codex, installed in one command.
readme-mark: Beautiful README images from one URL: banners, badges, icons and stats cards.
More from Sylphx: https://sylphx.com/open-source
Sylphx apps: Apps and tools from Sylphx.
Star history
Support
Questions, a bug, or a team rollout? Email hi@sylphx.com or open an issue.
MIT licence. © Sylphx Limited, registered in England and Wales, company no. 16438428. Registered office: 128 City Road, London EC1V 2NX, United Kingdom. Email hi@sylphx.com. Privacy · Terms · sylphx.com
Available Tools
3 toolsapiExact API of a symbolARead-only
The exact signature and doc comment of one symbol in the installed version, with overloads, members (for classes, interfaces, structs, traits) and other matches. Accepts zod.z.object, z.object, tokio::spawn, axum::Router::route, pydantic.BaseModel.model_dump, gin.Context.JSON.
Inputs: symbol (required), root, tokens, offline, +1 more.
docsSearch version-exact docsARead-only
Answer a question from the docs of the exact installed version of a dependency: README, changelog, docs folder (public release-tag docs fetched on first use unless offline), and API reference (signatures + doc comments from .d.ts, Python, Rust and Go sources). Returns the most relevant sections within a token budget (hybrid keyword + embedding search), each cited as package@version path:line. Use it before using a library API you are not sure about for this version. Omit package to search all direct dependencies.
Inputs: query (required), root, tokens, offline, +2 more.
resolveResolve dependency versionsARead-only
List the exact dependency versions this project pins (from package-lock.json, pnpm-lock.yaml, yarn.lock, bun.lock, Cargo.lock, uv.lock, poetry.lock, requirements*.txt, go.mod) and whether their docs are available locally. Call it to learn which version of a library the code actually uses before writing code against it.
Inputs: root, filter.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool has a distinct role: resolve reports pinned versions, docs does natural-language retrieval over a version's documentation, and api returns the exact signature of a single symbol. The docs/api boundary is the only mild overlap, but the descriptions make the intent (broad recall vs. precise symbol lookup) reasonably clear.
All three names are short, lowercase single tokens, which is readable, but they mix grammatical forms (verb 'resolve' vs. nouns 'docs' and 'api') and there is no verb_noun pattern to predict new tools from. Internal style is consistent enough not to cause confusion.
Three tools is tightly scoped to the domain of version-pinned documentation lookup, and each one covers a genuinely separate step (discover versions, ask questions, inspect a symbol). Nothing appears redundant or missing at this count.
The surface covers the full workflow: finding exact installed versions and whether docs exist locally, answering free-form doc questions, and retrieving precise API signatures across JS/Python/Rust/Go ecosystems. Being read-only by design, there are no obvious lifecycle gaps.
Maintenance
Related MCP Connectors
Versioned documentation registry and semantic search for AI tools and coding assistants.
@latest documentation and code examples to 9000+ libraries for LLMs and AI code editors in a singl…
Provide your AI coding tools with token-efficient access to up-to-date technical documentation for…
Real-time package and vulnerability data (Python, npm, Cargo, Go, and more) for AI coding agents.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides LLMs with up-to-date, version-specific documentation and code examples from library sources directly into prompts, eliminating outdated code generation and hallucinated APIs.MIT
- AlicenseNot gradedqualityCmaintenanceProvides up-to-date documentation for AI agents by locally querying a community-driven registry of pre-built docs packages.Apache 2.0
- AlicenseAqualityBmaintenanceProvides a local, version-exact API index for installed Python and TypeScript packages, enabling accurate lookups and static code checking that catches hallucinated or misused APIs without executing the code.9MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to read the real, installed version of a Python library's API documentation instead of relying on memory. It verifies library versions and symbols against the actual installed package, returning exact signatures, deprecation warnings, and honest "not found" answers rather than plausible but wrong documentation.1MIT