Skip to content

Editors and agents ​

Requires Node.js 18 or later and a supported native binary: macOS arm64/x64, Linux glibc arm64/x64, or Windows x64. No account or API key is needed.

Automatic setup ​

bash
npx -y @sylphx/lockdocs@0.7.0 setup

This detects installed clients, prints every config file it changes, and is safe to run again. Preview with setup --dry-run, select clients with setup --client cursor,codex, or remove the entry with setup --remove. Restart your client after changing its configuration.

The manual examples below pin 0.7.0, the release checked on 29 October 2026. Use a newer released version if you prefer; keep the same mcp subcommand. The one-click links use the current release instead of a fixed pin.

Cursor and VS Code, one click ​

Add to Cursor · Install in VS Code

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:

bash
code --add-mcp '{"name":"lockdocs","command":"npx","args":["-y","@sylphx/lockdocs","mcp"]}'

Or add the server to .cursor/mcp.json:

json
{
  "mcpServers": {
    "lockdocs": {
      "command": "npx",
      "args": [
        "-y",
        "@sylphx/lockdocs",
        "mcp"
      ]
    }
  }
}

For .vscode/mcp.json, use the VS Code servers format:

json
{
  "servers": {
    "lockdocs": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@sylphx/lockdocs",
        "mcp"
      ]
    }
  }
}

Claude Code ​

bash
claude mcp add --scope user lockdocs -- npx -y @sylphx/lockdocs@0.7.0 mcp

Or run setup --client claude-code. It writes mcpServers.lockdocs in ~/.claude.json, with type: "stdio".

Codex ​

Merge this table into ~/.codex/config.toml:

toml
[mcp_servers.lockdocs]
command = "npx"
args = ["-y", "@sylphx/lockdocs@0.7.0", "mcp"]

Cursor ​

Merge this into .cursor/mcp.json in your project, or ~/.cursor/mcp.json for all projects:

json
{
  "mcpServers": {
    "lockdocs": {
      "command": "npx",
      "args": ["-y", "@sylphx/lockdocs@0.7.0", "mcp"]
    }
  }
}

VS Code ​

Merge this into .vscode/mcp.json in your project. VS Code uses servers, not mcpServers:

json
{
  "servers": {
    "lockdocs": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@sylphx/lockdocs@0.7.0", "mcp"]
    }
  }
}

For a user-level configuration, setup --client vscode writes <config>/Code/User/mcp.json; setup --client vscode-insiders writes <config>/Code - Insiders/User/mcp.json with the same schema.

Claude Desktop ​

Merge this into <config>/Claude/claude_desktop_config.json:

json
{
  "mcpServers": {
    "lockdocs": {
      "command": "npx",
      "args": ["-y", "@sylphx/lockdocs@0.7.0", "mcp"]
    }
  }
}

Windsurf ​

Merge this into ~/.codeium/windsurf/mcp_config.json:

json
{
  "mcpServers": {
    "lockdocs": {
      "command": "npx",
      "args": ["-y", "@sylphx/lockdocs@0.7.0", "mcp"]
    }
  }
}

Gemini CLI ​

Merge this into ~/.gemini/settings.json:

json
{
  "mcpServers": {
    "lockdocs": {
      "command": "npx",
      "args": ["-y", "@sylphx/lockdocs@0.7.0", "mcp"]
    }
  }
}

<config> is ~/.config on Linux, ~/Library/Application Support on macOS, and %APPDATA% on Windows. Preserve other servers and settings when merging. On Windows, if your client cannot launch npx directly, use "command": "cmd" and "args": ["/c", "npx", "-y", "@sylphx/lockdocs@0.7.0", "mcp"] in JSON; use the equivalent command and args in TOML.

Check the connection and project root ​

Restart the client, enable or trust the server if prompted, and check that it lists resolve, docs, api. Then ask:

Use lockdocs: which version of zod do we use, and how do I reject unknown keys?

The server uses the client's MCP workspace roots, then LOCKDOCS_ROOT, then its working directory. If your client does not send roots, add an absolute path in the JSON server entry:

json
"env": { "LOCKDOCS_ROOT": "/absolute/path/to/your/project" }

For Codex, add env = { LOCKDOCS_ROOT = "/absolute/path/to/your/project" } under [mcp_servers.lockdocs]. Each tool also accepts a root argument. Check that resolve reports your project's lockfile and installed versions before querying.

The config schemas above were compared with the files written by the released 0.7.0 setup command in an empty Linux home. Each pinned launch command was also checked over stdio: initialize, list the three tools, resolve a project, and query an installed declaration. This verifies the release and config format, not every client's UI or every operating system. To repeat the check, run the verification script from a Linux or macOS checkout with Python 3.11+, Node.js and npm:

bash
python3 docs/examples/verify-setup.py

For a version-sensitive offline example, see Lockdocs vs Context7.

Offline use ​

The npx launcher can need a network connection to download Lockdocs itself. For a disconnected machine, install the binary and your dependencies first, then use "command": "lockdocs", "args": ["mcp", "--offline"] instead. Make sure the client's PATH contains the installed binary. --offline blocks all Lockdocs downloads, including the optional embedding model. Local keyword search and installed declarations still work with an empty cache; website-only docs must have been fetched beforehand. See fetching.

Environment ​

VariableEffect
LOCKDOCS_ROOTProject directory when the client sends no roots
LOCKDOCS_OFFLINE=1Block every Lockdocs download; does not make npm's launcher offline
LOCKDOCS_FETCH=1Allow fetching exact versions that are not installed
LOCKDOCS_CACHECache directory (default: the OS cache dir + /lockdocs)
LOCKDOCS_NO_STAR_HINT=1Turn off the one-time interactive CLI star hint; MCP never displays it
LOCKDOCS_NO_SYSTEM_PYTHON=1Do not ask the system interpreter for its site-packages