Skip to main content
The @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.
After saving the file, restart Claude Code. The 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.
After saving, open Cursor Settings → MCP and click Refresh. The 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:
The server accepts standard MCP JSON-RPC requests at 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.
Example with custom port:

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 uses search_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
The assistant reads live documentation rather than relying on its training data cutoff, so you always get accurate, up-to-date answers as the SDK evolves.
Use list_doc_sections to orient your assistant at the start of a session. Ask it to list all available CL SDK documentation sections before diving into a specific topic — this helps it navigate the doc tree more accurately for follow-up questions.