@claritylabs/cl-sdk-mcp companion package is a Model Context Protocol server that exposes CL SDK documentation to AI coding assistants. When you connect it to Claude Code, Cursor, or Windsurf, your assistant can search and read CL SDK docs directly — no copy-pasting, no stale context. You run it with npx, so there’s nothing to install globally and no API keys to configure.
Tools Provided
The MCP server exposes three tools to connected AI assistants:Setup for Claude Code
Add the MCP server to your project’s Claude configuration. Claude Code reads from.claude/mcp.json in your project root.
cl-sdk server will appear in your connected tools list, and Claude will automatically use it when answering questions about CL SDK.
Setup for Cursor / Windsurf
Cursor and Windsurf read MCP configuration from a file in your home directory.- Cursor
- Windsurf
cl-sdk server will appear with a green status indicator when active.The first
npx invocation downloads the package. Subsequent invocations use the cached version. To force a refresh to the latest documentation, run npx --yes @claritylabs/cl-sdk-mcp once to update the cache.HTTP Mode for Remote Connectors
If you’re connecting from Claude.ai’s remote MCP connector, or building a server-side integration, start the MCP server in HTTP mode:POST /mcp.
Environment Variables
number
default:"8787"
TCP port for the HTTP server to listen on.
string
default:"0.0.0.0"
Network interface to bind to. Set to
127.0.0.1 to restrict to localhost.Connecting from Claude.ai
1
Start the HTTP server
Run the server on a publicly accessible host or tunnel your local port:
2
Add the remote connector in Claude.ai
Go to Settings → Integrations → Add Integration. Enter your MCP endpoint URL:
3
Authorize and verify
Claude.ai will send a capabilities request to confirm the server is reachable. Once connected, you’ll see
search_docs, read_doc_page, and list_doc_sections in the available tools list.What the Assistant Sees
When you ask your AI assistant a question about CL SDK, it usessearch_docs to find relevant pages and read_doc_page to read the full content. For example:
- “How do I build page source spans?” → searches and reads
source-grounding/source-spans - “What storage interfaces does CL SDK define?” → reads
storage/overview - “Show me the PCE agent config options” → reads
reference/api