@axionquant/mcp 1.0.1
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.
- package/README.md +162 -0
- package/index.js +1407 -0
- package/package.json +34 -0
package/README.md
ADDED
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
# Axion MCP Server
|
|
2
|
+
|
|
3
|
+
A Model Context Protocol (MCP) server that provides LLM access to the Axion financial data API endpoints.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
This MCP server exposes all Axion product API endpoints as LLM-accessible tools, enabling AI assistants to query financial data including stocks, cryptocurrencies, forex, futures, indices, ETFs, credit ratings, ESG data, and supply chain information.
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
1. Install dependencies:
|
|
12
|
+
```bash
|
|
13
|
+
cd server/mcp-server
|
|
14
|
+
npm install
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
2. Configure environment variables:
|
|
18
|
+
```bash
|
|
19
|
+
cp .env.example .env
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Edit `.env` and set:
|
|
23
|
+
- `API_KEY`: Your API authentication key (if required)
|
|
24
|
+
|
|
25
|
+
## Usage
|
|
26
|
+
|
|
27
|
+
### Running the Server
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npm start
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Configuring with Claude Desktop
|
|
34
|
+
|
|
35
|
+
Add this to your Claude Desktop configuration file:
|
|
36
|
+
|
|
37
|
+
**MacOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
38
|
+
**Windows**: `%APPDATA%/Claude/claude_desktop_config.json`
|
|
39
|
+
|
|
40
|
+
```json
|
|
41
|
+
{
|
|
42
|
+
"mcpServers": {
|
|
43
|
+
"axion-financial-data": {
|
|
44
|
+
"command": "node",
|
|
45
|
+
"args": ["/absolute/path/to/axion/server/mcp-server/index.js"],
|
|
46
|
+
"env": {
|
|
47
|
+
"API_KEY": "your_api_key_here"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Using with Other MCP Clients
|
|
55
|
+
|
|
56
|
+
The server uses stdio transport, making it compatible with any MCP client. Configure according to your client's documentation.
|
|
57
|
+
|
|
58
|
+
## Available Tools
|
|
59
|
+
|
|
60
|
+
### Stock Market Tools
|
|
61
|
+
- `get_stock_tickers` - Get all stock tickers with optional country/exchange filtering
|
|
62
|
+
- `get_stock_ticker_info` - Get detailed info for a specific stock
|
|
63
|
+
- `get_stock_prices` - Get historical price data for a stock
|
|
64
|
+
|
|
65
|
+
### Cryptocurrency Tools
|
|
66
|
+
- `get_crypto_tickers` - Get all crypto tickers
|
|
67
|
+
- `get_crypto_ticker_info` - Get detailed info for a specific crypto
|
|
68
|
+
- `get_crypto_prices` - Get historical price data for a crypto
|
|
69
|
+
|
|
70
|
+
### Forex Tools
|
|
71
|
+
- `get_forex_tickers` - Get all forex pairs
|
|
72
|
+
- `get_forex_ticker_info` - Get detailed info for a forex pair
|
|
73
|
+
- `get_forex_prices` - Get historical price data for a forex pair
|
|
74
|
+
|
|
75
|
+
### Futures Tools
|
|
76
|
+
- `get_futures_tickers` - Get all futures tickers
|
|
77
|
+
- `get_futures_ticker_info` - Get detailed info for a futures contract
|
|
78
|
+
- `get_futures_prices` - Get historical price data for a futures contract
|
|
79
|
+
|
|
80
|
+
### Indices Tools
|
|
81
|
+
- `get_indices_tickers` - Get all market indices
|
|
82
|
+
- `get_indices_ticker_info` - Get detailed info for an index
|
|
83
|
+
- `get_indices_prices` - Get historical price data for an index
|
|
84
|
+
|
|
85
|
+
### ETF Tools
|
|
86
|
+
- `get_etf_fund_data` - Get comprehensive fund data including weights and regions
|
|
87
|
+
- `get_etf_holdings` - Get detailed holdings information
|
|
88
|
+
- `get_etf_exposure` - Get exposure analysis
|
|
89
|
+
|
|
90
|
+
### Credit Rating Tools
|
|
91
|
+
- `search_credit_entities` - Search S&P credit rating database
|
|
92
|
+
- `get_credit_ratings` - Get credit ratings for a specific entity
|
|
93
|
+
|
|
94
|
+
### ESG Tools
|
|
95
|
+
- `get_esg_data` - Get ESG (Environmental, Social, Governance) data for a ticker
|
|
96
|
+
|
|
97
|
+
### Supply Chain Tools
|
|
98
|
+
- `get_company_customers` - Get a company's customers
|
|
99
|
+
- `get_company_peers` - Get peer companies (competitors)
|
|
100
|
+
- `get_company_suppliers` - Get a company's suppliers
|
|
101
|
+
|
|
102
|
+
## Example Queries
|
|
103
|
+
|
|
104
|
+
Once configured with an LLM client like Claude Desktop, you can ask:
|
|
105
|
+
|
|
106
|
+
- "What are the current stock tickers for NASDAQ?"
|
|
107
|
+
- "Get me the historical prices for Bitcoin over the last month"
|
|
108
|
+
- "What are the top holdings in the SPY ETF?"
|
|
109
|
+
- "Search for Apple's credit rating"
|
|
110
|
+
- "Show me Tesla's ESG data"
|
|
111
|
+
- "Who are the main suppliers for AAPL?"
|
|
112
|
+
- "Get forex rates for EUR/USD"
|
|
113
|
+
|
|
114
|
+
## Architecture
|
|
115
|
+
|
|
116
|
+
The MCP server acts as a bridge between LLMs and your Axion REST API:
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
LLM (Claude, etc.) <--> MCP Server <--> Axion REST API
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
All API requests are proxied through the MCP server, which translates LLM tool calls into REST API requests.
|
|
123
|
+
|
|
124
|
+
## Development
|
|
125
|
+
|
|
126
|
+
### Project Structure
|
|
127
|
+
```
|
|
128
|
+
server/mcp-server/
|
|
129
|
+
├── index.js # Main MCP server implementation
|
|
130
|
+
├── package.json # Node.js dependencies
|
|
131
|
+
├── .env.example # Environment variable template
|
|
132
|
+
└── README.md # This file
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Adding New Tools
|
|
136
|
+
|
|
137
|
+
To add new API endpoints:
|
|
138
|
+
|
|
139
|
+
1. Add the tool definition in `ListToolsRequestSchema` handler
|
|
140
|
+
2. Add the corresponding case in `CallToolRequestSchema` handler
|
|
141
|
+
3. Update this README with the new tool
|
|
142
|
+
|
|
143
|
+
## Troubleshooting
|
|
144
|
+
|
|
145
|
+
### Server won't start
|
|
146
|
+
- Ensure Node.js is installed (v18+ recommended)
|
|
147
|
+
- Check that all dependencies are installed: `npm install`
|
|
148
|
+
- Verify the `.env` file exists and has correct values
|
|
149
|
+
|
|
150
|
+
### Tools not appearing in LLM
|
|
151
|
+
- Restart your MCP client (e.g., Claude Desktop)
|
|
152
|
+
- Check the client configuration file has the correct absolute path
|
|
153
|
+
- Verify the server is running without errors
|
|
154
|
+
|
|
155
|
+
### API requests failing
|
|
156
|
+
- Ensure your Axion API server is running
|
|
157
|
+
- Verify API_KEY if authentication is required
|
|
158
|
+
- Check server logs for detailed error messages
|
|
159
|
+
|
|
160
|
+
## License
|
|
161
|
+
|
|
162
|
+
MIT
|