Avanza MCP Server

Access to Avanza's public API for real-time Swedish stock and market data.

README.md

Avanza MCP Server

A Model Context Protocol (MCP) server providing access to Avanza's public API. Get real-time Swedish stock quotes, fund information, charts, and comprehensive market data.

🚀 Features

  • Fetch instrument info (stocks, ETFs, funds)
  • Real-time price quotes & order book depth
  • Historical price charts & financial ratios
  • Fund performance & ESG metrics
  • Screening and comparison prompts

Installation for MCP Clients

Claude Desktop

Add the following to your Claude Desktop MCP configuration file:

{
  "mcpServers": {
    "avanza": {
      "command": "uvx",
      "args": ["--prerelease=allow", "avanza-mcp"]
    }
  }
}

Restart Claude Desktop after saving the configuration.

Cursor

Cursor supports MCP servers via its settings.

  1. Open Cursor Settings
  2. Navigate to AI → MCP Servers
  3. Add a new MCP server with the following configuration:
{
  "name": "avanza",
  "command": "uvx",
  "args": ["--prerelease=allow", "avanza-mcp"]
}

Once added, Cursor can query Avanza market data directly in chat and inline prompts.

Visual Studio Code

VS Code can use Avanza MCP Server through MCP-compatible extensions or custom AI tooling.

  1. Ensure you have Python 3.10+ installed
  2. Ensure uv is installed: https://docs.astral.sh/uv/
  3. Add the following MCP server configuration to your MCP-enabled extension or tool:
{
  "mcpServers": {
    "avanza": {
      "command": "uvx",
      "args": ["--prerelease=allow", "avanza-mcp"]
    }
  }
}

Reload the VS Code window after updating the configuration.

Note: MCP support depends on the specific extension you are using. Refer to your extension’s documentation for MCP setup details.

⚠️ Disclaimer

This is an unofficial API client/MCP Server. Not affiliated with Avanza Bank AB. The underlying API can be taken down or changed without warning at any point in time.

The author of this software is not responsible for any indirect damages (foreseeable or unforeseeable), such as, if necessary, loss or alteration of or fraudulent access to data, accidental transmission of viruses or of any other harmful element, loss of profits or opportunities, the cost of replacement goods and services or the attitude and behavior of a third party.

🛠️ MCP Tools

Search & Discovery

Tool Description
search_instruments Find stocks, funds, ETFs by name or symbol
get_instrument_by_order_book_id Look up instruments by order book ID

Stock Analysis

Tool Description
get_stock_info Complete stock information with fundamentals
get_stock_quote Real-time price and volume data
get_stock_analysis Financial ratios by year and quarter
get_stock_chart Historical OHLC price data
get_orderbook Order book depth with bid/ask levels
get_marketplace_info Trading hours and market status
get_recent_trades Latest executed trades
get_broker_trade_summary Broker buy/sell activity
get_dividends Historical dividend data
get_company_financials Annual and quarterly financial statements

Fund Analysis

Tool Description
get_fund_info Complete fund information with performance
get_fund_sustainability ESG scores and sustainability metrics
get_fund_chart Historical performance charts
get_fund_chart_periods Performance across all time periods
get_fund_description Detailed fund description
get_fund_holdings Portfolio allocation (country, sector, top holdings)

Certificates

Tool Description
filter_certificates Search and filter certificates with pagination
get_certificate_info Get detailed certificate information
get_certificate_details Get extended certificate details

Warrants

Tool Description
filter_warrants Search and filter warrants (turbos, minis)
get_warrant_info Get detailed warrant information
get_warrant_details Get extended warrant details

ETFs

Tool Description
filter_etfs Search and filter exchange-traded funds
get_etf_info Get detailed ETF information
get_etf_details Get extended ETF details

Futures/Forwards

Tool Description
list_futures_forwards List available futures and forwards
get_future_forward_filter_options Get available filter options
get_future_forward_info Get contract information
get_future_forward_details Get extended contra

Tools 5

search_instrumentsFind stocks, funds, ETFs by name or symbol
get_stock_quoteReal-time price and volume data
get_fund_infoComplete fund information with performance
get_fund_holdingsPortfolio allocation (country, sector, top holdings)
get_stock_analysisFinancial ratios by year and quarter

Try it

What is the current real-time price and order book depth for Volvo B?
Compare the ESG sustainability scores of the top three Swedish index funds.
Show me the historical dividend data for Investor AB over the last 5 years.
What are the top holdings and sector allocation for the Avanza Zero fund?
Provide a financial analysis of Ericsson including recent quarterly ratios.

Frequently Asked Questions

What are the key features of Avanza MCP Server?

Fetch real-time price quotes and order book depth for Swedish instruments. Access historical price charts and financial ratios for stocks. Retrieve fund performance, ESG metrics, and portfolio holdings. Search and filter across stocks, ETFs, funds, warrants, and certificates.

What can I use Avanza MCP Server for?

Performing automated fundamental analysis on Swedish stocks using AI. Comparing fund performance and sustainability metrics for investment research. Retrieving real-time market data for personal financial dashboards. Analyzing portfolio allocation and sector exposure of specific funds.

How do I install Avanza MCP Server?

Install Avanza MCP Server by running: uvx --prerelease=allow avanza-mcp

What MCP clients work with Avanza MCP Server?

Avanza MCP Server works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Avanza MCP Server docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Open Conare