The Avanza MCP Server provides access to Avanza's public API for Swedish financial market data, enabling real-time quotes, historical analysis, and comprehensive instrument research for MCP clients like Claude Desktop, Cursor, and VS Code.
Search & Discovery
Search for stocks, funds, ETFs, certificates, and warrants by name, ticker, or ISIN
Look up instruments by their order book ID
Stock Analysis
Detailed stock information including fundamentals, market cap, and company description
Real-time price quotes with bid/ask spread, VWAP, and volume
Financial ratios (annual, quarterly, TTM, Q-o-Q comparisons)
Historical OHLC price chart data across multiple time periods
Real-time order book depth with bid/ask levels
Market status and trading hours
Recent executed trades with price, volume, and timestamps
Broker buy/sell activity summaries
Historical dividend data by year
Annual and quarterly company financial statements (revenue, profit, margins)
Fund Analysis
Comprehensive fund information including NAV, performance, risk metrics, and fees
ESG/sustainability scores (environmental, social, governance, carbon metrics)
Historical fund performance charts across various time periods
Detailed fund descriptions, investment strategy, and portfolio holdings by country, sector, and top positions
Specialized Instruments
Filter, search, and retrieve detailed information for certificates, warrants (turbos, minis), ETFs, and futures/forwards
Additional Market Data
Owner counts for any instrument
Short selling data
Market maker OHLC price charts for traded products (certificates, warrants, ETFs)
AI-driven Analysis & Workflows
Predefined prompts for comprehensive stock analysis, multi-fund comparisons, dividend stock screening, and guided workflows for efficient instrument searching, filtering, and custom criteria screening
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Avanza MCP ServerShow me the top holdings and performance for the Avanza Global fund"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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
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 supports MCP servers via its settings.
Open Cursor Settings
Navigate to AI โ MCP Servers
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.
VS Code can use Avanza MCP Server through MCP-compatible extensions or custom AI tooling.
Ensure you have Python 3.10+ installed
Ensure
uvis installed: https://docs.astral.sh/uv/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 |
| Find stocks, funds, ETFs by name or symbol |
| Look up instruments by order book ID |
Stock Analysis
Tool | Description |
| Complete stock information with fundamentals |
| Real-time price and volume data |
| Financial ratios by year and quarter |
| Historical OHLC price data |
| Order book depth with bid/ask levels |
| Trading hours and market status |
| Latest executed trades |
| Broker buy/sell activity |
| Historical dividend data |
| Annual and quarterly financial statements |
Fund Analysis
Tool | Description |
| Complete fund information with performance |
| ESG scores and sustainability metrics |
| Historical performance charts |
| Performance across all time periods |
| Detailed fund description |
| Portfolio allocation (country, sector, top holdings) |
Certificates
Tool | Description |
| Search and filter certificates with pagination |
| Get detailed certificate information |
| Get extended certificate details |
Warrants
Tool | Description |
| Search and filter warrants (turbos, minis) |
| Get detailed warrant information |
| Get extended warrant details |
ETFs
Tool | Description |
| Search and filter exchange-traded funds |
| Get detailed ETF information |
| Get extended ETF details |
Futures/Forwards
Tool | Description |
| List available futures and forwards |
| Get available filter options |
| Get contract information |
| Get extended contract details |
Additional Data
Tool | Description |
| Get owner count for any instrument |
| Get short selling data for instruments |
| Get OHLC price chart data for traded products (certificates, warrants, ETFs) |
๐ก MCP Prompts
Analysis Prompts
analyze_stock- Comprehensive stock analysis workflowcompare_funds- Multi-fund comparison templatescreen_dividend_stocks- Dividend stock screening
Workflow Prompts (Teach AI Efficient Data Fetching)
search_and_analyze_instrument- Guide for finding and analyzing instruments efficientlyfilter_instruments_efficiently- Guide for filtering large datasets with paginationcompare_multiple_instruments- Guide for comparing instruments efficientlyexplore_market_segment- Guide for exploring market segmentsget_historical_analysis- Guide for analyzing historical datascreen_by_criteria- Guide for screening by custom criteria
๐ MCP Resources
Documentation Resources
avanza://docs/usage- Comprehensive usage guide for AI assistantsavanza://docs/quick-start- Quick reference for common tasks
Instrument Resources
avanza://stock/{instrument_id}- Get stock information as markdownavanza://fund/{instrument_id}- Get fund information as markdown
Note: The
--prerelease=allowflag is required because this package depends on fastmcp 3.0 (currently in beta). This will no longer be needed once fastmcp 3.0 stable is released.
Usage in Claude Desktop
Once configured, you can ask Claude:
"Search for Volvo stock on Avanza"
"Get the latest stock quote for Ericsson"
"Show me sustainable Swedish funds"
"What's in the order book for H&M?"
"Compare the performance of these three funds"
"What dividends has SEB paid over the years?"
"Show me the portfolio holdings for Avanza Global fund"
๐ License
MIT License - See LICENSE.md for details.
๐ค Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.