Skip to main content
Glama
mhajder

Ghostfolio MCP Server

by mhajder

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
LOG_LEVELNoLogging level (e.g., DEBUG, INFO, WARNING, ERROR)INFO
SENTRY_DSNNoSentry DSN for error tracking and performance monitoring
MCP_HTTP_HOSTNoHost to bind the HTTP server (used when MCP_TRANSPORT=sse or http)0.0.0.0
MCP_HTTP_PORTNoPort to bind the HTTP server8000
MCP_TRANSPORTNoTransport type: stdio, sse, or httpstdio
GHOSTFOLIO_URLYesThe URL of your Ghostfolio instance (e.g., https://domain.tld:3333)
READ_ONLY_MODENoSet to true to disable all write operationsfalse
SENTRY_RELEASENoRelease version (auto-detected if not set)
GHOSTFOLIO_TOKENYesYour Ghostfolio API token
GHOSTFOLIO_TIMEOUTNoConnection timeout in seconds30
RATE_LIMIT_ENABLEDNoSet to true to enable rate limitingfalse
SENTRY_ENABLE_LOGSNoEnable log capture as breadcrumbs and eventstrue
SENTRY_ENVIRONMENTNoEnvironment name (e.g., production, staging)
TOOL_SEARCH_ENABLEDNoSet to true to replace full tool listings with search_tools + call_toolfalse
TOOL_SEARCH_STRATEGYNoSearch strategy: bm25 (natural language) or regex (pattern match)bm25
GHOSTFOLIO_VERIFY_SSLNoEnable SSL certificate verificationtrue
MCP_HTTP_BEARER_TOKENNoOptional bearer token for authentication on HTTP transports
RATE_LIMIT_MAX_REQUESTSNoMaximum requests allowed per rate limit window100
SENTRY_SEND_DEFAULT_PIINoInclude personally identifiable information in Sentry eventstrue
TOOL_SEARCH_MAX_RESULTSNoMaximum number of tools returned by search_tools5
GHOSTFOLIO_DISABLED_TAGSNoComma-separated list of tags to disable tools for (e.g., portfolio,symbol)
SENTRY_PROFILE_LIFECYCLENoProfiling lifecycle mode: all, continuation, or tracetrace
RATE_LIMIT_WINDOW_MINUTESNoRate limit window size in minutes1
SENTRY_TRACES_SAMPLE_RATENoPerformance monitoring sample rate (0.0-1.0)1.0
SENTRY_PROFILE_SESSION_SAMPLE_RATENoContinuous profiling sample rate (0.0-1.0)1.0

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}
logging
{}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
extensions
{
  "io.modelcontextprotocol/ui": {}
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
get_account_balancesA

Get account balances for a specific account.

Retrieves balance information for a specific account including current balance, currency, and balance history.

get_accountsA

Get all accounts in your portfolio including account types and balances.

Retrieves a list of all accounts in your portfolio including account types, balances, and account-specific information.

Returns: Dictionary containing account information including accounts list and total value

create_accountA

Create a new account in your portfolio.

Creates a new account with the specified name, currency, and optional balance. This is useful for organizing your investments across different account types or platforms.

delete_accountA

Delete an existing account from your portfolio.

Deletes an account specified by its ID. Be careful, this might delete associated transactions depending on backend rules!

get_account_detailsB

Get details for a specific account.

update_accountB

Update settings or details of an existing account.

transfer_account_balanceB

Transfer cash balances between two accounts.

get_ordersB

Get all activities/orders from your portfolio, optionally filtered by account.

Retrieves a list of all buy/sell orders in your portfolio, optionally filtered by a specific account.

create_activityB

Create a single new transaction/activity.

delete_activityB

Delete a single activity/transaction by its ID.

get_asset_profileB

Get asset profile information for a specific symbol.

Retrieves detailed profile information about an asset including company information, sector, industry, and other metadata.

upsert_asset_profileA

Create-or-update an asset profile.

POSTs an empty profile-data record (idempotent — Ghostfolio returns HTTP 500 on both duplicate-create and some first-time-create paths while still persisting the record, so this tolerates 500). Then PATCHes metadata (name, currency, asset class, optional sub-class). PATCH is the source of truth — if the profile doesn't exist after the POST, PATCH will surface a 404. Calling twice with the same input yields the same end state.

delete_asset_profileA

Delete an asset profile.

Removes the profile-data record for the given data source and symbol. Be careful, this might delete associated activities and market data depending on backend rules!

get_benchmarksA

Get all configured benchmarks.

Returns: Dictionary containing the list of benchmarks.

get_benchmark_performanceC

Compare portfolio performance against a benchmark symbol starting from a specific date.

get_exchange_rateA

Get the exchange rate for a given currency symbol on a specific date.

export_portfolioA

Export portfolio activities/transactions data as JSON.

Retrieves portfolio transactions with optional query filters.

import_transactionsA

Import transactions into your portfolio. This is a write operation.

Imports a batch of transactions (buy/sell orders) into your Ghostfolio portfolio. This is useful for bulk importing historical data or transactions from other platforms.

get_dividends_for_importB

Fetch historical dividend data formatted for import for a specific symbol.

get_market_data_for_assetB

Get market data for a specific asset.

Retrieves current market data for a specific symbol including price, volume, market cap, and other relevant market information.

add_market_data_pointsA

Add one or more market data points for a specific asset.

Posts to the market-data endpoint for the given data source and symbol. Same (symbol, date) overwrites the existing point; passing the same input twice yields the same end state.

get_portfolio_detailsB

Get comprehensive portfolio details including accounts, positions, and summary.

Retrieves a complete overview of your portfolio including account information, current positions, performance summary, and portfolio metrics.

Returns: Dictionary containing complete portfolio information including accounts, positions, and summary

get_dividendsA

Get dividend data grouped by time period showing dividend payments and yield.

Retrieves dividend income data grouped by the specified time period, showing dividend payments, yield, and income patterns over time.

get_portfolio_holdingsA

Get portfolio holdings and positions including allocations and asset breakdowns.

Retrieves current portfolio holdings including positions, allocations, and asset breakdowns for the specified time period.

get_investmentsA

Get investment data grouped by time period showing cash flows and contributions.

Retrieves investment activity data grouped by the specified time period, showing cash flows, contributions, and investment patterns over time.

get_portfolio_performanceB

Get portfolio performance data including returns, benchmarks, and performance metrics.

Retrieves comprehensive performance metrics for your portfolio including returns, benchmarks, and performance comparisons over the specified time period.

get_positionA

Get position details for a specific symbol from a data source.

Retrieves detailed information about a specific position including current value, quantity, performance, and market data.

get_symbol_dataB

Get symbol data for a specific asset from a data source.

Retrieves detailed information about a specific symbol including current price, market data, and asset information.

get_historical_dataB

Get historical data for a specific symbol on a specific date.

Retrieves historical market data for a symbol on a specific date, including price and volume information.

lookup_symbolsA

Search for symbols using a query string.

Search for financial symbols, stocks, ETFs, and other assets using a text query. Optionally include market indices in the results.

get_healthA

Get system health status.

Retrieves the health status of the Ghostfolio backend service. This is useful to verify if the server is up and running correctly.

Returns: Dictionary containing health status information

get_platformsA

Get available platforms.

Retrieves a list of all available platforms (brokers, exchanges, etc.) that can be used when tracking accounts or transactions.

Returns: Dictionary containing available platforms

get_user_infoA

Get user information and settings.

Retrieves information about the current user including settings, preferences, and account details.

Returns: Dictionary containing user information and settings

get_watchlistA

Get all items in the user's watchlist.

Retrieves list of all watchlisted symbols.

Returns: Dictionary containing the watchlist items.

add_to_watchlistB

Add a symbol to the user's watchlist.

remove_from_watchlistB

Remove a symbol from the user's watchlist.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mhajder/ghostfolio-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server