Skip to main content

Forge CLI MCP server

Let your AI assistant sign you in, call Digital Insight APIs, and build, preview, and submit widgets and Aspects for you.

The MCP server ships inside the Forge CLI. It works with Claude Code, Claude Desktop, Codex, GitHub Copilot CLI, Cursor, Visual Studio Code, Gemini CLI, and any other coding agent that supports local MCP servers. If you are already signed in to the Forge CLI, your agent uses that session, so you only sign in once. For background, see What is MCP?

Beta

The Forge CLI and its MCP server are in beta. Tool names, behavior, and setup steps may change between beta releases.

How to install​

Prerequisites​

Add Forge to your coding agent​

To set up Cursor, and Claude Code if it is installed, in one step, run forge mcp install. Or pick your agent:

Cursor IDE
  1. Install the Forge CLI.

  2. Install the MCP. The quickest option is the one-click button:

    Add to CursorAdd to Cursor

    Or set it up manually: merge the following into ~/.cursor/mcp.json to use Forge in every project, or into .cursor/mcp.json in your repo root for one project:

    {
    "mcpServers": {
    "forge": {
    "type": "stdio",
    "command": "forge",
    "args": ["mcp"]
    }
    }
    }

See the Cursor MCP docs for more.

Cursor CLI

The Cursor CLI uses the same MCP config as the Cursor IDE. If Forge is already set up in the IDE, there is nothing else to do.

Otherwise:

  1. Install the Forge CLI.

  2. Add Forge to .cursor/mcp.json in your project root:

    {
    "mcpServers": {
    "forge": {
    "type": "stdio",
    "command": "forge",
    "args": ["mcp"]
    }
    }
    }

See the Cursor CLI MCP docs.

VS Code
  1. Install the Forge CLI.

  2. Install the MCP. The quickest option is the one-click button, which opens VS Code and asks you to install the server:

    Open in VS Code

    Or add Forge to .mcp.json in your workspace root:

    {
    "mcpServers": {
    "forge": {
    "command": "forge",
    "args": ["mcp"]
    }
    }
    }

See the VS Code MCP docs.

Claude Code CLI
  1. Install the Forge CLI.

  2. Run:

    Bash
    claude mcp add forge -- forge mcp
note

By default, this adds Forge to the current project only. See the Claude Code MCP docs for scope options (--scope user, --scope project, and others).

Claude Desktop
  1. Install the Forge CLI.

  2. In Claude Desktop, open Settings > Developer > Edit Config and merge the following into claude_desktop_config.json:

    {
    "mcpServers": {
    "forge": {
    "command": "forge",
    "args": ["mcp"]
    }
    }
    }

    The config file lives at:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json

    These folders are hidden by default, so Edit Config is the easiest way to open the file. To browse to it yourself on macOS, press Cmd+Shift+G in Finder and paste ~/Library/Application Support/Claude. On Windows, paste %APPDATA%\Claude into the File Explorer address bar.

  3. Quit and reopen Claude Desktop.

    If Forge does not start, check mcp-server-forge.log in ~/Library/Logs/Claude on macOS or %APPDATA%\Claude\logs on Windows. When Claude Desktop cannot read your shell's PATH, it cannot find forge. Use the full path to the forge binary instead (run which forge in your terminal). If you installed the Forge CLI with npm or pnpm, also set PATH to the folder that contains node (run dirname "$(which node)"). The Homebrew install includes its own Node.js, so you can leave out env.

    {
    "mcpServers": {
    "forge": {
    "command": "<full path to forge binary>",
    "args": ["mcp"],
    "env": {
    "PATH": "<folder that contains node>:/usr/bin:/bin"
    }
    }
    }
    }
note

The Connectors UI in Claude Desktop only supports remote MCP servers. Add local servers like Forge by editing claude_desktop_config.json directly.

Codex CLI
  1. Install the Forge CLI.

  2. Run:

    Bash
    codex mcp add forge -- forge mcp

    Or add to ~/.codex/config.toml manually:

    [mcp_servers.forge]
    command = "forge"
    args = ["mcp"]

See the Codex MCP docs and the config reference.

Codex in the ChatGPT desktop app

The ChatGPT desktop app shares its MCP config (~/.codex/config.toml) with the Codex CLI and IDE extension. If Forge is already set up there, the desktop app picks it up automatically.

Otherwise:

  1. Install the Forge CLI.
  2. Open Settings, then select MCP servers.
  3. Select Add server, enter the name forge, choose STDIO, and enter the command forge mcp.
  4. Save the server, then select Restart.

See the Codex MCP docs.

GitHub Copilot CLI
  1. Install the Forge CLI.

  2. Run:

    Bash
    copilot mcp add forge -- forge mcp

    Or, in a Copilot CLI session, run /mcp add and fill in the form:

    • Server Name: forge
    • Server Type: STDIO
    • Command: forge mcp

    Or add to ~/.copilot/mcp-config.json manually:

    {
    "mcpServers": {
    "forge": {
    "type": "stdio",
    "command": "forge",
    "args": ["mcp"]
    }
    }
    }

See the Copilot CLI MCP docs.

Gemini CLI
  1. Install the Forge CLI.

  2. Run:

    Bash
    gemini mcp add forge forge mcp

    Or add to ~/.gemini/settings.json manually:

    {
    "mcpServers": {
    "forge": {
    "command": "forge",
    "args": ["mcp"]
    }
    }
    }
note

By default, gemini mcp add adds Forge to the current project. See the Gemini CLI MCP docs for scope options (-s user, -s project).

Other Coding Agents / Manual Installation

If your agent isn't listed above, the generic stdio config is:

{
"mcpServers": {
"forge": {
"command": "forge",
"args": ["mcp"]
}
}
}
note

This assumes forge is on your PATH. If it isn't, replace "forge" with the full path to the Forge CLI executable (for example /opt/homebrew/bin/forge).

If you installed the Forge CLI with npm or pnpm and run into PATH issues, forge also needs to find Node.js. You can set PATH explicitly:

{
"mcpServers": {
"forge": {
"command": "<full path to forge binary>",
"args": ["mcp"],
"env": {
"PATH": "<folder that contains node>:/usr/bin:/bin"
}
}
}
}

MCP documentation for other IDEs:

Restart and sign in​

Restart your coding agent, then ask it:

Log me in to Forge.

Forge opens the Developer Console in your browser. Sign in and complete MFA within three minutes, and your agent is ready. If you are already signed in to the Forge CLI, you can skip this step.

What you can ask​

  • "Show my Developer Console apps and select retail-test."
  • "List accounts for hostUserId HOST01."
  • "Create a spending widget and preview it in the Docker playground."
  • "Preview the banner Aspect with the message 'Summer savings'."
  • "Submit my-spending for review and show me its status."

Tools that submit, publish, deploy, change collaborators, or write to your FI backend require confirmation. Review what your agent is about to run before you approve it.

Tips for better results
  • Choose a capable model. Forge workflows chain several tool calls, such as sign in, select an app, scaffold, preview, and submit. Smaller, faster models can skip steps, pick the wrong tool, or stop early. If results look off, switch to a more capable model in your agent.
  • Be specific. Name the widget, template, app, and console environment you mean, for example "Create a web widget called my-spending from the spending template."
  • Go one step at a time. For a new workflow, ask for one step, check the result, then ask for the next.

How to update​

The MCP server ships inside the Forge CLI, so updating the CLI updates the server:

Bash
# Homebrew
brew upgrade forge-cli

# pnpm
pnpm add -g @cdx-forge/cli@beta

# npm
npm install -g @cdx-forge/cli@beta

Then reload Forge in your coding agent:

AgentHow to reload
Claude Code CLIRun /mcp, select forge, then Reconnect
Cursor IDEOpen Customize in the sidebar and turn forge off and on, or restart Cursor
VS CodeRun MCP: List Servers, select forge, then restart it
Codex in the ChatGPT desktop appSettings > MCP servers, then Restart
Claude Desktop, Codex CLI, Copilot CLI, Cursor CLI, Gemini CLI, and othersRestart the app or CLI

MCP tools​

Each tool runs the same code as the matching Forge CLI command.

