Skip to main content
Writes the Momentic MCP server into the config file of one or more coding agents. You do not need to edit JSON or TOML by hand. See the MCP guide for the tools the server exposes.
In a terminal, the command asks which agents to configure and where to save the config. It preselects the agents it detects in the project and on your machine. Outside a terminal, or with --yes, it writes the project config for every detected agent. Both CLIs share momentic-hosted for cloud tools, including in Claude Desktop. New hosted entries launch npx -y qa mcp. Install the CLI, run npx -y qa login, then add MCP. The saved login is shared across CLIs; API key options apply only to the local server. Claude.ai/ChatGPT connectors use https://mcp.momentic.ai with OAuth. The command adds a momentic server entry that runs npx -y momentic mcp and keeps other servers and JSON comments.

Existing configuration

Reinstalling preserves valid local launchers, settings, and inline API keys. --config resets the launcher to the default command and new path, removing version pins and custom arguments. --api-key or --with-api-key replaces the stored local key in non-Cursor config. Cursor preserves a nonempty literal key in an existing entry. Changing the shell environment or saved login won’t replace it; edit the existing key in Cursor’s MCP config or replace it with ${env:MOMENTIC_API_KEY}. New Cursor entries forward MOMENTIC_API_KEY with ${env:MOMENTIC_API_KEY} rather than writing its value, including when API-key options are supplied. Export the key before launching Cursor or run npx -y qa login to save a sign-in. With cursor-agent, enable each server with cursor-agent mcp enable <id> after installation or a config edit, then run npx -y qa login.

Existing hosted connections

Existing hosted URL entries switch to the bridge only when the saved CLI login matches the production server and is usable, refreshing expired credentials when needed. A definite authentication rejection keeps the URL and its OAuth sign-in; temporary refresh failures do not discard a saved refreshable login. If sign-in is rejected or the saved login targets another server, run npx -y qa login --server https://api.momentic.ai, then rerun npx momentic install-mcp with the same options. Existing hosted connections keep their names unless named momentic or momentic-mobile. These reserved slots are not migrated: the selected one becomes local, and the other is untouched. Back up their hosted settings before installing; a new momentic-hosted entry uses defaults.

Supported agents

Agents with no project config get the user config.

Options

string
One or more agents to configure. Defaults to the agents detected in the project and on your machine.
string
project writes a file in the current directory that you can commit. user writes the config for your machine only.
string
Path to the Momentic config file to pass to the server. Project configs store it relative to the project root.
string
Write this API key into non-Cursor config as MOMENTIC_API_KEY.
boolean
Write your saved API key into non-Cursor config. Do not use this for files that you commit to Git. Without it, the server reads MOMENTIC_API_KEY from your environment or from ~/.momentic/auth.json after npx -y qa login.
boolean
Skip prompts and use the defaults.

Examples

Configure Cursor and Claude Code in the project:
Write the Codex user config with a specific Momentic config file: