Firefly III MCP Server
A Model Context Protocol server that provides programmatic access to Firefly III personal finance management. It enables AI assistants to manage accounts, transactions, budgets, and more through natural language.
README
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
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:
- Log into your Firefly III instance
- Go to Options → Profile → OAuth
- Click Create New Token
- Give it a descriptive name (e.g., "MCP Server")
- Copy the generated token to your
.envfile
📖 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 operationfirefly_list_operations(entity?)- List available operationsfirefly_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 accountsaccount_get(id)- Get account detailstransaction_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
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
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Run the test suite
- 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.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。