Skip to content

native-mcp register

Manage native-mcp entries inside Claude Code, Claude Desktop, and Cursor configs from the command line. Same binary, no extra tool required (no jq, no claude CLI for the JSON-based clients).

What it does

  • Detects which of the three supported clients are installed locally.
  • Reads/writes their config files (or invokes claude mcp add for Claude Code).
  • Names each entry native-<server> by default.
  • Preserves any other keys in the JSON configs (theme, other servers, etc.).

For other clients (Continue, Cline, Zed, Sourcegraph Cody, …), see Use with any MCP client.

Interactive mode

bash
native-mcp register
  1. Lists detected clients.
  2. Asks once whether to register every zero-config server in every detected client.
  3. Done.

The zero-config servers are: time, calculator, json, crypto, encode, text, system, dns, scheduler.

Servers that take required runtime args (filesystem, fetch, sqlite, shell, git, archive, clipboard) are not offered in interactive mode — use the scripted form so you can pass their args.

Scripted mode

bash
# One client, specific servers
native-mcp register claude-code time calculator json

# All detected clients
native-mcp register --all time

# A server with runtime args (everything after `--` is forwarded to the server)
native-mcp register claude-code filesystem -- /tmp /home/you/projects
native-mcp register claude-code shell      -- --allow ls,grep,find,cat
native-mcp register claude-code sqlite     -- /var/data/app.db
native-mcp register claude-code git        -- /home/you/projects/myrepo

# Custom entry name (useful when you want two configurations of the same server)
native-mcp register --name native-shell-build claude-code shell -- --allow make,cargo,go
native-mcp register --name native-time-paris  claude-code time  -- --default-tz Europe/Paris

Positional argument layout

text
native-mcp register [flags] [client] [server...] [-- server-args...]
  • The first positional is interpreted as a client name (claude-code, claude-desktop, cursor) if it matches; otherwise everything is treated as server names.
  • Anything after -- is forwarded verbatim as runtime args to the server.

Inspect what's registered

bash
native-mcp register --list
native-mcp register --list --json

Only entries that start with native- are shown — your other MCP servers are not touched or reported.

Remove

bash
# Remove every native-* entry from every detected client
native-mcp register --remove

# Just one client
native-mcp register --remove claude-code

# Specific servers from a client
native-mcp register --remove claude-code time calculator

Targeting a specific binary

By default the entries are written with the path of the currently-running native-mcp binary (via os.Executable()). Override with --binary:

bash
native-mcp register --binary /usr/local/bin/native-mcp claude-code time

Permissions / security

  • The command never reads or sends any secrets.
  • For Claude Desktop and Cursor, the JSON config is rewritten in place (4-space indent, trailing newline). Existing keys are preserved.
  • For Claude Code, the underlying claude mcp add command is invoked — it returns an error if the entry already exists, in which case you can --remove it first.

Why a dedicated subcommand

Earlier versions of the installer would register entries automatically. We pulled that out: an installer should install, registration is a separate concern, and this approach gives you precise control without needing jq or hand-editing JSON.

Released under the MIT License.