Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Finary MCP Server

An MCP (Model Context Protocol) server that gives LLMs read-only access to your Finary investment portfolio. Built with FastMCP and the unofficial finary_uapi client.

The server strips Finary's verbose API responses (often 90%+ noise) down to clean, report-friendly JSON — keeping only the fields that matter for analysis.

Tools

Currently this MCP server only provide reading capabilities

Tool Description
signin Authenticate to Finary with MFA. The LLM will ask you for your 6-digit TOTP code.
investments Investment accounts and their securities (name, ISIN, quantity, value, P&L).
cryptos Cryptocurrency holdings (name, code, quantity, price, P&L).
real_estates Real estate properties with loans and rental info.
scpis SCPI (real estate fund) holdings.
fonds_euro Euro fund holdings with annual yield.

Prerequisites

  • Docker
  • A Finary account with MFA (TOTP) enabled

Setup

1. Build the Docker image

cd finary-mcp
docker build -t finary-mcp .

The Dockerfile clones finary_uapi from GitHub at build time — no local copy of the library is needed.

2. Configure Claude Desktop

Edit your Claude Desktop config file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Add (or merge) the finary entry:

{
  "mcpServers": {
    "finary": {
      "command": "docker",
      "args": [
        "run", "-i", "--rm",
        "-e", "FINARY_EMAIL",
        "-e", "FINARY_PASSWORD",
        "finary-mcp"
      ],
      "env": {
        "FINARY_EMAIL": "your-email@example.com",
        "FINARY_PASSWORD": "your-password-here"
      }
    }
  }
}

Replace the placeholder values in env with your actual Finary credentials.

3. Restart Claude Desktop

Fully quit and reopen Claude Desktop so it picks up the new MCP server.

How authentication works

Credentials (FINARY_EMAIL, FINARY_PASSWORD) are injected as environment variables into the Docker container. They are never stored on disk.

On first use, the LLM calls the signin tool which triggers the Finary login flow. Since your account has MFA enabled, the LLM will ask you for the 6-digit TOTP code from your authenticator app. Once signed in, the session is cached inside the container for the duration of the conversation.

Each container run starts fresh — no tokens or cookies persist between sessions.

Running without Docker

You can also run the server directly with Python 3.10+:

pip install fastmcp docopt fuzzywuzzy "curl-cffi>=0.13,<0.15"
git clone https://github.com/lasconic/finary_uapi.git /tmp/finary_uapi
export PYTHONPATH="/tmp/finary_uapi:$PYTHONPATH"
export FINARY_EMAIL="your-email@example.com"
export FINARY_PASSWORD="your-password-here"
python mcp_server.py

Project structure

finary-mcp/
├── Dockerfile                 # Self-contained build (clones finary_uapi from GitHub)
├── mcp_server.py              # MCP server: 6 tools + response simplification
├── claude_desktop_config.json # Example Claude Desktop configuration
└── README.md

Credits

  • finary_uapi by lasconic — unofficial Finary API client
  • FastMCP by jlowin — Python MCP framework

About

Unofficial Finary MCP server

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages