Sponsored by Deepsite.site

Firefly III MCP - AI Agent For Personal Finance Management

Created By
Evans Mike7 months ago
This is a Model Context Protocol (MCP) server for Firefly III, a free and open-source personal finance manager. Through this MCP server, users can leverage AI tools to manage their Firefly III accounts and transactions, creating AI assistants for personal finance and accounting.
Content

Firefly III MCP Server

Getting Started

1. Obtain a Firefly III Personal Access Token (PAT)

To allow the MCP server to interact with your Firefly III instance, you need to generate a Personal Access Token (PAT):

  1. Log in to your Firefly III instance
  2. Navigate to Options > Profile > OAuth
  3. Under the "Personal access tokens" section, click on "Create new token"
  4. Give your token a descriptive name (e.g., "MCP Server Token")
  5. Click "Create"
  6. Important: Copy the generated token immediately. You will not be able to see it again.

For more details, refer to the official Firefly III documentation on Personal Access Tokens.

2. Configure the MCP Server

You need to provide the Firefly III PAT and your Firefly III instance URL to the MCP server. This can be done in several ways:

Provide these values in the headers of each request to the MCP server. This is generally the most secure method:

  • X-Firefly-III-Url: Your Firefly III instance URL (e.g., https://firefly.yourdomain.com)
  • Authorization: The Personal Access Token, typically prefixed with Bearer (e.g., Bearer YOUR_FIREFLY_III_PAT)

Please consult the documentation of the AI tool or client you are using for the exact header names it expects.

Query Parameters (Use with caution)

Alternatively, you can provide these values in the query parameters of each request to the MCP server:

  • baseUrl: Your Firefly III instance URL
  • pat: Your Firefly III Personal Access Token

Please note that URLs, including query parameters, can be logged in various places, potentially exposing sensitive information.

Environment Variables (Primarily for self-hosting/local development)

Set the following environment variables before running the server:

FIREFLY_III_BASE_URL="YOUR_FIREFLY_III_INSTANCE_URL" # e.g., https://firefly.yourdomain.com
FIREFLY_III_PAT="YOUR_FIREFLY_III_PAT"

Running the MCP Server

Method 1: Local Mode

This method is suitable for clients that support calling MCP tools via standard input/output (stdio), such as Claude Desktop.

Basic run command:

npx @firefly-iii-mcp/local --pat YOUR_PAT --baseUrl YOUR_FIREFLY_III_URL

You can also refer to the official tutorial for configuration in JSON format.

{
  "mcpServers": {
    "firefly-iii": {
      "command": "npx",
      "args": [
        "@firefly-iii-mcp/local",
        "--pat",
        "<Your Firefly III Personal Access Token>",
        "--baseUrl",
        "<Your Firefly III Base URL>"
      ]
    }
  }
}

You can easily deploy this MCP server to Cloudflare Workers using the button below:

Deploy to Cloudflare Workers

Note: After deploying, you will need to configure the FIREFLY_III_BASE_URL and FIREFLY_III_PAT environment variables in your Cloudflare Worker's settings:

  1. Go to your Cloudflare dashboard
  2. Navigate to Workers & Pages
  3. Select your deployed Worker
  4. Go to Settings > Variables
  5. Add FIREFLY_III_BASE_URL and FIREFLY_III_PAT as secret variables

Method 3: Run Locally from Source

NOTE

For production use, it is recommended to use the NPM package or deploy to Cloudflare Workers.

  1. Clone the repository:

    git clone https://github.com/etnperlong/firefly-iii-mcp.git
    cd firefly-iii-mcp
    
  2. Install dependencies:

    npm install
    
  3. Create a .env file:

    FIREFLY_III_BASE_URL="YOUR_FIREFLY_III_INSTANCE_URL"
    FIREFLY_III_PAT="YOUR_FIREFLY_III_PAT"
    
  4. Build the project:

    npm run build
    
  5. Start the development server:

    npm run dev
    

Development Guide

This project uses Turborepo to manage the monorepo workflow and Changesets for versioning and publishing.

Common Commands

  • Build all packages: npm run build
  • Build specific packages: npm run build:core or npm run build:local
  • Clean build artifacts: npm run clean
  • Development mode: npm run dev
  • Publish packages: npm run publish-packages

Acknowledgements

This project utilizes and modifies generation scripts from harsha-iiiv/openapi-mcp-generator. Many thanks to the original authors for their work.

This project is licensed under the MIT License.

Server Config

{
  "mcpServers": {
    "firefly-iii": {
      "command": "npx",
      "args": [
        "@firefly-iii-mcp/local"
      ],
      "env": {
        "FIREFLY_III_BASE_URL": "<YOUR_FIREFLY_III_BASE_URL>",
        "FIREFLY_III_PAT": "<YOUR_FIREFLY_III_PAT>"
      }
    }
  }
}
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
DeepChatYour AI Partner on Desktop
WindsurfThe new purpose-built IDE to harness magic
Serper MCP ServerA Serper MCP Server
Playwright McpPlaywright MCP server
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Tavily Mcp
ChatWiseThe second fastest AI chatbot™
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
CursorThe AI Code Editor
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Amap Maps高德地图官方 MCP Server
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.