Skip to content

Commit 88f8cf0

Browse files
authored
Merge pull request #4 from alexwox/mcp_server
mcp server support
2 parents ae06a3d + d8f4301 commit 88f8cf0

File tree

11 files changed

+3060
-0
lines changed

11 files changed

+3060
-0
lines changed

README.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ This is a modern Python client for the Borsdata API, featuring:
1212
- Comprehensive error handling
1313
- Context manager support
1414
- Intuitive API design
15+
- **MCP Server for AI integration** 🤖
1516

1617
For the official documentation check out:
1718
[https://github.com/Borsdata-Sweden/API]
@@ -93,6 +94,62 @@ api_key = os.getenv("BORSDATA_API_KEY")
9394
client = BorsdataClient(api_key)
9495
```
9596

97+
## MCP Server for AI Integration
98+
99+
This library includes an MCP (Model Context Protocol) server that allows AI assistants like Claude to directly access Borsdata financial data through well-defined tools.
100+
101+
### Features
102+
103+
- **28 specialized tools** organized into logical categories
104+
- **Efficient batch operations** for analyzing multiple stocks
105+
- **Comprehensive financial data** including prices, reports, KPIs, and more
106+
- **Easy integration** with Claude Desktop and other MCP clients
107+
108+
### Quick Start with MCP Server
109+
110+
```bash
111+
# Install MCP support
112+
pip install mcp>=1.0.0
113+
114+
# Set your API key
115+
export BORSDATA_API_KEY="your_api_key_here"
116+
117+
# Run the server
118+
cd src
119+
python -m mcp_server.server
120+
```
121+
122+
### Configuration for Claude Desktop
123+
124+
Add to your `claude_desktop_config.json`:
125+
126+
```json
127+
{
128+
"mcpServers": {
129+
"borsdata": {
130+
"command": "python",
131+
"args": ["-m", "mcp_server.server"],
132+
"cwd": "/path/to/Modern-Borsdata-Client/src",
133+
"env": {
134+
"BORSDATA_API_KEY": "your_api_key_here"
135+
}
136+
}
137+
}
138+
}
139+
```
140+
141+
### Available MCP Tools
142+
143+
**Reference Data**: get_instruments, get_markets, get_branches, get_sectors, get_countries
144+
**Stock Prices**: get_stock_prices, get_stock_prices_batch, get_last_stock_prices
145+
**Financial Reports**: get_reports, get_reports_batch, get_reports_metadata
146+
**KPIs**: get_kpi_metadata, get_kpi_history, get_kpi_history_batch, get_kpi_summary
147+
**Holdings**: get_insider_holdings, get_short_positions, get_buybacks
148+
**Calendars**: get_report_calendar, get_dividend_calendar
149+
**Other**: get_stock_splits, get_translation_metadata
150+
151+
📚 **Full documentation**: See [MCP Server README](src/mcp_server/README.md) and [Usage Guide](src/mcp_server/USAGE_GUIDE.md)
152+
96153
## Documentation
97154

98155
Comprehensive documentation is available in the `docs` directory:

0 commit comments

Comments
 (0)