# Ghostfolio MCP

Connects an AI agent to Ghostfolio for portfolio analysis, market data, and investment account operations.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 22
- Author: mhajder
- License: AGPL-3.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/mhajder/ghostfolio-mcp
- Updated: 2026-10-23
- HTML: https://affpapa.org/en/nevibecode/mcp/ghostfolio-mcp

## What it does

Ghostfolio MCP gives an AI agent an MCP connection to a Ghostfolio instance. It can inspect holdings, positions, returns, dividends, allocations, and historical prices. The server also exposes symbol lookup plus account balances, orders, and transaction data.

This Python server supports both read and write actions. Set `GHOSTFOLIO_URL` and `GHOSTFOLIO_TOKEN` for the connection, then use `READ_ONLY_MODE` to block changes. SSL checks, request timeouts, rate limits, and tool filtering can be configured through environment variables.

The setup needs Python 3.11 to 3.15, access to Ghostfolio, and a valid Ghostfolio API token. Without that token, the server cannot connect to Ghostfolio.

## Requirements
- Needs: Python and uv (commands run via uvx)
- Environment variables: `GHOSTFOLIO_URL`, `GHOSTFOLIO_TOKEN`, `GHOSTFOLIO_VERIFY_SSL`, `GHOSTFOLIO_TIMEOUT`, `READ_ONLY_MODE`, `GHOSTFOLIO_DISABLED_TAGS`, `LOG_LEVEL`, `RATE_LIMIT_ENABLED`, `RATE_LIMIT_MAX_REQUESTS`, `RATE_LIMIT_WINDOW_MINUTES` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env GHOSTFOLIO_URL=<GHOSTFOLIO_URL> --env GHOSTFOLIO_TOKEN=<GHOSTFOLIO_TOKEN> --env GHOSTFOLIO_VERIFY_SSL=<GHOSTFOLIO_VERIFY_SSL> --env GHOSTFOLIO_TIMEOUT=<GHOSTFOLIO_TIMEOUT> --env READ_ONLY_MODE=<READ_ONLY_MODE> --transport stdio ghostfolio-mcp -- uvx ghostfolio-mcp
```
Replace <…> with your own values. 10 more environment variables are in the server README. uvx runs the command named after the package; if the README names another one, use uvx --from ghostfolio-mcp <command>

### Codex

**Platform CLI**
```bash
codex mcp add ghostfolio-mcp --env GHOSTFOLIO_URL=<GHOSTFOLIO_URL> --env GHOSTFOLIO_TOKEN=<GHOSTFOLIO_TOKEN> --env GHOSTFOLIO_VERIFY_SSL=<GHOSTFOLIO_VERIFY_SSL> --env GHOSTFOLIO_TIMEOUT=<GHOSTFOLIO_TIMEOUT> --env READ_ONLY_MODE=<READ_ONLY_MODE> -- uvx ghostfolio-mcp
```
Replace <…> with your own values. 10 more environment variables are in the server README. uvx runs the command named after the package; if the README names another one, use uvx --from ghostfolio-mcp <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "ghostfolio-mcp": {
            "command": "uvx",
            "args": [
                "ghostfolio-mcp"
            ],
            "env": {
                "GHOSTFOLIO_URL": "<GHOSTFOLIO_URL>",
                "GHOSTFOLIO_TOKEN": "<GHOSTFOLIO_TOKEN>",
                "GHOSTFOLIO_VERIFY_SSL": "<GHOSTFOLIO_VERIFY_SSL>",
                "GHOSTFOLIO_TIMEOUT": "<GHOSTFOLIO_TIMEOUT>",
                "READ_ONLY_MODE": "<READ_ONLY_MODE>"
            }
        }
    }
}
```
Replace <…> with your own values. 10 more environment variables are in the server README. uvx runs the command named after the package; if the README names another one, use uvx --from ghostfolio-mcp <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "ghostfolio-mcp": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "ghostfolio-mcp"
            ],
            "env": {
                "GHOSTFOLIO_URL": "<GHOSTFOLIO_URL>",
                "GHOSTFOLIO_TOKEN": "<GHOSTFOLIO_TOKEN>",
                "GHOSTFOLIO_VERIFY_SSL": "<GHOSTFOLIO_VERIFY_SSL>",
                "GHOSTFOLIO_TIMEOUT": "<GHOSTFOLIO_TIMEOUT>",
                "READ_ONLY_MODE": "<READ_ONLY_MODE>"
            }
        }
    }
}
```
Replace <…> with your own values. 10 more environment variables are in the server README. uvx runs the command named after the package; if the README names another one, use uvx --from ghostfolio-mcp <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e GHOSTFOLIO_URL=<GHOSTFOLIO_URL> -e GHOSTFOLIO_TOKEN=<GHOSTFOLIO_TOKEN> -e GHOSTFOLIO_VERIFY_SSL=<GHOSTFOLIO_VERIFY_SSL> -e GHOSTFOLIO_TIMEOUT=<GHOSTFOLIO_TIMEOUT> -e READ_ONLY_MODE=<READ_ONLY_MODE> ghostfolio-mcp uvx ghostfolio-mcp
```
Replace <…> with your own values. 10 more environment variables are in the server README. uvx runs the command named after the package; if the README names another one, use uvx --from ghostfolio-mcp <command>

## When to use it
- inspect portfolio holdings and returns
- retrieve dividends and asset allocations
- track orders, transactions, and balances
- look up stocks, ETFs, and financial symbols
- import transactions from another platform

## Example prompts
- Review my Ghostfolio portfolio performance for the selected period.
- Show dividends, asset allocation, and the benchmark comparison.
- Create a transaction in Ghostfolio and verify the result.

## Similar
- [World Monitor](https://affpapa.org/en/nevibecode/mcp/world-monitor.md) — MCP server · ★ 89408
- [CCXT](https://affpapa.org/en/nevibecode/mcp/ccxt.md) — MCP server · ★ 44583
- [Finance Toolkit](https://affpapa.org/en/nevibecode/mcp/finance-toolkit.md) — MCP server · ★ 5458
- [EdgarTools](https://affpapa.org/en/nevibecode/mcp/edgartools.md) — MCP server · ★ 2814
- [LetsFG — Flights & Hotels](https://affpapa.org/en/nevibecode/mcp/letsfg-flights-hotels.md) — MCP server · ★ 2188
- [AutoTS](https://affpapa.org/en/nevibecode/mcp/autots.md) — MCP server · ★ 1434

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
