Ghostfolio MCP Server

MCP server for Ghostfolio portfolio management and financial data access

Local serverstdioPython

What is the Ghostfolio MCP MCP server?

Most developer tooling work still happens through a UI a human drives. Ghostfolio MCP MCP server moves it into the conversation instead. MCP server for Ghostfolio portfolio management and financial data access.

The short version

Ghostfolio MCP Server is a Python-based Model Context Protocol (MCP) server designed to provide advanced, programmable access to Ghostfolio portfolio management and financial data. It exposes a modern API for querying, analyzing, and managing your investment portfolio through Ghostfolio's comprehensive features. The server supports both read and write operations, robust security features, and is suitable for integration with automation tools, financial dashboards, and custom portfolio management applications.

The tools it exposes

The server publishes 14 tools. What each one is for:

  • get_accounts — Get all accounts in your portfolio including account types and balances
  • get_account_balances — Get account balances for a specific account
  • create_account — Create a new account in your portfolio
  • delete_account — Delete an existing account from your portfolio (destructive operation)
  • get_account_details — Get details for a specific account
  • update_account — Update settings or details of an existing account
  • transfer_account_balance — Transfer cash balances between two accounts
  • get_portfolio_performance — Get portfolio performance data including returns, benchmarks, and performance metrics
  • get_portfolio_holdings — Get portfolio holdings and positions including allocations and asset breakdowns
  • get_portfolio_details — Get comprehensive portfolio details including accounts, positions, and summary
  • get_position — Get position details for a specific symbol from a data source
  • get_investments — Get investment data grouped by time period showing cash flows and contributions

What it needs from you

Configuration is passed through the environment: GHOSTFOLIO_URL, GHOSTFOLIO_TOKEN, SENTRY_DSN, MCP_HTTP_HOST, MCP_HTTP_BEARER_TOKEN. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.

  • Python 3.11 or higher - Access to a Ghostfolio instance - Valid Ghostfolio API token

Getting it running

ghostfolio-mcp on PyPI is all you need. Most clients run it directly, so configuration is a few lines and a restart.

How it compares

Plenty of developer tooling servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call. Ghostfolio MCP's toolset — get_accounts, get_account_balances, create_account and 11 more — is a fair guide to whether it matches your workflow. It is maintained by mhajder; worth a glance at recent repository activity before you build anything load-bearing on it.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Things to watch

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 14 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Ghostfolio MCP.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Available tools

ToolWhat it does
get_accountsGet all accounts in your portfolio including account types and balances
get_account_balancesGet account balances for a specific account
create_accountCreate a new account in your portfolio
delete_accountDelete an existing account from your portfolio (destructive operation)
get_account_detailsGet details for a specific account
update_accountUpdate settings or details of an existing account
transfer_account_balanceTransfer cash balances between two accounts
get_portfolio_performanceGet portfolio performance data including returns, benchmarks, and performance metrics
get_portfolio_holdingsGet portfolio holdings and positions including allocations and asset breakdowns
get_portfolio_detailsGet comprehensive portfolio details including accounts, positions, and summary
get_positionGet position details for a specific symbol from a data source
get_investmentsGet investment data grouped by time period showing cash flows and contributions
get_dividendsGet dividend data grouped by time period showing dividend payments and yield
get_ordersGet all activities/orders from your portfolio, optionally filtered by account

How to install the Ghostfolio MCP MCP server

{
  "mcpServers": {
    "ghostfolio": {
      "command": "uvx",
      "args": ["ghostfolio-mcp"],
      "env": {
        "GHOSTFOLIO_URL": "your-value",
        "GHOSTFOLIO_TOKEN": "your-value",
        "SENTRY_DSN": "your-value",
        "MCP_HTTP_HOST": "your-value",
        "MCP_HTTP_BEARER_TOKEN": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

  • Python 3.11 or higher - Access to a Ghostfolio instance - Valid Ghostfolio API token
VariableDescriptionRequired
GHOSTFOLIO_URLEndpoint or connection string the server talks to.Yes
GHOSTFOLIO_TOKENCredential the server authenticates with.Yes
SENTRY_DSNEndpoint or connection string the server talks to.Yes
MCP_HTTP_HOSTEndpoint or connection string the server talks to.Optional
MCP_HTTP_BEARER_TOKENCredential the server authenticates with.Yes

Example prompts to try

  • Use Ghostfolio MCP to get accounts.
  • Use Ghostfolio MCP to get account balances.
  • Use Ghostfolio MCP to create account.

Frequently asked questions

It connects Ghostfolio MCP to MCP-compatible AI assistants such as Claude and Cursor, exposing 14 tools (get_accounts, get_account_balances, create_account, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Ghostfolio MCP directly.