MCP Configuration
The ContextKit MCP server can be configured for any MCP-compatible client. Below are setup instructions for the most common tools.
Claude Code (stdio)
Section titled “Claude Code (stdio)”Claude Code uses a .claude/mcp.json file in your project root for MCP server configuration. The stdio transport runs the server as a child process.
{ "mcpServers": { "contextkit": { "command": "npx", "args": ["@runcontext/cli", "serve"], "cwd": "/path/to/your/project" } }}HTTP mode
Section titled “HTTP mode”For shared or remote setups, start the server in HTTP mode and point clients at the SSE endpoint.
Start the server:
npx @runcontext/cli serve --http --port 3000Client configuration (generic):
{ "mcpServers": { "contextkit": { "url": "http://localhost:3000/mcp" } }}Cursor
Section titled “Cursor”Cursor reads MCP configuration from its settings. Add the ContextKit server under the MCP section.
{ "mcpServers": { "contextkit": { "command": "npx", "args": ["@runcontext/cli", "serve"], "cwd": "/path/to/your/project" } }}{ "mcpServers": { "contextkit": { "url": "http://localhost:3000/mcp" } }}Verifying the connection
Section titled “Verifying the connection”Once configured, your AI tool should discover the ContextKit resources and tools automatically. You can verify by asking the agent:
“What MCP resources are available?”
It should list the context:// resources. You can also test a tool call:
“Search my semantic layer for revenue metrics.”
The agent should call context_search and return results from your context directory.
CLI flags
Section titled “CLI flags”The serve command accepts the following flags:
| Flag | Description | Default |
|---|---|---|
--http | Use HTTP transport (default is stdio) | Off |
--port <number> | Port for HTTP server | 3000 |
--host <address> | Host address to bind | 0.0.0.0 |
--context-dir <path> | Path to context files | ./context |