Skip to main content
The Model Context Protocol (MCP) is a standard for extending AI tools with external data sources, APIs, and custom tools. Claurst ships a full MCP client in the cc-mcp crate that connects to any MCP-compliant server over a stdio subprocess transport.

How MCP works in Claurst

When Claurst starts, the McpManager in cc-mcp reads the mcpServers block from your settings, spawns each configured server as a subprocess, performs the JSON-RPC 2.0 initialize handshake, and discovers the server’s tool and resource capabilities. Those tools are then namespaced and injected into Claude’s tool list for the session. Tool names are prefixed with the server name to avoid collisions. A server named filesystem that exposes a read_file tool appears in Claude’s tool list as filesystem_read_file.

Configuring MCP servers

MCP servers are configured in .claude/settings.json at the project level, or in ~/.claude/settings.json for global availability.
Each server entry maps to a McpServerConfig struct:

Available MCP tools

Claurst exposes four built-in tools for interacting with MCP servers at runtime: ListMcpResources and ReadMcpResource are both implemented in cc-tools/src/mcp_resources.rs and delegate to ctx.mcp_manager. They return an error if no MCP manager is present (i.e., no servers configured).

Dynamic tool registration

MCP server tools appear automatically in Claude’s tool list once the server connects. No restart is required when a server’s capabilities change — reconnecting the server re-runs discovery. The McpManager namespaces tools and routes calls:

Managing servers at runtime

Use the /mcp slash command to inspect and manage MCP servers during a session:

Authentication

When an MCP server requires authentication, Claude uses McpAuthTool to handle the flow. The authentication exchange happens via the MCP protocol’s standard elicitation mechanism — the server requests credentials, the tool prompts the user, and the response is forwarded to the server.

Adding your first MCP server

1

Choose a server

Select an MCP server for the data source or capability you need. The MCP ecosystem includes servers for filesystems, GitHub, databases, web search, and more.
2

Add to settings

Add the server to your .claude/settings.json:
3

Start Claurst

When Claurst starts, the McpManager connects to the server, runs initialize, and discovers available tools. You should see the server listed when you run /mcp.
4

Use the tools

MCP tools are available like any built-in tool. Ask Claude to use them directly, or they will be selected automatically when relevant:

Example: adding a GitHub MCP server

Once connected, Claude can search repositories, read files from GitHub, list issues, and access any other capability the server exposes — all without any additional configuration.
MCP server processes are spawned as subprocesses of Claurst using StdioTransport. Each server communicates over stdin/stdout using JSON-RPC 2.0 line-delimited messages. The MCP protocol version used is 2024-11-05.