mcp command group manages Model Context Protocol (MCP) servers, which extend Forge’s capabilities by providing additional tools, resources, and integrations.
Usage
Subcommands
import
Import server configuration from JSON.JSON configuration to import.
Configuration scope. Available scopes:
local- Project-specific configurationuser- Global user configuration
-slist
List configured MCP servers.Output in machine-readable format.
remove
Remove a configured server.Name of the server to remove.
Configuration scope.
local- Project-specific configurationuser- Global user configuration
-sshow
Show server configuration details.Name of the server to show details for.
reload
Reload servers and rebuild caches.Examples
Import Filesystem Server
Import GitHub Server
List MCP Servers
Show Server Details
Remove Server
Reload All Servers
Alternative Commands
You can also use thelist command:
Configuration Scopes
Local Scope
Project-specific servers (stored in./.forge/mcp-servers.json):
- Project-specific tools
- Development-only integrations
- Servers with project-specific configuration
User Scope
Global user servers (stored in~/.config/forge/mcp-servers.json):
- General-purpose tools
- Personal integrations
- Servers used across all projects
Popular MCP Servers
Filesystem Server
Provides file system access:GitHub Server
Integrates with GitHub:PostgreSQL Server
Provides database access:Slack Server
Integrates with Slack:Machine-Readable Output
Configuration Files
MCP servers are configured in:- User scope:
~/.config/forge/mcp-servers.json - Local scope:
./.forge/mcp-servers.json
Related Commands
forge list tool <AGENT>- List tools available to an agent (includes MCP tools)forge info- View active MCP servers
Notes
- MCP servers extend Forge with additional capabilities
- Servers run as separate processes and communicate via stdio or SSE
- Use
reloadafter manually editing configuration files - Local scope takes precedence over user scope
- Environment variables in server configs support secrets
- See Model Context Protocol documentation for creating custom servers