avanza-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
avanza-mcp
An MCP server that lets an AI assistant read your Avanza accounts, holdings and transactions, and look up public market data. You log in with BankID through a small login panel shown right in the chat.
Unofficial. Avanza has no public API. This server uses the same internal endpoints as avanza.se's own web app. They can change or break at any time, and automated use may be against Avanza's terms. Not affiliated with Avanza or BankID. Use at your own risk.
What it can do
Read-only. There are no tools for orders or transfers.
Tool | Login needed | What it returns |
| Shows the BankID login panel | |
| Whether you're logged in, and how old the snapshot is | |
| Logs out and deletes the stored session | |
| snapshot without login | Accounts with total value and cash |
| snapshot without login | Positions and cash, for one account or all |
| yes | Trades, deposits, dividends and fees |
| no | Stocks, funds, ETFs etc. by name, ticker or ISIN |
| no | Quote, key ratios, dividends, or fund details |
| no | Closing prices from one week to five years |
Avanza ends a web session after at most 24 hours. Every time you log in, the server saves a snapshot
of your accounts and holdings. While you're logged out, get_accounts and get_holdings answer from
that snapshot, with holdings re-priced from live public quotes.
Related MCP server: saldo-mcp
The login panel
connect_avanza returns an interactive MCP Apps
panel instead of a link:
On a computer it shows a live BankID QR code. Scan it with the BankID app.
On a phone it shows an Open BankID button that opens the BankID app on the same device.
The login only starts when the panel asks for it. That matters because BankID cancels a login the app hasn't picked up within about 30 seconds. A link written out by the assistant often arrives too late; the panel avoids that. The QR code is refreshed every second, and a new login is started automatically if nobody scans within 30 seconds.
You need a client that renders MCP Apps panels, such as ChatGPT. In a client without MCP Apps support the market-data tools still work, but there is no way to log in.
Install
Requires Python 3.12+ and uv.
git clone https://github.com/truls27a/avanza-mcp.git
cd avanza-mcp
uv sync
uv run avanza-mcp --helpLocal clients (stdio)
For a client that starts the server itself, add something like this to its MCP config:
{
"mcpServers": {
"avanza": {
"command": "uv",
"args": ["run", "--directory", "/path/to/avanza-mcp", "avanza-mcp"]
}
}
}Remote clients (HTTP)
AVANZA_MCP_TOKEN="$(openssl rand -hex 32)" uv run avanza-mcp --transport http --port 8000The MCP endpoint is http://127.0.0.1:8000/mcp, and /healthz is a health check.
By default it listens on
127.0.0.1only.If
AVANZA_MCP_TOKENis set, every request must sendAuthorization: Bearer <token>.It refuses to listen on a non-loopback address without a token. The exception is
--allow-unauthenticated, meant for a private container network where the only way in is a tunnel you control.
ChatGPT needs to reach the server over the internet. Put it behind a tunnel or reverse proxy that handles authentication, and never expose an unauthenticated port.
Docker
docker build -t avanza-mcp .
docker run -d --name avanza-mcp -p 127.0.0.1:8000:8000 \
-e AVANZA_MCP_TOKEN=change-me -v avanza-mcp-data:/data avanza-mcpConfiguration
Setting | Default | |
|
|
|
|
| HTTP only |
|
| Where the session and snapshot are stored |
| unset | Bearer token required on HTTP |
| off | Allow a non-loopback HTTP address without a token |
Security
Read this before you run it.
One user per server. The server stores one Avanza session. Anyone who can call the server can read that person's accounts, holdings and transactions. Run your own instance and keep it private.
The stored session can do more than this server does. The tools are read-only, but the stored cookies are a normal Avanza web session, which can also place orders. Anyone who gets hold of the data directory can act on the account until the session ends (at most 24 hours). The directory is created
0700and the database0600. Usedisconnect_avanzato log out early.No credentials are stored. Login is BankID only; the server never sees a password or a personal identity number.
Instrument names and descriptions come from Avanza. The server tells the model to treat them as data, not instructions.
Limitations
If one BankID has several Avanza customer profiles (for example private plus a company), login fails: choosing a profile isn't supported yet.
Endpoints and response shapes are reverse-engineered and may change without notice.
License
Related MCP Connectors
Ask your AI about your own accounts, debts, budgets and goals. OAuth sign-in, read-only by default.
Connect brokerage accounts to AI assistants: holdings, orders, asset lookup, and approved trading.
Read-only access to your MetaTrader 4 and 5 accounts for AI agents: balances, open positions, trade history with win rate, live quotes, symbol specs and candles. It cannot place, modify or close orders.
Read-only access to your own bank, card and brokerage accounts for Claude, ChatGPT and other AI agents: balances, transactions, spending, subscriptions, cashflow and investment holdings. It can never move money.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to securely interact with Charles Schwab accounts through OAuth authentication, providing access to account balances, real-time market quotes, options chains, transaction history, order management, and comprehensive market data.1MIT
- AlicenseNot gradedqualityDmaintenanceA read-only MCP server that securely connects Swedish/Nordic bank accounts to AI assistants, keeping all financial data local and encrypted.22 npmMIT

BankBridgeofficial
AlicenseNot gradedqualityAmaintenanceEnables financial data access from connected bank accounts via MCP tools, allowing natural language queries about balances, transactions, subscriptions, investments, and more, with a focus on privacy and read-only access.2MIT- AlicenseAqualityBmaintenanceEnables AI assistants to access Saxo Bank portfolio data, account balances, positions, orders, transactions, and market data such as instruments, quotes, and charts. It is read-only by default, with trading tools available only when explicitly enabled.10MIT