Skip to main content
Glama
Firefly III MCP Server

Firefly III MCP Server

Firefly III MCP Server

A Model Context Protocol (MCP) server that provides programmatic access to Firefly III personal finance management through Claude Desktop, Cursor IDE, and other MCP-compatible AI assistants.

๐Ÿ“š Documentation

๐Ÿ“– Full Documentation

Related MCP server: Lunch Money MCP Server

Overview

This MCP server enables AI assistants to interact with your Firefly III instance, allowing you to manage your personal finances through natural language conversations. You can:

  • ๐Ÿ’ฐ Manage accounts: List, create, update, and delete asset, expense, revenue, and liability accounts

  • ๐Ÿ“Š Handle transactions: Create, retrieve, update, and delete financial transactions

  • ๐Ÿ’ณ Budget management: Work with budgets, budget limits, and track spending

  • ๐Ÿท๏ธ Categorization: Manage transaction categories and tags

  • ๐Ÿ’ธ Bill tracking: Handle recurring bills and payment monitoring

  • ๐Ÿท Piggy banks: Manage savings goals and track progress

  • โš™๏ธ Rules & automation: Configure transaction rules and rule groups

Key Features

  • ๐Ÿค– AI Integration: Works seamlessly with Claude Desktop, Cursor IDE, and other MCP clients

  • ๐Ÿ’ก Comprehensive API: Supports most Firefly III v1 API endpoints

  • โšก Flexible modes: Choose between consolidated tools or direct API access

  • ๐Ÿ”’ Type-safe: Full Pydantic model validation for all requests/responses

  • ๐ŸŽฏ Configurable: Enable only the Firefly III entities you need

Quick Example

Once set up, you can interact with your finances naturally:

"Show me my account balances"
"Create a new expense for $25.50 at Coffee Shop from my Checking Account"
"What's my budget status for this month?"
"List all my transactions from last week"
"Create a new savings goal for a vacation with a target of $2000"
"Show me all bills that are due this month"
"Help me create a transaction rule that automatically categorizes Starbucks purchases as 'Coffee'"
"Create a new budget category for 'Home Improvement' with a $500 monthly limit"

Requirements

  • Python 3.12+

  • A running Firefly III instance

  • Firefly III API token (Personal Access Token)

๐Ÿš€ Quick Setup

Local Installation

Clone and set up the project locally:

# Clone the repository
git clone https://github.com/horsfallnathan/firefly-iii-mcp-server.git firefly-mcp
cd firefly-mcp

# Install with UV (recommended)
uv sync

# Or with pip
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
pip install -e .

Configuration

Create a .env file in the project root:

# Required: Your Firefly III API URL and token
FIREFLY_API_URL=https://your-firefly-instance.com/api/v1
FIREFLY_API_TOKEN=your_token_here

# Optional: Enable all entities (default: just accounts). Requires `FIREFLY_DIRECT_MODE=true`
# Enabling all entities would lead to about 76 tools being registered and most clients suggest a maximum of 40 tools
FIREFLY_ENABLED_ENTITIES=all

# When false, the server will register consolidated tools for dynamic operation. When true, it will register individual tools for each operation
FIREFLY_DIRECT_MODE=false

FIREFLY_LOG_LEVEL=INFO

๐Ÿ”‘ Getting a Firefly III API Token:

  1. Log into your Firefly III instance

  2. Go to Options โ†’ Profile โ†’ OAuth

  3. Click Create New Token

  4. Give it a descriptive name (e.g., "MCP Server")

  5. Copy the generated token to your .env file

๐Ÿ“– See full configuration guide

๐Ÿ”Œ MCP Client Integration

Cursor IDE

Add to your workspace or global settings:

{
  "mcp.servers": {
    "firefly-mcp": {
      "command": "uv",
      "args": ["--directory", "/absolute/path/to/firefly-mcp", "run", "firefly-mcp"],
      "env": {
        "FIREFLY_API_URL": "https://your-firefly-instance.com/api/v1",
        "FIREFLY_API_TOKEN": "your_token_here",
        "FIREFLY_ENABLED_ENTITIES": "all",
        "FIREFLY_DIRECT_MODE": "false"
      }
    }
  }
}

VSCode

Create an mcp.json file in your project root or workspace:

{
  "servers": {
    "firefly-mcp": {
      "command": "uv",
      "args": ["--directory", "/absolute/path/to/firefly-mcp", "run", "firefly-mcp"],
      "env": {
        "FIREFLY_API_URL": "https://your-firefly-instance.com/api/v1",
        "FIREFLY_API_TOKEN": "your_token_here",
        "FIREFLY_ENABLED_ENTITIES": "all",
        "FIREFLY_DIRECT_MODE": "false"
      }
    }
  }
}

Operation Modes

Consolidated Mode (Default)

Provides three meta-tools for dynamic operation:

  • firefly_execute(entity, operation, params) - Execute any Firefly III operation

  • firefly_list_operations(entity?) - List available operations

  • firefly_get_schema(entity, operation) - Get parameter schema for operations

Direct Mode

Set FIREFLY_DIRECT_MODE=true to register individual tools for each operation:

  • account_list(limit?, page?) - List accounts

  • account_get(id) - Get account details

  • transaction_create(transactions) - Create transactions

  • And many more...

๐Ÿ› ๏ธ Development & Testing

Using MCP Inspector

For development and debugging, use the MCP Inspector:

# Install and run MCP Inspector
npx @modelcontextprotocol/inspector uv run firefly-mcp

The MCP Inspector provides a web interface where you can:

  • ๐Ÿงช Test all available tools and operations

  • ๐Ÿ” Inspect request/response schemas

  • ๐Ÿ› Debug server connectivity and authentication

  • โœ… Validate your Firefly III configuration

๐Ÿ“– See full development guide

Running Tests

# Run all tests
make test-all

# Run with coverage
make coverage

# Run specific test types
make test-unit
make test-integration

Local Development

# Development with .env file
make dev

# Direct execution
uv run firefly-mcp
python -m firefly_mcp.main

๐Ÿ“‹ Environment Variables Reference

Variable

Default

Description

FIREFLY_API_URL

https://firefly.dev.nlocal/api/v1

Your Firefly III API base URL

FIREFLY_API_TOKEN

(required)

Personal Access Token from Firefly III

FIREFLY_DISABLE_SSL_VERIFY

false

Disable SSL verification for development

FIREFLY_DIRECT_MODE

false

Enable individual tools for each operation

FIREFLY_ENABLED_ENTITIES

account

Comma-separated list of entities to enable

FIREFLY_LOG_LEVEL

INFO

Logging level (DEBUG, INFO, WARNING, ERROR)

๐ŸŽฏ API Compatibility

This MCP server is compatible with Firefly III API v1. It has been tested with:

  • โœ… Firefly III v6.x

๐Ÿค Contributing

  1. Fork the repository

  2. Create a feature branch

  3. Make your changes

  4. Add tests for new functionality

  5. Run the test suite

  6. Submit a pull request

๐Ÿ“„ License

This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). See the LICENSE file for details.

Available Tools

5 tools
echoA

Echo a message back to the user

Inputs: message (required). Returns: result

firefly_executeC

Execute any Firefly III operation dynamically.

Args: entity: Entity type (account, transaction, budget, etc.) operation: Operation name (list, get, create, update, delete, etc.) params: Operation parameters as dictionary

Inputs: entity (required), operation (required), params.

firefly_get_schemaA

Get parameter schema for a specific operation.

Args: entity: Entity type (account, transaction, etc.) operation: Operation name (list, get, etc.)

Inputs: entity (required), operation (required). Returns: object

firefly_list_operationsB

List all available Firefly III operations.

Args: entity: Optional entity filter (account, transaction, etc.)

Inputs: entity. Returns: result

get_versionB

Get the version of the Firefly MCP server

Inputs: random_string. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

    TDQS

    B3.4/5.0

    Scored across 5 tools

    Disambiguation4/5

    Tools have distinct purposes: echo for testing, get_version for server info, and the firefly_ tools for dynamic API access. However, firefly_execute is a broad catch-all that could be confused with many specific operations, but its name clearly indicates dynamic execution.

    Naming Consistency3/5

    Three tools follow a consistent firefly_ prefix pattern, but echo and get_version break this convention. This inconsistency could confuse agents expecting uniform naming.

    Tool Count5/5

    Five tools is well-scoped for a dynamic API wrapper. The single executor tool reduces the need for many individual endpoints, making the set compact and manageable.

    Completeness5/5

    The dynamic firefly_execute tool can perform any Firefly III operation, ensuring full coverage. Supporting meta-tools for schema and operation listing compensate for the lack of explicit endpoints.

    Maintenance

    ActivityInactive
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      A
      maintenance
      A Model Context Protocol server that enables AI-powered interaction with YNAB (You Need A Budget) data, allowing users to query their budgets through conversational interfaces.
      22
      553 npm
      165
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      A Model Context Protocol server that allows AI assistants to interact with Lunch Money accounts, enabling management of transactions, categories, budgets, and other financial data through natural language commands.
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to manage Firefly III personal finance accounts and transactions through the Model Context Protocol.
      21 npm
      91
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Connects any MCP-compatible AI assistant to your Firefly III personal finance instance, enabling natural language queries about your finances.
      MIT