Overview
The Model Context Protocol (MCP) allows AI agents to communicate with external tools and services. This implementation follows Anthropic’s Model Context Protocol design, enabling powerful integrations with web browsers, APIs, and custom services.Configuration
Using the CLI
The recommended way to configure MCP servers is through Forge’s CLI commands:Manual Configuration
You can also manually create or edit.mcp.json configuration files. MCP configurations are read from two locations in order of precedence:
- Local configuration (project-specific):
.mcp.jsonin your project directory - User configuration (user-specific):
~/.config/forge/.mcp.json
Configuration Structure
Configuration Examples
Command-based Server
HTTP-based Server
Browser Automation
Server Lifecycle
mcp_{server_name}_tool_forge mcp reload to manually refresh the cacheUse Cases
Web Browser Automation
Enable agents to control a web browser for testing, scraping, or automation tasks.External API Interactions
Connect to REST APIs or other web services.Database Access
Allow agents to query databases for information.Multi-Agent Workflows
MCP tools can be used as part of multi-agent workflows, allowing specialized agents to interact with external systems:Troubleshooting
Server Not Connecting
- Check that the command and arguments are correct
- Verify environment variables are set properly
- Use
forge mcp listto see error details - Check server logs if available
Tools Not Appearing
- Ensure the server connected successfully
- Verify the server implements the MCP protocol correctly
- Try reloading with
forge mcp reload
Performance Issues
- Reduce the number of concurrent MCP servers
- Check if servers are responding slowly
- Consider disabling unused servers
Advanced Configuration
Disabling a Server
To temporarily disable a server without removing it, add adisabled field:
Environment Variable Expansion
Environment variables in theenv section use standard shell syntax: