Inverse of write_mcp_config(). For file-based clients (Cursor, Claude Code
project scope) it removes the named server while preserving every other
server. For CLI-managed targets (Claude Code user/local scope, Codex) it
prints the removal command to run.
Arguments
- client
One or more of
"cursor","claude-code","codex","claude-desktop". A bare call defaults to"cursor"only; pass a vector to configure several."claude-desktop"targets Claude Desktop and its Cowork local-agent mode (user scope only).- scope
One or more of
"project","user","local". A bare call defaults to"project"only."local"is Claude Code-only (a per-project private entry in~/.claude.json); it is skipped with a warning for"cursor", which has no local tier, and is irrelevant to"codex".- server_name
MCP server key (default
"certara-r"). Restricted to letters, digits,-, and_(starting with a letter or digit), since it is written verbatim as a JSON key, a TOML table name, and inside an R string literal.- project_dir
Project root for project-scope files.
- run
For CLI-managed targets (Claude Code user/local scope), actually execute the client CLI when it is on
PATHinstead of only printing the command. Falls back to printing if the CLI is not found. DefaultFALSE. Claude Code'sclaude mcp addrefuses when the server name already exists, so this path always remove-then-adds (soft-remove if absent) so a stale launcher (e.g. an oldCertara.RsNLME::launch_certara_mcpentry) is replaced. Codex is configured by writing~/.codex/config.tomldirectly (the only way to set per-tool approvals), sorundoes not invoke the Codex CLI; the equivalentcodex mcp addcommand is reported for reference.