Model Context Protocol (MCP)
Extend Factory’s capabilities with custom tools and data sources using Model Context Protocol
What is MCP?
The Model Context Protocol (MCP) is an open protocol that standardizes how applications provide context and tools to LLMs. With MCP, you can extend Factory’s capabilities by connecting it to various data sources and tools through standardized interfaces.
Configuring MCP Servers
Factory supports MCP through Factory Bridge, which runs MCP servers on your local machine and makes their tools available to Factory.
Configuration Process
To set up MCP servers with Factory:
- Install Factory Bridge if you haven’t already
- Configure your MCP servers in the configuration file (details below)
- Factory Bridge will automatically detect and load your MCP servers
- The tools provided by your MCP servers will become available in Factory
Accessing the MCP Configuration File
The easiest way to access and edit your MCP configuration is through the Factory Bridge system tray icon:
- Locate the Factory Bridge icon in the system tray (menu bar on macOS, notification area on Windows)
- Click on the icon to open the context menu
- Select “Open MCP Config File” from the menu options
This will open the configuration file in your default text editor. If the file doesn’t exist yet, Factory Bridge will automatically create it with an empty default configuration.
For reference, the configuration file is stored at:
- macOS:
~/Library/Application Support/Factory Bridge/mcp.json
- Windows:
%APPDATA%\Factory Bridge\mcp.json
Configuration Format
The MCP configuration file uses JSON format with the following structure:
Configuration Fields
mcpServers
: An object containing named server configurations- For each server:
command
: The executable to run (required)args
: Array of command-line arguments (required)env
: Optional environment variables to pass to the serverdisabled
: Optional boolean to temporarily disable a server without removing it
Example Configuration
Here’s an example configuration with multiple MCP servers:
In this example:
- The
google-maps
server provides tools for interacting with Google Maps - The
firecrawl
server is enabled and configured with an API key - The
slack
server is disabled (it won’t be loaded) but its configuration is preserved for future use
Automatic Configuration Updates
Factory Bridge automatically detects changes to the MCP configuration file in real-time. When you modify the mcp.json
file:
- Factory Bridge detects the changes immediately
- It identifies which servers need to be stopped, started, or restarted
- It applies the changes without requiring a restart of the application
- New servers and tools are automatically made available in Factory
This allows you to add, modify, or remove MCP servers without restarting Factory Bridge. Simply edit the configuration file, save your changes, and the new tools will be available in Factory.
Disabling Servers
The disabled
field allows you to temporarily disable a server without removing its configuration. This is useful for:
- Troubleshooting issues by selectively enabling/disabling servers
- Maintaining configurations for servers you only use occasionally
- Testing different server configurations
When a server is disabled, Factory Bridge will skip loading it but keep its configuration in the file for future use.
To disable a server, simply add "disabled": true
to its configuration:
To re-enable it, either remove the disabled
field or set it to false
.
Using MCP Tools in Factory
Once your MCP servers are configured and running, Factory will automatically detect the available tools and make them available for use.
When using Factory, it will intelligently determine when to use MCP tools based on your requests. You can also explicitly ask Factory to use a specific tool by referring to it by name.
Coming Soon
We’re actively working on expanding MCP support with these upcoming features:
-
SSE Transport Support: Support for SSE transport to connect to remote MCP servers over HTTP/HTTPS.
-
Image Tool Support: Support for tools that return image outputs.
-
Configuration UI: A dedicated UI for MCP configuration with error reporting and server status monitoring.
Resources
For more information about MCP and available servers: