Set Up Forge with VS Code + Continue
import { Aside, Tabs, TabItem } from ‘@astrojs/starlight/components’;
Continue is an open-source AI coding assistant for VS Code and JetBrains. It supports MCP servers as context providers. This guide covers adding Forge to Continue in VS Code.
Prerequisites
Section titled “Prerequisites”- Forge installed and on your PATH (
forge --versionreturns a version string) - At least one repo indexed (
forge index /path/to/repo) - VS Code installed with the Continue extension (version 0.8.x or later)
If you haven’t installed Forge yet, see Install Forge.
Add Forge to Continue’s config
Section titled “Add Forge to Continue’s config”Continue’s configuration lives at ~/.continue/config.json (user-global) or .continue/config.json in the workspace root (project-local). The project-local file takes precedence when it exists.
Create .continue/config.json in your project root:
{ "mcpServers": [ { "name": "forge", "command": "forge", "args": ["serve", ".", "--watch"] } ]}This file can be committed to the repo so all team members get Forge automatically.
Edit ~/.continue/config.json to add Forge to the mcpServers array:
{ "mcpServers": [ { "name": "forge", "command": "forge", "args": ["serve", "/absolute/path/to/your/repo", "--watch"] } ]}If ~/.continue/config.json doesn’t exist yet, create it with this content. If it already exists (from a prior Continue setup), add Forge to the existing mcpServers array.
Reload Continue
Section titled “Reload Continue”After editing the config, reload VS Code (Ctrl+Shift+P → “Developer: Reload Window”) or restart VS Code. Continue loads MCP server configs at startup.
Verify the connection
Section titled “Verify the connection”Open the Continue sidebar (click the Continue icon in the VS Code activity bar or press Ctrl+L). Ask:
What MCP tools do you have from forge?
Expected response lists Forge’s 21 tools. If Continue is connected to Forge, you’ll see tools like forge_prepare, forge_search, forge_trace_dependents, and the rest of the catalog.
Test with a structural query:
Use forge_find_cycles to check if there are any circular dependencies in this repo.
Continue calls forge_find_cycles and returns any circular dependency chains found.
Using Forge tools in Continue
Section titled “Using Forge tools in Continue”Continue’s MCP integration requires you to explicitly ask for tool use in most configurations. Suggested prompts:
- “Before we refactor this file, call forge_prepare on
src/payments/index.ts.” - “Use forge_trace_dependents to find everything that imports
utils/format.ts.” - “Run forge_health_check and summarize the findings.”
Custom slash command (optional)
Section titled “Custom slash command (optional)”Add a slash command to Continue’s config for a one-key Forge prepare:
{ "mcpServers": [ { "name": "forge", "command": "forge", "args": ["serve", ".", "--watch"] } ], "slashCommands": [ { "name": "prepare", "description": "Run forge_prepare on the current file before editing", "prompt": "Call forge_prepare on {{{ input }}} and summarize: dependents count, health findings, and the GO/CAUTION/STOP assessment." } ]}Use it with /prepare src/payments/index.ts in the Continue input.
Common pitfalls
Section titled “Common pitfalls”Continue doesn’t show MCP tools Continue’s MCP support requires version 0.8.x or later. Run “Continue: Check for Updates” in the VS Code command palette and update if needed.
Config file not found
Continue looks for ~/.continue/config.json by default. If you’ve configured Continue to use a different config path via VS Code settings, check continue.configFile in your VS Code settings.
PATH issues on VS Code
VS Code on macOS may not inherit your terminal’s PATH. Use the absolute path to forge in the config:
{ "mcpServers": [ { "name": "forge", "command": "/usr/local/bin/forge", "args": ["serve", ".", "--watch"] } ]}