MCP Integration Guide
This guide shows you how to integrate CodeFire’s MCP server into your daily AI-assisted development workflow.Core Concepts
Project Auto-Detection
The MCP server automatically detects which CodeFire project you’re working on based on your current working directory when the AI CLI tool starts. How it works:- The MCP server reads the working directory from your shell environment
- It queries the CodeFire database for projects matching that path
- It falls back to parent directory matching (so
/path/to/project/srcmatches/path/to/project) - If a match is found, that project becomes the default project for the session
- You can omit
project_idfrom most tool calls - The agent automatically works with the correct project
- No manual configuration needed per session
- Add the project to CodeFire (open the GUI and add the folder)
- Or, explicitly pass
project_idto each tool call - Or,
cdinto a directory that matches a tracked project
Global vs Project-Scoped Data
CodeFire supports both project-specific and global tasks and notes:| Scope | Description | When to Use |
|---|---|---|
| Project | Data tied to a specific project | Most development tasks, project-specific context |
| Global | Data visible on the home board, not tied to any project | Cross-project tasks, personal reminders, general planning |
global: true in tool calls:
Real-World Usage Examples
1. Starting a New Session
When you begin a new coding session, help your AI agent get oriented:2. Creating Tasks During Development
As you discover bugs or ideas, create tasks on the fly:3. Logging Progress with Task Notes
Use task notes to create an audit trail of your work:4. Capturing Architecture Decisions
Use project notes to document important decisions:5. Searching Project Context
Before starting work, search notes for relevant context:6. Browser Automation for Testing
Test your web app directly from your AI session:7. Git Workflow Integration
Manage git operations without leaving your AI session:8. Semantic Code Search
Find relevant code without knowing exact file names:9. Generating Assets
Create images for your project:Best Practices
1. Start Every Session with Context
Always begin by asking the agent to:- Check the current project (
get_current_project) - List in-progress tasks (
list_tasks({ status: "in_progress" })) - Read any pinned notes (
list_notes({ pinned_only: true }))
2. Create Tasks, Not Just Code
Don’t just ask the agent to write code. Ask it to:- Create a task for the feature
- Add notes to the task as it works
- Mark the task as done when complete
3. Use Notes for Long-Lived Context
Task notes are for progress updates. Project notes are for architectural context that persists beyond a single task.| Use Case | Tool |
|---|---|
| ”I fixed the bug by changing the middleware” | add_task_note |
| ”Our database schema uses soft deletes” | create_note |
| ”Progress update: 50% done, blocked on API keys” | add_task_note |
| ”We use JWT for auth with 7-day expiry” | create_note |
4. Pin Important Notes
Pin notes that you reference frequently:- Coding standards
- Architecture diagrams
- API design decisions
- Deployment checklists
5. Leverage Global Tasks for Planning
Use global tasks for work that spans multiple projects or isn’t project-specific:6. Use Browser Tools for Visual Debugging
Don’t just read error logs. Use browser tools to:- Take screenshots before and after changes
- Inspect network requests to debug API calls
- Read console logs to see runtime errors
- Test interactions (clicking buttons, filling forms)
7. Search Before Creating
Before creating a new note, search to see if one already exists:Workflow Patterns
Pattern 1: Feature Development
Pattern 2: Bug Investigation
Pattern 3: Research & Documentation
Troubleshooting
”No project detected” Error
Cause: Your working directory doesn’t match any project in CodeFire. Solution:- Check which projects exist:
- Verify the path matches:
- Either:
cdinto a tracked project directory- Add the current directory to CodeFire
- Pass
project_idexplicitly to each tool
”CodeFire database not found” Error
Cause: The CodeFire app hasn’t been launched yet, so the database doesn’t exist. Solution: Open the CodeFire app at least once to initialize the database.MCP Tools Not Available
Cause: The MCP server isn’t configured for your AI CLI tool. Solution: Follow the Setup Guide to configure the MCP server.Browser Tools Failing
Cause: CodeFire app isn’t running, or the browser tab was closed. Solution:- Launch the CodeFire app
- Open the built-in browser
- Ensure at least one tab is open
Next Steps
Tools Reference
Browse all available MCP tools
API Reference
Detailed API schemas and examples
