avanza-mcp 1.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- avanza_mcp/__init__.py +29 -0
- avanza_mcp/client/__init__.py +25 -0
- avanza_mcp/client/base.py +375 -0
- avanza_mcp/client/endpoints.py +41 -0
- avanza_mcp/client/exceptions.py +66 -0
- avanza_mcp/models/__init__.py +41 -0
- avanza_mcp/models/common.py +50 -0
- avanza_mcp/models/fund.py +246 -0
- avanza_mcp/models/search.py +123 -0
- avanza_mcp/models/stock.py +268 -0
- avanza_mcp/prompts/__init__.py +6 -0
- avanza_mcp/prompts/analysis.py +116 -0
- avanza_mcp/resources/__init__.py +6 -0
- avanza_mcp/resources/instruments.py +127 -0
- avanza_mcp/services/__init__.py +6 -0
- avanza_mcp/services/market_data_service.py +298 -0
- avanza_mcp/services/search_service.py +64 -0
- avanza_mcp/tools/__init__.py +8 -0
- avanza_mcp/tools/funds.py +267 -0
- avanza_mcp/tools/market_data.py +508 -0
- avanza_mcp/tools/search.py +119 -0
- avanza_mcp-1.0.0.dist-info/METADATA +99 -0
- avanza_mcp-1.0.0.dist-info/RECORD +26 -0
- avanza_mcp-1.0.0.dist-info/WHEEL +4 -0
- avanza_mcp-1.0.0.dist-info/entry_points.txt +2 -0
- avanza_mcp-1.0.0.dist-info/licenses/LICENSE.md +21 -0
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: avanza-mcp
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: MCP server for Avanza public market data API - Swedish stocks, funds, and more
|
|
5
|
+
License-File: LICENSE.md
|
|
6
|
+
Requires-Python: >=3.12
|
|
7
|
+
Requires-Dist: fastmcp==3.0.0b1
|
|
8
|
+
Requires-Dist: httpx>=0.27.0
|
|
9
|
+
Requires-Dist: pydantic>=2.0.0
|
|
10
|
+
Requires-Dist: tenacity>=9.0.0
|
|
11
|
+
Provides-Extra: dev
|
|
12
|
+
Requires-Dist: pytest-asyncio>=0.23.0; extra == 'dev'
|
|
13
|
+
Requires-Dist: pytest>=8.0.0; extra == 'dev'
|
|
14
|
+
Requires-Dist: respx>=0.21.0; extra == 'dev'
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
|
|
17
|
+
# Avanza MCP Server
|
|
18
|
+
|
|
19
|
+
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.
|
|
20
|
+
|
|
21
|
+
## ⚠️ Disclaimer
|
|
22
|
+
|
|
23
|
+
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.
|
|
24
|
+
|
|
25
|
+
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.
|
|
26
|
+
|
|
27
|
+
## 🛠️ MCP Tools
|
|
28
|
+
|
|
29
|
+
### Search & Discovery
|
|
30
|
+
| Tool | Description |
|
|
31
|
+
|------|-------------|
|
|
32
|
+
| `search_instruments` | Find stocks, funds, ETFs by name or symbol |
|
|
33
|
+
| `get_instrument_by_order_book_id` | Look up instruments by order book ID |
|
|
34
|
+
|
|
35
|
+
### Stock Analysis
|
|
36
|
+
| Tool | Description |
|
|
37
|
+
|------|-------------|
|
|
38
|
+
| `get_stock_info` | Complete stock information with fundamentals |
|
|
39
|
+
| `get_stock_quote` | Real-time price and volume data |
|
|
40
|
+
| `get_stock_analysis` | Financial ratios by year and quarter |
|
|
41
|
+
| `get_stock_chart` | Historical OHLC price data |
|
|
42
|
+
| `get_orderbook` | Order book depth with bid/ask levels |
|
|
43
|
+
| `get_marketplace_info` | Trading hours and market status |
|
|
44
|
+
| `get_recent_trades` | Latest executed trades |
|
|
45
|
+
| `get_broker_trade_summary` | Broker buy/sell activity |
|
|
46
|
+
| `get_dividends` | Historical dividend data |
|
|
47
|
+
| `get_company_financials` | Annual and quarterly financial statements |
|
|
48
|
+
|
|
49
|
+
### Fund Analysis
|
|
50
|
+
| Tool | Description |
|
|
51
|
+
|------|-------------|
|
|
52
|
+
| `get_fund_info` | Complete fund information with performance |
|
|
53
|
+
| `get_fund_sustainability` | ESG scores and sustainability metrics |
|
|
54
|
+
| `get_fund_chart` | Historical performance charts |
|
|
55
|
+
| `get_fund_chart_periods` | Performance across all time periods |
|
|
56
|
+
| `get_fund_description` | Detailed fund description |
|
|
57
|
+
| `get_fund_holdings` | Portfolio allocation (country, sector, top holdings) |
|
|
58
|
+
|
|
59
|
+
## 💡 MCP Prompts
|
|
60
|
+
|
|
61
|
+
- `analyze_stock` - Comprehensive stock analysis workflow
|
|
62
|
+
- `compare_funds` - Multi-fund comparison template
|
|
63
|
+
- `screen_dividend_stocks` - Dividend stock screening
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
### Configuration for MCP Clients
|
|
67
|
+
|
|
68
|
+
For Claude Desktop or other MCP clients, add to your configuration:
|
|
69
|
+
|
|
70
|
+
```json
|
|
71
|
+
{
|
|
72
|
+
"mcpServers": {
|
|
73
|
+
"avanza": {
|
|
74
|
+
"command": "uvx",
|
|
75
|
+
"args": ["avanza-mcp"]
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Usage in Claude Desktop
|
|
82
|
+
|
|
83
|
+
Once configured, you can ask Claude:
|
|
84
|
+
|
|
85
|
+
- "Search for Volvo stock on Avanza"
|
|
86
|
+
- "Get the latest stock quote for Ericsson"
|
|
87
|
+
- "Show me sustainable Swedish funds"
|
|
88
|
+
- "What's in the order book for H&M?"
|
|
89
|
+
- "Compare the performance of these three funds"
|
|
90
|
+
- "What dividends has SEB paid over the years?"
|
|
91
|
+
- "Show me the portfolio holdings for Avanza Global fund"
|
|
92
|
+
|
|
93
|
+
## 📄 License
|
|
94
|
+
|
|
95
|
+
MIT License - See [LICENSE.md](LICENSE.md) for details.
|
|
96
|
+
|
|
97
|
+
## 🤝 Contributing
|
|
98
|
+
|
|
99
|
+
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
avanza_mcp/__init__.py,sha256=BZ26uazp_mAWUwnynnO8YP2nv2dElW4AMYnlVGTvxmM,891
|
|
2
|
+
avanza_mcp/client/__init__.py,sha256=Yab-cUgQclyZgqdUkl7I15abQjEXVLoTvD3430oxpuY,515
|
|
3
|
+
avanza_mcp/client/base.py,sha256=92WrXDf0oTvE9gLJvEcbNkgbaT3rQkhoCAoGIpbaz0M,12853
|
|
4
|
+
avanza_mcp/client/endpoints.py,sha256=9Puu15PHVxmqmvSfIxVDcILztJrZoD2bLX7OlePyplg,1473
|
|
5
|
+
avanza_mcp/client/exceptions.py,sha256=KfVbVUdqdulPMiD0NdLjOaYczKu5pSgvYYrM2ngkgU8,1597
|
|
6
|
+
avanza_mcp/models/__init__.py,sha256=X_kmCaAe3iTq_MZIMr3XupH-yoHn1K_yHpX2aZmQSXE,767
|
|
7
|
+
avanza_mcp/models/common.py,sha256=QDEdMk-OYorPubcyHt__cl-FH9j55NykxLqXppMYENo,1226
|
|
8
|
+
avanza_mcp/models/fund.py,sha256=zwn2-p-TMRWguT8-scDPEvzkuzrsHffaS8K4pot2AyE,7850
|
|
9
|
+
avanza_mcp/models/search.py,sha256=HrP3V2T9Y1LBk_wwnNJdqg6XbHaz96AqvVUQ9iwuNyw,2816
|
|
10
|
+
avanza_mcp/models/stock.py,sha256=KR7SxeaiGe-7Me0-mXuqE37xwyhW94FPn8zjOtpyh8I,6420
|
|
11
|
+
avanza_mcp/prompts/__init__.py,sha256=P7ClxG1itpYEKXGP9nQzqJ1zo2S0QeiHgOsfgwdf7VQ,140
|
|
12
|
+
avanza_mcp/prompts/analysis.py,sha256=uW3P_jdupoNp7QsyjPsjXJjCNlR5646oYyVV9SMwXeM,3694
|
|
13
|
+
avanza_mcp/resources/__init__.py,sha256=jXyXHN_BV7HKkVh-2EfqHui7PzfcPlpEY7GaCWJuDQA,150
|
|
14
|
+
avanza_mcp/resources/instruments.py,sha256=1pZbQ19NAWNMD_qmBOcniwf988jpFKUK4QiXrdOyYGw,3948
|
|
15
|
+
avanza_mcp/services/__init__.py,sha256=hCCYSVLvFglaGfNo4MXQP8mzsKHmV8yG_iNH0VsIsPs,190
|
|
16
|
+
avanza_mcp/services/market_data_service.py,sha256=p3XGoLBU1YmX9EcbqSZOmXrX3NOlaITaVTo6o28vLns,9434
|
|
17
|
+
avanza_mcp/services/search_service.py,sha256=op2BKokwraqoOSv0SdnLMFBJJODyqCAhOaFiCJ1hc30,1930
|
|
18
|
+
avanza_mcp/tools/__init__.py,sha256=NMBh_rZ5q0u3WtQlfUxDVisWqJmtYc-3r2DHasKwMTQ,230
|
|
19
|
+
avanza_mcp/tools/funds.py,sha256=qRLYsZH-zNGCI_0KwfgFm1J43Bxlva9ug8mVIp6-Nzs,8781
|
|
20
|
+
avanza_mcp/tools/market_data.py,sha256=qqvnrnYpcvPucZlqvLHODh4DsRF5XPC7WmguDmaEzEk,16474
|
|
21
|
+
avanza_mcp/tools/search.py,sha256=srB7K-9VCJhB6Zvs4aLX_jfFekiMUIkYgOAp5IrCApg,3722
|
|
22
|
+
avanza_mcp-1.0.0.dist-info/METADATA,sha256=ngefdiVOguK_u6KSS20eiaro8rvMqmD1Wvh8CXOorR4,3570
|
|
23
|
+
avanza_mcp-1.0.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
24
|
+
avanza_mcp-1.0.0.dist-info/entry_points.txt,sha256=4MF6-imOIBHK-U5DLdRrufwrV3MXfqGG0OIA_e4Jl_M,47
|
|
25
|
+
avanza_mcp-1.0.0.dist-info/licenses/LICENSE.md,sha256=WVxy2qGCtophbFXxeAHHY0IksvRJLsUIuRgcGNtqH5Q,1065
|
|
26
|
+
avanza_mcp-1.0.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Ante Wall
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|