Skip to content

MCP Integration

Fermi supports the Model Context Protocol (MCP) for connecting to external tool servers. MCP servers provide additional tools that the agent can use alongside its built-in tools.

MCP servers can be configured in several places (all optional, all user-edited — none are created by fermi init):

  • ~/.fermi/mcp.json — global MCP servers
  • <project>/.mcp.json — project-local MCP servers
  • mcp_servers key in settings.json — global or project-local, supports local overrides

The examples below use mcp.json. A nested { "mcpServers": { ... } } wrapper is also accepted in the JSON files.

The file is a JSON object where each key is a server name and each value is a server configuration:

{
"filesystem": {
"transport": "stdio",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/allowed/dir"]
},
"github": {
"transport": "stdio",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_TOKEN": "${GITHUB_TOKEN}"
}
}
}
FieldTypeRequiredDescription
transport"stdio" or "sse"NoTransport protocol. Default: "stdio".
commandstringYes (stdio)The command to run the MCP server.
argsstring[]NoArguments passed to the command.
urlstringYes (sse)URL for SSE transport servers.
envobjectNoEnvironment variables passed to the server process. Supports ${VAR} syntax to reference your shell environment.
env_allowliststring[]NoList of environment variable names to pass through from the parent process.
sensitive_toolsstring[]NoTool names that should be treated as sensitive (may require extra confirmation).

Environment variables in the env field support the ${VAR} syntax:

{
"env": {
"API_KEY": "${MY_API_KEY}"
}
}

This resolves ${MY_API_KEY} from your shell environment at startup. If the variable is not set, Fermi does not fail — it warns and skips that variable (for mcp.json) or silently omits it (for settings.json), and the server still launches without it.

The most common transport. Fermi spawns the MCP server as a child process and communicates via stdin/stdout.

{
"my-server": {
"transport": "stdio",
"command": "node",
"args": ["path/to/server.js"]
}
}

For servers that run as a separate HTTP service. Fermi connects to the server’s SSE endpoint.

{
"remote-server": {
"transport": "sse",
"url": "http://localhost:3000/sse"
}
}

Once configured, MCP tools are available to the agent automatically. They appear alongside the built-in tools. You do not need to do anything special to use them — the agent discovers and calls MCP tools as needed.

You can also run /mcp inside Fermi to connect the configured servers on demand and list the discovered tools. This works before your first agent turn, which makes it a useful quick verification step.

{
"sqlite": {
"transport": "stdio",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-sqlite", "path/to/database.db"]
}
}

After saving this to ~/.fermi/mcp.json and restarting Fermi, run /mcp to verify the SQLite tools were discovered. The agent will then be able to call them during normal turns.