AreaTools
Sign-in and setupforge_login, forge_login_status, forge_logout, forge_whoami, forge_env_switch, forge_doctor
Apps and APIsforge_app_list, forge_app_select, forge_api_catalog, forge_api_call
Docs and templatesforge_ask_docs, forge_templates, forge_api_contract
Widgetsforge_widget_scaffold, forge_widget_list, forge_widget_set_urls, forge_widget_build, forge_widget_preview, forge_widget_preview_status, forge_widget_preview_stop, forge_widget_submit
Aspectsforge_aspect_preview, forge_aspect_preview_status, forge_aspect_preview_stop, forge_aspect_submit
Playgroundforge_playground_up, forge_playground_restart
Submissionsforge_submission_list, forge_submission_dashboard, forge_submission_status, forge_submission_publish, forge_submission_deploy
Repositoryforge_repo_status, forge_repo_pr_list, forge_repo_pr_status, forge_repo_init, forge_collaborator_list, forge_collaborator_add, forge_collaborator_remove

Troubleshooting​

Start with forge mcp doctor. It checks your Node.js version and your Cursor and Claude Code entries, then test-starts the server.

ProblemFix
Forge does not appear or will not startFor Cursor and Claude Code, run forge mcp install --force to rewrite the entry with full paths. For other agents, use the full path to forge, as in Other Coding Agents / Manual Installation under Add Forge to your coding agent. Then restart your agent.
Sign-in never finishesThe sign-in link expires after three minutes. Ask your agent to log you in again, then finish sign-in and MFA in the browser tab it opens. If Forge runs on a different machine than your browser, for example over SSH, browser sign-in cannot complete. Instead, run forge login in a terminal on the machine where Forge runs and choose Login with username and password. Your agent then uses that session.
Your agent asks you to log in againYour session ended. Sessions end after about 30 minutes without Forge activity, or when you sign out or switch console environment from a terminal or another agent. Ask your agent to log you in again.
Secret store is memory-onlyForge cannot reach your OS credential store. On macOS, run brew reinstall forge-cli. On Linux, install libsecret (libsecret-1-0 on Debian and Ubuntu).
Preview or Docker errorsStart Docker Desktop, then ask your agent to run the Forge doctor.

For anything else, see Forge CLI Troubleshooting.

If you still need help​

Send the platform team the following:

What to sendHow to get it
Your prompt and the errorCopy them from your agent's chat
Agent, version, and modelYour agent's settings or About screen
Forge and Node.js versionsforge --version and node -v
MCP doctor reportforge mcp doctor --json > mcp-doctor.json
Forge doctor reportforge doctor --verbose --json > doctor.json
Recent Forge MCP logThe last 500 lines of ~/.forge/mcp.log, using the commands below
Your agent's MCP log, if it has oneClaude Desktop: mcp-server-forge.log in ~/Library/Logs/Claude
Cursor: the MCP Logs channel in the Output panel
Bash
# macOS and Linux
tail -n 500 ~/.forge/mcp.log > forge-mcp.log

# Windows PowerShell
Get-Content $env:USERPROFILE\.forge\mcp.log -Tail 500 > forge-mcp.log
Capture more detail

Add "env": {"FORGE_MCP_LOG_LEVEL": "info"} to the forge entry in your agent's config, restart the agent, and reproduce the problem before you collect the Forge MCP log.

Privacy

Forge removes credentials, session tokens, and personal details such as usernames and email addresses from its MCP log. The Forge doctor report can contain your username, organization, institution ID, app ID, and file paths, and the MCP doctor report contains file paths. Share these files only with the platform team.

What is MCP?​

The Model Context Protocol (MCP) is an open standard for connecting AI applications to external tools and data. MCP uses a client-server model:

  • MCP servers expose tools, resources, and prompts through a standard interface.
  • MCP clients, such as Cursor, Claude Code, and VS Code, discover those tools and call them on your behalf.
  • Transports carry JSON-RPC 2.0 messages between them, either over stdio for a local server or over Streamable HTTP for a remote one.

The Forge CLI MCP server runs on your machine over stdio. It exposes Forge CLI workflows as tools, so your coding agent can run them for you.