MCP Server Setup
This guide walks through configuring the CodeFire MCP server for each supported AI CLI tool.Prerequisites
- CodeFire installed: Download from GitHub Releases and drag to
/Applications - Launch CodeFire once: This creates the database and installs the MCP server binary to:
- AI CLI tool installed: Claude Code, Gemini CLI, Codex CLI, or OpenCode
Quick Install (Recommended)
CodeFire includes a one-click installer for the MCP server:- Open CodeFire
- Go to Settings (
Cmd + ,) → MCP Server tab - Click Install for [Your CLI Tool]
Manual Setup
If you prefer to configure manually, follow the instructions for your CLI tool below.Claude Code
Claude Code
Configuration
Run this command to register the CodeFire MCP server:~/.claude/mcp.json.Verification
- Navigate to a project directory that exists in CodeFire
- Start a Claude Code session:
- In the Claude session, type:
Troubleshooting
“CodeFire database not found” error- Launch the CodeFire GUI app at least once to initialize the database
- Make sure you’ve added the project to CodeFire (it should appear in the sidebar)
- Verify the current directory matches the project path shown in CodeFire
- Use
list_projectsto see all available projects and their paths
Gemini CLI
Gemini CLI
Configuration
Add the MCP server to Gemini’s settings file:YOUR_USERNAME with your actual macOS username, or use the full expanded path.Verification
- Navigate to a CodeFire project:
- Check the connection:
list_tasks tool and show your tasks.Troubleshooting
“MCP server failed to start” error- Verify the path to
CodeFireMCPis correct and uses the full expanded path (not~) - Check file permissions:
ls -l ~/Library/Application\ Support/CodeFire/bin/CodeFireMCP - The file should be executable. If not, run:
Codex CLI
Codex CLI
Configuration
Add the MCP server to Codex’s config file:Verification
- Start a Codex session in a project directory:
- Test the connection:
get_current_project and display the detected project.Troubleshooting
MCP tools not appearing- Check the TOML syntax in
~/.codex/config.toml - Ensure there are no duplicate
[mcp_servers.codefire]sections - Restart Codex after editing the config
OpenCode
OpenCode
Configuration
Add the MCP server to OpenCode’s config:Verification
- Navigate to a project and launch OpenCode:
- Verify the MCP connection:
list_tasks tool.Troubleshooting
“Command not found” error for CodeFireMCP- OpenCode may not expand
~in the command path - Use the full absolute path:
Testing the Connection
Once configured, verify the MCP server is working:1. Check Auto-Detection
get_current_project and show the detected project name and ID.
2. List Projects
list_projects and display all your projects with their IDs and paths.
3. Create a Test Task
create_task and confirm the task was created. Open CodeFire to verify the task appears in the task board.
4. Check Connection Status in CodeFire
- Open CodeFire
- Look for the MCP connection indicator (usually in the status bar or toolbar)
- It should show:
- Connected status
- Current project name
- Working directory
Connection Lifecycle
When MCP Server Starts
- Reads the current working directory
- Opens the shared SQLite database (
~/Library/Application Support/CodeFire/codefire.db) - Queries the database to auto-detect the project
- Writes a connection status file to
~/Library/Application Support/CodeFire/mcp-connections/<pid>.json - Begins listening for JSON-RPC messages on stdin
During Operation
- Updates the connection heartbeat on each request
- CodeFire GUI polls the
mcp-connections/directory to show live connections - All database operations use a 5-second busy timeout for safe cross-process access
When MCP Server Exits
- Automatically removes the connection status file
- Releases the database connection
- Closes cleanly on SIGTERM or SIGINT
Advanced Configuration
Custom Database Path
By default, the MCP server looks for the database at:Running Multiple Instances
You can run multiple AI CLI sessions simultaneously. Each spawns its own MCP server process:- Each process gets a unique PID
- Each writes its own connection status file
- Database locks are managed via WAL mode and busy timeouts
- CodeFire shows all active connections in the status bar
Debugging
The MCP server writes diagnostic messages to stderr. To see them:Next Steps
Tools Reference
Browse all available MCP tools
Integration Guide
Learn how to use MCP tools effectively
