@toolbeltai/mcp-config
v0.1.3
Published
Shared MCP client config descriptors used by @toolbeltai/cli and toolbelt atlas. Plug-in schema: one descriptor per client (Claude Code, Claude Desktop, OpenClaw, Cursor, Windsurf, Codex CLI, Gemini CLI).
Maintainers
Readme
@toolbeltai/mcp-config
Shared MCP client config descriptors used across the Toolbelt stack —
@toolbeltai/cli (install flow)
and toolbelt atlas (Connect picker UI).
Each descriptor is a plain object describing one MCP client:
- Where the client's config file lives (per OS)
- What format it uses (JSON or TOML)
- How to render a copy-pasteable snippet
- How to upsert an entry into an existing parsed config
Supported clients
| Client | Config path (macOS) | Format |
|---|---|---|
| Claude Code | ~/.claude.json | JSON |
| Claude Desktop | ~/Library/Application Support/Claude/claude_desktop_config.json | JSON |
| OpenClaw | ~/.openclaw/openclaw.json | JSON (nested mcp.servers) |
| Cursor | ~/.cursor/mcp.json | JSON |
| Windsurf | ~/.codeium/windsurf/mcp_config.json | JSON |
| Gemini CLI | ~/.gemini/settings.json | JSON (uses httpUrl) |
| Codex CLI | ~/.codex/config.toml | TOML (uses http_headers) |
Usage
import { allClients, getClient, renderSnippet } from '@toolbeltai/mcp-config';
const entry = {
name: 'toolbelt',
url: 'https://mcp.toolbelt.ai/mcp',
token: 'tb_xxx',
};
// Render a snippet for a specific client
console.log(renderSnippet('claude-code', entry));
// Enumerate all supported clients
for (const c of allClients) {
console.log(c.displayName, c.configPaths.darwin);
}
// Upsert into a parsed JSON config (for CLI install flow)
const c = getClient('claude-code');
const updated = c.upsertInto!(existingConfig, entry);Design
- One descriptor per client. New client = one new file in
src/clients/. - Pure functions. No IO, no side effects — renderers and upserts take data in and return data out. File reads/writes live in the CLI.
- Golden-file tests. Every client has a byte-for-byte expected snippet locked in tests so format drift shows up in the diff, not at runtime.
License
MIT
