DoclightDocs

Installation and connection

Install the Doclight MCP server and register it with Claude Code, Claude Desktop, Cursor or VS Code, with configuration locations for each client.

Not published to a package index yet

doclight-mcp is not on PyPI. Its source is the mcp-server/ directory of Doclight's source repository, which is not public. Ask Doclight for access to that directory (or a copy of it) before the steps below. These docs do not assume a package name you could install from a public registry.

1. Install the server

You need Python 3.10 or newer. Install into a virtual environment so the dependencies (mcp and httpx) stay isolated:

python3 -m venv ~/.venvs/doclight-mcp
~/.venvs/doclight-mcp/bin/pip install /path/to/mcp-server

On Windows, use py -m venv %USERPROFILE%\.venvs\doclight-mcp and %USERPROFILE%\.venvs\doclight-mcp\Scripts\pip install C:\path\to\mcp-server.

The install creates a doclight-mcp command inside the environment (for example ~/.venvs/doclight-mcp/bin/doclight-mcp). Use its full path in client configuration. Desktop clients do not inherit your shell's activated environment, so a bare doclight-mcp often fails with "command not found". ~/.venvs/doclight-mcp/bin/python -m doclight_mcp is equivalent.

The server speaks MCP on stdin and stdout, so running it by hand just waits for input (press Ctrl+C to stop). Let your MCP client launch it.

2. Configuration values

VariableRequiredMeaning
DOCLIGHT_API_KEYYesYour scoped credential, aeok_<prefix>_<secret>. See Getting started.
DOCLIGHT_API_URLNoAPI base URL. Defaults to https://api.doclight.app.

Examples below use aeok_xxxxxxxx_yyyyyyyy as a placeholder. Never commit a real key to version control.

3. Register it with your client

Claude Code stores the server for you. Run once:

claude mcp add --transport stdio --env DOCLIGHT_API_KEY=aeok_xxxxxxxx_yyyyyyyy doclight \
  -- ~/.venvs/doclight-mcp/bin/doclight-mcp
  • The -- separates Claude's options from the server command.
  • By default the server is saved in your local scope (~/.claude.json, this project only, private to you). Add --scope user to make it available in all your projects. Use --scope project only if you intend to share the server in a .mcp.json file, and then reference the key as "${DOCLIGHT_API_KEY}" rather than writing it into the file.
  • Check it with claude mcp list, or run /mcp inside Claude Code.

Open Settings → Developer → Edit Config. This opens claude_desktop_config.json:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Add the server under mcpServers, then fully quit and reopen Claude Desktop:

{
  "mcpServers": {
    "doclight": {
      "command": "/Users/you/.venvs/doclight-mcp/bin/doclight-mcp",
      "env": { "DOCLIGHT_API_KEY": "aeok_xxxxxxxx_yyyyyyyy" }
    }
  }
}

Use an absolute path; ~ is not expanded here.

Cursor reads ~/.cursor/mcp.json (all projects) or .cursor/mcp.json in a project (that project only):

{
  "mcpServers": {
    "doclight": {
      "command": "/Users/you/.venvs/doclight-mcp/bin/doclight-mcp",
      "args": [],
      "env": { "DOCLIGHT_API_KEY": "aeok_xxxxxxxx_yyyyyyyy" }
    }
  }
}

Prefer the global file for a real key so it does not end up in a repository.

VS Code uses .vscode/mcp.json in a workspace (or the user-level MCP configuration). The top-level key is servers, not mcpServers, and a prompt input keeps the key out of the file:

{
  "servers": {
    "doclight": {
      "type": "stdio",
      "command": "/Users/you/.venvs/doclight-mcp/bin/doclight-mcp",
      "env": { "DOCLIGHT_API_KEY": "${input:doclight-key}" }
    }
  },
  "inputs": [
    {
      "type": "promptString",
      "id": "doclight-key",
      "description": "Doclight API key (aeok_...)",
      "password": true
    }
  ]
}

What has and has not been tested

The server itself is tested end to end over stdio with an MCP client library against a fixture API. The Claude Code command above follows its official documentation. The file locations and formats for Claude Desktop, Cursor and VS Code are taken from those products' documentation and can change between versions; if a client rejects the file, check its current MCP documentation. They all launch the same command, so the server behaves identically.

4. Verify the connection

Restart the client, then ask it to list my Doclight brands. It should call list_brands and return your projects. If no Doclight tools appear, or you get an error, see Troubleshooting.

Rotating or revoking a key

Revoke a credential through the session-authenticated API (DELETE /api/api-credentials/{id}), create a new one, and update DOCLIGHT_API_KEY in the client configuration. Settings are read when the server starts, so restart the client.