LOCKDOCS / SETUP GUIDE
Up-to-date docs for Cursor and Claude Code
Give your editor the docs for the version you run. Connect Lockdocs over MCP, then check one citation against your lockfile before relying on its answers.
Check the CLI in your project
Run the commands from the folder with your lockfile. Confirm the CLI prints its own version, then find the library you want in the resolve output. If you’re trying this in a throwaway npm project, install Zod first to follow the example below.
Using Python? Run the PyPI release with
uvx lockdocs, or runpip install lockdocsand uselockdocsdirectly. To connect your editor without npm, see MCP setup without Node.js.Optional scratch project mkdir lockdocs-editor-demo cd lockdocs-editor-demo npm init -y npm install --save-exact zod@4.6.7CLI version and lockfile check npx -y @sylphx/lockdocs version npx -y @sylphx/lockdocs resolve --offlineIn the scratch project, look for
zod@4.6.7andpackage-lock.json. The firstnpxrun may download Lockdocs;--offlineapplies to Lockdocs’s lookups, not to npm.Want to see what changes between versions? Try the Zod example in the playground to see Zod 3.23.8 resolve from a sample
yarn.lockand compare its API with Zod v4.Connect Cursor or Claude Code
Pick your editor below. Both configurations launch the same local MCP server over standard input and output. Keep the project open in your editor.
Save this as
.cursor/mcp.jsonin your project. If the file exists, add only thelockdocsentry undermcpServersso you keep your other servers.Cursor project configuration { "mcpServers": { "lockdocs": { "command": "npx", "args": [ "-y", "@sylphx/lockdocs", "mcp" ] } } }Reload Cursor and check that
lockdocsis enabled in its MCP settings.Match the editor’s answer to the CLI
Ask your editor to call Lockdocs. Give it the absolute path to the folder with your lockfile. Check that the version from resolve and the declaration citation from api match what you see in the terminal.
Editor verification prompt Use Lockdocs resolve with root <absolute path to my project>. Then call Lockdocs api with the same root, package zod, and symbol z.strictObject. Show the package version, file and line from the result.Terminal cross-check npx -y @sylphx/lockdocs api z.strictObject --pkg zod --offlineReplace the placeholder in the prompt. In your own project, substitute an installed library and a known symbol if you don’t use Zod. If the versions differ, check the tool’s
rootand reinstall from the lockfile. If the server doesn’t start, check that the editor can runnpxand has the same Node.js setup as your terminal.
Frequently asked questions
Does up-to-date mean the newest release?
It means the version in this project’s lockfile. After a dependency upgrade, update the lockfile and install the new version before running resolve again.
Why does resolve show a different project or no dependencies?
Use the absolute path of the folder with the lockfile as the root tool argument. In a monorepo, check that you are testing the intended package. If a local dependency is missing or out of sync, install from the lockfile before checking the declaration.
Can I use the server without internet access?
Install the CLI and dependencies while online. For a fully offline launch, use the absolute path to an already installed lockdocs executable as the MCP command and pass mcp --offline as its arguments. Local and cached files remain available; missing upstream docs will not download.
Look up your next API
Use api for a symbol you know and docs for a question about a package.