@codespar/mcp
MCP transport for CodeSpar — connect Claude Desktop, Cursor, VS Code, and other MCP clients to CodeSpar sessions.
Install
npm install @codespar/mcp @codespar/sdk
Usage
import { CodeSpar } from "@codespar/sdk";
import { getMcpConfig, getClaudeDesktopConfig } from "@codespar/mcp";
const cs = new CodeSpar({ apiKey: "ak_..." });
const session = await cs.create("user_123", { preset: "brazilian" });
const { url, headers } = getMcpConfig(session);
const config = getClaudeDesktopConfig(session);
API
getMcpConfig | (session: Session) => McpConfig | Get the MCP transport URL and headers for any MCP-compatible client |
getClaudeDesktopConfig | (session: Session, serverName?: string) => { mcpServers: ... } | Generate Claude Desktop configuration (for claude_desktop_config.json) |
getCursorConfig | (session: Session) => { url: string; headers: Record<string, string> } | Generate Cursor / VS Code MCP configuration |
McpConfig
url | string | MCP transport URL |
headers | Record<string, string> | Auth headers for the transport |
Need more?
For production workloads with governance, audit trails, policy engines, self-hosted runtimes, and enterprise commerce primitives (mandates, escrow, payment routing), see CodeSpar Enterprise.
License
MIT — codespar.dev