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?
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
- Install the Forge CLI
- A coding agent that supports MCP
- A Developer Console account with an Admin or Developer role
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
-
Install the MCP. The quickest option is the one-click button:
Or set it up manually: merge the following into
~/.cursor/mcp.jsonto use Forge in every project, or into.cursor/mcp.jsonin 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:
-
Add Forge to
.cursor/mcp.jsonin your project root:{
"mcpServers": {
"forge": {
"type": "stdio",
"command": "forge",
"args": ["mcp"]
}
}
}
See the Cursor CLI MCP docs.
VS Code
-
Install the MCP. The quickest option is the one-click button, which opens VS Code and asks you to install the server:
Or add Forge to
.mcp.jsonin your workspace root:{
"mcpServers": {
"forge": {
"command": "forge",
"args": ["mcp"]
}
}
}
See the VS Code MCP docs.
Claude Code CLI
-
Run:
Bashclaude mcp add forge -- forge mcp
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
-
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%\Claudeinto the File Explorer address bar. - macOS:
-
Quit and reopen Claude Desktop.
If Forge does not start, check
mcp-server-forge.login~/Library/Logs/Claudeon macOS or%APPDATA%\Claude\logson Windows. When Claude Desktop cannot read your shell'sPATH, it cannot findforge. Use the full path to theforgebinary instead (runwhich forgein your terminal). If you installed the Forge CLI with npm or pnpm, also setPATHto the folder that containsnode(rundirname "$(which node)"). The Homebrew install includes its own Node.js, so you can leave outenv.{
"mcpServers": {
"forge": {
"command": "<full path to forge binary>",
"args": ["mcp"],
"env": {
"PATH": "<folder that contains node>:/usr/bin:/bin"
}
}
}
}
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
-
Run:
Bashcodex mcp add forge -- forge mcpOr add to
~/.codex/config.tomlmanually:[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:
- Install the Forge CLI.
- Open Settings, then select MCP servers.
- Select Add server, enter the name
forge, choose STDIO, and enter the commandforge mcp. - Save the server, then select Restart.
See the Codex MCP docs.
GitHub Copilot CLI
-
Run:
Bashcopilot mcp add forge -- forge mcpOr, in a Copilot CLI session, run
/mcp addand fill in the form:- Server Name:
forge - Server Type:
STDIO - Command:
forge mcp
Or add to
~/.copilot/mcp-config.jsonmanually:{
"mcpServers": {
"forge": {
"type": "stdio",
"command": "forge",
"args": ["mcp"]
}
}
} - Server Name:
See the Copilot CLI MCP docs.
Gemini CLI
-
Run:
Bashgemini mcp add forge forge mcpOr add to
~/.gemini/settings.jsonmanually:{
"mcpServers": {
"forge": {
"command": "forge",
"args": ["mcp"]
}
}
}
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"]
}
}
}
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.
- 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:
# 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:
| Agent | How to reload |
|---|---|
| Claude Code CLI | Run /mcp, select forge, then Reconnect |
| Cursor IDE | Open Customize in the sidebar and turn forge off and on, or restart Cursor |
| VS Code | Run MCP: List Servers, select forge, then restart it |
| Codex in the ChatGPT desktop app | Settings > MCP servers, then Restart |
| Claude Desktop, Codex CLI, Copilot CLI, Cursor CLI, Gemini CLI, and others | Restart the app or CLI |
MCP tools
Each tool runs the same code as the matching Forge CLI command.
| Area | Tools |
|---|---|
| Sign-in and setup | forge_login, forge_login_status, forge_logout, forge_whoami, forge_env_switch, forge_doctor |
| Apps and APIs | forge_app_list, forge_app_select, forge_api_catalog, forge_api_call |
| Docs and templates | forge_ask_docs, forge_templates, forge_api_contract |
| Widgets | forge_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 |
| Aspects | forge_aspect_preview, forge_aspect_preview_status, forge_aspect_preview_stop, forge_aspect_submit |
| Playground | forge_playground_up, forge_playground_restart |
| Submissions | forge_submission_list, forge_submission_dashboard, forge_submission_status, forge_submission_publish, forge_submission_deploy |
| Repository | forge_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.
| Problem | Fix |
|---|---|
| Forge does not appear or will not start | For 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 finishes | The 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 again | Your 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-only | Forge 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 errors | Start 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 send | How to get it |
|---|---|
| Your prompt and the error | Copy them from your agent's chat |
| Agent, version, and model | Your agent's settings or About screen |
| Forge and Node.js versions | forge --version and node -v |
| MCP doctor report | forge mcp doctor --json > mcp-doctor.json |
| Forge doctor report | forge doctor --verbose --json > doctor.json |
| Recent Forge MCP log | The last 500 lines of ~/.forge/mcp.log, using the commands below |
| Your agent's MCP log, if it has one | Claude Desktop: mcp-server-forge.log in ~/Library/Logs/ClaudeCursor: the MCP Logs channel in the Output panel |
# 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
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.
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.