Spaces:
Sleeping
Sleeping
Upload 2537 files
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- .gitattributes +5 -0
- crypto-indicators-mcp/.gitignore +3 -0
- crypto-indicators-mcp/LICENSE +21 -0
- crypto-indicators-mcp/README.md +177 -0
- crypto-indicators-mcp/index.js +33 -0
- crypto-indicators-mcp/indicators/momentumIndicators.js +198 -0
- crypto-indicators-mcp/indicators/trendIndicators.js +494 -0
- crypto-indicators-mcp/indicators/volatilityIndicators.js +232 -0
- crypto-indicators-mcp/indicators/volumeIndicators.js +184 -0
- crypto-indicators-mcp/node_modules/.package-lock.json +1435 -0
- crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/LICENSE +21 -0
- crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/README.md +493 -0
- crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/cli.d.ts +2 -0
- crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/cli.d.ts.map +1 -0
- crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/cli.js +131 -0
- crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/cli.js.map +1 -0
- crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/auth.d.ts +116 -0
- crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/auth.d.ts.map +1 -0
- crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/auth.js +251 -0
- crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/auth.js.map +1 -0
- crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/index.d.ts +784 -0
- crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/index.d.ts.map +1 -0
- crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/index.js +229 -0
- crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/index.js.map +1 -0
- crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/sse.d.ts +70 -0
- crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/sse.d.ts.map +1 -0
- crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/sse.js +173 -0
- crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/sse.js.map +1 -0
- crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/stdio.d.ts +69 -0
- crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/stdio.d.ts.map +1 -0
- crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/stdio.js +157 -0
- crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/stdio.js.map +1 -0
- crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/websocket.d.ts +17 -0
- crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/websocket.d.ts.map +1 -0
- crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/websocket.js +65 -0
- crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/websocket.js.map +1 -0
- crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/inMemory.d.ts +21 -0
- crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/inMemory.d.ts.map +1 -0
- crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/inMemory.js +51 -0
- crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/inMemory.js.map +1 -0
- crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/package.json +1 -0
- crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/clients.d.ts +19 -0
- crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/clients.d.ts.map +1 -0
- crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/clients.js +3 -0
- crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/clients.js.map +1 -0
- crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/errors.d.ts +126 -0
- crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/errors.d.ts.map +1 -0
- crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/errors.js +189 -0
- crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/errors.js.map +1 -0
- crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/authorize.d.ts +13 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,8 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
crypto-indicators-mcp/node_modules/ccxt/dist/ccxt.browser.js filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
crypto-indicators-mcp/node_modules/technicalindicators/images/home.png filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
crypto-indicators-mcp/node_modules/technicalindicators/images/screener.png filter=lfs diff=lfs merge=lfs -text
|
| 39 |
+
crypto-indicators-mcp/node_modules/technicalindicators/images/trade.png filter=lfs diff=lfs merge=lfs -text
|
| 40 |
+
crypto-indicators-mcp/node_modules/technicalindicators/tf_model/group1-shard1of1 filter=lfs diff=lfs merge=lfs -text
|
crypto-indicators-mcp/.gitignore
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
node_modules
|
| 2 |
+
.env
|
| 3 |
+
deprecated
|
crypto-indicators-mcp/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
MIT License
|
| 2 |
+
|
| 3 |
+
Copyright (c) 2025 kukapay
|
| 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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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Crypto Indicators MCP Server
|
| 2 |
+
|
| 3 |
+
An MCP server providing a range of cryptocurrency technical analysis indicators and strategies, empowering AI trading agents to efficiently analyze market trends and develop robust quantitative strategies.
|
| 4 |
+
|
| 5 |
+
[](https://opensource.org/licenses/MIT)
|
| 6 |
+
[](https://nodejs.org/)
|
| 7 |
+

|
| 8 |
+
|
| 9 |
+
## Features
|
| 10 |
+
|
| 11 |
+
- **Technical Indicators**: 50+ indicators across trend, momentum, volatility, and volume categories.
|
| 12 |
+
- **Trading Strategies**: Corresponding strategies outputting signals: `-1` (SELL), `0` (HOLD), `1` (BUY).
|
| 13 |
+
- **Flexible Data Source**: Defaults to Binance, configurable to any `ccxt`-supported exchange.
|
| 14 |
+
- **Modular Design**: Indicators and strategies are categorized for easy maintenance.
|
| 15 |
+
|
| 16 |
+
## Installation
|
| 17 |
+
|
| 18 |
+
### Prerequisites
|
| 19 |
+
|
| 20 |
+
- [Node.js](https://nodejs.org/) (v18.x or higher)
|
| 21 |
+
- npm (v8.x or higher)
|
| 22 |
+
|
| 23 |
+
### Steps
|
| 24 |
+
|
| 25 |
+
1. **Clone the Repository**:
|
| 26 |
+
```bash
|
| 27 |
+
git clone https://github.com/kukapay/crypto-indicators-mcp.git
|
| 28 |
+
cd crypto-indicators-mcp
|
| 29 |
+
```
|
| 30 |
+
|
| 31 |
+
2. **Install Dependencies**:
|
| 32 |
+
```bash
|
| 33 |
+
npm install
|
| 34 |
+
```
|
| 35 |
+
|
| 36 |
+
3. **Configure MCP Client**:
|
| 37 |
+
To use this server with an MCP client like Claude Desktop, add the following to your config file (or equivalent):
|
| 38 |
+
```json
|
| 39 |
+
{
|
| 40 |
+
"mcpServers": {
|
| 41 |
+
"crypto-indicators-mcp": {
|
| 42 |
+
"command": "node",
|
| 43 |
+
"args": ["path/to/crypto-indicators-mcp/index.js"],
|
| 44 |
+
"env": {
|
| 45 |
+
"EXCHANGE_NAME": "binance"
|
| 46 |
+
}
|
| 47 |
+
}
|
| 48 |
+
}
|
| 49 |
+
}
|
| 50 |
+
```
|
| 51 |
+
|
| 52 |
+
## Available Tools
|
| 53 |
+
|
| 54 |
+
### Trend Indicators
|
| 55 |
+
- `calculate_absolute_price_oscillator`: Measures the difference between two EMAs to identify trend strength (APO).
|
| 56 |
+
- `calculate_aroon`: Identifies trend changes and strength using high/low price extremes (Aroon).
|
| 57 |
+
- `calculate_balance_of_power`: Gauges buying vs. selling pressure based on price movement (BOP).
|
| 58 |
+
- `calculate_chande_forecast_oscillator`: Predicts future price movements relative to past trends (CFO).
|
| 59 |
+
- `calculate_commodity_channel_index`: Detects overbought/oversold conditions and trend reversals (CCI).
|
| 60 |
+
- `calculate_double_exponential_moving_average`: Smooths price data with reduced lag for trend detection (DEMA).
|
| 61 |
+
- `calculate_exponential_moving_average`: Weights recent prices more heavily for trend analysis (EMA).
|
| 62 |
+
- `calculate_mass_index`: Identifies potential reversals by measuring range expansion (MI).
|
| 63 |
+
- `calculate_moving_average_convergence_divergence`: Tracks momentum and trend direction via EMA differences (MACD).
|
| 64 |
+
- `calculate_moving_max`: Computes the maximum price over a rolling period (MMAX).
|
| 65 |
+
- `calculate_moving_min`: Computes the minimum price over a rolling period (MMIN).
|
| 66 |
+
- `calculate_moving_sum`: Calculates the sum of prices over a rolling period (MSUM).
|
| 67 |
+
- `calculate_parabolic_sar`: Provides stop-and-reverse points for trend following (PSAR).
|
| 68 |
+
- `calculate_qstick`: Measures buying/selling pressure based on open-close differences (Qstick).
|
| 69 |
+
- `calculate_kdj`: Combines stochastic and momentum signals for trend analysis (KDJ).
|
| 70 |
+
- `calculate_rolling_moving_average`: Applies a rolling EMA for smoother trend tracking (RMA).
|
| 71 |
+
- `calculate_simple_moving_average`: Averages prices over a period to identify trends (SMA).
|
| 72 |
+
- `calculate_since_change`: Tracks the time since the last significant price change.
|
| 73 |
+
- `calculate_triple_exponential_moving_average`: Reduces lag further than DEMA for trend clarity (TEMA).
|
| 74 |
+
- `calculate_triangular_moving_average`: Weights middle prices more for smoother trends (TRIMA).
|
| 75 |
+
- `calculate_triple_exponential_average`: Measures momentum with triple smoothing (TRIX).
|
| 76 |
+
- `calculate_typical_price`: Averages high, low, and close prices for a balanced trend view.
|
| 77 |
+
- `calculate_volume_weighted_moving_average`: Incorporates volume into moving averages for trend strength (VWMA).
|
| 78 |
+
- `calculate_vortex`: Identifies trend direction and strength using true range (Vortex).
|
| 79 |
+
|
| 80 |
+
### Momentum Indicators
|
| 81 |
+
- `calculate_awesome_oscillator`: Measures market momentum using midline crossovers (AO).
|
| 82 |
+
- `calculate_chaikin_oscillator`: Tracks accumulation/distribution momentum (CMO).
|
| 83 |
+
- `calculate_ichimoku_cloud`: Provides a comprehensive view of support, resistance, and momentum (Ichimoku).
|
| 84 |
+
- `calculate_percentage_price_oscillator`: Normalizes MACD as a percentage for momentum (PPO).
|
| 85 |
+
- `calculate_percentage_volume_oscillator`: Measures volume momentum via EMA differences (PVO).
|
| 86 |
+
- `calculate_price_rate_of_change`: Tracks price momentum as a percentage change (ROC).
|
| 87 |
+
- `calculate_relative_strength_index`: Identifies overbought/oversold conditions via momentum (RSI).
|
| 88 |
+
- `calculate_stochastic_oscillator`: Compares closing prices to ranges for momentum signals (STOCH).
|
| 89 |
+
- `calculate_williams_r`: Measures momentum relative to recent high-low ranges (Williams %R).
|
| 90 |
+
|
| 91 |
+
### Volatility Indicators
|
| 92 |
+
- `calculate_acceleration_bands`: Frames price action with dynamic volatility bands (AB).
|
| 93 |
+
- `calculate_average_true_range`: Measures market volatility based on price ranges (ATR).
|
| 94 |
+
- `calculate_bollinger_bands`: Encloses price action with volatility-based bands (BB).
|
| 95 |
+
- `calculate_bollinger_bands_width`: Quantifies volatility via band width changes (BBW).
|
| 96 |
+
- `calculate_chandelier_exit`: Sets trailing stop-losses based on volatility (CE).
|
| 97 |
+
- `calculate_donchian_channel`: Tracks volatility with high/low price channels (DC).
|
| 98 |
+
- `calculate_keltner_channel`: Combines ATR and EMA for volatility bands (KC).
|
| 99 |
+
- `calculate_moving_standard_deviation`: Measures price deviation for volatility (MSTD).
|
| 100 |
+
- `calculate_projection_oscillator`: Assesses volatility relative to projected prices (PO).
|
| 101 |
+
- `calculate_true_range`: Calculates daily price range for volatility analysis (TR).
|
| 102 |
+
- `calculate_ulcer_index`: Quantifies downside volatility and drawdowns (UI).
|
| 103 |
+
|
| 104 |
+
### Volume Indicators
|
| 105 |
+
- `calculate_accumulation_distribution`: Tracks volume flow to confirm price trends (AD).
|
| 106 |
+
- `calculate_chaikin_money_flow`: Measures buying/selling pressure with volume (CMF).
|
| 107 |
+
- `calculate_ease_of_movement`: Assesses how easily prices move with volume (EMV).
|
| 108 |
+
- `calculate_force_index`: Combines price and volume for momentum strength (FI).
|
| 109 |
+
- `calculate_money_flow_index`: Identifies overbought/oversold via price-volume (MFI).
|
| 110 |
+
- `calculate_negative_volume_index`: Tracks price changes on lower volume days (NVI).
|
| 111 |
+
- `calculate_on_balance_volume`: Accumulates volume to predict price movements (OBV).
|
| 112 |
+
- `calculate_volume_price_trend`: Combines volume and price for trend confirmation (VPT).
|
| 113 |
+
- `calculate_volume_weighted_average_price`: Averages prices weighted by volume (VWAP).
|
| 114 |
+
|
| 115 |
+
### Trend Strategies
|
| 116 |
+
- `calculate_absolute_price_oscillator_strategy`: Generates buy/sell signals from APO crossovers (APO Strategy).
|
| 117 |
+
- `calculate_aroon_strategy`: Signals trend reversals using Aroon crossovers (Aroon Strategy).
|
| 118 |
+
- `calculate_balance_of_power_strategy`: Issues signals based on BOP thresholds (BOP Strategy).
|
| 119 |
+
- `calculate_chande_forecast_oscillator_strategy`: Predicts reversals with CFO signals (CFO Strategy).
|
| 120 |
+
- `calculate_kdj_strategy`: Combines KDJ lines for trend-based signals (KDJ Strategy).
|
| 121 |
+
- `calculate_macd_strategy`: Uses MACD crossovers for trading signals (MACD Strategy).
|
| 122 |
+
- `calculate_parabolic_sar_strategy`: Signals trend direction with PSAR shifts (PSAR Strategy).
|
| 123 |
+
- `calculate_typical_price_strategy`: Generates signals from typical price trends.
|
| 124 |
+
- `calculate_volume_weighted_moving_average_strategy`: Issues signals based on VWMA crossovers (VWMA Strategy).
|
| 125 |
+
- `calculate_vortex_strategy`: Signals trend direction with Vortex crossovers (Vortex Strategy).
|
| 126 |
+
|
| 127 |
+
### Momentum Strategies
|
| 128 |
+
- `calculate_momentum_strategy`: Issues signals based on momentum direction.
|
| 129 |
+
- `calculate_awesome_oscillator_strategy`: Signals momentum shifts with AO crossovers (AO Strategy).
|
| 130 |
+
- `calculate_ichimoku_cloud_strategy`: Generates signals from Ichimoku cloud positions (Ichimoku Strategy).
|
| 131 |
+
- `calculate_rsi2_strategy`: Signals overbought/oversold with RSI thresholds (RSI Strategy).
|
| 132 |
+
- `calculate_stochastic_oscillator_strategy`: Uses stochastic crossovers for signals (STOCH Strategy).
|
| 133 |
+
- `calculate_williams_r_strategy`: Signals momentum reversals with Williams %R (Williams %R Strategy).
|
| 134 |
+
|
| 135 |
+
### Volatility Strategies
|
| 136 |
+
- `calculate_acceleration_bands_strategy`: Signals breakouts with acceleration bands (AB Strategy).
|
| 137 |
+
- `calculate_bollinger_bands_strategy`: Issues signals from Bollinger Band breaches (BB Strategy).
|
| 138 |
+
- `calculate_projection_oscillator_strategy`: Signals volatility shifts with PO (PO Strategy).
|
| 139 |
+
|
| 140 |
+
### Volume Strategies
|
| 141 |
+
- `calculate_chaikin_money_flow_strategy`: Signals volume pressure with CMF (CMF Strategy).
|
| 142 |
+
- `calculate_ease_of_movement_strategy`: Issues signals based on EMV trends (EMV Strategy).
|
| 143 |
+
- `calculate_force_index_strategy`: Signals momentum with force index shifts (FI Strategy).
|
| 144 |
+
- `calculate_money_flow_index_strategy`: Signals overbought/oversold with MFI (MFI Strategy).
|
| 145 |
+
- `calculate_negative_volume_index_strategy`: Signals trends with NVI changes (NVI Strategy).
|
| 146 |
+
- `calculate_volume_weighted_average_price_strategy`: Issues signals from VWAP crossovers (VWAP Strategy).
|
| 147 |
+
|
| 148 |
+
## Usage Examples
|
| 149 |
+
|
| 150 |
+
### Example 1: Calculate MACD Indicator
|
| 151 |
+
|
| 152 |
+
**Input (Natural Language Prompt)**:
|
| 153 |
+
```
|
| 154 |
+
Calculate the MACD for BTC/USDT on a 1-hour timeframe with fast period 12, slow period 26, signal period 9, and fetch 100 data points.
|
| 155 |
+
```
|
| 156 |
+
|
| 157 |
+
**Output**:
|
| 158 |
+
```
|
| 159 |
+
{"macd": [...], "signal": [...], "histogram": [...]}
|
| 160 |
+
```
|
| 161 |
+
|
| 162 |
+
### Example 2: Calculate RSI Strategy
|
| 163 |
+
|
| 164 |
+
**Input (Natural Language Prompt)**:
|
| 165 |
+
```
|
| 166 |
+
Give me the RSI strategy signals for ETH/USDT on a 4-hour timeframe with a period of 14 and 50 data points.
|
| 167 |
+
```
|
| 168 |
+
|
| 169 |
+
**Output**:
|
| 170 |
+
```
|
| 171 |
+
[-1, 0, 1, 0, ...]
|
| 172 |
+
```
|
| 173 |
+
|
| 174 |
+
## License
|
| 175 |
+
|
| 176 |
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
| 177 |
+
|
crypto-indicators-mcp/index.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
const { McpServer } = require("@modelcontextprotocol/sdk/server/mcp.js");
|
| 2 |
+
const { StdioServerTransport } = require("@modelcontextprotocol/sdk/server/stdio.js");
|
| 3 |
+
|
| 4 |
+
// Initialize MCP server
|
| 5 |
+
const server = new McpServer({
|
| 6 |
+
name: "crypto-indicators-mcp",
|
| 7 |
+
version: "1.0.0",
|
| 8 |
+
});
|
| 9 |
+
|
| 10 |
+
// Load tools from separate files
|
| 11 |
+
require("./indicators/trendIndicators")(server);
|
| 12 |
+
require("./indicators/momentumIndicators")(server);
|
| 13 |
+
require("./indicators/volatilityIndicators")(server);
|
| 14 |
+
require("./indicators/volumeIndicators")(server);
|
| 15 |
+
|
| 16 |
+
// Load strategies from separate files
|
| 17 |
+
require("./strategies/trendStrategies")(server);
|
| 18 |
+
require("./strategies/momentumStrategies")(server);
|
| 19 |
+
require("./strategies/volatilityStrategies")(server);
|
| 20 |
+
require("./strategies/volumeStrategies")(server);
|
| 21 |
+
|
| 22 |
+
// Function to start the server using async/await
|
| 23 |
+
async function startServer() {
|
| 24 |
+
const transport = new StdioServerTransport();
|
| 25 |
+
try {
|
| 26 |
+
await server.connect(transport);
|
| 27 |
+
} catch (err) {
|
| 28 |
+
console.error("Failed to start server:", err);
|
| 29 |
+
}
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
// Start the server
|
| 33 |
+
startServer();
|
crypto-indicators-mcp/indicators/momentumIndicators.js
ADDED
|
@@ -0,0 +1,198 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
const { z } = require("zod");
|
| 2 |
+
const {
|
| 3 |
+
awesomeOscillator, chaikinOscillator, ichimokuCloud, percentagePriceOscillator,
|
| 4 |
+
percentageVolumeOscillator, priceRateOfChange, relativeStrengthIndex,
|
| 5 |
+
stochasticOscillator, williamsR,
|
| 6 |
+
} = require("indicatorts");
|
| 7 |
+
const fetchOhlcvData = require("../utils/fetchOhlcvData");
|
| 8 |
+
|
| 9 |
+
module.exports = (server) => {
|
| 10 |
+
server.tool(
|
| 11 |
+
"calculate_awesome_oscillator",
|
| 12 |
+
"Calculate the Awesome Oscillator (AO) for a given trading pair using Binance OHLCV data",
|
| 13 |
+
{
|
| 14 |
+
symbol: z.string().describe("Trading pair, e.g., 'BTC/USDT'"),
|
| 15 |
+
timeframe: z.string().default("1h").describe("Timeframe, e.g., '1m', '1h', '1d'"),
|
| 16 |
+
fastPeriod: z.number().default(5).describe("Fast period for AO"),
|
| 17 |
+
slowPeriod: z.number().default(34).describe("Slow period for AO"),
|
| 18 |
+
limit: z.number().default(100).describe("Number of OHLCV data points to fetch"),
|
| 19 |
+
},
|
| 20 |
+
async ({ symbol, timeframe, fastPeriod, slowPeriod, limit }) => {
|
| 21 |
+
try {
|
| 22 |
+
const asset = await fetchOhlcvData(symbol, timeframe, limit);
|
| 23 |
+
const result = awesomeOscillator(asset.highs, asset.lows, { fastPeriod, slowPeriod });
|
| 24 |
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
| 25 |
+
} catch (error) {
|
| 26 |
+
return { content: [{ type: "text", text: `Error: ${error.message}` }] };
|
| 27 |
+
}
|
| 28 |
+
}
|
| 29 |
+
);
|
| 30 |
+
|
| 31 |
+
server.tool(
|
| 32 |
+
"calculate_chaikin_oscillator",
|
| 33 |
+
"Calculate the Chaikin Oscillator (CMO) for a given trading pair using Binance OHLCV data",
|
| 34 |
+
{
|
| 35 |
+
symbol: z.string().describe("Trading pair, e.g., 'BTC/USDT'"),
|
| 36 |
+
timeframe: z.string().default("1h").describe("Timeframe, e.g., '1m', '1h', '1d'"),
|
| 37 |
+
fastPeriod: z.number().default(3).describe("Fast period for CMO"),
|
| 38 |
+
slowPeriod: z.number().default(10).describe("Slow period for CMO"),
|
| 39 |
+
limit: z.number().default(100).describe("Number of OHLCV data points to fetch"),
|
| 40 |
+
},
|
| 41 |
+
async ({ symbol, timeframe, fastPeriod, slowPeriod, limit }) => {
|
| 42 |
+
try {
|
| 43 |
+
const asset = await fetchOhlcvData(symbol, timeframe, limit);
|
| 44 |
+
const result = chaikinOscillator(asset.highs, asset.lows, asset.closings, asset.volumes, { fastPeriod, slowPeriod });
|
| 45 |
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
| 46 |
+
} catch (error) {
|
| 47 |
+
return { content: [{ type: "text", text: `Error: ${error.message}` }] };
|
| 48 |
+
}
|
| 49 |
+
}
|
| 50 |
+
);
|
| 51 |
+
|
| 52 |
+
server.tool(
|
| 53 |
+
"calculate_ichimoku_cloud",
|
| 54 |
+
"Calculate the Ichimoku Cloud for a given trading pair using Binance OHLCV data",
|
| 55 |
+
{
|
| 56 |
+
symbol: z.string().describe("Trading pair, e.g., 'BTC/USDT'"),
|
| 57 |
+
timeframe: z.string().default("1h").describe("Timeframe, e.g., '1m', '1h', '1d'"),
|
| 58 |
+
conversionPeriod: z.number().default(9).describe("Conversion line period"),
|
| 59 |
+
basePeriod: z.number().default(26).describe("Base line period"),
|
| 60 |
+
spanPeriod: z.number().default(52).describe("Leading span period"),
|
| 61 |
+
limit: z.number().default(100).describe("Number of OHLCV data points to fetch"),
|
| 62 |
+
},
|
| 63 |
+
async ({ symbol, timeframe, conversionPeriod, basePeriod, spanPeriod, limit }) => {
|
| 64 |
+
try {
|
| 65 |
+
const asset = await fetchOhlcvData(symbol, timeframe, limit);
|
| 66 |
+
const result = ichimokuCloud(asset.highs, asset.lows, asset.closings, { conversionPeriod, basePeriod, spanPeriod });
|
| 67 |
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
| 68 |
+
} catch (error) {
|
| 69 |
+
return { content: [{ type: "text", text: `Error: ${error.message}` }] };
|
| 70 |
+
}
|
| 71 |
+
}
|
| 72 |
+
);
|
| 73 |
+
|
| 74 |
+
server.tool(
|
| 75 |
+
"calculate_percentage_price_oscillator",
|
| 76 |
+
"Calculate the Percentage Price Oscillator (PPO) for a given trading pair using Binance OHLCV data",
|
| 77 |
+
{
|
| 78 |
+
symbol: z.string().describe("Trading pair, e.g., 'BTC/USDT'"),
|
| 79 |
+
timeframe: z.string().default("1h").describe("Timeframe, e.g., '1m', '1h', '1d'"),
|
| 80 |
+
fastPeriod: z.number().default(12).describe("Fast period for PPO"),
|
| 81 |
+
slowPeriod: z.number().default(26).describe("Slow period for PPO"),
|
| 82 |
+
signalPeriod: z.number().default(9).describe("Signal period for PPO"),
|
| 83 |
+
limit: z.number().default(100).describe("Number of OHLCV data points to fetch"),
|
| 84 |
+
},
|
| 85 |
+
async ({ symbol, timeframe, fastPeriod, slowPeriod, signalPeriod, limit }) => {
|
| 86 |
+
try {
|
| 87 |
+
const asset = await fetchOhlcvData(symbol, timeframe, limit);
|
| 88 |
+
const result = percentagePriceOscillator(asset.closings, { fastPeriod, slowPeriod, signalPeriod });
|
| 89 |
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
| 90 |
+
} catch (error) {
|
| 91 |
+
return { content: [{ type: "text", text: `Error: ${error.message}` }] };
|
| 92 |
+
}
|
| 93 |
+
}
|
| 94 |
+
);
|
| 95 |
+
|
| 96 |
+
server.tool(
|
| 97 |
+
"calculate_percentage_volume_oscillator",
|
| 98 |
+
"Calculate the Percentage Volume Oscillator (PVO) for a given trading pair using Binance OHLCV data",
|
| 99 |
+
{
|
| 100 |
+
symbol: z.string().describe("Trading pair, e.g., 'BTC/USDT'"),
|
| 101 |
+
timeframe: z.string().default("1h").describe("Timeframe, e.g., '1m', '1h', '1d'"),
|
| 102 |
+
fastPeriod: z.number().default(12).describe("Fast period for PVO"),
|
| 103 |
+
slowPeriod: z.number().default(26).describe("Slow period for PVO"),
|
| 104 |
+
signalPeriod: z.number().default(9).describe("Signal period for PVO"),
|
| 105 |
+
limit: z.number().default(100).describe("Number of OHLCV data points to fetch"),
|
| 106 |
+
},
|
| 107 |
+
async ({ symbol, timeframe, fastPeriod, slowPeriod, signalPeriod, limit }) => {
|
| 108 |
+
try {
|
| 109 |
+
const asset = await fetchOhlcvData(symbol, timeframe, limit);
|
| 110 |
+
const result = percentageVolumeOscillator(asset.volumes, { fastPeriod, slowPeriod, signalPeriod });
|
| 111 |
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
| 112 |
+
} catch (error) {
|
| 113 |
+
return { content: [{ type: "text", text: `Error: ${error.message}` }] };
|
| 114 |
+
}
|
| 115 |
+
}
|
| 116 |
+
);
|
| 117 |
+
|
| 118 |
+
server.tool(
|
| 119 |
+
"calculate_price_rate_of_change",
|
| 120 |
+
"Calculate the Price Rate of Change (ROC) for a given trading pair using Binance OHLCV data",
|
| 121 |
+
{
|
| 122 |
+
symbol: z.string().describe("Trading pair, e.g., 'BTC/USDT'"),
|
| 123 |
+
timeframe: z.string().default("1h").describe("Timeframe, e.g., '1m', '1h', '1d'"),
|
| 124 |
+
period: z.number().default(14).describe("Period length for ROC"),
|
| 125 |
+
limit: z.number().default(100).describe("Number of OHLCV data points to fetch"),
|
| 126 |
+
},
|
| 127 |
+
async ({ symbol, timeframe, period, limit }) => {
|
| 128 |
+
try {
|
| 129 |
+
const asset = await fetchOhlcvData(symbol, timeframe, limit);
|
| 130 |
+
const result = priceRateOfChange(asset.closings, { period });
|
| 131 |
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
| 132 |
+
} catch (error) {
|
| 133 |
+
return { content: [{ type: "text", text: `Error: ${error.message}` }] };
|
| 134 |
+
}
|
| 135 |
+
}
|
| 136 |
+
);
|
| 137 |
+
|
| 138 |
+
server.tool(
|
| 139 |
+
"calculate_relative_strength_index",
|
| 140 |
+
"Calculate the Relative Strength Index (RSI) for a given trading pair using Binance OHLCV data",
|
| 141 |
+
{
|
| 142 |
+
symbol: z.string().describe("Trading pair, e.g., 'BTC/USDT'"),
|
| 143 |
+
timeframe: z.string().default("1h").describe("Timeframe, e.g., '1m', '1h', '1d'"),
|
| 144 |
+
period: z.number().default(14).describe("Period length for RSI"),
|
| 145 |
+
limit: z.number().default(100).describe("Number of OHLCV data points to fetch"),
|
| 146 |
+
},
|
| 147 |
+
async ({ symbol, timeframe, period, limit }) => {
|
| 148 |
+
try {
|
| 149 |
+
const asset = await fetchOhlcvData(symbol, timeframe, limit);
|
| 150 |
+
const result = relativeStrengthIndex(asset.closings, { period });
|
| 151 |
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
| 152 |
+
} catch (error) {
|
| 153 |
+
return { content: [{ type: "text", text: `Error: ${error.message}` }] };
|
| 154 |
+
}
|
| 155 |
+
}
|
| 156 |
+
);
|
| 157 |
+
|
| 158 |
+
server.tool(
|
| 159 |
+
"calculate_stochastic_oscillator",
|
| 160 |
+
"Calculate the Stochastic Oscillator (STOCH) for a given trading pair using Binance OHLCV data",
|
| 161 |
+
{
|
| 162 |
+
symbol: z.string().describe("Trading pair, e.g., 'BTC/USDT'"),
|
| 163 |
+
timeframe: z.string().default("1h").describe("Timeframe, e.g., '1m', '1h', '1d'"),
|
| 164 |
+
period: z.number().default(14).describe("Period length for STOCH"),
|
| 165 |
+
signalPeriod: z.number().default(3).describe("Signal period for STOCH"),
|
| 166 |
+
limit: z.number().default(100).describe("Number of OHLCV data points to fetch"),
|
| 167 |
+
},
|
| 168 |
+
async ({ symbol, timeframe, period, signalPeriod, limit }) => {
|
| 169 |
+
try {
|
| 170 |
+
const asset = await fetchOhlcvData(symbol, timeframe, limit);
|
| 171 |
+
const result = stochasticOscillator(asset.highs, asset.lows, asset.closings, { period, signalPeriod });
|
| 172 |
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
| 173 |
+
} catch (error) {
|
| 174 |
+
return { content: [{ type: "text", text: `Error: ${error.message}` }] };
|
| 175 |
+
}
|
| 176 |
+
}
|
| 177 |
+
);
|
| 178 |
+
|
| 179 |
+
server.tool(
|
| 180 |
+
"calculate_williams_r",
|
| 181 |
+
"Calculate the Williams R (WILLR) for a given trading pair using Binance OHLCV data",
|
| 182 |
+
{
|
| 183 |
+
symbol: z.string().describe("Trading pair, e.g., 'BTC/USDT'"),
|
| 184 |
+
timeframe: z.string().default("1h").describe("Timeframe, e.g., '1m', '1h', '1d'"),
|
| 185 |
+
period: z.number().default(14).describe("Period length for WILLR"),
|
| 186 |
+
limit: z.number().default(100).describe("Number of OHLCV data points to fetch"),
|
| 187 |
+
},
|
| 188 |
+
async ({ symbol, timeframe, period, limit }) => {
|
| 189 |
+
try {
|
| 190 |
+
const asset = await fetchOhlcvData(symbol, timeframe, limit);
|
| 191 |
+
const result = williamsR(asset.highs, asset.lows, asset.closings, { period });
|
| 192 |
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
| 193 |
+
} catch (error) {
|
| 194 |
+
return { content: [{ type: "text", text: `Error: ${error.message}` }] };
|
| 195 |
+
}
|
| 196 |
+
}
|
| 197 |
+
);
|
| 198 |
+
};
|
crypto-indicators-mcp/indicators/trendIndicators.js
ADDED
|
@@ -0,0 +1,494 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
const { z } = require("zod");
|
| 2 |
+
const {
|
| 3 |
+
absolutePriceOscillator, aroon, balanceOfPower, chandeForecastOscillator,
|
| 4 |
+
commodityChannelIndex, doubleExponentialMovingAverage, exponentialMovingAverage,
|
| 5 |
+
massIndex, movingAverageConvergenceDivergence, movingMax, movingMin, movingSum,
|
| 6 |
+
parabolicSar, qstick, kdj, rollingMovingAverage, simpleMovingAverage, sinceChange,
|
| 7 |
+
tripleExponentialMovingAverage, triangularMovingAverage, tripleExponentialAverage,
|
| 8 |
+
typicalPrice, volumeWeightedMovingAverage, vortex,
|
| 9 |
+
} = require("indicatorts");
|
| 10 |
+
const fetchOhlcvData = require("../utils/fetchOhlcvData");
|
| 11 |
+
|
| 12 |
+
module.exports = (server) => {
|
| 13 |
+
server.tool(
|
| 14 |
+
"calculate_absolute_price_oscillator",
|
| 15 |
+
"Calculate the Absolute Price Oscillator (APO) for a given trading pair using Binance OHLCV data",
|
| 16 |
+
{
|
| 17 |
+
symbol: z.string().describe("Trading pair, e.g., 'BTC/USDT'"),
|
| 18 |
+
timeframe: z.string().default("1h").describe("Timeframe, e.g., '1m', '1h', '1d'"),
|
| 19 |
+
fastPeriod: z.number().default(12).describe("Fast period for APO"),
|
| 20 |
+
slowPeriod: z.number().default(26).describe("Slow period for APO"),
|
| 21 |
+
limit: z.number().default(100).describe("Number of OHLCV data points to fetch"),
|
| 22 |
+
},
|
| 23 |
+
async ({ symbol, timeframe, fastPeriod, slowPeriod, limit }) => {
|
| 24 |
+
try {
|
| 25 |
+
const asset = await fetchOhlcvData(symbol, timeframe, limit);
|
| 26 |
+
const result = absolutePriceOscillator(asset.closings, { fastPeriod, slowPeriod });
|
| 27 |
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
| 28 |
+
} catch (error) {
|
| 29 |
+
return { content: [{ type: "text", text: `Error: ${error.message}` }] };
|
| 30 |
+
}
|
| 31 |
+
}
|
| 32 |
+
);
|
| 33 |
+
|
| 34 |
+
server.tool(
|
| 35 |
+
"calculate_aroon",
|
| 36 |
+
"Calculate the Aroon Indicator for a given trading pair using Binance OHLCV data",
|
| 37 |
+
{
|
| 38 |
+
symbol: z.string().describe("Trading pair, e.g., 'BTC/USDT'"),
|
| 39 |
+
timeframe: z.string().default("1h").describe("Timeframe, e.g., '1m', '1h', '1d'"),
|
| 40 |
+
period: z.number().default(14).describe("Period length for Aroon"),
|
| 41 |
+
limit: z.number().default(100).describe("Number of OHLCV data points to fetch"),
|
| 42 |
+
},
|
| 43 |
+
async ({ symbol, timeframe, period, limit }) => {
|
| 44 |
+
try {
|
| 45 |
+
const asset = await fetchOhlcvData(symbol, timeframe, limit);
|
| 46 |
+
const result = aroon(asset.highs, asset.lows, { period });
|
| 47 |
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
| 48 |
+
} catch (error) {
|
| 49 |
+
return { content: [{ type: "text", text: `Error: ${error.message}` }] };
|
| 50 |
+
}
|
| 51 |
+
}
|
| 52 |
+
);
|
| 53 |
+
|
| 54 |
+
server.tool(
|
| 55 |
+
"calculate_balance_of_power",
|
| 56 |
+
"Calculate the Balance of Power (BOP) for a given trading pair using Binance OHLCV data",
|
| 57 |
+
{
|
| 58 |
+
symbol: z.string().describe("Trading pair, e.g., 'BTC/USDT'"),
|
| 59 |
+
timeframe: z.string().default("1h").describe("Timeframe, e.g., '1m', '1h', '1d'"),
|
| 60 |
+
limit: z.number().default(100).describe("Number of OHLCV data points to fetch"),
|
| 61 |
+
},
|
| 62 |
+
async ({ symbol, timeframe, limit }) => {
|
| 63 |
+
try {
|
| 64 |
+
const asset = await fetchOhlcvData(symbol, timeframe, limit);
|
| 65 |
+
const result = balanceOfPower(asset.openings, asset.highs, asset.lows, asset.closings);
|
| 66 |
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
| 67 |
+
} catch (error) {
|
| 68 |
+
return { content: [{ type: "text", text: `Error: ${error.message}` }] };
|
| 69 |
+
}
|
| 70 |
+
}
|
| 71 |
+
);
|
| 72 |
+
|
| 73 |
+
server.tool(
|
| 74 |
+
"calculate_chande_forecast_oscillator",
|
| 75 |
+
"Calculate the Chande Forecast Oscillator (CFO) for a given trading pair using Binance OHLCV data",
|
| 76 |
+
{
|
| 77 |
+
symbol: z.string().describe("Trading pair, e.g., 'BTC/USDT'"),
|
| 78 |
+
timeframe: z.string().default("1h").describe("Timeframe, e.g., '1m', '1h', '1d'"),
|
| 79 |
+
period: z.number().default(14).describe("Period length for CFO"),
|
| 80 |
+
limit: z.number().default(100).describe("Number of OHLCV data points to fetch"),
|
| 81 |
+
},
|
| 82 |
+
async ({ symbol, timeframe, period, limit }) => {
|
| 83 |
+
try {
|
| 84 |
+
const asset = await fetchOhlcvData(symbol, timeframe, limit);
|
| 85 |
+
const result = chandeForecastOscillator(asset.closings, { period });
|
| 86 |
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
| 87 |
+
} catch (error) {
|
| 88 |
+
return { content: [{ type: "text", text: `Error: ${error.message}` }] };
|
| 89 |
+
}
|
| 90 |
+
}
|
| 91 |
+
);
|
| 92 |
+
|
| 93 |
+
server.tool(
|
| 94 |
+
"calculate_commodity_channel_index",
|
| 95 |
+
"Calculate the Commodity Channel Index (CCI) for a given trading pair using Binance OHLCV data",
|
| 96 |
+
{
|
| 97 |
+
symbol: z.string().describe("Trading pair, e.g., 'BTC/USDT'"),
|
| 98 |
+
timeframe: z.string().default("1h").describe("Timeframe, e.g., '1m', '1h', '1d'"),
|
| 99 |
+
period: z.number().default(20).describe("Period length for CCI"),
|
| 100 |
+
limit: z.number().default(100).describe("Number of OHLCV data points to fetch"),
|
| 101 |
+
},
|
| 102 |
+
async ({ symbol, timeframe, period, limit }) => {
|
| 103 |
+
try {
|
| 104 |
+
const asset = await fetchOhlcvData(symbol, timeframe, limit);
|
| 105 |
+
const result = commodityChannelIndex(asset.highs, asset.lows, asset.closings, { period });
|
| 106 |
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
| 107 |
+
} catch (error) {
|
| 108 |
+
return { content: [{ type: "text", text: `Error: ${error.message}` }] };
|
| 109 |
+
}
|
| 110 |
+
}
|
| 111 |
+
);
|
| 112 |
+
|
| 113 |
+
server.tool(
|
| 114 |
+
"calculate_double_exponential_moving_average",
|
| 115 |
+
"Calculate the Double Exponential Moving Average (DEMA) for a given trading pair using Binance OHLCV data",
|
| 116 |
+
{
|
| 117 |
+
symbol: z.string().describe("Trading pair, e.g., 'BTC/USDT'"),
|
| 118 |
+
timeframe: z.string().default("1h").describe("Timeframe, e.g., '1m', '1h', '1d'"),
|
| 119 |
+
period: z.number().default(10).describe("Period length for DEMA"),
|
| 120 |
+
limit: z.number().default(100).describe("Number of OHLCV data points to fetch"),
|
| 121 |
+
},
|
| 122 |
+
async ({ symbol, timeframe, period, limit }) => {
|
| 123 |
+
try {
|
| 124 |
+
const asset = await fetchOhlcvData(symbol, timeframe, limit);
|
| 125 |
+
const result = doubleExponentialMovingAverage(asset.closings, { period });
|
| 126 |
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
| 127 |
+
} catch (error) {
|
| 128 |
+
return { content: [{ type: "text", text: `Error: ${error.message}` }] };
|
| 129 |
+
}
|
| 130 |
+
}
|
| 131 |
+
);
|
| 132 |
+
|
| 133 |
+
server.tool(
|
| 134 |
+
"calculate_exponential_moving_average",
|
| 135 |
+
"Calculate the Exponential Moving Average (EMA) for a given trading pair using Binance OHLCV data",
|
| 136 |
+
{
|
| 137 |
+
symbol: z.string().describe("Trading pair, e.g., 'BTC/USDT'"),
|
| 138 |
+
timeframe: z.string().default("1h").describe("Timeframe, e.g., '1m', '1h', '1d'"),
|
| 139 |
+
period: z.number().default(10).describe("Period length for EMA"),
|
| 140 |
+
limit: z.number().default(100).describe("Number of OHLCV data points to fetch"),
|
| 141 |
+
},
|
| 142 |
+
async ({ symbol, timeframe, period, limit }) => {
|
| 143 |
+
try {
|
| 144 |
+
const asset = await fetchOhlcvData(symbol, timeframe, limit);
|
| 145 |
+
const result = exponentialMovingAverage(asset.closings, { period });
|
| 146 |
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
| 147 |
+
} catch (error) {
|
| 148 |
+
return { content: [{ type: "text", text: `Error: ${error.message}` }] };
|
| 149 |
+
}
|
| 150 |
+
}
|
| 151 |
+
);
|
| 152 |
+
|
| 153 |
+
server.tool(
|
| 154 |
+
"calculate_mass_index",
|
| 155 |
+
"Calculate the Mass Index (MI) for a given trading pair using Binance OHLCV data",
|
| 156 |
+
{
|
| 157 |
+
symbol: z.string().describe("Trading pair, e.g., 'BTC/USDT'"),
|
| 158 |
+
timeframe: z.string().default("1h").describe("Timeframe, e.g., '1m', '1h', '1d'"),
|
| 159 |
+
period: z.number().default(25).describe("Period length for MI"),
|
| 160 |
+
limit: z.number().default(100).describe("Number of OHLCV data points to fetch"),
|
| 161 |
+
},
|
| 162 |
+
async ({ symbol, timeframe, period, limit }) => {
|
| 163 |
+
try {
|
| 164 |
+
const asset = await fetchOhlcvData(symbol, timeframe, limit);
|
| 165 |
+
const result = massIndex(asset.highs, asset.lows, { period });
|
| 166 |
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
| 167 |
+
} catch (error) {
|
| 168 |
+
return { content: [{ type: "text", text: `Error: ${error.message}` }] };
|
| 169 |
+
}
|
| 170 |
+
}
|
| 171 |
+
);
|
| 172 |
+
|
| 173 |
+
server.tool(
|
| 174 |
+
"calculate_moving_average_convergence_divergence",
|
| 175 |
+
"Calculate the MACD for a given trading pair using Binance OHLCV data",
|
| 176 |
+
{
|
| 177 |
+
symbol: z.string().describe("Trading pair, e.g., 'BTC/USDT'"),
|
| 178 |
+
timeframe: z.string().default("1h").describe("Timeframe, e.g., '1m', '1h', '1d'"),
|
| 179 |
+
fastPeriod: z.number().default(12).describe("Fast period for MACD"),
|
| 180 |
+
slowPeriod: z.number().default(26).describe("Slow period for MACD"),
|
| 181 |
+
signalPeriod: z.number().default(9).describe("Signal period for MACD"),
|
| 182 |
+
limit: z.number().default(100).describe("Number of OHLCV data points to fetch"),
|
| 183 |
+
},
|
| 184 |
+
async ({ symbol, timeframe, fastPeriod, slowPeriod, signalPeriod, limit }) => {
|
| 185 |
+
try {
|
| 186 |
+
const asset = await fetchOhlcvData(symbol, timeframe, limit);
|
| 187 |
+
const result = movingAverageConvergenceDivergence(asset.closings, { fastPeriod, slowPeriod, signalPeriod });
|
| 188 |
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
| 189 |
+
} catch (error) {
|
| 190 |
+
return { content: [{ type: "text", text: `Error: ${error.message}` }] };
|
| 191 |
+
}
|
| 192 |
+
}
|
| 193 |
+
);
|
| 194 |
+
|
| 195 |
+
server.tool(
|
| 196 |
+
"calculate_moving_max",
|
| 197 |
+
"Calculate the Moving Max (MMAX) for a given trading pair using Binance OHLCV data",
|
| 198 |
+
{
|
| 199 |
+
symbol: z.string().describe("Trading pair, e.g., 'BTC/USDT'"),
|
| 200 |
+
timeframe: z.string().default("1h").describe("Timeframe, e.g., '1m', '1h', '1d'"),
|
| 201 |
+
period: z.number().default(10).describe("Period length for MMAX"),
|
| 202 |
+
limit: z.number().default(100).describe("Number of OHLCV data points to fetch"),
|
| 203 |
+
},
|
| 204 |
+
async ({ symbol, timeframe, period, limit }) => {
|
| 205 |
+
try {
|
| 206 |
+
const asset = await fetchOhlcvData(symbol, timeframe, limit);
|
| 207 |
+
const result = movingMax(asset.closings, { period });
|
| 208 |
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
| 209 |
+
} catch (error) {
|
| 210 |
+
return { content: [{ type: "text", text: `Error: ${error.message}` }] };
|
| 211 |
+
}
|
| 212 |
+
}
|
| 213 |
+
);
|
| 214 |
+
|
| 215 |
+
server.tool(
|
| 216 |
+
"calculate_moving_min",
|
| 217 |
+
"Calculate the Moving Min (MMIN) for a given trading pair using Binance OHLCV data",
|
| 218 |
+
{
|
| 219 |
+
symbol: z.string().describe("Trading pair, e.g., 'BTC/USDT'"),
|
| 220 |
+
timeframe: z.string().default("1h").describe("Timeframe, e.g., '1m', '1h', '1d'"),
|
| 221 |
+
period: z.number().default(10).describe("Period length for MMIN"),
|
| 222 |
+
limit: z.number().default(100).describe("Number of OHLCV data points to fetch"),
|
| 223 |
+
},
|
| 224 |
+
async ({ symbol, timeframe, period, limit }) => {
|
| 225 |
+
try {
|
| 226 |
+
const asset = await fetchOhlcvData(symbol, timeframe, limit);
|
| 227 |
+
const result = movingMin(asset.closings, { period });
|
| 228 |
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
| 229 |
+
} catch (error) {
|
| 230 |
+
return { content: [{ type: "text", text: `Error: ${error.message}` }] };
|
| 231 |
+
}
|
| 232 |
+
}
|
| 233 |
+
);
|
| 234 |
+
|
| 235 |
+
server.tool(
|
| 236 |
+
"calculate_moving_sum",
|
| 237 |
+
"Calculate the Moving Sum (MSUM) for a given trading pair using Binance OHLCV data",
|
| 238 |
+
{
|
| 239 |
+
symbol: z.string().describe("Trading pair, e.g., 'BTC/USDT'"),
|
| 240 |
+
timeframe: z.string().default("1h").describe("Timeframe, e.g., '1m', '1h', '1d'"),
|
| 241 |
+
period: z.number().default(10).describe("Period length for MSUM"),
|
| 242 |
+
limit: z.number().default(100).describe("Number of OHLCV data points to fetch"),
|
| 243 |
+
},
|
| 244 |
+
async ({ symbol, timeframe, period, limit }) => {
|
| 245 |
+
try {
|
| 246 |
+
const asset = await fetchOhlcvData(symbol, timeframe, limit);
|
| 247 |
+
const result = movingSum(asset.closings, { period });
|
| 248 |
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
| 249 |
+
} catch (error) {
|
| 250 |
+
return { content: [{ type: "text", text: `Error: ${error.message}` }] };
|
| 251 |
+
}
|
| 252 |
+
}
|
| 253 |
+
);
|
| 254 |
+
|
| 255 |
+
server.tool(
|
| 256 |
+
"calculate_parabolic_sar",
|
| 257 |
+
"Calculate the Parabolic SAR (PSAR) for a given trading pair using Binance OHLCV data",
|
| 258 |
+
{
|
| 259 |
+
symbol: z.string().describe("Trading pair, e.g., 'BTC/USDT'"),
|
| 260 |
+
timeframe: z.string().default("1h").describe("Timeframe, e.g., '1m', '1h', '1d'"),
|
| 261 |
+
accelerationFactorStep: z.number().default(0.02).describe("Acceleration factor step for PSAR"),
|
| 262 |
+
accelerationFactorMax: z.number().default(0.2).describe("Maximum acceleration factor for PSAR"),
|
| 263 |
+
limit: z.number().default(100).describe("Number of OHLCV data points to fetch"),
|
| 264 |
+
},
|
| 265 |
+
async ({ symbol, timeframe, accelerationFactorStep, accelerationFactorMax, limit }) => {
|
| 266 |
+
try {
|
| 267 |
+
const asset = await fetchOhlcvData(symbol, timeframe, limit);
|
| 268 |
+
const result = parabolicSar(asset.highs, asset.lows, { accelerationFactorStep, accelerationFactorMax });
|
| 269 |
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
| 270 |
+
} catch (error) {
|
| 271 |
+
return { content: [{ type: "text", text: `Error: ${error.message}` }] };
|
| 272 |
+
}
|
| 273 |
+
}
|
| 274 |
+
);
|
| 275 |
+
|
| 276 |
+
server.tool(
|
| 277 |
+
"calculate_qstick",
|
| 278 |
+
"Calculate the Qstick Indicator for a given trading pair using Binance OHLCV data",
|
| 279 |
+
{
|
| 280 |
+
symbol: z.string().describe("Trading pair, e.g., 'BTC/USDT'"),
|
| 281 |
+
timeframe: z.string().default("1h").describe("Timeframe, e.g., '1m', '1h', '1d'"),
|
| 282 |
+
period: z.number().default(14).describe("Period length for Qstick"),
|
| 283 |
+
limit: z.number().default(100).describe("Number of OHLCV data points to fetch"),
|
| 284 |
+
},
|
| 285 |
+
async ({ symbol, timeframe, period, limit }) => {
|
| 286 |
+
try {
|
| 287 |
+
const asset = await fetchOhlcvData(symbol, timeframe, limit);
|
| 288 |
+
const result = qstick(asset.openings, asset.closings, { period });
|
| 289 |
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
| 290 |
+
} catch (error) {
|
| 291 |
+
return { content: [{ type: "text", text: `Error: ${error.message}` }] };
|
| 292 |
+
}
|
| 293 |
+
}
|
| 294 |
+
);
|
| 295 |
+
|
| 296 |
+
server.tool(
|
| 297 |
+
"calculate_kdj",
|
| 298 |
+
"Calculate the Random Index (KDJ) for a given trading pair using Binance OHLCV data",
|
| 299 |
+
{
|
| 300 |
+
symbol: z.string().describe("Trading pair, e.g., 'BTC/USDT'"),
|
| 301 |
+
timeframe: z.string().default("1h").describe("Timeframe, e.g., '1m', '1h', '1d'"),
|
| 302 |
+
period: z.number().default(9).describe("Period length for KDJ"),
|
| 303 |
+
signalPeriod: z.number().default(3).describe("Signal period for KDJ"),
|
| 304 |
+
limit: z.number().default(100).describe("Number of OHLCV data points to fetch"),
|
| 305 |
+
},
|
| 306 |
+
async ({ symbol, timeframe, period, signalPeriod, limit }) => {
|
| 307 |
+
try {
|
| 308 |
+
const asset = await fetchOhlcvData(symbol, timeframe, limit);
|
| 309 |
+
const result = kdj(asset.highs, asset.lows, asset.closings, { period, signalPeriod });
|
| 310 |
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
| 311 |
+
} catch (error) {
|
| 312 |
+
return { content: [{ type: "text", text: `Error: ${error.message}` }] };
|
| 313 |
+
}
|
| 314 |
+
}
|
| 315 |
+
);
|
| 316 |
+
|
| 317 |
+
server.tool(
|
| 318 |
+
"calculate_rolling_moving_average",
|
| 319 |
+
"Calculate the Rolling Moving Average (RMA) for a given trading pair using Binance OHLCV data",
|
| 320 |
+
{
|
| 321 |
+
symbol: z.string().describe("Trading pair, e.g., 'BTC/USDT'"),
|
| 322 |
+
timeframe: z.string().default("1h").describe("Timeframe, e.g., '1m', '1h', '1d'"),
|
| 323 |
+
period: z.number().default(10).describe("Period length for RMA"),
|
| 324 |
+
limit: z.number().default(100).describe("Number of OHLCV data points to fetch"),
|
| 325 |
+
},
|
| 326 |
+
async ({ symbol, timeframe, period, limit }) => {
|
| 327 |
+
try {
|
| 328 |
+
const asset = await fetchOhlcvData(symbol, timeframe, limit);
|
| 329 |
+
const result = rollingMovingAverage(asset.closings, { period });
|
| 330 |
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
| 331 |
+
} catch (error) {
|
| 332 |
+
return { content: [{ type: "text", text: `Error: ${error.message}` }] };
|
| 333 |
+
}
|
| 334 |
+
}
|
| 335 |
+
);
|
| 336 |
+
|
| 337 |
+
server.tool(
|
| 338 |
+
"calculate_simple_moving_average",
|
| 339 |
+
"Calculate the Simple Moving Average (SMA) for a given trading pair using Binance OHLCV data",
|
| 340 |
+
{
|
| 341 |
+
symbol: z.string().describe("Trading pair, e.g., 'BTC/USDT'"),
|
| 342 |
+
timeframe: z.string().default("1h").describe("Timeframe, e.g., '1m', '1h', '1d'"),
|
| 343 |
+
period: z.number().default(10).describe("Period length for SMA"),
|
| 344 |
+
limit: z.number().default(100).describe("Number of OHLCV data points to fetch"),
|
| 345 |
+
},
|
| 346 |
+
async ({ symbol, timeframe, period, limit }) => {
|
| 347 |
+
try {
|
| 348 |
+
const asset = await fetchOhlcvData(symbol, timeframe, limit);
|
| 349 |
+
const result = simpleMovingAverage(asset.closings, { period });
|
| 350 |
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
| 351 |
+
} catch (error) {
|
| 352 |
+
return { content: [{ type: "text", text: `Error: ${error.message}` }] };
|
| 353 |
+
}
|
| 354 |
+
}
|
| 355 |
+
);
|
| 356 |
+
|
| 357 |
+
server.tool(
|
| 358 |
+
"calculate_since_change",
|
| 359 |
+
"Calculate the Since Change for a given trading pair using Binance OHLCV data",
|
| 360 |
+
{
|
| 361 |
+
symbol: z.string().describe("Trading pair, e.g., 'BTC/USDT'"),
|
| 362 |
+
timeframe: z.string().default("1h").describe("Timeframe, e.g., '1m', '1h', '1d'"),
|
| 363 |
+
limit: z.number().default(100).describe("Number of OHLCV data points to fetch"),
|
| 364 |
+
},
|
| 365 |
+
async ({ symbol, timeframe, limit }) => {
|
| 366 |
+
try {
|
| 367 |
+
const asset = await fetchOhlcvData(symbol, timeframe, limit);
|
| 368 |
+
const result = sinceChange(asset.closings);
|
| 369 |
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
| 370 |
+
} catch (error) {
|
| 371 |
+
return { content: [{ type: "text", text: `Error: ${error.message}` }] };
|
| 372 |
+
}
|
| 373 |
+
}
|
| 374 |
+
);
|
| 375 |
+
|
| 376 |
+
server.tool(
|
| 377 |
+
"calculate_triple_exponential_moving_average",
|
| 378 |
+
"Calculate the Triple Exponential Moving Average (TEMA) for a given trading pair using Binance OHLCV data",
|
| 379 |
+
{
|
| 380 |
+
symbol: z.string().describe("Trading pair, e.g., 'BTC/USDT'"),
|
| 381 |
+
timeframe: z.string().default("1h").describe("Timeframe, e.g., '1m', '1h', '1d'"),
|
| 382 |
+
period: z.number().default(10).describe("Period length for TEMA"),
|
| 383 |
+
limit: z.number().default(100).describe("Number of OHLCV data points to fetch"),
|
| 384 |
+
},
|
| 385 |
+
async ({ symbol, timeframe, period, limit }) => {
|
| 386 |
+
try {
|
| 387 |
+
const asset = await fetchOhlcvData(symbol, timeframe, limit);
|
| 388 |
+
const result = tripleExponentialMovingAverage(asset.closings, { period });
|
| 389 |
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
| 390 |
+
} catch (error) {
|
| 391 |
+
return { content: [{ type: "text", text: `Error: ${error.message}` }] };
|
| 392 |
+
}
|
| 393 |
+
}
|
| 394 |
+
);
|
| 395 |
+
|
| 396 |
+
server.tool(
|
| 397 |
+
"calculate_triangular_moving_average",
|
| 398 |
+
"Calculate the Triangular Moving Average (TRIMA) for a given trading pair using Binance OHLCV data",
|
| 399 |
+
{
|
| 400 |
+
symbol: z.string().describe("Trading pair, e.g., 'BTC/USDT'"),
|
| 401 |
+
timeframe: z.string().default("1h").describe("Timeframe, e.g., '1m', '1h', '1d'"),
|
| 402 |
+
period: z.number().default(10).describe("Period length for TRIMA"),
|
| 403 |
+
limit: z.number().default(100).describe("Number of OHLCV data points to fetch"),
|
| 404 |
+
},
|
| 405 |
+
async ({ symbol, timeframe, period, limit }) => {
|
| 406 |
+
try {
|
| 407 |
+
const asset = await fetchOhlcvData(symbol, timeframe, limit);
|
| 408 |
+
const result = triangularMovingAverage(asset.closings, { period });
|
| 409 |
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
| 410 |
+
} catch (error) {
|
| 411 |
+
return { content: [{ type: "text", text: `Error: ${error.message}` }] };
|
| 412 |
+
}
|
| 413 |
+
}
|
| 414 |
+
);
|
| 415 |
+
|
| 416 |
+
server.tool(
|
| 417 |
+
"calculate_triple_exponential_average",
|
| 418 |
+
"Calculate the Triple Exponential Average (TRIX) for a given trading pair using Binance OHLCV data",
|
| 419 |
+
{
|
| 420 |
+
symbol: z.string().describe("Trading pair, e.g., 'BTC/USDT'"),
|
| 421 |
+
timeframe: z.string().default("1h").describe("Timeframe, e.g., '1m', '1h', '1d'"),
|
| 422 |
+
period: z.number().default(15).describe("Period length for TRIX"),
|
| 423 |
+
limit: z.number().default(100).describe("Number of OHLCV data points to fetch"),
|
| 424 |
+
},
|
| 425 |
+
async ({ symbol, timeframe, period, limit }) => {
|
| 426 |
+
try {
|
| 427 |
+
const asset = await fetchOhlcvData(symbol, timeframe, limit);
|
| 428 |
+
const result = tripleExponentialAverage(asset.closings, { period });
|
| 429 |
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
| 430 |
+
} catch (error) {
|
| 431 |
+
return { content: [{ type: "text", text: `Error: ${error.message}` }] };
|
| 432 |
+
}
|
| 433 |
+
}
|
| 434 |
+
);
|
| 435 |
+
|
| 436 |
+
server.tool(
|
| 437 |
+
"calculate_typical_price",
|
| 438 |
+
"Calculate the Typical Price for a given trading pair using Binance OHLCV data",
|
| 439 |
+
{
|
| 440 |
+
symbol: z.string().describe("Trading pair, e.g., 'BTC/USDT'"),
|
| 441 |
+
timeframe: z.string().default("1h").describe("Timeframe, e.g., '1m', '1h', '1d'"),
|
| 442 |
+
limit: z.number().default(100).describe("Number of OHLCV data points to fetch"),
|
| 443 |
+
},
|
| 444 |
+
async ({ symbol, timeframe, limit }) => {
|
| 445 |
+
try {
|
| 446 |
+
const asset = await fetchOhlcvData(symbol, timeframe, limit);
|
| 447 |
+
const result = typicalPrice(asset.highs, asset.lows, asset.closings);
|
| 448 |
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
| 449 |
+
} catch (error) {
|
| 450 |
+
return { content: [{ type: "text", text: `Error: ${error.message}` }] };
|
| 451 |
+
}
|
| 452 |
+
}
|
| 453 |
+
);
|
| 454 |
+
|
| 455 |
+
server.tool(
|
| 456 |
+
"calculate_volume_weighted_moving_average",
|
| 457 |
+
"Calculate the Volume Weighted Moving Average (VWMA) for a given trading pair using Binance OHLCV data",
|
| 458 |
+
{
|
| 459 |
+
symbol: z.string().describe("Trading pair, e.g., 'BTC/USDT'"),
|
| 460 |
+
timeframe: z.string().default("1h").describe("Timeframe, e.g., '1m', '1h', '1d'"),
|
| 461 |
+
period: z.number().default(14).describe("Period length for VWMA"),
|
| 462 |
+
limit: z.number().default(100).describe("Number of OHLCV data points to fetch"),
|
| 463 |
+
},
|
| 464 |
+
async ({ symbol, timeframe, period, limit }) => {
|
| 465 |
+
try {
|
| 466 |
+
const asset = await fetchOhlcvData(symbol, timeframe, limit);
|
| 467 |
+
const result = volumeWeightedMovingAverage(asset.closings, asset.volumes, { period });
|
| 468 |
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
| 469 |
+
} catch (error) {
|
| 470 |
+
return { content: [{ type: "text", text: `Error: ${error.message}` }] };
|
| 471 |
+
}
|
| 472 |
+
}
|
| 473 |
+
);
|
| 474 |
+
|
| 475 |
+
server.tool(
|
| 476 |
+
"calculate_vortex",
|
| 477 |
+
"Calculate the Vortex Indicator for a given trading pair using Binance OHLCV data",
|
| 478 |
+
{
|
| 479 |
+
symbol: z.string().describe("Trading pair, e.g., 'BTC/USDT'"),
|
| 480 |
+
timeframe: z.string().default("1h").describe("Timeframe, e.g., '1m', '1h', '1d'"),
|
| 481 |
+
period: z.number().default(14).describe("Period length for Vortex"),
|
| 482 |
+
limit: z.number().default(100).describe("Number of OHLCV data points to fetch"),
|
| 483 |
+
},
|
| 484 |
+
async ({ symbol, timeframe, period, limit }) => {
|
| 485 |
+
try {
|
| 486 |
+
const asset = await fetchOhlcvData(symbol, timeframe, limit);
|
| 487 |
+
const result = vortex(asset.highs, asset.lows, asset.closings, { period });
|
| 488 |
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
| 489 |
+
} catch (error) {
|
| 490 |
+
return { content: [{ type: "text", text: `Error: ${error.message}` }] };
|
| 491 |
+
}
|
| 492 |
+
}
|
| 493 |
+
);
|
| 494 |
+
};
|
crypto-indicators-mcp/indicators/volatilityIndicators.js
ADDED
|
@@ -0,0 +1,232 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
const { z } = require("zod");
|
| 2 |
+
const {
|
| 3 |
+
accelerationBands, averageTrueRange, bollingerBands, bollingerBandsWidth,
|
| 4 |
+
chandelierExit, donchianChannel, keltnerChannel, movingStandardDeviation,
|
| 5 |
+
projectionOscillator, trueRange, ulcerIndex,
|
| 6 |
+
} = require("indicatorts");
|
| 7 |
+
const fetchOhlcvData = require("../utils/fetchOhlcvData");
|
| 8 |
+
|
| 9 |
+
module.exports = (server) => {
|
| 10 |
+
server.tool(
|
| 11 |
+
"calculate_acceleration_bands",
|
| 12 |
+
"Calculate the Acceleration Bands (AB) for a given trading pair using Binance OHLCV data",
|
| 13 |
+
{
|
| 14 |
+
symbol: z.string().describe("Trading pair, e.g., 'BTC/USDT'"),
|
| 15 |
+
timeframe: z.string().default("1h").describe("Timeframe, e.g., '1m', '1h', '1d'"),
|
| 16 |
+
period: z.number().default(20).describe("Period length for AB"),
|
| 17 |
+
limit: z.number().default(100).describe("Number of OHLCV data points to fetch"),
|
| 18 |
+
},
|
| 19 |
+
async ({ symbol, timeframe, period, limit }) => {
|
| 20 |
+
try {
|
| 21 |
+
const asset = await fetchOhlcvData(symbol, timeframe, limit);
|
| 22 |
+
const result = accelerationBands(asset.highs, asset.lows, asset.closings, { period });
|
| 23 |
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
| 24 |
+
} catch (error) {
|
| 25 |
+
return { content: [{ type: "text", text: `Error: ${error.message}` }] };
|
| 26 |
+
}
|
| 27 |
+
}
|
| 28 |
+
);
|
| 29 |
+
|
| 30 |
+
server.tool(
|
| 31 |
+
"calculate_average_true_range",
|
| 32 |
+
"Calculate the Average True Range (ATR) for a given trading pair using Binance OHLCV data",
|
| 33 |
+
{
|
| 34 |
+
symbol: z.string().describe("Trading pair, e.g., 'BTC/USDT'"),
|
| 35 |
+
timeframe: z.string().default("1h").describe("Timeframe, e.g., '1m', '1h', '1d'"),
|
| 36 |
+
period: z.number().default(14).describe("Period length for ATR"),
|
| 37 |
+
limit: z.number().default(100).describe("Number of OHLCV data points to fetch"),
|
| 38 |
+
},
|
| 39 |
+
async ({ symbol, timeframe, period, limit }) => {
|
| 40 |
+
try {
|
| 41 |
+
const asset = await fetchOhlcvData(symbol, timeframe, limit);
|
| 42 |
+
const result = averageTrueRange(asset.highs, asset.lows, asset.closings, { period });
|
| 43 |
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
| 44 |
+
} catch (error) {
|
| 45 |
+
return { content: [{ type: "text", text: `Error: ${error.message}` }] };
|
| 46 |
+
}
|
| 47 |
+
}
|
| 48 |
+
);
|
| 49 |
+
|
| 50 |
+
server.tool(
|
| 51 |
+
"calculate_bollinger_bands",
|
| 52 |
+
"Calculate the Bollinger Bands (BB) for a given trading pair using Binance OHLCV data",
|
| 53 |
+
{
|
| 54 |
+
symbol: z.string().describe("Trading pair, e.g., 'BTC/USDT'"),
|
| 55 |
+
timeframe: z.string().default("1h").describe("Timeframe, e.g., '1m', '1h', '1d'"),
|
| 56 |
+
period: z.number().default(20).describe("Period length for BB"),
|
| 57 |
+
stdDev: z.number().default(2).describe("Standard deviation multiplier"),
|
| 58 |
+
limit: z.number().default(100).describe("Number of OHLCV data points to fetch"),
|
| 59 |
+
},
|
| 60 |
+
async ({ symbol, timeframe, period, stdDev, limit }) => {
|
| 61 |
+
try {
|
| 62 |
+
const asset = await fetchOhlcvData(symbol, timeframe, limit);
|
| 63 |
+
const result = bollingerBands(asset.closings, { period, stdDev });
|
| 64 |
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
| 65 |
+
} catch (error) {
|
| 66 |
+
return { content: [{ type: "text", text: `Error: ${error.message}` }] };
|
| 67 |
+
}
|
| 68 |
+
}
|
| 69 |
+
);
|
| 70 |
+
|
| 71 |
+
server.tool(
|
| 72 |
+
"calculate_bollinger_bands_width",
|
| 73 |
+
"Calculate the Bollinger Bands Width (BBW) for a given trading pair using Binance OHLCV data",
|
| 74 |
+
{
|
| 75 |
+
symbol: z.string().describe("Trading pair, e.g., 'BTC/USDT'"),
|
| 76 |
+
timeframe: z.string().default("1h").describe("Timeframe, e.g., '1m', '1h', '1d'"),
|
| 77 |
+
period: z.number().default(20).describe("Period length for BBW"),
|
| 78 |
+
stdDev: z.number().default(2).describe("Standard deviation multiplier"),
|
| 79 |
+
limit: z.number().default(100).describe("Number of OHLCV data points to fetch"),
|
| 80 |
+
},
|
| 81 |
+
async ({ symbol, timeframe, period, stdDev, limit }) => {
|
| 82 |
+
try {
|
| 83 |
+
const asset = await fetchOhlcvData(symbol, timeframe, limit);
|
| 84 |
+
const result = bollingerBandsWidth(asset.closings, { period, stdDev });
|
| 85 |
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
| 86 |
+
} catch (error) {
|
| 87 |
+
return { content: [{ type: "text", text: `Error: ${error.message}` }] };
|
| 88 |
+
}
|
| 89 |
+
}
|
| 90 |
+
);
|
| 91 |
+
|
| 92 |
+
server.tool(
|
| 93 |
+
"calculate_chandelier_exit",
|
| 94 |
+
"Calculate the Chandelier Exit (CE) for a given trading pair using Binance OHLCV data",
|
| 95 |
+
{
|
| 96 |
+
symbol: z.string().describe("Trading pair, e.g., 'BTC/USDT'"),
|
| 97 |
+
timeframe: z.string().default("1h").describe("Timeframe, e.g., '1m', '1h', '1d'"),
|
| 98 |
+
period: z.number().default(22).describe("Period length for CE"),
|
| 99 |
+
multiplier: z.number().default(3).describe("Multiplier for CE"),
|
| 100 |
+
limit: z.number().default(100).describe("Number of OHLCV data points to fetch"),
|
| 101 |
+
},
|
| 102 |
+
async ({ symbol, timeframe, period, multiplier, limit }) => {
|
| 103 |
+
try {
|
| 104 |
+
const asset = await fetchOhlcvData(symbol, timeframe, limit);
|
| 105 |
+
const result = chandelierExit(asset.highs, asset.lows, asset.closings, { period, multiplier });
|
| 106 |
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
| 107 |
+
} catch (error) {
|
| 108 |
+
return { content: [{ type: "text", text: `Error: ${error.message}` }] };
|
| 109 |
+
}
|
| 110 |
+
}
|
| 111 |
+
);
|
| 112 |
+
|
| 113 |
+
server.tool(
|
| 114 |
+
"calculate_donchian_channel",
|
| 115 |
+
"Calculate the Donchian Channel (DC) for a given trading pair using Binance OHLCV data",
|
| 116 |
+
{
|
| 117 |
+
symbol: z.string().describe("Trading pair, e.g., 'BTC/USDT'"),
|
| 118 |
+
timeframe: z.string().default("1h").describe("Timeframe, e.g., '1m', '1h', '1d'"),
|
| 119 |
+
period: z.number().default(20).describe("Period length for DC"),
|
| 120 |
+
limit: z.number().default(100).describe("Number of OHLCV data points to fetch"),
|
| 121 |
+
},
|
| 122 |
+
async ({ symbol, timeframe, period, limit }) => {
|
| 123 |
+
try {
|
| 124 |
+
const asset = await fetchOhlcvData(symbol, timeframe, limit);
|
| 125 |
+
const result = donchianChannel(asset.highs, asset.lows, { period });
|
| 126 |
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
| 127 |
+
} catch (error) {
|
| 128 |
+
return { content: [{ type: "text", text: `Error: ${error.message}` }] };
|
| 129 |
+
}
|
| 130 |
+
}
|
| 131 |
+
);
|
| 132 |
+
|
| 133 |
+
server.tool(
|
| 134 |
+
"calculate_keltner_channel",
|
| 135 |
+
"Calculate the Keltner Channel (KC) for a given trading pair using Binance OHLCV data",
|
| 136 |
+
{
|
| 137 |
+
symbol: z.string().describe("Trading pair, e.g., 'BTC/USDT'"),
|
| 138 |
+
timeframe: z.string().default("1h").describe("Timeframe, e.g., '1m', '1h', '1d'"),
|
| 139 |
+
period: z.number().default(20).describe("Period length for KC"),
|
| 140 |
+
multiplier: z.number().default(2).describe("Multiplier for KC"),
|
| 141 |
+
limit: z.number().default(100).describe("Number of OHLCV data points to fetch"),
|
| 142 |
+
},
|
| 143 |
+
async ({ symbol, timeframe, period, multiplier, limit }) => {
|
| 144 |
+
try {
|
| 145 |
+
const asset = await fetchOhlcvData(symbol, timeframe, limit);
|
| 146 |
+
const result = keltnerChannel(asset.highs, asset.lows, asset.closings, { period, multiplier });
|
| 147 |
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
| 148 |
+
} catch (error) {
|
| 149 |
+
return { content: [{ type: "text", text: `Error: ${error.message}` }] };
|
| 150 |
+
}
|
| 151 |
+
}
|
| 152 |
+
);
|
| 153 |
+
|
| 154 |
+
server.tool(
|
| 155 |
+
"calculate_moving_standard_deviation",
|
| 156 |
+
"Calculate the Moving Standard Deviation (MSTD) for a given trading pair using Binance OHLCV data",
|
| 157 |
+
{
|
| 158 |
+
symbol: z.string().describe("Trading pair, e.g., 'BTC/USDT'"),
|
| 159 |
+
timeframe: z.string().default("1h").describe("Timeframe, e.g., '1m', '1h', '1d'"),
|
| 160 |
+
period: z.number().default(20).describe("Period length for MSTD"),
|
| 161 |
+
limit: z.number().default(100).describe("Number of OHLCV data points to fetch"),
|
| 162 |
+
},
|
| 163 |
+
async ({ symbol, timeframe, period, limit }) => {
|
| 164 |
+
try {
|
| 165 |
+
const asset = await fetchOhlcvData(symbol, timeframe, limit);
|
| 166 |
+
const result = movingStandardDeviation(asset.closings, { period });
|
| 167 |
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
| 168 |
+
} catch (error) {
|
| 169 |
+
return { content: [{ type: "text", text: `Error: ${error.message}` }] };
|
| 170 |
+
}
|
| 171 |
+
}
|
| 172 |
+
);
|
| 173 |
+
|
| 174 |
+
server.tool(
|
| 175 |
+
"calculate_projection_oscillator",
|
| 176 |
+
"Calculate the Projection Oscillator (PO) for a given trading pair using Binance OHLCV data",
|
| 177 |
+
{
|
| 178 |
+
symbol: z.string().describe("Trading pair, e.g., 'BTC/USDT'"),
|
| 179 |
+
timeframe: z.string().default("1h").describe("Timeframe, e.g., '1m', '1h', '1d'"),
|
| 180 |
+
period: z.number().default(14).describe("Period length for PO"),
|
| 181 |
+
limit: z.number().default(100).describe("Number of OHLCV data points to fetch"),
|
| 182 |
+
},
|
| 183 |
+
async ({ symbol, timeframe, period, limit }) => {
|
| 184 |
+
try {
|
| 185 |
+
const asset = await fetchOhlcvData(symbol, timeframe, limit);
|
| 186 |
+
const result = projectionOscillator(asset.highs, asset.lows, asset.closings, { period });
|
| 187 |
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
| 188 |
+
} catch (error) {
|
| 189 |
+
return { content: [{ type: "text", text: `Error: ${error.message}` }] };
|
| 190 |
+
}
|
| 191 |
+
}
|
| 192 |
+
);
|
| 193 |
+
|
| 194 |
+
server.tool(
|
| 195 |
+
"calculate_true_range",
|
| 196 |
+
"Calculate the True Range (TR) for a given trading pair using Binance OHLCV data",
|
| 197 |
+
{
|
| 198 |
+
symbol: z.string().describe("Trading pair, e.g., 'BTC/USDT'"),
|
| 199 |
+
timeframe: z.string().default("1h").describe("Timeframe, e.g., '1m', '1h', '1d'"),
|
| 200 |
+
limit: z.number().default(100).describe("Number of OHLCV data points to fetch"),
|
| 201 |
+
},
|
| 202 |
+
async ({ symbol, timeframe, limit }) => {
|
| 203 |
+
try {
|
| 204 |
+
const asset = await fetchOhlcvData(symbol, timeframe, limit);
|
| 205 |
+
const result = trueRange(asset.highs, asset.lows, asset.closings);
|
| 206 |
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
| 207 |
+
} catch (error) {
|
| 208 |
+
return { content: [{ type: "text", text: `Error: ${error.message}` }] };
|
| 209 |
+
}
|
| 210 |
+
}
|
| 211 |
+
);
|
| 212 |
+
|
| 213 |
+
server.tool(
|
| 214 |
+
"calculate_ulcer_index",
|
| 215 |
+
"Calculate the Ulcer Index (UI) for a given trading pair using Binance OHLCV data",
|
| 216 |
+
{
|
| 217 |
+
symbol: z.string().describe("Trading pair, e.g., 'BTC/USDT'"),
|
| 218 |
+
timeframe: z.string().default("1h").describe("Timeframe, e.g., '1m', '1h', '1d'"),
|
| 219 |
+
period: z.number().default(14).describe("Period length for UI"),
|
| 220 |
+
limit: z.number().default(100).describe("Number of OHLCV data points to fetch"),
|
| 221 |
+
},
|
| 222 |
+
async ({ symbol, timeframe, period, limit }) => {
|
| 223 |
+
try {
|
| 224 |
+
const asset = await fetchOhlcvData(symbol, timeframe, limit);
|
| 225 |
+
const result = ulcerIndex(asset.closings, { period });
|
| 226 |
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
| 227 |
+
} catch (error) {
|
| 228 |
+
return { content: [{ type: "text", text: `Error: ${error.message}` }] };
|
| 229 |
+
}
|
| 230 |
+
}
|
| 231 |
+
);
|
| 232 |
+
};
|
crypto-indicators-mcp/indicators/volumeIndicators.js
ADDED
|
@@ -0,0 +1,184 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
const { z } = require("zod");
|
| 2 |
+
const {
|
| 3 |
+
accumulationDistribution, chaikinMoneyFlow, easeOfMovement, forceIndex,
|
| 4 |
+
moneyFlowIndex, negativeVolumeIndex, onBalanceVolume, volumePriceTrend,
|
| 5 |
+
volumeWeightedAveragePrice,
|
| 6 |
+
} = require("indicatorts");
|
| 7 |
+
const fetchOhlcvData = require("../utils/fetchOhlcvData");
|
| 8 |
+
|
| 9 |
+
module.exports = (server) => {
|
| 10 |
+
server.tool(
|
| 11 |
+
"calculate_accumulation_distribution",
|
| 12 |
+
"Calculate the Accumulation/Distribution (AD) for a given trading pair using Binance OHLCV data",
|
| 13 |
+
{
|
| 14 |
+
symbol: z.string().describe("Trading pair, e.g., 'BTC/USDT'"),
|
| 15 |
+
timeframe: z.string().default("1h").describe("Timeframe, e.g., '1m', '1h', '1d'"),
|
| 16 |
+
limit: z.number().default(100).describe("Number of OHLCV data points to fetch"),
|
| 17 |
+
},
|
| 18 |
+
async ({ symbol, timeframe, limit }) => {
|
| 19 |
+
try {
|
| 20 |
+
const asset = await fetchOhlcvData(symbol, timeframe, limit);
|
| 21 |
+
const result = accumulationDistribution(asset.highs, asset.lows, asset.closings, asset.volumes);
|
| 22 |
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
| 23 |
+
} catch (error) {
|
| 24 |
+
return { content: [{ type: "text", text: `Error: ${error.message}` }] };
|
| 25 |
+
}
|
| 26 |
+
}
|
| 27 |
+
);
|
| 28 |
+
|
| 29 |
+
server.tool(
|
| 30 |
+
"calculate_chaikin_money_flow",
|
| 31 |
+
"Calculate the Chaikin Money Flow (CMF) for a given trading pair using Binance OHLCV data",
|
| 32 |
+
{
|
| 33 |
+
symbol: z.string().describe("Trading pair, e.g., 'BTC/USDT'"),
|
| 34 |
+
timeframe: z.string().default("1h").describe("Timeframe, e.g., '1m', '1h', '1d'"),
|
| 35 |
+
period: z.number().default(20).describe("Period length for CMF"),
|
| 36 |
+
limit: z.number().default(100).describe("Number of OHLCV data points to fetch"),
|
| 37 |
+
},
|
| 38 |
+
async ({ symbol, timeframe, period, limit }) => {
|
| 39 |
+
try {
|
| 40 |
+
const asset = await fetchOhlcvData(symbol, timeframe, limit);
|
| 41 |
+
const result = chaikinMoneyFlow(asset.highs, asset.lows, asset.closings, asset.volumes, { period });
|
| 42 |
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
| 43 |
+
} catch (error) {
|
| 44 |
+
return { content: [{ type: "text", text: `Error: ${error.message}` }] };
|
| 45 |
+
}
|
| 46 |
+
}
|
| 47 |
+
);
|
| 48 |
+
|
| 49 |
+
server.tool(
|
| 50 |
+
"calculate_ease_of_movement",
|
| 51 |
+
"Calculate the Ease of Movement (EMV) for a given trading pair using Binance OHLCV data",
|
| 52 |
+
{
|
| 53 |
+
symbol: z.string().describe("Trading pair, e.g., 'BTC/USDT'"),
|
| 54 |
+
timeframe: z.string().default("1h").describe("Timeframe, e.g., '1m', '1h', '1d'"),
|
| 55 |
+
period: z.number().default(14).describe("Period length for EMV"),
|
| 56 |
+
limit: z.number().default(100).describe("Number of OHLCV data points to fetch"),
|
| 57 |
+
},
|
| 58 |
+
async ({ symbol, timeframe, period, limit }) => {
|
| 59 |
+
try {
|
| 60 |
+
const asset = await fetchOhlcvData(symbol, timeframe, limit);
|
| 61 |
+
const result = easeOfMovement(asset.highs, asset.lows, asset.volumes, { period });
|
| 62 |
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
| 63 |
+
} catch (error) {
|
| 64 |
+
return { content: [{ type: "text", text: `Error: ${error.message}` }] };
|
| 65 |
+
}
|
| 66 |
+
}
|
| 67 |
+
);
|
| 68 |
+
|
| 69 |
+
server.tool(
|
| 70 |
+
"calculate_force_index",
|
| 71 |
+
"Calculate the Force Index (FI) for a given trading pair using Binance OHLCV data",
|
| 72 |
+
{
|
| 73 |
+
symbol: z.string().describe("Trading pair, e.g., 'BTC/USDT'"),
|
| 74 |
+
timeframe: z.string().default("1h").describe("Timeframe, e.g., '1m', '1h', '1d'"),
|
| 75 |
+
period: z.number().default(13).describe("Period length for FI"),
|
| 76 |
+
limit: z.number().default(100).describe("Number of OHLCV data points to fetch"),
|
| 77 |
+
},
|
| 78 |
+
async ({ symbol, timeframe, period, limit }) => {
|
| 79 |
+
try {
|
| 80 |
+
const asset = await fetchOhlcvData(symbol, timeframe, limit);
|
| 81 |
+
const result = forceIndex(asset.closings, asset.volumes, { period });
|
| 82 |
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
| 83 |
+
} catch (error) {
|
| 84 |
+
return { content: [{ type: "text", text: `Error: ${error.message}` }] };
|
| 85 |
+
}
|
| 86 |
+
}
|
| 87 |
+
);
|
| 88 |
+
|
| 89 |
+
server.tool(
|
| 90 |
+
"calculate_money_flow_index",
|
| 91 |
+
"Calculate the Money Flow Index (MFI) for a given trading pair using Binance OHLCV data",
|
| 92 |
+
{
|
| 93 |
+
symbol: z.string().describe("Trading pair, e.g., 'BTC/USDT'"),
|
| 94 |
+
timeframe: z.string().default("1h").describe("Timeframe, e.g., '1m', '1h', '1d'"),
|
| 95 |
+
period: z.number().default(14).describe("Period length for MFI"),
|
| 96 |
+
limit: z.number().default(100).describe("Number of OHLCV data points to fetch"),
|
| 97 |
+
},
|
| 98 |
+
async ({ symbol, timeframe, period, limit }) => {
|
| 99 |
+
try {
|
| 100 |
+
const asset = await fetchOhlcvData(symbol, timeframe, limit);
|
| 101 |
+
const result = moneyFlowIndex(asset.highs, asset.lows, asset.closings, asset.volumes, { period });
|
| 102 |
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
| 103 |
+
} catch (error) {
|
| 104 |
+
return { content: [{ type: "text", text: `Error: ${error.message}` }] };
|
| 105 |
+
}
|
| 106 |
+
}
|
| 107 |
+
);
|
| 108 |
+
|
| 109 |
+
server.tool(
|
| 110 |
+
"calculate_negative_volume_index",
|
| 111 |
+
"Calculate the Negative Volume Index (NVI) for a given trading pair using Binance OHLCV data",
|
| 112 |
+
{
|
| 113 |
+
symbol: z.string().describe("Trading pair, e.g., 'BTC/USDT'"),
|
| 114 |
+
timeframe: z.string().default("1h").describe("Timeframe, e.g., '1m', '1h', '1d'"),
|
| 115 |
+
limit: z.number().default(100).describe("Number of OHLCV data points to fetch"),
|
| 116 |
+
},
|
| 117 |
+
async ({ symbol, timeframe, limit }) => {
|
| 118 |
+
try {
|
| 119 |
+
const asset = await fetchOhlcvData(symbol, timeframe, limit);
|
| 120 |
+
const result = negativeVolumeIndex(asset.closings, asset.volumes);
|
| 121 |
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
| 122 |
+
} catch (error) {
|
| 123 |
+
return { content: [{ type: "text", text: `Error: ${error.message}` }] };
|
| 124 |
+
}
|
| 125 |
+
}
|
| 126 |
+
);
|
| 127 |
+
|
| 128 |
+
server.tool(
|
| 129 |
+
"calculate_on_balance_volume",
|
| 130 |
+
"Calculate the On-Balance Volume (OBV) for a given trading pair using Binance OHLCV data",
|
| 131 |
+
{
|
| 132 |
+
symbol: z.string().describe("Trading pair, e.g., 'BTC/USDT'"),
|
| 133 |
+
timeframe: z.string().default("1h").describe("Timeframe, e.g., '1m', '1h', '1d'"),
|
| 134 |
+
limit: z.number().default(100).describe("Number of OHLCV data points to fetch"),
|
| 135 |
+
},
|
| 136 |
+
async ({ symbol, timeframe, limit }) => {
|
| 137 |
+
try {
|
| 138 |
+
const asset = await fetchOhlcvData(symbol, timeframe, limit);
|
| 139 |
+
const result = onBalanceVolume(asset.closings, asset.volumes);
|
| 140 |
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
| 141 |
+
} catch (error) {
|
| 142 |
+
return { content: [{ type: "text", text: `Error: ${error.message}` }] };
|
| 143 |
+
}
|
| 144 |
+
}
|
| 145 |
+
);
|
| 146 |
+
|
| 147 |
+
server.tool(
|
| 148 |
+
"calculate_volume_price_trend",
|
| 149 |
+
"Calculate the Volume Price Trend (VPT) for a given trading pair using Binance OHLCV data",
|
| 150 |
+
{
|
| 151 |
+
symbol: z.string().describe("Trading pair, e.g., 'BTC/USDT'"),
|
| 152 |
+
timeframe: z.string().default("1h").describe("Timeframe, e.g., '1m', '1h', '1d'"),
|
| 153 |
+
limit: z.number().default(100).describe("Number of OHLCV data points to fetch"),
|
| 154 |
+
},
|
| 155 |
+
async ({ symbol, timeframe, limit }) => {
|
| 156 |
+
try {
|
| 157 |
+
const asset = await fetchOhlcvData(symbol, timeframe, limit);
|
| 158 |
+
const result = volumePriceTrend(asset.closings, asset.volumes);
|
| 159 |
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
| 160 |
+
} catch (error) {
|
| 161 |
+
return { content: [{ type: "text", text: `Error: ${error.message}` }] };
|
| 162 |
+
}
|
| 163 |
+
}
|
| 164 |
+
);
|
| 165 |
+
|
| 166 |
+
server.tool(
|
| 167 |
+
"calculate_volume_weighted_average_price",
|
| 168 |
+
"Calculate the Volume Weighted Average Price (VWAP) for a given trading pair using Binance OHLCV data",
|
| 169 |
+
{
|
| 170 |
+
symbol: z.string().describe("Trading pair, e.g., 'BTC/USDT'"),
|
| 171 |
+
timeframe: z.string().default("1h").describe("Timeframe, e.g., '1m', '1h', '1d'"),
|
| 172 |
+
limit: z.number().default(100).describe("Number of OHLCV data points to fetch"),
|
| 173 |
+
},
|
| 174 |
+
async ({ symbol, timeframe, limit }) => {
|
| 175 |
+
try {
|
| 176 |
+
const asset = await fetchOhlcvData(symbol, timeframe, limit);
|
| 177 |
+
const result = volumeWeightedAveragePrice(asset.highs, asset.lows, asset.closings, asset.volumes);
|
| 178 |
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
| 179 |
+
} catch (error) {
|
| 180 |
+
return { content: [{ type: "text", text: `Error: ${error.message}` }] };
|
| 181 |
+
}
|
| 182 |
+
}
|
| 183 |
+
);
|
| 184 |
+
};
|
crypto-indicators-mcp/node_modules/.package-lock.json
ADDED
|
@@ -0,0 +1,1435 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "crypto-indicators-mcp",
|
| 3 |
+
"version": "1.0.1",
|
| 4 |
+
"lockfileVersion": 3,
|
| 5 |
+
"requires": true,
|
| 6 |
+
"packages": {
|
| 7 |
+
"node_modules/@modelcontextprotocol/sdk": {
|
| 8 |
+
"version": "1.7.0",
|
| 9 |
+
"resolved": "https://registry.npmmirror.com/@modelcontextprotocol/sdk/-/sdk-1.7.0.tgz",
|
| 10 |
+
"integrity": "sha512-IYPe/FLpvF3IZrd/f5p5ffmWhMc3aEMuM2wGJASDqC2Ge7qatVCdbfPx3n/5xFeb19xN0j/911M2AaFuircsWA==",
|
| 11 |
+
"license": "MIT",
|
| 12 |
+
"dependencies": {
|
| 13 |
+
"content-type": "^1.0.5",
|
| 14 |
+
"cors": "^2.8.5",
|
| 15 |
+
"eventsource": "^3.0.2",
|
| 16 |
+
"express": "^5.0.1",
|
| 17 |
+
"express-rate-limit": "^7.5.0",
|
| 18 |
+
"pkce-challenge": "^4.1.0",
|
| 19 |
+
"raw-body": "^3.0.0",
|
| 20 |
+
"zod": "^3.23.8",
|
| 21 |
+
"zod-to-json-schema": "^3.24.1"
|
| 22 |
+
},
|
| 23 |
+
"engines": {
|
| 24 |
+
"node": ">=18"
|
| 25 |
+
}
|
| 26 |
+
},
|
| 27 |
+
"node_modules/@types/node": {
|
| 28 |
+
"version": "6.14.13",
|
| 29 |
+
"resolved": "https://registry.npmmirror.com/@types/node/-/node-6.14.13.tgz",
|
| 30 |
+
"integrity": "sha512-J1F0XJ/9zxlZel5ZlbeSuHW2OpabrUAqpFuC2sm2I3by8sERQ8+KCjNKUcq8QHuzpGMWiJpo9ZxeHrqrP2KzQw==",
|
| 31 |
+
"license": "MIT"
|
| 32 |
+
},
|
| 33 |
+
"node_modules/accepts": {
|
| 34 |
+
"version": "2.0.0",
|
| 35 |
+
"resolved": "https://registry.npmmirror.com/accepts/-/accepts-2.0.0.tgz",
|
| 36 |
+
"integrity": "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==",
|
| 37 |
+
"license": "MIT",
|
| 38 |
+
"dependencies": {
|
| 39 |
+
"mime-types": "^3.0.0",
|
| 40 |
+
"negotiator": "^1.0.0"
|
| 41 |
+
},
|
| 42 |
+
"engines": {
|
| 43 |
+
"node": ">= 0.6"
|
| 44 |
+
}
|
| 45 |
+
},
|
| 46 |
+
"node_modules/ansi-regex": {
|
| 47 |
+
"version": "5.0.1",
|
| 48 |
+
"resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-5.0.1.tgz",
|
| 49 |
+
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
|
| 50 |
+
"license": "MIT",
|
| 51 |
+
"engines": {
|
| 52 |
+
"node": ">=8"
|
| 53 |
+
}
|
| 54 |
+
},
|
| 55 |
+
"node_modules/ansi-styles": {
|
| 56 |
+
"version": "4.3.0",
|
| 57 |
+
"resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz",
|
| 58 |
+
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
|
| 59 |
+
"license": "MIT",
|
| 60 |
+
"dependencies": {
|
| 61 |
+
"color-convert": "^2.0.1"
|
| 62 |
+
},
|
| 63 |
+
"engines": {
|
| 64 |
+
"node": ">=8"
|
| 65 |
+
},
|
| 66 |
+
"funding": {
|
| 67 |
+
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
|
| 68 |
+
}
|
| 69 |
+
},
|
| 70 |
+
"node_modules/balanced-match": {
|
| 71 |
+
"version": "1.0.2",
|
| 72 |
+
"resolved": "https://registry.npmmirror.com/balanced-match/-/balanced-match-1.0.2.tgz",
|
| 73 |
+
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
|
| 74 |
+
"license": "MIT"
|
| 75 |
+
},
|
| 76 |
+
"node_modules/body-parser": {
|
| 77 |
+
"version": "2.1.0",
|
| 78 |
+
"resolved": "https://registry.npmmirror.com/body-parser/-/body-parser-2.1.0.tgz",
|
| 79 |
+
"integrity": "sha512-/hPxh61E+ll0Ujp24Ilm64cykicul1ypfwjVttduAiEdtnJFvLePSrIPk+HMImtNv5270wOGCb1Tns2rybMkoQ==",
|
| 80 |
+
"license": "MIT",
|
| 81 |
+
"dependencies": {
|
| 82 |
+
"bytes": "^3.1.2",
|
| 83 |
+
"content-type": "^1.0.5",
|
| 84 |
+
"debug": "^4.4.0",
|
| 85 |
+
"http-errors": "^2.0.0",
|
| 86 |
+
"iconv-lite": "^0.5.2",
|
| 87 |
+
"on-finished": "^2.4.1",
|
| 88 |
+
"qs": "^6.14.0",
|
| 89 |
+
"raw-body": "^3.0.0",
|
| 90 |
+
"type-is": "^2.0.0"
|
| 91 |
+
},
|
| 92 |
+
"engines": {
|
| 93 |
+
"node": ">=18"
|
| 94 |
+
}
|
| 95 |
+
},
|
| 96 |
+
"node_modules/body-parser/node_modules/debug": {
|
| 97 |
+
"version": "4.4.0",
|
| 98 |
+
"resolved": "https://registry.npmmirror.com/debug/-/debug-4.4.0.tgz",
|
| 99 |
+
"integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==",
|
| 100 |
+
"license": "MIT",
|
| 101 |
+
"dependencies": {
|
| 102 |
+
"ms": "^2.1.3"
|
| 103 |
+
},
|
| 104 |
+
"engines": {
|
| 105 |
+
"node": ">=6.0"
|
| 106 |
+
},
|
| 107 |
+
"peerDependenciesMeta": {
|
| 108 |
+
"supports-color": {
|
| 109 |
+
"optional": true
|
| 110 |
+
}
|
| 111 |
+
}
|
| 112 |
+
},
|
| 113 |
+
"node_modules/body-parser/node_modules/ms": {
|
| 114 |
+
"version": "2.1.3",
|
| 115 |
+
"resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz",
|
| 116 |
+
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
|
| 117 |
+
"license": "MIT"
|
| 118 |
+
},
|
| 119 |
+
"node_modules/body-parser/node_modules/qs": {
|
| 120 |
+
"version": "6.14.0",
|
| 121 |
+
"resolved": "https://registry.npmmirror.com/qs/-/qs-6.14.0.tgz",
|
| 122 |
+
"integrity": "sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==",
|
| 123 |
+
"license": "BSD-3-Clause",
|
| 124 |
+
"dependencies": {
|
| 125 |
+
"side-channel": "^1.1.0"
|
| 126 |
+
},
|
| 127 |
+
"engines": {
|
| 128 |
+
"node": ">=0.6"
|
| 129 |
+
},
|
| 130 |
+
"funding": {
|
| 131 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 132 |
+
}
|
| 133 |
+
},
|
| 134 |
+
"node_modules/brace-expansion": {
|
| 135 |
+
"version": "1.1.11",
|
| 136 |
+
"resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
| 137 |
+
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
|
| 138 |
+
"license": "MIT",
|
| 139 |
+
"dependencies": {
|
| 140 |
+
"balanced-match": "^1.0.0",
|
| 141 |
+
"concat-map": "0.0.1"
|
| 142 |
+
}
|
| 143 |
+
},
|
| 144 |
+
"node_modules/bytes": {
|
| 145 |
+
"version": "3.1.2",
|
| 146 |
+
"resolved": "https://registry.npmmirror.com/bytes/-/bytes-3.1.2.tgz",
|
| 147 |
+
"integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
|
| 148 |
+
"license": "MIT",
|
| 149 |
+
"engines": {
|
| 150 |
+
"node": ">= 0.8"
|
| 151 |
+
}
|
| 152 |
+
},
|
| 153 |
+
"node_modules/call-bind-apply-helpers": {
|
| 154 |
+
"version": "1.0.2",
|
| 155 |
+
"resolved": "https://registry.npmmirror.com/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz",
|
| 156 |
+
"integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==",
|
| 157 |
+
"license": "MIT",
|
| 158 |
+
"dependencies": {
|
| 159 |
+
"es-errors": "^1.3.0",
|
| 160 |
+
"function-bind": "^1.1.2"
|
| 161 |
+
},
|
| 162 |
+
"engines": {
|
| 163 |
+
"node": ">= 0.4"
|
| 164 |
+
}
|
| 165 |
+
},
|
| 166 |
+
"node_modules/call-bound": {
|
| 167 |
+
"version": "1.0.4",
|
| 168 |
+
"resolved": "https://registry.npmmirror.com/call-bound/-/call-bound-1.0.4.tgz",
|
| 169 |
+
"integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==",
|
| 170 |
+
"license": "MIT",
|
| 171 |
+
"dependencies": {
|
| 172 |
+
"call-bind-apply-helpers": "^1.0.2",
|
| 173 |
+
"get-intrinsic": "^1.3.0"
|
| 174 |
+
},
|
| 175 |
+
"engines": {
|
| 176 |
+
"node": ">= 0.4"
|
| 177 |
+
},
|
| 178 |
+
"funding": {
|
| 179 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 180 |
+
}
|
| 181 |
+
},
|
| 182 |
+
"node_modules/ccxt": {
|
| 183 |
+
"version": "1.95.43",
|
| 184 |
+
"resolved": "https://registry.npmmirror.com/ccxt/-/ccxt-1.95.43.tgz",
|
| 185 |
+
"integrity": "sha512-LKu1ECf56mmCGY8vlpoZrgQ1DQ8A+uc01mza/1vvgZ+q4Azrp2XXYjKXsGSDvbR47xziEGY6S1QxFoQwAE4k/w==",
|
| 186 |
+
"hasInstallScript": true,
|
| 187 |
+
"license": "MIT",
|
| 188 |
+
"dependencies": {
|
| 189 |
+
"replace-in-file": "^6.3.5",
|
| 190 |
+
"ws": "^8.8.1"
|
| 191 |
+
},
|
| 192 |
+
"engines": {
|
| 193 |
+
"node": ">=10.4.0"
|
| 194 |
+
}
|
| 195 |
+
},
|
| 196 |
+
"node_modules/chalk": {
|
| 197 |
+
"version": "4.1.2",
|
| 198 |
+
"resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz",
|
| 199 |
+
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
| 200 |
+
"license": "MIT",
|
| 201 |
+
"dependencies": {
|
| 202 |
+
"ansi-styles": "^4.1.0",
|
| 203 |
+
"supports-color": "^7.1.0"
|
| 204 |
+
},
|
| 205 |
+
"engines": {
|
| 206 |
+
"node": ">=10"
|
| 207 |
+
},
|
| 208 |
+
"funding": {
|
| 209 |
+
"url": "https://github.com/chalk/chalk?sponsor=1"
|
| 210 |
+
}
|
| 211 |
+
},
|
| 212 |
+
"node_modules/cliui": {
|
| 213 |
+
"version": "8.0.1",
|
| 214 |
+
"resolved": "https://registry.npmmirror.com/cliui/-/cliui-8.0.1.tgz",
|
| 215 |
+
"integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==",
|
| 216 |
+
"license": "ISC",
|
| 217 |
+
"dependencies": {
|
| 218 |
+
"string-width": "^4.2.0",
|
| 219 |
+
"strip-ansi": "^6.0.1",
|
| 220 |
+
"wrap-ansi": "^7.0.0"
|
| 221 |
+
},
|
| 222 |
+
"engines": {
|
| 223 |
+
"node": ">=12"
|
| 224 |
+
}
|
| 225 |
+
},
|
| 226 |
+
"node_modules/color-convert": {
|
| 227 |
+
"version": "2.0.1",
|
| 228 |
+
"resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz",
|
| 229 |
+
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
|
| 230 |
+
"license": "MIT",
|
| 231 |
+
"dependencies": {
|
| 232 |
+
"color-name": "~1.1.4"
|
| 233 |
+
},
|
| 234 |
+
"engines": {
|
| 235 |
+
"node": ">=7.0.0"
|
| 236 |
+
}
|
| 237 |
+
},
|
| 238 |
+
"node_modules/color-name": {
|
| 239 |
+
"version": "1.1.4",
|
| 240 |
+
"resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz",
|
| 241 |
+
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
|
| 242 |
+
"license": "MIT"
|
| 243 |
+
},
|
| 244 |
+
"node_modules/concat-map": {
|
| 245 |
+
"version": "0.0.1",
|
| 246 |
+
"resolved": "https://registry.npmmirror.com/concat-map/-/concat-map-0.0.1.tgz",
|
| 247 |
+
"integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
|
| 248 |
+
"license": "MIT"
|
| 249 |
+
},
|
| 250 |
+
"node_modules/content-disposition": {
|
| 251 |
+
"version": "1.0.0",
|
| 252 |
+
"resolved": "https://registry.npmmirror.com/content-disposition/-/content-disposition-1.0.0.tgz",
|
| 253 |
+
"integrity": "sha512-Au9nRL8VNUut/XSzbQA38+M78dzP4D+eqg3gfJHMIHHYa3bg067xj1KxMUWj+VULbiZMowKngFFbKczUrNJ1mg==",
|
| 254 |
+
"license": "MIT",
|
| 255 |
+
"dependencies": {
|
| 256 |
+
"safe-buffer": "5.2.1"
|
| 257 |
+
},
|
| 258 |
+
"engines": {
|
| 259 |
+
"node": ">= 0.6"
|
| 260 |
+
}
|
| 261 |
+
},
|
| 262 |
+
"node_modules/content-type": {
|
| 263 |
+
"version": "1.0.5",
|
| 264 |
+
"resolved": "https://registry.npmmirror.com/content-type/-/content-type-1.0.5.tgz",
|
| 265 |
+
"integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==",
|
| 266 |
+
"license": "MIT",
|
| 267 |
+
"engines": {
|
| 268 |
+
"node": ">= 0.6"
|
| 269 |
+
}
|
| 270 |
+
},
|
| 271 |
+
"node_modules/cookie": {
|
| 272 |
+
"version": "0.7.1",
|
| 273 |
+
"resolved": "https://registry.npmmirror.com/cookie/-/cookie-0.7.1.tgz",
|
| 274 |
+
"integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==",
|
| 275 |
+
"license": "MIT",
|
| 276 |
+
"engines": {
|
| 277 |
+
"node": ">= 0.6"
|
| 278 |
+
}
|
| 279 |
+
},
|
| 280 |
+
"node_modules/cookie-signature": {
|
| 281 |
+
"version": "1.2.2",
|
| 282 |
+
"resolved": "https://registry.npmmirror.com/cookie-signature/-/cookie-signature-1.2.2.tgz",
|
| 283 |
+
"integrity": "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==",
|
| 284 |
+
"license": "MIT",
|
| 285 |
+
"engines": {
|
| 286 |
+
"node": ">=6.6.0"
|
| 287 |
+
}
|
| 288 |
+
},
|
| 289 |
+
"node_modules/cors": {
|
| 290 |
+
"version": "2.8.5",
|
| 291 |
+
"resolved": "https://registry.npmmirror.com/cors/-/cors-2.8.5.tgz",
|
| 292 |
+
"integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==",
|
| 293 |
+
"license": "MIT",
|
| 294 |
+
"dependencies": {
|
| 295 |
+
"object-assign": "^4",
|
| 296 |
+
"vary": "^1"
|
| 297 |
+
},
|
| 298 |
+
"engines": {
|
| 299 |
+
"node": ">= 0.10"
|
| 300 |
+
}
|
| 301 |
+
},
|
| 302 |
+
"node_modules/debug": {
|
| 303 |
+
"version": "4.3.6",
|
| 304 |
+
"resolved": "https://registry.npmmirror.com/debug/-/debug-4.3.6.tgz",
|
| 305 |
+
"integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==",
|
| 306 |
+
"license": "MIT",
|
| 307 |
+
"dependencies": {
|
| 308 |
+
"ms": "2.1.2"
|
| 309 |
+
},
|
| 310 |
+
"engines": {
|
| 311 |
+
"node": ">=6.0"
|
| 312 |
+
},
|
| 313 |
+
"peerDependenciesMeta": {
|
| 314 |
+
"supports-color": {
|
| 315 |
+
"optional": true
|
| 316 |
+
}
|
| 317 |
+
}
|
| 318 |
+
},
|
| 319 |
+
"node_modules/depd": {
|
| 320 |
+
"version": "2.0.0",
|
| 321 |
+
"resolved": "https://registry.npmmirror.com/depd/-/depd-2.0.0.tgz",
|
| 322 |
+
"integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
|
| 323 |
+
"license": "MIT",
|
| 324 |
+
"engines": {
|
| 325 |
+
"node": ">= 0.8"
|
| 326 |
+
}
|
| 327 |
+
},
|
| 328 |
+
"node_modules/destroy": {
|
| 329 |
+
"version": "1.2.0",
|
| 330 |
+
"resolved": "https://registry.npmmirror.com/destroy/-/destroy-1.2.0.tgz",
|
| 331 |
+
"integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==",
|
| 332 |
+
"license": "MIT",
|
| 333 |
+
"engines": {
|
| 334 |
+
"node": ">= 0.8",
|
| 335 |
+
"npm": "1.2.8000 || >= 1.4.16"
|
| 336 |
+
}
|
| 337 |
+
},
|
| 338 |
+
"node_modules/dunder-proto": {
|
| 339 |
+
"version": "1.0.1",
|
| 340 |
+
"resolved": "https://registry.npmmirror.com/dunder-proto/-/dunder-proto-1.0.1.tgz",
|
| 341 |
+
"integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==",
|
| 342 |
+
"license": "MIT",
|
| 343 |
+
"dependencies": {
|
| 344 |
+
"call-bind-apply-helpers": "^1.0.1",
|
| 345 |
+
"es-errors": "^1.3.0",
|
| 346 |
+
"gopd": "^1.2.0"
|
| 347 |
+
},
|
| 348 |
+
"engines": {
|
| 349 |
+
"node": ">= 0.4"
|
| 350 |
+
}
|
| 351 |
+
},
|
| 352 |
+
"node_modules/ee-first": {
|
| 353 |
+
"version": "1.1.1",
|
| 354 |
+
"resolved": "https://registry.npmmirror.com/ee-first/-/ee-first-1.1.1.tgz",
|
| 355 |
+
"integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==",
|
| 356 |
+
"license": "MIT"
|
| 357 |
+
},
|
| 358 |
+
"node_modules/emoji-regex": {
|
| 359 |
+
"version": "8.0.0",
|
| 360 |
+
"resolved": "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-8.0.0.tgz",
|
| 361 |
+
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
|
| 362 |
+
"license": "MIT"
|
| 363 |
+
},
|
| 364 |
+
"node_modules/encodeurl": {
|
| 365 |
+
"version": "2.0.0",
|
| 366 |
+
"resolved": "https://registry.npmmirror.com/encodeurl/-/encodeurl-2.0.0.tgz",
|
| 367 |
+
"integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==",
|
| 368 |
+
"license": "MIT",
|
| 369 |
+
"engines": {
|
| 370 |
+
"node": ">= 0.8"
|
| 371 |
+
}
|
| 372 |
+
},
|
| 373 |
+
"node_modules/es-define-property": {
|
| 374 |
+
"version": "1.0.1",
|
| 375 |
+
"resolved": "https://registry.npmmirror.com/es-define-property/-/es-define-property-1.0.1.tgz",
|
| 376 |
+
"integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==",
|
| 377 |
+
"license": "MIT",
|
| 378 |
+
"engines": {
|
| 379 |
+
"node": ">= 0.4"
|
| 380 |
+
}
|
| 381 |
+
},
|
| 382 |
+
"node_modules/es-errors": {
|
| 383 |
+
"version": "1.3.0",
|
| 384 |
+
"resolved": "https://registry.npmmirror.com/es-errors/-/es-errors-1.3.0.tgz",
|
| 385 |
+
"integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
|
| 386 |
+
"license": "MIT",
|
| 387 |
+
"engines": {
|
| 388 |
+
"node": ">= 0.4"
|
| 389 |
+
}
|
| 390 |
+
},
|
| 391 |
+
"node_modules/es-object-atoms": {
|
| 392 |
+
"version": "1.1.1",
|
| 393 |
+
"resolved": "https://registry.npmmirror.com/es-object-atoms/-/es-object-atoms-1.1.1.tgz",
|
| 394 |
+
"integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==",
|
| 395 |
+
"license": "MIT",
|
| 396 |
+
"dependencies": {
|
| 397 |
+
"es-errors": "^1.3.0"
|
| 398 |
+
},
|
| 399 |
+
"engines": {
|
| 400 |
+
"node": ">= 0.4"
|
| 401 |
+
}
|
| 402 |
+
},
|
| 403 |
+
"node_modules/escalade": {
|
| 404 |
+
"version": "3.2.0",
|
| 405 |
+
"resolved": "https://registry.npmmirror.com/escalade/-/escalade-3.2.0.tgz",
|
| 406 |
+
"integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==",
|
| 407 |
+
"license": "MIT",
|
| 408 |
+
"engines": {
|
| 409 |
+
"node": ">=6"
|
| 410 |
+
}
|
| 411 |
+
},
|
| 412 |
+
"node_modules/escape-html": {
|
| 413 |
+
"version": "1.0.3",
|
| 414 |
+
"resolved": "https://registry.npmmirror.com/escape-html/-/escape-html-1.0.3.tgz",
|
| 415 |
+
"integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==",
|
| 416 |
+
"license": "MIT"
|
| 417 |
+
},
|
| 418 |
+
"node_modules/etag": {
|
| 419 |
+
"version": "1.8.1",
|
| 420 |
+
"resolved": "https://registry.npmmirror.com/etag/-/etag-1.8.1.tgz",
|
| 421 |
+
"integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==",
|
| 422 |
+
"license": "MIT",
|
| 423 |
+
"engines": {
|
| 424 |
+
"node": ">= 0.6"
|
| 425 |
+
}
|
| 426 |
+
},
|
| 427 |
+
"node_modules/eventsource": {
|
| 428 |
+
"version": "3.0.5",
|
| 429 |
+
"resolved": "https://registry.npmmirror.com/eventsource/-/eventsource-3.0.5.tgz",
|
| 430 |
+
"integrity": "sha512-LT/5J605bx5SNyE+ITBDiM3FxffBiq9un7Vx0EwMDM3vg8sWKx/tO2zC+LMqZ+smAM0F2hblaDZUVZF0te2pSw==",
|
| 431 |
+
"license": "MIT",
|
| 432 |
+
"dependencies": {
|
| 433 |
+
"eventsource-parser": "^3.0.0"
|
| 434 |
+
},
|
| 435 |
+
"engines": {
|
| 436 |
+
"node": ">=18.0.0"
|
| 437 |
+
}
|
| 438 |
+
},
|
| 439 |
+
"node_modules/eventsource-parser": {
|
| 440 |
+
"version": "3.0.0",
|
| 441 |
+
"resolved": "https://registry.npmmirror.com/eventsource-parser/-/eventsource-parser-3.0.0.tgz",
|
| 442 |
+
"integrity": "sha512-T1C0XCUimhxVQzW4zFipdx0SficT651NnkR0ZSH3yQwh+mFMdLfgjABVi4YtMTtaL4s168593DaoaRLMqryavA==",
|
| 443 |
+
"license": "MIT",
|
| 444 |
+
"engines": {
|
| 445 |
+
"node": ">=18.0.0"
|
| 446 |
+
}
|
| 447 |
+
},
|
| 448 |
+
"node_modules/express": {
|
| 449 |
+
"version": "5.0.1",
|
| 450 |
+
"resolved": "https://registry.npmmirror.com/express/-/express-5.0.1.tgz",
|
| 451 |
+
"integrity": "sha512-ORF7g6qGnD+YtUG9yx4DFoqCShNMmUKiXuT5oWMHiOvt/4WFbHC6yCwQMTSBMno7AqntNCAzzcnnjowRkTL9eQ==",
|
| 452 |
+
"license": "MIT",
|
| 453 |
+
"dependencies": {
|
| 454 |
+
"accepts": "^2.0.0",
|
| 455 |
+
"body-parser": "^2.0.1",
|
| 456 |
+
"content-disposition": "^1.0.0",
|
| 457 |
+
"content-type": "~1.0.4",
|
| 458 |
+
"cookie": "0.7.1",
|
| 459 |
+
"cookie-signature": "^1.2.1",
|
| 460 |
+
"debug": "4.3.6",
|
| 461 |
+
"depd": "2.0.0",
|
| 462 |
+
"encodeurl": "~2.0.0",
|
| 463 |
+
"escape-html": "~1.0.3",
|
| 464 |
+
"etag": "~1.8.1",
|
| 465 |
+
"finalhandler": "^2.0.0",
|
| 466 |
+
"fresh": "2.0.0",
|
| 467 |
+
"http-errors": "2.0.0",
|
| 468 |
+
"merge-descriptors": "^2.0.0",
|
| 469 |
+
"methods": "~1.1.2",
|
| 470 |
+
"mime-types": "^3.0.0",
|
| 471 |
+
"on-finished": "2.4.1",
|
| 472 |
+
"once": "1.4.0",
|
| 473 |
+
"parseurl": "~1.3.3",
|
| 474 |
+
"proxy-addr": "~2.0.7",
|
| 475 |
+
"qs": "6.13.0",
|
| 476 |
+
"range-parser": "~1.2.1",
|
| 477 |
+
"router": "^2.0.0",
|
| 478 |
+
"safe-buffer": "5.2.1",
|
| 479 |
+
"send": "^1.1.0",
|
| 480 |
+
"serve-static": "^2.1.0",
|
| 481 |
+
"setprototypeof": "1.2.0",
|
| 482 |
+
"statuses": "2.0.1",
|
| 483 |
+
"type-is": "^2.0.0",
|
| 484 |
+
"utils-merge": "1.0.1",
|
| 485 |
+
"vary": "~1.1.2"
|
| 486 |
+
},
|
| 487 |
+
"engines": {
|
| 488 |
+
"node": ">= 18"
|
| 489 |
+
}
|
| 490 |
+
},
|
| 491 |
+
"node_modules/express-rate-limit": {
|
| 492 |
+
"version": "7.5.0",
|
| 493 |
+
"resolved": "https://registry.npmmirror.com/express-rate-limit/-/express-rate-limit-7.5.0.tgz",
|
| 494 |
+
"integrity": "sha512-eB5zbQh5h+VenMPM3fh+nw1YExi5nMr6HUCR62ELSP11huvxm/Uir1H1QEyTkk5QX6A58pX6NmaTMceKZ0Eodg==",
|
| 495 |
+
"license": "MIT",
|
| 496 |
+
"engines": {
|
| 497 |
+
"node": ">= 16"
|
| 498 |
+
},
|
| 499 |
+
"funding": {
|
| 500 |
+
"url": "https://github.com/sponsors/express-rate-limit"
|
| 501 |
+
},
|
| 502 |
+
"peerDependencies": {
|
| 503 |
+
"express": "^4.11 || 5 || ^5.0.0-beta.1"
|
| 504 |
+
}
|
| 505 |
+
},
|
| 506 |
+
"node_modules/finalhandler": {
|
| 507 |
+
"version": "2.1.0",
|
| 508 |
+
"resolved": "https://registry.npmmirror.com/finalhandler/-/finalhandler-2.1.0.tgz",
|
| 509 |
+
"integrity": "sha512-/t88Ty3d5JWQbWYgaOGCCYfXRwV1+be02WqYYlL6h0lEiUAMPM8o8qKGO01YIkOHzka2up08wvgYD0mDiI+q3Q==",
|
| 510 |
+
"license": "MIT",
|
| 511 |
+
"dependencies": {
|
| 512 |
+
"debug": "^4.4.0",
|
| 513 |
+
"encodeurl": "^2.0.0",
|
| 514 |
+
"escape-html": "^1.0.3",
|
| 515 |
+
"on-finished": "^2.4.1",
|
| 516 |
+
"parseurl": "^1.3.3",
|
| 517 |
+
"statuses": "^2.0.1"
|
| 518 |
+
},
|
| 519 |
+
"engines": {
|
| 520 |
+
"node": ">= 0.8"
|
| 521 |
+
}
|
| 522 |
+
},
|
| 523 |
+
"node_modules/finalhandler/node_modules/debug": {
|
| 524 |
+
"version": "4.4.0",
|
| 525 |
+
"resolved": "https://registry.npmmirror.com/debug/-/debug-4.4.0.tgz",
|
| 526 |
+
"integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==",
|
| 527 |
+
"license": "MIT",
|
| 528 |
+
"dependencies": {
|
| 529 |
+
"ms": "^2.1.3"
|
| 530 |
+
},
|
| 531 |
+
"engines": {
|
| 532 |
+
"node": ">=6.0"
|
| 533 |
+
},
|
| 534 |
+
"peerDependenciesMeta": {
|
| 535 |
+
"supports-color": {
|
| 536 |
+
"optional": true
|
| 537 |
+
}
|
| 538 |
+
}
|
| 539 |
+
},
|
| 540 |
+
"node_modules/finalhandler/node_modules/ms": {
|
| 541 |
+
"version": "2.1.3",
|
| 542 |
+
"resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz",
|
| 543 |
+
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
|
| 544 |
+
"license": "MIT"
|
| 545 |
+
},
|
| 546 |
+
"node_modules/forwarded": {
|
| 547 |
+
"version": "0.2.0",
|
| 548 |
+
"resolved": "https://registry.npmmirror.com/forwarded/-/forwarded-0.2.0.tgz",
|
| 549 |
+
"integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
|
| 550 |
+
"license": "MIT",
|
| 551 |
+
"engines": {
|
| 552 |
+
"node": ">= 0.6"
|
| 553 |
+
}
|
| 554 |
+
},
|
| 555 |
+
"node_modules/fresh": {
|
| 556 |
+
"version": "2.0.0",
|
| 557 |
+
"resolved": "https://registry.npmmirror.com/fresh/-/fresh-2.0.0.tgz",
|
| 558 |
+
"integrity": "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==",
|
| 559 |
+
"license": "MIT",
|
| 560 |
+
"engines": {
|
| 561 |
+
"node": ">= 0.8"
|
| 562 |
+
}
|
| 563 |
+
},
|
| 564 |
+
"node_modules/fs.realpath": {
|
| 565 |
+
"version": "1.0.0",
|
| 566 |
+
"resolved": "https://registry.npmmirror.com/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
| 567 |
+
"integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",
|
| 568 |
+
"license": "ISC"
|
| 569 |
+
},
|
| 570 |
+
"node_modules/function-bind": {
|
| 571 |
+
"version": "1.1.2",
|
| 572 |
+
"resolved": "https://registry.npmmirror.com/function-bind/-/function-bind-1.1.2.tgz",
|
| 573 |
+
"integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
|
| 574 |
+
"license": "MIT",
|
| 575 |
+
"funding": {
|
| 576 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 577 |
+
}
|
| 578 |
+
},
|
| 579 |
+
"node_modules/get-caller-file": {
|
| 580 |
+
"version": "2.0.5",
|
| 581 |
+
"resolved": "https://registry.npmmirror.com/get-caller-file/-/get-caller-file-2.0.5.tgz",
|
| 582 |
+
"integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
|
| 583 |
+
"license": "ISC",
|
| 584 |
+
"engines": {
|
| 585 |
+
"node": "6.* || 8.* || >= 10.*"
|
| 586 |
+
}
|
| 587 |
+
},
|
| 588 |
+
"node_modules/get-intrinsic": {
|
| 589 |
+
"version": "1.3.0",
|
| 590 |
+
"resolved": "https://registry.npmmirror.com/get-intrinsic/-/get-intrinsic-1.3.0.tgz",
|
| 591 |
+
"integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==",
|
| 592 |
+
"license": "MIT",
|
| 593 |
+
"dependencies": {
|
| 594 |
+
"call-bind-apply-helpers": "^1.0.2",
|
| 595 |
+
"es-define-property": "^1.0.1",
|
| 596 |
+
"es-errors": "^1.3.0",
|
| 597 |
+
"es-object-atoms": "^1.1.1",
|
| 598 |
+
"function-bind": "^1.1.2",
|
| 599 |
+
"get-proto": "^1.0.1",
|
| 600 |
+
"gopd": "^1.2.0",
|
| 601 |
+
"has-symbols": "^1.1.0",
|
| 602 |
+
"hasown": "^2.0.2",
|
| 603 |
+
"math-intrinsics": "^1.1.0"
|
| 604 |
+
},
|
| 605 |
+
"engines": {
|
| 606 |
+
"node": ">= 0.4"
|
| 607 |
+
},
|
| 608 |
+
"funding": {
|
| 609 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 610 |
+
}
|
| 611 |
+
},
|
| 612 |
+
"node_modules/get-proto": {
|
| 613 |
+
"version": "1.0.1",
|
| 614 |
+
"resolved": "https://registry.npmmirror.com/get-proto/-/get-proto-1.0.1.tgz",
|
| 615 |
+
"integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==",
|
| 616 |
+
"license": "MIT",
|
| 617 |
+
"dependencies": {
|
| 618 |
+
"dunder-proto": "^1.0.1",
|
| 619 |
+
"es-object-atoms": "^1.0.0"
|
| 620 |
+
},
|
| 621 |
+
"engines": {
|
| 622 |
+
"node": ">= 0.4"
|
| 623 |
+
}
|
| 624 |
+
},
|
| 625 |
+
"node_modules/glob": {
|
| 626 |
+
"version": "7.2.3",
|
| 627 |
+
"resolved": "https://registry.npmmirror.com/glob/-/glob-7.2.3.tgz",
|
| 628 |
+
"integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
|
| 629 |
+
"license": "ISC",
|
| 630 |
+
"dependencies": {
|
| 631 |
+
"fs.realpath": "^1.0.0",
|
| 632 |
+
"inflight": "^1.0.4",
|
| 633 |
+
"inherits": "2",
|
| 634 |
+
"minimatch": "^3.1.1",
|
| 635 |
+
"once": "^1.3.0",
|
| 636 |
+
"path-is-absolute": "^1.0.0"
|
| 637 |
+
},
|
| 638 |
+
"engines": {
|
| 639 |
+
"node": "*"
|
| 640 |
+
},
|
| 641 |
+
"funding": {
|
| 642 |
+
"url": "https://github.com/sponsors/isaacs"
|
| 643 |
+
}
|
| 644 |
+
},
|
| 645 |
+
"node_modules/gopd": {
|
| 646 |
+
"version": "1.2.0",
|
| 647 |
+
"resolved": "https://registry.npmmirror.com/gopd/-/gopd-1.2.0.tgz",
|
| 648 |
+
"integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==",
|
| 649 |
+
"license": "MIT",
|
| 650 |
+
"engines": {
|
| 651 |
+
"node": ">= 0.4"
|
| 652 |
+
},
|
| 653 |
+
"funding": {
|
| 654 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 655 |
+
}
|
| 656 |
+
},
|
| 657 |
+
"node_modules/has-flag": {
|
| 658 |
+
"version": "4.0.0",
|
| 659 |
+
"resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz",
|
| 660 |
+
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
|
| 661 |
+
"license": "MIT",
|
| 662 |
+
"engines": {
|
| 663 |
+
"node": ">=8"
|
| 664 |
+
}
|
| 665 |
+
},
|
| 666 |
+
"node_modules/has-symbols": {
|
| 667 |
+
"version": "1.1.0",
|
| 668 |
+
"resolved": "https://registry.npmmirror.com/has-symbols/-/has-symbols-1.1.0.tgz",
|
| 669 |
+
"integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==",
|
| 670 |
+
"license": "MIT",
|
| 671 |
+
"engines": {
|
| 672 |
+
"node": ">= 0.4"
|
| 673 |
+
},
|
| 674 |
+
"funding": {
|
| 675 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 676 |
+
}
|
| 677 |
+
},
|
| 678 |
+
"node_modules/hasown": {
|
| 679 |
+
"version": "2.0.2",
|
| 680 |
+
"resolved": "https://registry.npmmirror.com/hasown/-/hasown-2.0.2.tgz",
|
| 681 |
+
"integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
|
| 682 |
+
"license": "MIT",
|
| 683 |
+
"dependencies": {
|
| 684 |
+
"function-bind": "^1.1.2"
|
| 685 |
+
},
|
| 686 |
+
"engines": {
|
| 687 |
+
"node": ">= 0.4"
|
| 688 |
+
}
|
| 689 |
+
},
|
| 690 |
+
"node_modules/http-errors": {
|
| 691 |
+
"version": "2.0.0",
|
| 692 |
+
"resolved": "https://registry.npmmirror.com/http-errors/-/http-errors-2.0.0.tgz",
|
| 693 |
+
"integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==",
|
| 694 |
+
"license": "MIT",
|
| 695 |
+
"dependencies": {
|
| 696 |
+
"depd": "2.0.0",
|
| 697 |
+
"inherits": "2.0.4",
|
| 698 |
+
"setprototypeof": "1.2.0",
|
| 699 |
+
"statuses": "2.0.1",
|
| 700 |
+
"toidentifier": "1.0.1"
|
| 701 |
+
},
|
| 702 |
+
"engines": {
|
| 703 |
+
"node": ">= 0.8"
|
| 704 |
+
}
|
| 705 |
+
},
|
| 706 |
+
"node_modules/iconv-lite": {
|
| 707 |
+
"version": "0.5.2",
|
| 708 |
+
"resolved": "https://registry.npmmirror.com/iconv-lite/-/iconv-lite-0.5.2.tgz",
|
| 709 |
+
"integrity": "sha512-kERHXvpSaB4aU3eANwidg79K8FlrN77m8G9V+0vOR3HYaRifrlwMEpT7ZBJqLSEIHnEgJTHcWK82wwLwwKwtag==",
|
| 710 |
+
"license": "MIT",
|
| 711 |
+
"dependencies": {
|
| 712 |
+
"safer-buffer": ">= 2.1.2 < 3"
|
| 713 |
+
},
|
| 714 |
+
"engines": {
|
| 715 |
+
"node": ">=0.10.0"
|
| 716 |
+
}
|
| 717 |
+
},
|
| 718 |
+
"node_modules/indicatorts": {
|
| 719 |
+
"version": "2.2.2",
|
| 720 |
+
"resolved": "https://registry.npmmirror.com/indicatorts/-/indicatorts-2.2.2.tgz",
|
| 721 |
+
"integrity": "sha512-oJRe83n2zj826Mlp2RKQVfurqbq5dEHzAWgZidiYkS0mrx3GCbXlNj59YtwZvekRmNwi/d4NdeHGHd8Nspl6Xg==",
|
| 722 |
+
"license": "MIT"
|
| 723 |
+
},
|
| 724 |
+
"node_modules/inflight": {
|
| 725 |
+
"version": "1.0.6",
|
| 726 |
+
"resolved": "https://registry.npmmirror.com/inflight/-/inflight-1.0.6.tgz",
|
| 727 |
+
"integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
|
| 728 |
+
"license": "ISC",
|
| 729 |
+
"dependencies": {
|
| 730 |
+
"once": "^1.3.0",
|
| 731 |
+
"wrappy": "1"
|
| 732 |
+
}
|
| 733 |
+
},
|
| 734 |
+
"node_modules/inherits": {
|
| 735 |
+
"version": "2.0.4",
|
| 736 |
+
"resolved": "https://registry.npmmirror.com/inherits/-/inherits-2.0.4.tgz",
|
| 737 |
+
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
|
| 738 |
+
"license": "ISC"
|
| 739 |
+
},
|
| 740 |
+
"node_modules/ipaddr.js": {
|
| 741 |
+
"version": "1.9.1",
|
| 742 |
+
"resolved": "https://registry.npmmirror.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
|
| 743 |
+
"integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",
|
| 744 |
+
"license": "MIT",
|
| 745 |
+
"engines": {
|
| 746 |
+
"node": ">= 0.10"
|
| 747 |
+
}
|
| 748 |
+
},
|
| 749 |
+
"node_modules/is-fullwidth-code-point": {
|
| 750 |
+
"version": "3.0.0",
|
| 751 |
+
"resolved": "https://registry.npmmirror.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
|
| 752 |
+
"integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
|
| 753 |
+
"license": "MIT",
|
| 754 |
+
"engines": {
|
| 755 |
+
"node": ">=8"
|
| 756 |
+
}
|
| 757 |
+
},
|
| 758 |
+
"node_modules/is-promise": {
|
| 759 |
+
"version": "4.0.0",
|
| 760 |
+
"resolved": "https://registry.npmmirror.com/is-promise/-/is-promise-4.0.0.tgz",
|
| 761 |
+
"integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==",
|
| 762 |
+
"license": "MIT"
|
| 763 |
+
},
|
| 764 |
+
"node_modules/math-intrinsics": {
|
| 765 |
+
"version": "1.1.0",
|
| 766 |
+
"resolved": "https://registry.npmmirror.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
|
| 767 |
+
"integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==",
|
| 768 |
+
"license": "MIT",
|
| 769 |
+
"engines": {
|
| 770 |
+
"node": ">= 0.4"
|
| 771 |
+
}
|
| 772 |
+
},
|
| 773 |
+
"node_modules/media-typer": {
|
| 774 |
+
"version": "1.1.0",
|
| 775 |
+
"resolved": "https://registry.npmmirror.com/media-typer/-/media-typer-1.1.0.tgz",
|
| 776 |
+
"integrity": "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==",
|
| 777 |
+
"license": "MIT",
|
| 778 |
+
"engines": {
|
| 779 |
+
"node": ">= 0.8"
|
| 780 |
+
}
|
| 781 |
+
},
|
| 782 |
+
"node_modules/merge-descriptors": {
|
| 783 |
+
"version": "2.0.0",
|
| 784 |
+
"resolved": "https://registry.npmmirror.com/merge-descriptors/-/merge-descriptors-2.0.0.tgz",
|
| 785 |
+
"integrity": "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==",
|
| 786 |
+
"license": "MIT",
|
| 787 |
+
"engines": {
|
| 788 |
+
"node": ">=18"
|
| 789 |
+
},
|
| 790 |
+
"funding": {
|
| 791 |
+
"url": "https://github.com/sponsors/sindresorhus"
|
| 792 |
+
}
|
| 793 |
+
},
|
| 794 |
+
"node_modules/methods": {
|
| 795 |
+
"version": "1.1.2",
|
| 796 |
+
"resolved": "https://registry.npmmirror.com/methods/-/methods-1.1.2.tgz",
|
| 797 |
+
"integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==",
|
| 798 |
+
"license": "MIT",
|
| 799 |
+
"engines": {
|
| 800 |
+
"node": ">= 0.6"
|
| 801 |
+
}
|
| 802 |
+
},
|
| 803 |
+
"node_modules/mime-db": {
|
| 804 |
+
"version": "1.54.0",
|
| 805 |
+
"resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.54.0.tgz",
|
| 806 |
+
"integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==",
|
| 807 |
+
"license": "MIT",
|
| 808 |
+
"engines": {
|
| 809 |
+
"node": ">= 0.6"
|
| 810 |
+
}
|
| 811 |
+
},
|
| 812 |
+
"node_modules/mime-types": {
|
| 813 |
+
"version": "3.0.0",
|
| 814 |
+
"resolved": "https://registry.npmmirror.com/mime-types/-/mime-types-3.0.0.tgz",
|
| 815 |
+
"integrity": "sha512-XqoSHeCGjVClAmoGFG3lVFqQFRIrTVw2OH3axRqAcfaw+gHWIfnASS92AV+Rl/mk0MupgZTRHQOjxY6YVnzK5w==",
|
| 816 |
+
"license": "MIT",
|
| 817 |
+
"dependencies": {
|
| 818 |
+
"mime-db": "^1.53.0"
|
| 819 |
+
},
|
| 820 |
+
"engines": {
|
| 821 |
+
"node": ">= 0.6"
|
| 822 |
+
}
|
| 823 |
+
},
|
| 824 |
+
"node_modules/minimatch": {
|
| 825 |
+
"version": "3.1.2",
|
| 826 |
+
"resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-3.1.2.tgz",
|
| 827 |
+
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
|
| 828 |
+
"license": "ISC",
|
| 829 |
+
"dependencies": {
|
| 830 |
+
"brace-expansion": "^1.1.7"
|
| 831 |
+
},
|
| 832 |
+
"engines": {
|
| 833 |
+
"node": "*"
|
| 834 |
+
}
|
| 835 |
+
},
|
| 836 |
+
"node_modules/ms": {
|
| 837 |
+
"version": "2.1.2",
|
| 838 |
+
"resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.2.tgz",
|
| 839 |
+
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
|
| 840 |
+
"license": "MIT"
|
| 841 |
+
},
|
| 842 |
+
"node_modules/negotiator": {
|
| 843 |
+
"version": "1.0.0",
|
| 844 |
+
"resolved": "https://registry.npmmirror.com/negotiator/-/negotiator-1.0.0.tgz",
|
| 845 |
+
"integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==",
|
| 846 |
+
"license": "MIT",
|
| 847 |
+
"engines": {
|
| 848 |
+
"node": ">= 0.6"
|
| 849 |
+
}
|
| 850 |
+
},
|
| 851 |
+
"node_modules/object-assign": {
|
| 852 |
+
"version": "4.1.1",
|
| 853 |
+
"resolved": "https://registry.npmmirror.com/object-assign/-/object-assign-4.1.1.tgz",
|
| 854 |
+
"integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",
|
| 855 |
+
"license": "MIT",
|
| 856 |
+
"engines": {
|
| 857 |
+
"node": ">=0.10.0"
|
| 858 |
+
}
|
| 859 |
+
},
|
| 860 |
+
"node_modules/object-inspect": {
|
| 861 |
+
"version": "1.13.4",
|
| 862 |
+
"resolved": "https://registry.npmmirror.com/object-inspect/-/object-inspect-1.13.4.tgz",
|
| 863 |
+
"integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==",
|
| 864 |
+
"license": "MIT",
|
| 865 |
+
"engines": {
|
| 866 |
+
"node": ">= 0.4"
|
| 867 |
+
},
|
| 868 |
+
"funding": {
|
| 869 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 870 |
+
}
|
| 871 |
+
},
|
| 872 |
+
"node_modules/on-finished": {
|
| 873 |
+
"version": "2.4.1",
|
| 874 |
+
"resolved": "https://registry.npmmirror.com/on-finished/-/on-finished-2.4.1.tgz",
|
| 875 |
+
"integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
|
| 876 |
+
"license": "MIT",
|
| 877 |
+
"dependencies": {
|
| 878 |
+
"ee-first": "1.1.1"
|
| 879 |
+
},
|
| 880 |
+
"engines": {
|
| 881 |
+
"node": ">= 0.8"
|
| 882 |
+
}
|
| 883 |
+
},
|
| 884 |
+
"node_modules/once": {
|
| 885 |
+
"version": "1.4.0",
|
| 886 |
+
"resolved": "https://registry.npmmirror.com/once/-/once-1.4.0.tgz",
|
| 887 |
+
"integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
|
| 888 |
+
"license": "ISC",
|
| 889 |
+
"dependencies": {
|
| 890 |
+
"wrappy": "1"
|
| 891 |
+
}
|
| 892 |
+
},
|
| 893 |
+
"node_modules/parseurl": {
|
| 894 |
+
"version": "1.3.3",
|
| 895 |
+
"resolved": "https://registry.npmmirror.com/parseurl/-/parseurl-1.3.3.tgz",
|
| 896 |
+
"integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
|
| 897 |
+
"license": "MIT",
|
| 898 |
+
"engines": {
|
| 899 |
+
"node": ">= 0.8"
|
| 900 |
+
}
|
| 901 |
+
},
|
| 902 |
+
"node_modules/path-is-absolute": {
|
| 903 |
+
"version": "1.0.1",
|
| 904 |
+
"resolved": "https://registry.npmmirror.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
|
| 905 |
+
"integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
|
| 906 |
+
"license": "MIT",
|
| 907 |
+
"engines": {
|
| 908 |
+
"node": ">=0.10.0"
|
| 909 |
+
}
|
| 910 |
+
},
|
| 911 |
+
"node_modules/path-to-regexp": {
|
| 912 |
+
"version": "8.2.0",
|
| 913 |
+
"resolved": "https://registry.npmmirror.com/path-to-regexp/-/path-to-regexp-8.2.0.tgz",
|
| 914 |
+
"integrity": "sha512-TdrF7fW9Rphjq4RjrW0Kp2AW0Ahwu9sRGTkS6bvDi0SCwZlEZYmcfDbEsTz8RVk0EHIS/Vd1bv3JhG+1xZuAyQ==",
|
| 915 |
+
"license": "MIT",
|
| 916 |
+
"engines": {
|
| 917 |
+
"node": ">=16"
|
| 918 |
+
}
|
| 919 |
+
},
|
| 920 |
+
"node_modules/pkce-challenge": {
|
| 921 |
+
"version": "4.1.0",
|
| 922 |
+
"resolved": "https://registry.npmmirror.com/pkce-challenge/-/pkce-challenge-4.1.0.tgz",
|
| 923 |
+
"integrity": "sha512-ZBmhE1C9LcPoH9XZSdwiPtbPHZROwAnMy+kIFQVrnMCxY4Cudlz3gBOpzilgc0jOgRaiT3sIWfpMomW2ar2orQ==",
|
| 924 |
+
"license": "MIT",
|
| 925 |
+
"engines": {
|
| 926 |
+
"node": ">=16.20.0"
|
| 927 |
+
}
|
| 928 |
+
},
|
| 929 |
+
"node_modules/proxy-addr": {
|
| 930 |
+
"version": "2.0.7",
|
| 931 |
+
"resolved": "https://registry.npmmirror.com/proxy-addr/-/proxy-addr-2.0.7.tgz",
|
| 932 |
+
"integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
|
| 933 |
+
"license": "MIT",
|
| 934 |
+
"dependencies": {
|
| 935 |
+
"forwarded": "0.2.0",
|
| 936 |
+
"ipaddr.js": "1.9.1"
|
| 937 |
+
},
|
| 938 |
+
"engines": {
|
| 939 |
+
"node": ">= 0.10"
|
| 940 |
+
}
|
| 941 |
+
},
|
| 942 |
+
"node_modules/qs": {
|
| 943 |
+
"version": "6.13.0",
|
| 944 |
+
"resolved": "https://registry.npmmirror.com/qs/-/qs-6.13.0.tgz",
|
| 945 |
+
"integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==",
|
| 946 |
+
"license": "BSD-3-Clause",
|
| 947 |
+
"dependencies": {
|
| 948 |
+
"side-channel": "^1.0.6"
|
| 949 |
+
},
|
| 950 |
+
"engines": {
|
| 951 |
+
"node": ">=0.6"
|
| 952 |
+
},
|
| 953 |
+
"funding": {
|
| 954 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 955 |
+
}
|
| 956 |
+
},
|
| 957 |
+
"node_modules/range-parser": {
|
| 958 |
+
"version": "1.2.1",
|
| 959 |
+
"resolved": "https://registry.npmmirror.com/range-parser/-/range-parser-1.2.1.tgz",
|
| 960 |
+
"integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
|
| 961 |
+
"license": "MIT",
|
| 962 |
+
"engines": {
|
| 963 |
+
"node": ">= 0.6"
|
| 964 |
+
}
|
| 965 |
+
},
|
| 966 |
+
"node_modules/raw-body": {
|
| 967 |
+
"version": "3.0.0",
|
| 968 |
+
"resolved": "https://registry.npmmirror.com/raw-body/-/raw-body-3.0.0.tgz",
|
| 969 |
+
"integrity": "sha512-RmkhL8CAyCRPXCE28MMH0z2PNWQBNk2Q09ZdxM9IOOXwxwZbN+qbWaatPkdkWIKL2ZVDImrN/pK5HTRz2PcS4g==",
|
| 970 |
+
"license": "MIT",
|
| 971 |
+
"dependencies": {
|
| 972 |
+
"bytes": "3.1.2",
|
| 973 |
+
"http-errors": "2.0.0",
|
| 974 |
+
"iconv-lite": "0.6.3",
|
| 975 |
+
"unpipe": "1.0.0"
|
| 976 |
+
},
|
| 977 |
+
"engines": {
|
| 978 |
+
"node": ">= 0.8"
|
| 979 |
+
}
|
| 980 |
+
},
|
| 981 |
+
"node_modules/raw-body/node_modules/iconv-lite": {
|
| 982 |
+
"version": "0.6.3",
|
| 983 |
+
"resolved": "https://registry.npmmirror.com/iconv-lite/-/iconv-lite-0.6.3.tgz",
|
| 984 |
+
"integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
|
| 985 |
+
"license": "MIT",
|
| 986 |
+
"dependencies": {
|
| 987 |
+
"safer-buffer": ">= 2.1.2 < 3.0.0"
|
| 988 |
+
},
|
| 989 |
+
"engines": {
|
| 990 |
+
"node": ">=0.10.0"
|
| 991 |
+
}
|
| 992 |
+
},
|
| 993 |
+
"node_modules/replace-in-file": {
|
| 994 |
+
"version": "6.3.5",
|
| 995 |
+
"resolved": "https://registry.npmmirror.com/replace-in-file/-/replace-in-file-6.3.5.tgz",
|
| 996 |
+
"integrity": "sha512-arB9d3ENdKva2fxRnSjwBEXfK1npgyci7ZZuwysgAp7ORjHSyxz6oqIjTEv8R0Ydl4Ll7uOAZXL4vbkhGIizCg==",
|
| 997 |
+
"license": "MIT",
|
| 998 |
+
"dependencies": {
|
| 999 |
+
"chalk": "^4.1.2",
|
| 1000 |
+
"glob": "^7.2.0",
|
| 1001 |
+
"yargs": "^17.2.1"
|
| 1002 |
+
},
|
| 1003 |
+
"bin": {
|
| 1004 |
+
"replace-in-file": "bin/cli.js"
|
| 1005 |
+
},
|
| 1006 |
+
"engines": {
|
| 1007 |
+
"node": ">=10"
|
| 1008 |
+
}
|
| 1009 |
+
},
|
| 1010 |
+
"node_modules/require-directory": {
|
| 1011 |
+
"version": "2.1.1",
|
| 1012 |
+
"resolved": "https://registry.npmmirror.com/require-directory/-/require-directory-2.1.1.tgz",
|
| 1013 |
+
"integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==",
|
| 1014 |
+
"license": "MIT",
|
| 1015 |
+
"engines": {
|
| 1016 |
+
"node": ">=0.10.0"
|
| 1017 |
+
}
|
| 1018 |
+
},
|
| 1019 |
+
"node_modules/router": {
|
| 1020 |
+
"version": "2.1.0",
|
| 1021 |
+
"resolved": "https://registry.npmmirror.com/router/-/router-2.1.0.tgz",
|
| 1022 |
+
"integrity": "sha512-/m/NSLxeYEgWNtyC+WtNHCF7jbGxOibVWKnn+1Psff4dJGOfoXP+MuC/f2CwSmyiHdOIzYnYFp4W6GxWfekaLA==",
|
| 1023 |
+
"license": "MIT",
|
| 1024 |
+
"dependencies": {
|
| 1025 |
+
"is-promise": "^4.0.0",
|
| 1026 |
+
"parseurl": "^1.3.3",
|
| 1027 |
+
"path-to-regexp": "^8.0.0"
|
| 1028 |
+
},
|
| 1029 |
+
"engines": {
|
| 1030 |
+
"node": ">= 18"
|
| 1031 |
+
}
|
| 1032 |
+
},
|
| 1033 |
+
"node_modules/safe-buffer": {
|
| 1034 |
+
"version": "5.2.1",
|
| 1035 |
+
"resolved": "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.2.1.tgz",
|
| 1036 |
+
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
|
| 1037 |
+
"funding": [
|
| 1038 |
+
{
|
| 1039 |
+
"type": "github",
|
| 1040 |
+
"url": "https://github.com/sponsors/feross"
|
| 1041 |
+
},
|
| 1042 |
+
{
|
| 1043 |
+
"type": "patreon",
|
| 1044 |
+
"url": "https://www.patreon.com/feross"
|
| 1045 |
+
},
|
| 1046 |
+
{
|
| 1047 |
+
"type": "consulting",
|
| 1048 |
+
"url": "https://feross.org/support"
|
| 1049 |
+
}
|
| 1050 |
+
],
|
| 1051 |
+
"license": "MIT"
|
| 1052 |
+
},
|
| 1053 |
+
"node_modules/safer-buffer": {
|
| 1054 |
+
"version": "2.1.2",
|
| 1055 |
+
"resolved": "https://registry.npmmirror.com/safer-buffer/-/safer-buffer-2.1.2.tgz",
|
| 1056 |
+
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
|
| 1057 |
+
"license": "MIT"
|
| 1058 |
+
},
|
| 1059 |
+
"node_modules/send": {
|
| 1060 |
+
"version": "1.1.0",
|
| 1061 |
+
"resolved": "https://registry.npmmirror.com/send/-/send-1.1.0.tgz",
|
| 1062 |
+
"integrity": "sha512-v67WcEouB5GxbTWL/4NeToqcZiAWEq90N888fczVArY8A79J0L4FD7vj5hm3eUMua5EpoQ59wa/oovY6TLvRUA==",
|
| 1063 |
+
"license": "MIT",
|
| 1064 |
+
"dependencies": {
|
| 1065 |
+
"debug": "^4.3.5",
|
| 1066 |
+
"destroy": "^1.2.0",
|
| 1067 |
+
"encodeurl": "^2.0.0",
|
| 1068 |
+
"escape-html": "^1.0.3",
|
| 1069 |
+
"etag": "^1.8.1",
|
| 1070 |
+
"fresh": "^0.5.2",
|
| 1071 |
+
"http-errors": "^2.0.0",
|
| 1072 |
+
"mime-types": "^2.1.35",
|
| 1073 |
+
"ms": "^2.1.3",
|
| 1074 |
+
"on-finished": "^2.4.1",
|
| 1075 |
+
"range-parser": "^1.2.1",
|
| 1076 |
+
"statuses": "^2.0.1"
|
| 1077 |
+
},
|
| 1078 |
+
"engines": {
|
| 1079 |
+
"node": ">= 18"
|
| 1080 |
+
}
|
| 1081 |
+
},
|
| 1082 |
+
"node_modules/send/node_modules/fresh": {
|
| 1083 |
+
"version": "0.5.2",
|
| 1084 |
+
"resolved": "https://registry.npmmirror.com/fresh/-/fresh-0.5.2.tgz",
|
| 1085 |
+
"integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==",
|
| 1086 |
+
"license": "MIT",
|
| 1087 |
+
"engines": {
|
| 1088 |
+
"node": ">= 0.6"
|
| 1089 |
+
}
|
| 1090 |
+
},
|
| 1091 |
+
"node_modules/send/node_modules/mime-db": {
|
| 1092 |
+
"version": "1.52.0",
|
| 1093 |
+
"resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz",
|
| 1094 |
+
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
|
| 1095 |
+
"license": "MIT",
|
| 1096 |
+
"engines": {
|
| 1097 |
+
"node": ">= 0.6"
|
| 1098 |
+
}
|
| 1099 |
+
},
|
| 1100 |
+
"node_modules/send/node_modules/mime-types": {
|
| 1101 |
+
"version": "2.1.35",
|
| 1102 |
+
"resolved": "https://registry.npmmirror.com/mime-types/-/mime-types-2.1.35.tgz",
|
| 1103 |
+
"integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
|
| 1104 |
+
"license": "MIT",
|
| 1105 |
+
"dependencies": {
|
| 1106 |
+
"mime-db": "1.52.0"
|
| 1107 |
+
},
|
| 1108 |
+
"engines": {
|
| 1109 |
+
"node": ">= 0.6"
|
| 1110 |
+
}
|
| 1111 |
+
},
|
| 1112 |
+
"node_modules/send/node_modules/ms": {
|
| 1113 |
+
"version": "2.1.3",
|
| 1114 |
+
"resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz",
|
| 1115 |
+
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
|
| 1116 |
+
"license": "MIT"
|
| 1117 |
+
},
|
| 1118 |
+
"node_modules/serve-static": {
|
| 1119 |
+
"version": "2.1.0",
|
| 1120 |
+
"resolved": "https://registry.npmmirror.com/serve-static/-/serve-static-2.1.0.tgz",
|
| 1121 |
+
"integrity": "sha512-A3We5UfEjG8Z7VkDv6uItWw6HY2bBSBJT1KtVESn6EOoOr2jAxNhxWCLY3jDE2WcuHXByWju74ck3ZgLwL8xmA==",
|
| 1122 |
+
"license": "MIT",
|
| 1123 |
+
"dependencies": {
|
| 1124 |
+
"encodeurl": "^2.0.0",
|
| 1125 |
+
"escape-html": "^1.0.3",
|
| 1126 |
+
"parseurl": "^1.3.3",
|
| 1127 |
+
"send": "^1.0.0"
|
| 1128 |
+
},
|
| 1129 |
+
"engines": {
|
| 1130 |
+
"node": ">= 18"
|
| 1131 |
+
}
|
| 1132 |
+
},
|
| 1133 |
+
"node_modules/setprototypeof": {
|
| 1134 |
+
"version": "1.2.0",
|
| 1135 |
+
"resolved": "https://registry.npmmirror.com/setprototypeof/-/setprototypeof-1.2.0.tgz",
|
| 1136 |
+
"integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==",
|
| 1137 |
+
"license": "ISC"
|
| 1138 |
+
},
|
| 1139 |
+
"node_modules/side-channel": {
|
| 1140 |
+
"version": "1.1.0",
|
| 1141 |
+
"resolved": "https://registry.npmmirror.com/side-channel/-/side-channel-1.1.0.tgz",
|
| 1142 |
+
"integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==",
|
| 1143 |
+
"license": "MIT",
|
| 1144 |
+
"dependencies": {
|
| 1145 |
+
"es-errors": "^1.3.0",
|
| 1146 |
+
"object-inspect": "^1.13.3",
|
| 1147 |
+
"side-channel-list": "^1.0.0",
|
| 1148 |
+
"side-channel-map": "^1.0.1",
|
| 1149 |
+
"side-channel-weakmap": "^1.0.2"
|
| 1150 |
+
},
|
| 1151 |
+
"engines": {
|
| 1152 |
+
"node": ">= 0.4"
|
| 1153 |
+
},
|
| 1154 |
+
"funding": {
|
| 1155 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 1156 |
+
}
|
| 1157 |
+
},
|
| 1158 |
+
"node_modules/side-channel-list": {
|
| 1159 |
+
"version": "1.0.0",
|
| 1160 |
+
"resolved": "https://registry.npmmirror.com/side-channel-list/-/side-channel-list-1.0.0.tgz",
|
| 1161 |
+
"integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==",
|
| 1162 |
+
"license": "MIT",
|
| 1163 |
+
"dependencies": {
|
| 1164 |
+
"es-errors": "^1.3.0",
|
| 1165 |
+
"object-inspect": "^1.13.3"
|
| 1166 |
+
},
|
| 1167 |
+
"engines": {
|
| 1168 |
+
"node": ">= 0.4"
|
| 1169 |
+
},
|
| 1170 |
+
"funding": {
|
| 1171 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 1172 |
+
}
|
| 1173 |
+
},
|
| 1174 |
+
"node_modules/side-channel-map": {
|
| 1175 |
+
"version": "1.0.1",
|
| 1176 |
+
"resolved": "https://registry.npmmirror.com/side-channel-map/-/side-channel-map-1.0.1.tgz",
|
| 1177 |
+
"integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==",
|
| 1178 |
+
"license": "MIT",
|
| 1179 |
+
"dependencies": {
|
| 1180 |
+
"call-bound": "^1.0.2",
|
| 1181 |
+
"es-errors": "^1.3.0",
|
| 1182 |
+
"get-intrinsic": "^1.2.5",
|
| 1183 |
+
"object-inspect": "^1.13.3"
|
| 1184 |
+
},
|
| 1185 |
+
"engines": {
|
| 1186 |
+
"node": ">= 0.4"
|
| 1187 |
+
},
|
| 1188 |
+
"funding": {
|
| 1189 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 1190 |
+
}
|
| 1191 |
+
},
|
| 1192 |
+
"node_modules/side-channel-weakmap": {
|
| 1193 |
+
"version": "1.0.2",
|
| 1194 |
+
"resolved": "https://registry.npmmirror.com/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz",
|
| 1195 |
+
"integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==",
|
| 1196 |
+
"license": "MIT",
|
| 1197 |
+
"dependencies": {
|
| 1198 |
+
"call-bound": "^1.0.2",
|
| 1199 |
+
"es-errors": "^1.3.0",
|
| 1200 |
+
"get-intrinsic": "^1.2.5",
|
| 1201 |
+
"object-inspect": "^1.13.3",
|
| 1202 |
+
"side-channel-map": "^1.0.1"
|
| 1203 |
+
},
|
| 1204 |
+
"engines": {
|
| 1205 |
+
"node": ">= 0.4"
|
| 1206 |
+
},
|
| 1207 |
+
"funding": {
|
| 1208 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 1209 |
+
}
|
| 1210 |
+
},
|
| 1211 |
+
"node_modules/statuses": {
|
| 1212 |
+
"version": "2.0.1",
|
| 1213 |
+
"resolved": "https://registry.npmmirror.com/statuses/-/statuses-2.0.1.tgz",
|
| 1214 |
+
"integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==",
|
| 1215 |
+
"license": "MIT",
|
| 1216 |
+
"engines": {
|
| 1217 |
+
"node": ">= 0.8"
|
| 1218 |
+
}
|
| 1219 |
+
},
|
| 1220 |
+
"node_modules/string-width": {
|
| 1221 |
+
"version": "4.2.3",
|
| 1222 |
+
"resolved": "https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz",
|
| 1223 |
+
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
|
| 1224 |
+
"license": "MIT",
|
| 1225 |
+
"dependencies": {
|
| 1226 |
+
"emoji-regex": "^8.0.0",
|
| 1227 |
+
"is-fullwidth-code-point": "^3.0.0",
|
| 1228 |
+
"strip-ansi": "^6.0.1"
|
| 1229 |
+
},
|
| 1230 |
+
"engines": {
|
| 1231 |
+
"node": ">=8"
|
| 1232 |
+
}
|
| 1233 |
+
},
|
| 1234 |
+
"node_modules/strip-ansi": {
|
| 1235 |
+
"version": "6.0.1",
|
| 1236 |
+
"resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-6.0.1.tgz",
|
| 1237 |
+
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
|
| 1238 |
+
"license": "MIT",
|
| 1239 |
+
"dependencies": {
|
| 1240 |
+
"ansi-regex": "^5.0.1"
|
| 1241 |
+
},
|
| 1242 |
+
"engines": {
|
| 1243 |
+
"node": ">=8"
|
| 1244 |
+
}
|
| 1245 |
+
},
|
| 1246 |
+
"node_modules/supports-color": {
|
| 1247 |
+
"version": "7.2.0",
|
| 1248 |
+
"resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz",
|
| 1249 |
+
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
|
| 1250 |
+
"license": "MIT",
|
| 1251 |
+
"dependencies": {
|
| 1252 |
+
"has-flag": "^4.0.0"
|
| 1253 |
+
},
|
| 1254 |
+
"engines": {
|
| 1255 |
+
"node": ">=8"
|
| 1256 |
+
}
|
| 1257 |
+
},
|
| 1258 |
+
"node_modules/technicalindicators": {
|
| 1259 |
+
"version": "3.1.0",
|
| 1260 |
+
"resolved": "https://registry.npmmirror.com/technicalindicators/-/technicalindicators-3.1.0.tgz",
|
| 1261 |
+
"integrity": "sha512-f16mOc+Y05hNy/of+UbGxhxQQmxUztCiluhsqC5QLUYz4WowUgKde9m6nIjK1Kay0wGHigT0IkOabpp0+22UfA==",
|
| 1262 |
+
"license": "MIT",
|
| 1263 |
+
"dependencies": {
|
| 1264 |
+
"@types/node": "^6.0.96"
|
| 1265 |
+
}
|
| 1266 |
+
},
|
| 1267 |
+
"node_modules/toidentifier": {
|
| 1268 |
+
"version": "1.0.1",
|
| 1269 |
+
"resolved": "https://registry.npmmirror.com/toidentifier/-/toidentifier-1.0.1.tgz",
|
| 1270 |
+
"integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
|
| 1271 |
+
"license": "MIT",
|
| 1272 |
+
"engines": {
|
| 1273 |
+
"node": ">=0.6"
|
| 1274 |
+
}
|
| 1275 |
+
},
|
| 1276 |
+
"node_modules/trading-indicator": {
|
| 1277 |
+
"version": "2.0.4",
|
| 1278 |
+
"resolved": "https://registry.npmmirror.com/trading-indicator/-/trading-indicator-2.0.4.tgz",
|
| 1279 |
+
"integrity": "sha512-j4ns8c4/JZXE8jJJsQ2d0ZFyRQbB3x9J+Dpfgwb4towW3TE+AFKVgsD8eGUrHJft7+hWoWKAJDhH7ljynJrYHw==",
|
| 1280 |
+
"license": "ISC",
|
| 1281 |
+
"dependencies": {
|
| 1282 |
+
"ccxt": "^1.95.36",
|
| 1283 |
+
"technicalindicators": "^3.0.0"
|
| 1284 |
+
}
|
| 1285 |
+
},
|
| 1286 |
+
"node_modules/type-is": {
|
| 1287 |
+
"version": "2.0.0",
|
| 1288 |
+
"resolved": "https://registry.npmmirror.com/type-is/-/type-is-2.0.0.tgz",
|
| 1289 |
+
"integrity": "sha512-gd0sGezQYCbWSbkZr75mln4YBidWUN60+devscpLF5mtRDUpiaTvKpBNrdaCvel1NdR2k6vclXybU5fBd2i+nw==",
|
| 1290 |
+
"license": "MIT",
|
| 1291 |
+
"dependencies": {
|
| 1292 |
+
"content-type": "^1.0.5",
|
| 1293 |
+
"media-typer": "^1.1.0",
|
| 1294 |
+
"mime-types": "^3.0.0"
|
| 1295 |
+
},
|
| 1296 |
+
"engines": {
|
| 1297 |
+
"node": ">= 0.6"
|
| 1298 |
+
}
|
| 1299 |
+
},
|
| 1300 |
+
"node_modules/undici": {
|
| 1301 |
+
"version": "7.5.0",
|
| 1302 |
+
"resolved": "https://registry.npmmirror.com/undici/-/undici-7.5.0.tgz",
|
| 1303 |
+
"integrity": "sha512-NFQG741e8mJ0fLQk90xKxFdaSM7z4+IQpAgsFI36bCDY9Z2+aXXZjVy2uUksMouWfMI9+w5ejOq5zYYTBCQJDQ==",
|
| 1304 |
+
"license": "MIT",
|
| 1305 |
+
"engines": {
|
| 1306 |
+
"node": ">=20.18.1"
|
| 1307 |
+
}
|
| 1308 |
+
},
|
| 1309 |
+
"node_modules/unpipe": {
|
| 1310 |
+
"version": "1.0.0",
|
| 1311 |
+
"resolved": "https://registry.npmmirror.com/unpipe/-/unpipe-1.0.0.tgz",
|
| 1312 |
+
"integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==",
|
| 1313 |
+
"license": "MIT",
|
| 1314 |
+
"engines": {
|
| 1315 |
+
"node": ">= 0.8"
|
| 1316 |
+
}
|
| 1317 |
+
},
|
| 1318 |
+
"node_modules/utils-merge": {
|
| 1319 |
+
"version": "1.0.1",
|
| 1320 |
+
"resolved": "https://registry.npmmirror.com/utils-merge/-/utils-merge-1.0.1.tgz",
|
| 1321 |
+
"integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==",
|
| 1322 |
+
"license": "MIT",
|
| 1323 |
+
"engines": {
|
| 1324 |
+
"node": ">= 0.4.0"
|
| 1325 |
+
}
|
| 1326 |
+
},
|
| 1327 |
+
"node_modules/vary": {
|
| 1328 |
+
"version": "1.1.2",
|
| 1329 |
+
"resolved": "https://registry.npmmirror.com/vary/-/vary-1.1.2.tgz",
|
| 1330 |
+
"integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==",
|
| 1331 |
+
"license": "MIT",
|
| 1332 |
+
"engines": {
|
| 1333 |
+
"node": ">= 0.8"
|
| 1334 |
+
}
|
| 1335 |
+
},
|
| 1336 |
+
"node_modules/wrap-ansi": {
|
| 1337 |
+
"version": "7.0.0",
|
| 1338 |
+
"resolved": "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
|
| 1339 |
+
"integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
|
| 1340 |
+
"license": "MIT",
|
| 1341 |
+
"dependencies": {
|
| 1342 |
+
"ansi-styles": "^4.0.0",
|
| 1343 |
+
"string-width": "^4.1.0",
|
| 1344 |
+
"strip-ansi": "^6.0.0"
|
| 1345 |
+
},
|
| 1346 |
+
"engines": {
|
| 1347 |
+
"node": ">=10"
|
| 1348 |
+
},
|
| 1349 |
+
"funding": {
|
| 1350 |
+
"url": "https://github.com/chalk/wrap-ansi?sponsor=1"
|
| 1351 |
+
}
|
| 1352 |
+
},
|
| 1353 |
+
"node_modules/wrappy": {
|
| 1354 |
+
"version": "1.0.2",
|
| 1355 |
+
"resolved": "https://registry.npmmirror.com/wrappy/-/wrappy-1.0.2.tgz",
|
| 1356 |
+
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
|
| 1357 |
+
"license": "ISC"
|
| 1358 |
+
},
|
| 1359 |
+
"node_modules/ws": {
|
| 1360 |
+
"version": "8.18.1",
|
| 1361 |
+
"resolved": "https://registry.npmmirror.com/ws/-/ws-8.18.1.tgz",
|
| 1362 |
+
"integrity": "sha512-RKW2aJZMXeMxVpnZ6bck+RswznaxmzdULiBr6KY7XkTnW8uvt0iT9H5DkHUChXrc+uurzwa0rVI16n/Xzjdz1w==",
|
| 1363 |
+
"license": "MIT",
|
| 1364 |
+
"engines": {
|
| 1365 |
+
"node": ">=10.0.0"
|
| 1366 |
+
},
|
| 1367 |
+
"peerDependencies": {
|
| 1368 |
+
"bufferutil": "^4.0.1",
|
| 1369 |
+
"utf-8-validate": ">=5.0.2"
|
| 1370 |
+
},
|
| 1371 |
+
"peerDependenciesMeta": {
|
| 1372 |
+
"bufferutil": {
|
| 1373 |
+
"optional": true
|
| 1374 |
+
},
|
| 1375 |
+
"utf-8-validate": {
|
| 1376 |
+
"optional": true
|
| 1377 |
+
}
|
| 1378 |
+
}
|
| 1379 |
+
},
|
| 1380 |
+
"node_modules/y18n": {
|
| 1381 |
+
"version": "5.0.8",
|
| 1382 |
+
"resolved": "https://registry.npmmirror.com/y18n/-/y18n-5.0.8.tgz",
|
| 1383 |
+
"integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",
|
| 1384 |
+
"license": "ISC",
|
| 1385 |
+
"engines": {
|
| 1386 |
+
"node": ">=10"
|
| 1387 |
+
}
|
| 1388 |
+
},
|
| 1389 |
+
"node_modules/yargs": {
|
| 1390 |
+
"version": "17.7.2",
|
| 1391 |
+
"resolved": "https://registry.npmmirror.com/yargs/-/yargs-17.7.2.tgz",
|
| 1392 |
+
"integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==",
|
| 1393 |
+
"license": "MIT",
|
| 1394 |
+
"dependencies": {
|
| 1395 |
+
"cliui": "^8.0.1",
|
| 1396 |
+
"escalade": "^3.1.1",
|
| 1397 |
+
"get-caller-file": "^2.0.5",
|
| 1398 |
+
"require-directory": "^2.1.1",
|
| 1399 |
+
"string-width": "^4.2.3",
|
| 1400 |
+
"y18n": "^5.0.5",
|
| 1401 |
+
"yargs-parser": "^21.1.1"
|
| 1402 |
+
},
|
| 1403 |
+
"engines": {
|
| 1404 |
+
"node": ">=12"
|
| 1405 |
+
}
|
| 1406 |
+
},
|
| 1407 |
+
"node_modules/yargs-parser": {
|
| 1408 |
+
"version": "21.1.1",
|
| 1409 |
+
"resolved": "https://registry.npmmirror.com/yargs-parser/-/yargs-parser-21.1.1.tgz",
|
| 1410 |
+
"integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==",
|
| 1411 |
+
"license": "ISC",
|
| 1412 |
+
"engines": {
|
| 1413 |
+
"node": ">=12"
|
| 1414 |
+
}
|
| 1415 |
+
},
|
| 1416 |
+
"node_modules/zod": {
|
| 1417 |
+
"version": "3.24.2",
|
| 1418 |
+
"resolved": "https://registry.npmmirror.com/zod/-/zod-3.24.2.tgz",
|
| 1419 |
+
"integrity": "sha512-lY7CDW43ECgW9u1TcT3IoXHflywfVqDYze4waEz812jR/bZ8FHDsl7pFQoSZTz5N+2NqRXs8GBwnAwo3ZNxqhQ==",
|
| 1420 |
+
"license": "MIT",
|
| 1421 |
+
"funding": {
|
| 1422 |
+
"url": "https://github.com/sponsors/colinhacks"
|
| 1423 |
+
}
|
| 1424 |
+
},
|
| 1425 |
+
"node_modules/zod-to-json-schema": {
|
| 1426 |
+
"version": "3.24.5",
|
| 1427 |
+
"resolved": "https://registry.npmmirror.com/zod-to-json-schema/-/zod-to-json-schema-3.24.5.tgz",
|
| 1428 |
+
"integrity": "sha512-/AuWwMP+YqiPbsJx5D6TfgRTc4kTLjsh5SOcd4bLsfUg2RcEXrFMJl1DGgdHy2aCfsIA/cr/1JM0xcB2GZji8g==",
|
| 1429 |
+
"license": "ISC",
|
| 1430 |
+
"peerDependencies": {
|
| 1431 |
+
"zod": "^3.24.1"
|
| 1432 |
+
}
|
| 1433 |
+
}
|
| 1434 |
+
}
|
| 1435 |
+
}
|
crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
MIT License
|
| 2 |
+
|
| 3 |
+
Copyright (c) 2024 Anthropic, PBC
|
| 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, AR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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# MCP TypeScript SDK  
|
| 2 |
+
|
| 3 |
+
## Table of Contents
|
| 4 |
+
- [Overview](#overview)
|
| 5 |
+
- [Installation](#installation)
|
| 6 |
+
- [Quickstart](#quickstart)
|
| 7 |
+
- [What is MCP?](#what-is-mcp)
|
| 8 |
+
- [Core Concepts](#core-concepts)
|
| 9 |
+
- [Server](#server)
|
| 10 |
+
- [Resources](#resources)
|
| 11 |
+
- [Tools](#tools)
|
| 12 |
+
- [Prompts](#prompts)
|
| 13 |
+
- [Running Your Server](#running-your-server)
|
| 14 |
+
- [stdio](#stdio)
|
| 15 |
+
- [HTTP with SSE](#http-with-sse)
|
| 16 |
+
- [Testing and Debugging](#testing-and-debugging)
|
| 17 |
+
- [Examples](#examples)
|
| 18 |
+
- [Echo Server](#echo-server)
|
| 19 |
+
- [SQLite Explorer](#sqlite-explorer)
|
| 20 |
+
- [Advanced Usage](#advanced-usage)
|
| 21 |
+
- [Low-Level Server](#low-level-server)
|
| 22 |
+
- [Writing MCP Clients](#writing-mcp-clients)
|
| 23 |
+
- [Server Capabilities](#server-capabilities)
|
| 24 |
+
|
| 25 |
+
## Overview
|
| 26 |
+
|
| 27 |
+
The Model Context Protocol allows applications to provide context for LLMs in a standardized way, separating the concerns of providing context from the actual LLM interaction. This TypeScript SDK implements the full MCP specification, making it easy to:
|
| 28 |
+
|
| 29 |
+
- Build MCP clients that can connect to any MCP server
|
| 30 |
+
- Create MCP servers that expose resources, prompts and tools
|
| 31 |
+
- Use standard transports like stdio and SSE
|
| 32 |
+
- Handle all MCP protocol messages and lifecycle events
|
| 33 |
+
|
| 34 |
+
## Installation
|
| 35 |
+
|
| 36 |
+
```bash
|
| 37 |
+
npm install @modelcontextprotocol/sdk
|
| 38 |
+
```
|
| 39 |
+
|
| 40 |
+
## Quick Start
|
| 41 |
+
|
| 42 |
+
Let's create a simple MCP server that exposes a calculator tool and some data:
|
| 43 |
+
|
| 44 |
+
```typescript
|
| 45 |
+
import { McpServer, ResourceTemplate } from "@modelcontextprotocol/sdk/server/mcp.js";
|
| 46 |
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
| 47 |
+
import { z } from "zod";
|
| 48 |
+
|
| 49 |
+
// Create an MCP server
|
| 50 |
+
const server = new McpServer({
|
| 51 |
+
name: "Demo",
|
| 52 |
+
version: "1.0.0"
|
| 53 |
+
});
|
| 54 |
+
|
| 55 |
+
// Add an addition tool
|
| 56 |
+
server.tool("add",
|
| 57 |
+
{ a: z.number(), b: z.number() },
|
| 58 |
+
async ({ a, b }) => ({
|
| 59 |
+
content: [{ type: "text", text: String(a + b) }]
|
| 60 |
+
})
|
| 61 |
+
);
|
| 62 |
+
|
| 63 |
+
// Add a dynamic greeting resource
|
| 64 |
+
server.resource(
|
| 65 |
+
"greeting",
|
| 66 |
+
new ResourceTemplate("greeting://{name}", { list: undefined }),
|
| 67 |
+
async (uri, { name }) => ({
|
| 68 |
+
contents: [{
|
| 69 |
+
uri: uri.href,
|
| 70 |
+
text: `Hello, ${name}!`
|
| 71 |
+
}]
|
| 72 |
+
})
|
| 73 |
+
);
|
| 74 |
+
|
| 75 |
+
// Start receiving messages on stdin and sending messages on stdout
|
| 76 |
+
const transport = new StdioServerTransport();
|
| 77 |
+
await server.connect(transport);
|
| 78 |
+
```
|
| 79 |
+
|
| 80 |
+
## What is MCP?
|
| 81 |
+
|
| 82 |
+
The [Model Context Protocol (MCP)](https://modelcontextprotocol.io) lets you build servers that expose data and functionality to LLM applications in a secure, standardized way. Think of it like a web API, but specifically designed for LLM interactions. MCP servers can:
|
| 83 |
+
|
| 84 |
+
- Expose data through **Resources** (think of these sort of like GET endpoints; they are used to load information into the LLM's context)
|
| 85 |
+
- Provide functionality through **Tools** (sort of like POST endpoints; they are used to execute code or otherwise produce a side effect)
|
| 86 |
+
- Define interaction patterns through **Prompts** (reusable templates for LLM interactions)
|
| 87 |
+
- And more!
|
| 88 |
+
|
| 89 |
+
## Core Concepts
|
| 90 |
+
|
| 91 |
+
### Server
|
| 92 |
+
|
| 93 |
+
The McpServer is your core interface to the MCP protocol. It handles connection management, protocol compliance, and message routing:
|
| 94 |
+
|
| 95 |
+
```typescript
|
| 96 |
+
const server = new McpServer({
|
| 97 |
+
name: "My App",
|
| 98 |
+
version: "1.0.0"
|
| 99 |
+
});
|
| 100 |
+
```
|
| 101 |
+
|
| 102 |
+
### Resources
|
| 103 |
+
|
| 104 |
+
Resources are how you expose data to LLMs. They're similar to GET endpoints in a REST API - they provide data but shouldn't perform significant computation or have side effects:
|
| 105 |
+
|
| 106 |
+
```typescript
|
| 107 |
+
// Static resource
|
| 108 |
+
server.resource(
|
| 109 |
+
"config",
|
| 110 |
+
"config://app",
|
| 111 |
+
async (uri) => ({
|
| 112 |
+
contents: [{
|
| 113 |
+
uri: uri.href,
|
| 114 |
+
text: "App configuration here"
|
| 115 |
+
}]
|
| 116 |
+
})
|
| 117 |
+
);
|
| 118 |
+
|
| 119 |
+
// Dynamic resource with parameters
|
| 120 |
+
server.resource(
|
| 121 |
+
"user-profile",
|
| 122 |
+
new ResourceTemplate("users://{userId}/profile", { list: undefined }),
|
| 123 |
+
async (uri, { userId }) => ({
|
| 124 |
+
contents: [{
|
| 125 |
+
uri: uri.href,
|
| 126 |
+
text: `Profile data for user ${userId}`
|
| 127 |
+
}]
|
| 128 |
+
})
|
| 129 |
+
);
|
| 130 |
+
```
|
| 131 |
+
|
| 132 |
+
### Tools
|
| 133 |
+
|
| 134 |
+
Tools let LLMs take actions through your server. Unlike resources, tools are expected to perform computation and have side effects:
|
| 135 |
+
|
| 136 |
+
```typescript
|
| 137 |
+
// Simple tool with parameters
|
| 138 |
+
server.tool(
|
| 139 |
+
"calculate-bmi",
|
| 140 |
+
{
|
| 141 |
+
weightKg: z.number(),
|
| 142 |
+
heightM: z.number()
|
| 143 |
+
},
|
| 144 |
+
async ({ weightKg, heightM }) => ({
|
| 145 |
+
content: [{
|
| 146 |
+
type: "text",
|
| 147 |
+
text: String(weightKg / (heightM * heightM))
|
| 148 |
+
}]
|
| 149 |
+
})
|
| 150 |
+
);
|
| 151 |
+
|
| 152 |
+
// Async tool with external API call
|
| 153 |
+
server.tool(
|
| 154 |
+
"fetch-weather",
|
| 155 |
+
{ city: z.string() },
|
| 156 |
+
async ({ city }) => {
|
| 157 |
+
const response = await fetch(`https://api.weather.com/${city}`);
|
| 158 |
+
const data = await response.text();
|
| 159 |
+
return {
|
| 160 |
+
content: [{ type: "text", text: data }]
|
| 161 |
+
};
|
| 162 |
+
}
|
| 163 |
+
);
|
| 164 |
+
```
|
| 165 |
+
|
| 166 |
+
### Prompts
|
| 167 |
+
|
| 168 |
+
Prompts are reusable templates that help LLMs interact with your server effectively:
|
| 169 |
+
|
| 170 |
+
```typescript
|
| 171 |
+
server.prompt(
|
| 172 |
+
"review-code",
|
| 173 |
+
{ code: z.string() },
|
| 174 |
+
({ code }) => ({
|
| 175 |
+
messages: [{
|
| 176 |
+
role: "user",
|
| 177 |
+
content: {
|
| 178 |
+
type: "text",
|
| 179 |
+
text: `Please review this code:\n\n${code}`
|
| 180 |
+
}
|
| 181 |
+
}]
|
| 182 |
+
})
|
| 183 |
+
);
|
| 184 |
+
```
|
| 185 |
+
|
| 186 |
+
## Running Your Server
|
| 187 |
+
|
| 188 |
+
MCP servers in TypeScript need to be connected to a transport to communicate with clients. How you start the server depends on the choice of transport:
|
| 189 |
+
|
| 190 |
+
### stdio
|
| 191 |
+
|
| 192 |
+
For command-line tools and direct integrations:
|
| 193 |
+
|
| 194 |
+
```typescript
|
| 195 |
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
| 196 |
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
| 197 |
+
|
| 198 |
+
const server = new McpServer({
|
| 199 |
+
name: "example-server",
|
| 200 |
+
version: "1.0.0"
|
| 201 |
+
});
|
| 202 |
+
|
| 203 |
+
// ... set up server resources, tools, and prompts ...
|
| 204 |
+
|
| 205 |
+
const transport = new StdioServerTransport();
|
| 206 |
+
await server.connect(transport);
|
| 207 |
+
```
|
| 208 |
+
|
| 209 |
+
### HTTP with SSE
|
| 210 |
+
|
| 211 |
+
For remote servers, start a web server with a Server-Sent Events (SSE) endpoint, and a separate endpoint for the client to send its messages to:
|
| 212 |
+
|
| 213 |
+
```typescript
|
| 214 |
+
import express from "express";
|
| 215 |
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
| 216 |
+
import { SSEServerTransport } from "@modelcontextprotocol/sdk/server/sse.js";
|
| 217 |
+
|
| 218 |
+
const server = new McpServer({
|
| 219 |
+
name: "example-server",
|
| 220 |
+
version: "1.0.0"
|
| 221 |
+
});
|
| 222 |
+
|
| 223 |
+
// ... set up server resources, tools, and prompts ...
|
| 224 |
+
|
| 225 |
+
const app = express();
|
| 226 |
+
|
| 227 |
+
app.get("/sse", async (req, res) => {
|
| 228 |
+
const transport = new SSEServerTransport("/messages", res);
|
| 229 |
+
await server.connect(transport);
|
| 230 |
+
});
|
| 231 |
+
|
| 232 |
+
app.post("/messages", async (req, res) => {
|
| 233 |
+
// Note: to support multiple simultaneous connections, these messages will
|
| 234 |
+
// need to be routed to a specific matching transport. (This logic isn't
|
| 235 |
+
// implemented here, for simplicity.)
|
| 236 |
+
await transport.handlePostMessage(req, res);
|
| 237 |
+
});
|
| 238 |
+
|
| 239 |
+
app.listen(3001);
|
| 240 |
+
```
|
| 241 |
+
|
| 242 |
+
### Testing and Debugging
|
| 243 |
+
|
| 244 |
+
To test your server, you can use the [MCP Inspector](https://github.com/modelcontextprotocol/inspector). See its README for more information.
|
| 245 |
+
|
| 246 |
+
## Examples
|
| 247 |
+
|
| 248 |
+
### Echo Server
|
| 249 |
+
|
| 250 |
+
A simple server demonstrating resources, tools, and prompts:
|
| 251 |
+
|
| 252 |
+
```typescript
|
| 253 |
+
import { McpServer, ResourceTemplate } from "@modelcontextprotocol/sdk/server/mcp.js";
|
| 254 |
+
import { z } from "zod";
|
| 255 |
+
|
| 256 |
+
const server = new McpServer({
|
| 257 |
+
name: "Echo",
|
| 258 |
+
version: "1.0.0"
|
| 259 |
+
});
|
| 260 |
+
|
| 261 |
+
server.resource(
|
| 262 |
+
"echo",
|
| 263 |
+
new ResourceTemplate("echo://{message}", { list: undefined }),
|
| 264 |
+
async (uri, { message }) => ({
|
| 265 |
+
contents: [{
|
| 266 |
+
uri: uri.href,
|
| 267 |
+
text: `Resource echo: ${message}`
|
| 268 |
+
}]
|
| 269 |
+
})
|
| 270 |
+
);
|
| 271 |
+
|
| 272 |
+
server.tool(
|
| 273 |
+
"echo",
|
| 274 |
+
{ message: z.string() },
|
| 275 |
+
async ({ message }) => ({
|
| 276 |
+
content: [{ type: "text", text: `Tool echo: ${message}` }]
|
| 277 |
+
})
|
| 278 |
+
);
|
| 279 |
+
|
| 280 |
+
server.prompt(
|
| 281 |
+
"echo",
|
| 282 |
+
{ message: z.string() },
|
| 283 |
+
({ message }) => ({
|
| 284 |
+
messages: [{
|
| 285 |
+
role: "user",
|
| 286 |
+
content: {
|
| 287 |
+
type: "text",
|
| 288 |
+
text: `Please process this message: ${message}`
|
| 289 |
+
}
|
| 290 |
+
}]
|
| 291 |
+
})
|
| 292 |
+
);
|
| 293 |
+
```
|
| 294 |
+
|
| 295 |
+
### SQLite Explorer
|
| 296 |
+
|
| 297 |
+
A more complex example showing database integration:
|
| 298 |
+
|
| 299 |
+
```typescript
|
| 300 |
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
| 301 |
+
import sqlite3 from "sqlite3";
|
| 302 |
+
import { promisify } from "util";
|
| 303 |
+
import { z } from "zod";
|
| 304 |
+
|
| 305 |
+
const server = new McpServer({
|
| 306 |
+
name: "SQLite Explorer",
|
| 307 |
+
version: "1.0.0"
|
| 308 |
+
});
|
| 309 |
+
|
| 310 |
+
// Helper to create DB connection
|
| 311 |
+
const getDb = () => {
|
| 312 |
+
const db = new sqlite3.Database("database.db");
|
| 313 |
+
return {
|
| 314 |
+
all: promisify<string, any[]>(db.all.bind(db)),
|
| 315 |
+
close: promisify(db.close.bind(db))
|
| 316 |
+
};
|
| 317 |
+
};
|
| 318 |
+
|
| 319 |
+
server.resource(
|
| 320 |
+
"schema",
|
| 321 |
+
"schema://main",
|
| 322 |
+
async (uri) => {
|
| 323 |
+
const db = getDb();
|
| 324 |
+
try {
|
| 325 |
+
const tables = await db.all(
|
| 326 |
+
"SELECT sql FROM sqlite_master WHERE type='table'"
|
| 327 |
+
);
|
| 328 |
+
return {
|
| 329 |
+
contents: [{
|
| 330 |
+
uri: uri.href,
|
| 331 |
+
text: tables.map((t: {sql: string}) => t.sql).join("\n")
|
| 332 |
+
}]
|
| 333 |
+
};
|
| 334 |
+
} finally {
|
| 335 |
+
await db.close();
|
| 336 |
+
}
|
| 337 |
+
}
|
| 338 |
+
);
|
| 339 |
+
|
| 340 |
+
server.tool(
|
| 341 |
+
"query",
|
| 342 |
+
{ sql: z.string() },
|
| 343 |
+
async ({ sql }) => {
|
| 344 |
+
const db = getDb();
|
| 345 |
+
try {
|
| 346 |
+
const results = await db.all(sql);
|
| 347 |
+
return {
|
| 348 |
+
content: [{
|
| 349 |
+
type: "text",
|
| 350 |
+
text: JSON.stringify(results, null, 2)
|
| 351 |
+
}]
|
| 352 |
+
};
|
| 353 |
+
} catch (err: unknown) {
|
| 354 |
+
const error = err as Error;
|
| 355 |
+
return {
|
| 356 |
+
content: [{
|
| 357 |
+
type: "text",
|
| 358 |
+
text: `Error: ${error.message}`
|
| 359 |
+
}],
|
| 360 |
+
isError: true
|
| 361 |
+
};
|
| 362 |
+
} finally {
|
| 363 |
+
await db.close();
|
| 364 |
+
}
|
| 365 |
+
}
|
| 366 |
+
);
|
| 367 |
+
```
|
| 368 |
+
|
| 369 |
+
## Advanced Usage
|
| 370 |
+
|
| 371 |
+
### Low-Level Server
|
| 372 |
+
|
| 373 |
+
For more control, you can use the low-level Server class directly:
|
| 374 |
+
|
| 375 |
+
```typescript
|
| 376 |
+
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
| 377 |
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
| 378 |
+
import {
|
| 379 |
+
ListPromptsRequestSchema,
|
| 380 |
+
GetPromptRequestSchema
|
| 381 |
+
} from "@modelcontextprotocol/sdk/types.js";
|
| 382 |
+
|
| 383 |
+
const server = new Server(
|
| 384 |
+
{
|
| 385 |
+
name: "example-server",
|
| 386 |
+
version: "1.0.0"
|
| 387 |
+
},
|
| 388 |
+
{
|
| 389 |
+
capabilities: {
|
| 390 |
+
prompts: {}
|
| 391 |
+
}
|
| 392 |
+
}
|
| 393 |
+
);
|
| 394 |
+
|
| 395 |
+
server.setRequestHandler(ListPromptsRequestSchema, async () => {
|
| 396 |
+
return {
|
| 397 |
+
prompts: [{
|
| 398 |
+
name: "example-prompt",
|
| 399 |
+
description: "An example prompt template",
|
| 400 |
+
arguments: [{
|
| 401 |
+
name: "arg1",
|
| 402 |
+
description: "Example argument",
|
| 403 |
+
required: true
|
| 404 |
+
}]
|
| 405 |
+
}]
|
| 406 |
+
};
|
| 407 |
+
});
|
| 408 |
+
|
| 409 |
+
server.setRequestHandler(GetPromptRequestSchema, async (request) => {
|
| 410 |
+
if (request.params.name !== "example-prompt") {
|
| 411 |
+
throw new Error("Unknown prompt");
|
| 412 |
+
}
|
| 413 |
+
return {
|
| 414 |
+
description: "Example prompt",
|
| 415 |
+
messages: [{
|
| 416 |
+
role: "user",
|
| 417 |
+
content: {
|
| 418 |
+
type: "text",
|
| 419 |
+
text: "Example prompt text"
|
| 420 |
+
}
|
| 421 |
+
}]
|
| 422 |
+
};
|
| 423 |
+
});
|
| 424 |
+
|
| 425 |
+
const transport = new StdioServerTransport();
|
| 426 |
+
await server.connect(transport);
|
| 427 |
+
```
|
| 428 |
+
|
| 429 |
+
### Writing MCP Clients
|
| 430 |
+
|
| 431 |
+
The SDK provides a high-level client interface:
|
| 432 |
+
|
| 433 |
+
```typescript
|
| 434 |
+
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
| 435 |
+
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
|
| 436 |
+
|
| 437 |
+
const transport = new StdioClientTransport({
|
| 438 |
+
command: "node",
|
| 439 |
+
args: ["server.js"]
|
| 440 |
+
});
|
| 441 |
+
|
| 442 |
+
const client = new Client(
|
| 443 |
+
{
|
| 444 |
+
name: "example-client",
|
| 445 |
+
version: "1.0.0"
|
| 446 |
+
},
|
| 447 |
+
{
|
| 448 |
+
capabilities: {
|
| 449 |
+
prompts: {},
|
| 450 |
+
resources: {},
|
| 451 |
+
tools: {}
|
| 452 |
+
}
|
| 453 |
+
}
|
| 454 |
+
);
|
| 455 |
+
|
| 456 |
+
await client.connect(transport);
|
| 457 |
+
|
| 458 |
+
// List prompts
|
| 459 |
+
const prompts = await client.listPrompts();
|
| 460 |
+
|
| 461 |
+
// Get a prompt
|
| 462 |
+
const prompt = await client.getPrompt("example-prompt", {
|
| 463 |
+
arg1: "value"
|
| 464 |
+
});
|
| 465 |
+
|
| 466 |
+
// List resources
|
| 467 |
+
const resources = await client.listResources();
|
| 468 |
+
|
| 469 |
+
// Read a resource
|
| 470 |
+
const resource = await client.readResource("file:///example.txt");
|
| 471 |
+
|
| 472 |
+
// Call a tool
|
| 473 |
+
const result = await client.callTool({
|
| 474 |
+
name: "example-tool",
|
| 475 |
+
arguments: {
|
| 476 |
+
arg1: "value"
|
| 477 |
+
}
|
| 478 |
+
});
|
| 479 |
+
```
|
| 480 |
+
|
| 481 |
+
## Documentation
|
| 482 |
+
|
| 483 |
+
- [Model Context Protocol documentation](https://modelcontextprotocol.io)
|
| 484 |
+
- [MCP Specification](https://spec.modelcontextprotocol.io)
|
| 485 |
+
- [Example Servers](https://github.com/modelcontextprotocol/servers)
|
| 486 |
+
|
| 487 |
+
## Contributing
|
| 488 |
+
|
| 489 |
+
Issues and pull requests are welcome on GitHub at https://github.com/modelcontextprotocol/typescript-sdk.
|
| 490 |
+
|
| 491 |
+
## License
|
| 492 |
+
|
| 493 |
+
This project is licensed under the MIT License—see the [LICENSE](LICENSE) file for details.
|
crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/cli.d.ts
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
export {};
|
| 2 |
+
//# sourceMappingURL=cli.d.ts.map
|
crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/cli.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":""}
|
crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/cli.js
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
| 3 |
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
| 4 |
+
};
|
| 5 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
| 6 |
+
const ws_1 = __importDefault(require("ws"));
|
| 7 |
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
| 8 |
+
global.WebSocket = ws_1.default;
|
| 9 |
+
const express_1 = __importDefault(require("express"));
|
| 10 |
+
const index_js_1 = require("./client/index.js");
|
| 11 |
+
const sse_js_1 = require("./client/sse.js");
|
| 12 |
+
const stdio_js_1 = require("./client/stdio.js");
|
| 13 |
+
const websocket_js_1 = require("./client/websocket.js");
|
| 14 |
+
const index_js_2 = require("./server/index.js");
|
| 15 |
+
const sse_js_2 = require("./server/sse.js");
|
| 16 |
+
const stdio_js_2 = require("./server/stdio.js");
|
| 17 |
+
const types_js_1 = require("./types.js");
|
| 18 |
+
async function runClient(url_or_command, args) {
|
| 19 |
+
const client = new index_js_1.Client({
|
| 20 |
+
name: "mcp-typescript test client",
|
| 21 |
+
version: "0.1.0",
|
| 22 |
+
}, {
|
| 23 |
+
capabilities: {
|
| 24 |
+
sampling: {},
|
| 25 |
+
},
|
| 26 |
+
});
|
| 27 |
+
let clientTransport;
|
| 28 |
+
let url = undefined;
|
| 29 |
+
try {
|
| 30 |
+
url = new URL(url_or_command);
|
| 31 |
+
}
|
| 32 |
+
catch (_a) {
|
| 33 |
+
// Ignore
|
| 34 |
+
}
|
| 35 |
+
if ((url === null || url === void 0 ? void 0 : url.protocol) === "http:" || (url === null || url === void 0 ? void 0 : url.protocol) === "https:") {
|
| 36 |
+
clientTransport = new sse_js_1.SSEClientTransport(new URL(url_or_command));
|
| 37 |
+
}
|
| 38 |
+
else if ((url === null || url === void 0 ? void 0 : url.protocol) === "ws:" || (url === null || url === void 0 ? void 0 : url.protocol) === "wss:") {
|
| 39 |
+
clientTransport = new websocket_js_1.WebSocketClientTransport(new URL(url_or_command));
|
| 40 |
+
}
|
| 41 |
+
else {
|
| 42 |
+
clientTransport = new stdio_js_1.StdioClientTransport({
|
| 43 |
+
command: url_or_command,
|
| 44 |
+
args,
|
| 45 |
+
});
|
| 46 |
+
}
|
| 47 |
+
console.log("Connected to server.");
|
| 48 |
+
await client.connect(clientTransport);
|
| 49 |
+
console.log("Initialized.");
|
| 50 |
+
await client.request({ method: "resources/list" }, types_js_1.ListResourcesResultSchema);
|
| 51 |
+
await client.close();
|
| 52 |
+
console.log("Closed.");
|
| 53 |
+
}
|
| 54 |
+
async function runServer(port) {
|
| 55 |
+
if (port !== null) {
|
| 56 |
+
const app = (0, express_1.default)();
|
| 57 |
+
let servers = [];
|
| 58 |
+
app.get("/sse", async (req, res) => {
|
| 59 |
+
console.log("Got new SSE connection");
|
| 60 |
+
const transport = new sse_js_2.SSEServerTransport("/message", res);
|
| 61 |
+
const server = new index_js_2.Server({
|
| 62 |
+
name: "mcp-typescript test server",
|
| 63 |
+
version: "0.1.0",
|
| 64 |
+
}, {
|
| 65 |
+
capabilities: {},
|
| 66 |
+
});
|
| 67 |
+
servers.push(server);
|
| 68 |
+
server.onclose = () => {
|
| 69 |
+
console.log("SSE connection closed");
|
| 70 |
+
servers = servers.filter((s) => s !== server);
|
| 71 |
+
};
|
| 72 |
+
await server.connect(transport);
|
| 73 |
+
});
|
| 74 |
+
app.post("/message", async (req, res) => {
|
| 75 |
+
console.log("Received message");
|
| 76 |
+
const sessionId = req.query.sessionId;
|
| 77 |
+
const transport = servers
|
| 78 |
+
.map((s) => s.transport)
|
| 79 |
+
.find((t) => t.sessionId === sessionId);
|
| 80 |
+
if (!transport) {
|
| 81 |
+
res.status(404).send("Session not found");
|
| 82 |
+
return;
|
| 83 |
+
}
|
| 84 |
+
await transport.handlePostMessage(req, res);
|
| 85 |
+
});
|
| 86 |
+
app.listen(port, () => {
|
| 87 |
+
console.log(`Server running on http://localhost:${port}/sse`);
|
| 88 |
+
});
|
| 89 |
+
}
|
| 90 |
+
else {
|
| 91 |
+
const server = new index_js_2.Server({
|
| 92 |
+
name: "mcp-typescript test server",
|
| 93 |
+
version: "0.1.0",
|
| 94 |
+
}, {
|
| 95 |
+
capabilities: {
|
| 96 |
+
prompts: {},
|
| 97 |
+
resources: {},
|
| 98 |
+
tools: {},
|
| 99 |
+
logging: {},
|
| 100 |
+
},
|
| 101 |
+
});
|
| 102 |
+
const transport = new stdio_js_2.StdioServerTransport();
|
| 103 |
+
await server.connect(transport);
|
| 104 |
+
console.log("Server running on stdio");
|
| 105 |
+
}
|
| 106 |
+
}
|
| 107 |
+
const args = process.argv.slice(2);
|
| 108 |
+
const command = args[0];
|
| 109 |
+
switch (command) {
|
| 110 |
+
case "client":
|
| 111 |
+
if (args.length < 2) {
|
| 112 |
+
console.error("Usage: client <server_url_or_command> [args...]");
|
| 113 |
+
process.exit(1);
|
| 114 |
+
}
|
| 115 |
+
runClient(args[1], args.slice(2)).catch((error) => {
|
| 116 |
+
console.error(error);
|
| 117 |
+
process.exit(1);
|
| 118 |
+
});
|
| 119 |
+
break;
|
| 120 |
+
case "server": {
|
| 121 |
+
const port = args[1] ? parseInt(args[1]) : null;
|
| 122 |
+
runServer(port).catch((error) => {
|
| 123 |
+
console.error(error);
|
| 124 |
+
process.exit(1);
|
| 125 |
+
});
|
| 126 |
+
break;
|
| 127 |
+
}
|
| 128 |
+
default:
|
| 129 |
+
console.error("Unrecognized command:", command);
|
| 130 |
+
}
|
| 131 |
+
//# sourceMappingURL=cli.js.map
|
crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/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ts
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import type { OAuthClientMetadata, OAuthClientInformation, OAuthTokens, OAuthMetadata, OAuthClientInformationFull } from "../shared/auth.js";
|
| 2 |
+
/**
|
| 3 |
+
* Implements an end-to-end OAuth client to be used with one MCP server.
|
| 4 |
+
*
|
| 5 |
+
* This client relies upon a concept of an authorized "session," the exact
|
| 6 |
+
* meaning of which is application-defined. Tokens, authorization codes, and
|
| 7 |
+
* code verifiers should not cross different sessions.
|
| 8 |
+
*/
|
| 9 |
+
export interface OAuthClientProvider {
|
| 10 |
+
/**
|
| 11 |
+
* The URL to redirect the user agent to after authorization.
|
| 12 |
+
*/
|
| 13 |
+
get redirectUrl(): string | URL;
|
| 14 |
+
/**
|
| 15 |
+
* Metadata about this OAuth client.
|
| 16 |
+
*/
|
| 17 |
+
get clientMetadata(): OAuthClientMetadata;
|
| 18 |
+
/**
|
| 19 |
+
* Loads information about this OAuth client, as registered already with the
|
| 20 |
+
* server, or returns `undefined` if the client is not registered with the
|
| 21 |
+
* server.
|
| 22 |
+
*/
|
| 23 |
+
clientInformation(): OAuthClientInformation | undefined | Promise<OAuthClientInformation | undefined>;
|
| 24 |
+
/**
|
| 25 |
+
* If implemented, this permits the OAuth client to dynamically register with
|
| 26 |
+
* the server. Client information saved this way should later be read via
|
| 27 |
+
* `clientInformation()`.
|
| 28 |
+
*
|
| 29 |
+
* This method is not required to be implemented if client information is
|
| 30 |
+
* statically known (e.g., pre-registered).
|
| 31 |
+
*/
|
| 32 |
+
saveClientInformation?(clientInformation: OAuthClientInformationFull): void | Promise<void>;
|
| 33 |
+
/**
|
| 34 |
+
* Loads any existing OAuth tokens for the current session, or returns
|
| 35 |
+
* `undefined` if there are no saved tokens.
|
| 36 |
+
*/
|
| 37 |
+
tokens(): OAuthTokens | undefined | Promise<OAuthTokens | undefined>;
|
| 38 |
+
/**
|
| 39 |
+
* Stores new OAuth tokens for the current session, after a successful
|
| 40 |
+
* authorization.
|
| 41 |
+
*/
|
| 42 |
+
saveTokens(tokens: OAuthTokens): void | Promise<void>;
|
| 43 |
+
/**
|
| 44 |
+
* Invoked to redirect the user agent to the given URL to begin the authorization flow.
|
| 45 |
+
*/
|
| 46 |
+
redirectToAuthorization(authorizationUrl: URL): void | Promise<void>;
|
| 47 |
+
/**
|
| 48 |
+
* Saves a PKCE code verifier for the current session, before redirecting to
|
| 49 |
+
* the authorization flow.
|
| 50 |
+
*/
|
| 51 |
+
saveCodeVerifier(codeVerifier: string): void | Promise<void>;
|
| 52 |
+
/**
|
| 53 |
+
* Loads the PKCE code verifier for the current session, necessary to validate
|
| 54 |
+
* the authorization result.
|
| 55 |
+
*/
|
| 56 |
+
codeVerifier(): string | Promise<string>;
|
| 57 |
+
}
|
| 58 |
+
export type AuthResult = "AUTHORIZED" | "REDIRECT";
|
| 59 |
+
export declare class UnauthorizedError extends Error {
|
| 60 |
+
constructor(message?: string);
|
| 61 |
+
}
|
| 62 |
+
/**
|
| 63 |
+
* Orchestrates the full auth flow with a server.
|
| 64 |
+
*
|
| 65 |
+
* This can be used as a single entry point for all authorization functionality,
|
| 66 |
+
* instead of linking together the other lower-level functions in this module.
|
| 67 |
+
*/
|
| 68 |
+
export declare function auth(provider: OAuthClientProvider, { serverUrl, authorizationCode }: {
|
| 69 |
+
serverUrl: string | URL;
|
| 70 |
+
authorizationCode?: string;
|
| 71 |
+
}): Promise<AuthResult>;
|
| 72 |
+
/**
|
| 73 |
+
* Looks up RFC 8414 OAuth 2.0 Authorization Server Metadata.
|
| 74 |
+
*
|
| 75 |
+
* If the server returns a 404 for the well-known endpoint, this function will
|
| 76 |
+
* return `undefined`. Any other errors will be thrown as exceptions.
|
| 77 |
+
*/
|
| 78 |
+
export declare function discoverOAuthMetadata(serverUrl: string | URL, opts?: {
|
| 79 |
+
protocolVersion?: string;
|
| 80 |
+
}): Promise<OAuthMetadata | undefined>;
|
| 81 |
+
/**
|
| 82 |
+
* Begins the authorization flow with the given server, by generating a PKCE challenge and constructing the authorization URL.
|
| 83 |
+
*/
|
| 84 |
+
export declare function startAuthorization(serverUrl: string | URL, { metadata, clientInformation, redirectUrl, }: {
|
| 85 |
+
metadata?: OAuthMetadata;
|
| 86 |
+
clientInformation: OAuthClientInformation;
|
| 87 |
+
redirectUrl: string | URL;
|
| 88 |
+
}): Promise<{
|
| 89 |
+
authorizationUrl: URL;
|
| 90 |
+
codeVerifier: string;
|
| 91 |
+
}>;
|
| 92 |
+
/**
|
| 93 |
+
* Exchanges an authorization code for an access token with the given server.
|
| 94 |
+
*/
|
| 95 |
+
export declare function exchangeAuthorization(serverUrl: string | URL, { metadata, clientInformation, authorizationCode, codeVerifier, }: {
|
| 96 |
+
metadata?: OAuthMetadata;
|
| 97 |
+
clientInformation: OAuthClientInformation;
|
| 98 |
+
authorizationCode: string;
|
| 99 |
+
codeVerifier: string;
|
| 100 |
+
}): Promise<OAuthTokens>;
|
| 101 |
+
/**
|
| 102 |
+
* Exchange a refresh token for an updated access token.
|
| 103 |
+
*/
|
| 104 |
+
export declare function refreshAuthorization(serverUrl: string | URL, { metadata, clientInformation, refreshToken, }: {
|
| 105 |
+
metadata?: OAuthMetadata;
|
| 106 |
+
clientInformation: OAuthClientInformation;
|
| 107 |
+
refreshToken: string;
|
| 108 |
+
}): Promise<OAuthTokens>;
|
| 109 |
+
/**
|
| 110 |
+
* Performs OAuth 2.0 Dynamic Client Registration according to RFC 7591.
|
| 111 |
+
*/
|
| 112 |
+
export declare function registerClient(serverUrl: string | URL, { metadata, clientMetadata, }: {
|
| 113 |
+
metadata?: OAuthMetadata;
|
| 114 |
+
clientMetadata: OAuthClientMetadata;
|
| 115 |
+
}): Promise<OAuthClientInformationFull>;
|
| 116 |
+
//# sourceMappingURL=auth.d.ts.map
|
crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/auth.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../src/client/auth.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,WAAW,EAAE,aAAa,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAG7I;;;;;;GAMG;AACH,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,IAAI,WAAW,IAAI,MAAM,GAAG,GAAG,CAAC;IAEhC;;OAEG;IACH,IAAI,cAAc,IAAI,mBAAmB,CAAC;IAE1C;;;;OAIG;IACH,iBAAiB,IAAI,sBAAsB,GAAG,SAAS,GAAG,OAAO,CAAC,sBAAsB,GAAG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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
| 3 |
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
| 4 |
+
};
|
| 5 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
| 6 |
+
exports.UnauthorizedError = void 0;
|
| 7 |
+
exports.auth = auth;
|
| 8 |
+
exports.discoverOAuthMetadata = discoverOAuthMetadata;
|
| 9 |
+
exports.startAuthorization = startAuthorization;
|
| 10 |
+
exports.exchangeAuthorization = exchangeAuthorization;
|
| 11 |
+
exports.refreshAuthorization = refreshAuthorization;
|
| 12 |
+
exports.registerClient = registerClient;
|
| 13 |
+
const pkce_challenge_1 = __importDefault(require("pkce-challenge"));
|
| 14 |
+
const types_js_1 = require("../types.js");
|
| 15 |
+
const auth_js_1 = require("../shared/auth.js");
|
| 16 |
+
class UnauthorizedError extends Error {
|
| 17 |
+
constructor(message) {
|
| 18 |
+
super(message !== null && message !== void 0 ? message : "Unauthorized");
|
| 19 |
+
}
|
| 20 |
+
}
|
| 21 |
+
exports.UnauthorizedError = UnauthorizedError;
|
| 22 |
+
/**
|
| 23 |
+
* Orchestrates the full auth flow with a server.
|
| 24 |
+
*
|
| 25 |
+
* This can be used as a single entry point for all authorization functionality,
|
| 26 |
+
* instead of linking together the other lower-level functions in this module.
|
| 27 |
+
*/
|
| 28 |
+
async function auth(provider, { serverUrl, authorizationCode }) {
|
| 29 |
+
const metadata = await discoverOAuthMetadata(serverUrl);
|
| 30 |
+
// Handle client registration if needed
|
| 31 |
+
let clientInformation = await Promise.resolve(provider.clientInformation());
|
| 32 |
+
if (!clientInformation) {
|
| 33 |
+
if (authorizationCode !== undefined) {
|
| 34 |
+
throw new Error("Existing OAuth client information is required when exchanging an authorization code");
|
| 35 |
+
}
|
| 36 |
+
if (!provider.saveClientInformation) {
|
| 37 |
+
throw new Error("OAuth client information must be saveable for dynamic registration");
|
| 38 |
+
}
|
| 39 |
+
const fullInformation = await registerClient(serverUrl, {
|
| 40 |
+
metadata,
|
| 41 |
+
clientMetadata: provider.clientMetadata,
|
| 42 |
+
});
|
| 43 |
+
await provider.saveClientInformation(fullInformation);
|
| 44 |
+
clientInformation = fullInformation;
|
| 45 |
+
}
|
| 46 |
+
// Exchange authorization code for tokens
|
| 47 |
+
if (authorizationCode !== undefined) {
|
| 48 |
+
const codeVerifier = await provider.codeVerifier();
|
| 49 |
+
const tokens = await exchangeAuthorization(serverUrl, {
|
| 50 |
+
metadata,
|
| 51 |
+
clientInformation,
|
| 52 |
+
authorizationCode,
|
| 53 |
+
codeVerifier,
|
| 54 |
+
});
|
| 55 |
+
await provider.saveTokens(tokens);
|
| 56 |
+
return "AUTHORIZED";
|
| 57 |
+
}
|
| 58 |
+
const tokens = await provider.tokens();
|
| 59 |
+
// Handle token refresh or new authorization
|
| 60 |
+
if (tokens === null || tokens === void 0 ? void 0 : tokens.refresh_token) {
|
| 61 |
+
try {
|
| 62 |
+
// Attempt to refresh the token
|
| 63 |
+
const newTokens = await refreshAuthorization(serverUrl, {
|
| 64 |
+
metadata,
|
| 65 |
+
clientInformation,
|
| 66 |
+
refreshToken: tokens.refresh_token,
|
| 67 |
+
});
|
| 68 |
+
await provider.saveTokens(newTokens);
|
| 69 |
+
return "AUTHORIZED";
|
| 70 |
+
}
|
| 71 |
+
catch (error) {
|
| 72 |
+
console.error("Could not refresh OAuth tokens:", error);
|
| 73 |
+
}
|
| 74 |
+
}
|
| 75 |
+
// Start new authorization flow
|
| 76 |
+
const { authorizationUrl, codeVerifier } = await startAuthorization(serverUrl, {
|
| 77 |
+
metadata,
|
| 78 |
+
clientInformation,
|
| 79 |
+
redirectUrl: provider.redirectUrl
|
| 80 |
+
});
|
| 81 |
+
await provider.saveCodeVerifier(codeVerifier);
|
| 82 |
+
await provider.redirectToAuthorization(authorizationUrl);
|
| 83 |
+
return "REDIRECT";
|
| 84 |
+
}
|
| 85 |
+
/**
|
| 86 |
+
* Looks up RFC 8414 OAuth 2.0 Authorization Server Metadata.
|
| 87 |
+
*
|
| 88 |
+
* If the server returns a 404 for the well-known endpoint, this function will
|
| 89 |
+
* return `undefined`. Any other errors will be thrown as exceptions.
|
| 90 |
+
*/
|
| 91 |
+
async function discoverOAuthMetadata(serverUrl, opts) {
|
| 92 |
+
var _a;
|
| 93 |
+
const url = new URL("/.well-known/oauth-authorization-server", serverUrl);
|
| 94 |
+
let response;
|
| 95 |
+
try {
|
| 96 |
+
response = await fetch(url, {
|
| 97 |
+
headers: {
|
| 98 |
+
"MCP-Protocol-Version": (_a = opts === null || opts === void 0 ? void 0 : opts.protocolVersion) !== null && _a !== void 0 ? _a : types_js_1.LATEST_PROTOCOL_VERSION
|
| 99 |
+
}
|
| 100 |
+
});
|
| 101 |
+
}
|
| 102 |
+
catch (error) {
|
| 103 |
+
// CORS errors come back as TypeError
|
| 104 |
+
if (error instanceof TypeError) {
|
| 105 |
+
response = await fetch(url);
|
| 106 |
+
}
|
| 107 |
+
else {
|
| 108 |
+
throw error;
|
| 109 |
+
}
|
| 110 |
+
}
|
| 111 |
+
if (response.status === 404) {
|
| 112 |
+
return undefined;
|
| 113 |
+
}
|
| 114 |
+
if (!response.ok) {
|
| 115 |
+
throw new Error(`HTTP ${response.status} trying to load well-known OAuth metadata`);
|
| 116 |
+
}
|
| 117 |
+
return auth_js_1.OAuthMetadataSchema.parse(await response.json());
|
| 118 |
+
}
|
| 119 |
+
/**
|
| 120 |
+
* Begins the authorization flow with the given server, by generating a PKCE challenge and constructing the authorization URL.
|
| 121 |
+
*/
|
| 122 |
+
async function startAuthorization(serverUrl, { metadata, clientInformation, redirectUrl, }) {
|
| 123 |
+
const responseType = "code";
|
| 124 |
+
const codeChallengeMethod = "S256";
|
| 125 |
+
let authorizationUrl;
|
| 126 |
+
if (metadata) {
|
| 127 |
+
authorizationUrl = new URL(metadata.authorization_endpoint);
|
| 128 |
+
if (!metadata.response_types_supported.includes(responseType)) {
|
| 129 |
+
throw new Error(`Incompatible auth server: does not support response type ${responseType}`);
|
| 130 |
+
}
|
| 131 |
+
if (!metadata.code_challenge_methods_supported ||
|
| 132 |
+
!metadata.code_challenge_methods_supported.includes(codeChallengeMethod)) {
|
| 133 |
+
throw new Error(`Incompatible auth server: does not support code challenge method ${codeChallengeMethod}`);
|
| 134 |
+
}
|
| 135 |
+
}
|
| 136 |
+
else {
|
| 137 |
+
authorizationUrl = new URL("/authorize", serverUrl);
|
| 138 |
+
}
|
| 139 |
+
// Generate PKCE challenge
|
| 140 |
+
const challenge = await (0, pkce_challenge_1.default)();
|
| 141 |
+
const codeVerifier = challenge.code_verifier;
|
| 142 |
+
const codeChallenge = challenge.code_challenge;
|
| 143 |
+
authorizationUrl.searchParams.set("response_type", responseType);
|
| 144 |
+
authorizationUrl.searchParams.set("client_id", clientInformation.client_id);
|
| 145 |
+
authorizationUrl.searchParams.set("code_challenge", codeChallenge);
|
| 146 |
+
authorizationUrl.searchParams.set("code_challenge_method", codeChallengeMethod);
|
| 147 |
+
authorizationUrl.searchParams.set("redirect_uri", String(redirectUrl));
|
| 148 |
+
return { authorizationUrl, codeVerifier };
|
| 149 |
+
}
|
| 150 |
+
/**
|
| 151 |
+
* Exchanges an authorization code for an access token with the given server.
|
| 152 |
+
*/
|
| 153 |
+
async function exchangeAuthorization(serverUrl, { metadata, clientInformation, authorizationCode, codeVerifier, }) {
|
| 154 |
+
const grantType = "authorization_code";
|
| 155 |
+
let tokenUrl;
|
| 156 |
+
if (metadata) {
|
| 157 |
+
tokenUrl = new URL(metadata.token_endpoint);
|
| 158 |
+
if (metadata.grant_types_supported &&
|
| 159 |
+
!metadata.grant_types_supported.includes(grantType)) {
|
| 160 |
+
throw new Error(`Incompatible auth server: does not support grant type ${grantType}`);
|
| 161 |
+
}
|
| 162 |
+
}
|
| 163 |
+
else {
|
| 164 |
+
tokenUrl = new URL("/token", serverUrl);
|
| 165 |
+
}
|
| 166 |
+
// Exchange code for tokens
|
| 167 |
+
const params = new URLSearchParams({
|
| 168 |
+
grant_type: grantType,
|
| 169 |
+
client_id: clientInformation.client_id,
|
| 170 |
+
code: authorizationCode,
|
| 171 |
+
code_verifier: codeVerifier,
|
| 172 |
+
});
|
| 173 |
+
if (clientInformation.client_secret) {
|
| 174 |
+
params.set("client_secret", clientInformation.client_secret);
|
| 175 |
+
}
|
| 176 |
+
const response = await fetch(tokenUrl, {
|
| 177 |
+
method: "POST",
|
| 178 |
+
headers: {
|
| 179 |
+
"Content-Type": "application/x-www-form-urlencoded",
|
| 180 |
+
},
|
| 181 |
+
body: params,
|
| 182 |
+
});
|
| 183 |
+
if (!response.ok) {
|
| 184 |
+
throw new Error(`Token exchange failed: HTTP ${response.status}`);
|
| 185 |
+
}
|
| 186 |
+
return auth_js_1.OAuthTokensSchema.parse(await response.json());
|
| 187 |
+
}
|
| 188 |
+
/**
|
| 189 |
+
* Exchange a refresh token for an updated access token.
|
| 190 |
+
*/
|
| 191 |
+
async function refreshAuthorization(serverUrl, { metadata, clientInformation, refreshToken, }) {
|
| 192 |
+
const grantType = "refresh_token";
|
| 193 |
+
let tokenUrl;
|
| 194 |
+
if (metadata) {
|
| 195 |
+
tokenUrl = new URL(metadata.token_endpoint);
|
| 196 |
+
if (metadata.grant_types_supported &&
|
| 197 |
+
!metadata.grant_types_supported.includes(grantType)) {
|
| 198 |
+
throw new Error(`Incompatible auth server: does not support grant type ${grantType}`);
|
| 199 |
+
}
|
| 200 |
+
}
|
| 201 |
+
else {
|
| 202 |
+
tokenUrl = new URL("/token", serverUrl);
|
| 203 |
+
}
|
| 204 |
+
// Exchange refresh token
|
| 205 |
+
const params = new URLSearchParams({
|
| 206 |
+
grant_type: grantType,
|
| 207 |
+
client_id: clientInformation.client_id,
|
| 208 |
+
refresh_token: refreshToken,
|
| 209 |
+
});
|
| 210 |
+
if (clientInformation.client_secret) {
|
| 211 |
+
params.set("client_secret", clientInformation.client_secret);
|
| 212 |
+
}
|
| 213 |
+
const response = await fetch(tokenUrl, {
|
| 214 |
+
method: "POST",
|
| 215 |
+
headers: {
|
| 216 |
+
"Content-Type": "application/x-www-form-urlencoded",
|
| 217 |
+
},
|
| 218 |
+
body: params,
|
| 219 |
+
});
|
| 220 |
+
if (!response.ok) {
|
| 221 |
+
throw new Error(`Token refresh failed: HTTP ${response.status}`);
|
| 222 |
+
}
|
| 223 |
+
return auth_js_1.OAuthTokensSchema.parse(await response.json());
|
| 224 |
+
}
|
| 225 |
+
/**
|
| 226 |
+
* Performs OAuth 2.0 Dynamic Client Registration according to RFC 7591.
|
| 227 |
+
*/
|
| 228 |
+
async function registerClient(serverUrl, { metadata, clientMetadata, }) {
|
| 229 |
+
let registrationUrl;
|
| 230 |
+
if (metadata) {
|
| 231 |
+
if (!metadata.registration_endpoint) {
|
| 232 |
+
throw new Error("Incompatible auth server: does not support dynamic client registration");
|
| 233 |
+
}
|
| 234 |
+
registrationUrl = new URL(metadata.registration_endpoint);
|
| 235 |
+
}
|
| 236 |
+
else {
|
| 237 |
+
registrationUrl = new URL("/register", serverUrl);
|
| 238 |
+
}
|
| 239 |
+
const response = await fetch(registrationUrl, {
|
| 240 |
+
method: "POST",
|
| 241 |
+
headers: {
|
| 242 |
+
"Content-Type": "application/json",
|
| 243 |
+
},
|
| 244 |
+
body: JSON.stringify(clientMetadata),
|
| 245 |
+
});
|
| 246 |
+
if (!response.ok) {
|
| 247 |
+
throw new Error(`Dynamic client registration failed: HTTP ${response.status}`);
|
| 248 |
+
}
|
| 249 |
+
return auth_js_1.OAuthClientInformationFullSchema.parse(await response.json());
|
| 250 |
+
}
|
| 251 |
+
//# sourceMappingURL=auth.js.map
|
crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/auth.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../src/client/auth.ts"],"names":[],"mappings":";;;;;;AAoFA,oBAoEC;AAQD,sDAgCC;AAKD,gDAoDC;AAKD,sDAyDC;AAKD,oDAsDC;AAKD,wCAmCC;AA1ZD,oEAA2C;AAC3C,0CAAsD;AAEtD,+CAA6G;AAqE7G,MAAa,iBAAkB,SAAQ,KAAK;IAC1C,YAAY,OAAgB;QAC1B,KAAK,CAAC,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,cAAc,CAAC,CAAC;IACnC,CAAC;CACF;AAJD,8CAIC;AAED;;;;;GAKG;AACI,KAAK,UAAU,IAAI,CACxB,QAA6B,EAC7B,EAAE,SAAS,EAAE,iBAAiB,EAA2D;IACzF,MAAM,QAAQ,GAAG,MAAM,qBAAqB,CAAC,SAAS,CAAC,CAAC;IAExD,uCAAuC;IACvC,IAAI,iBAAiB,GAAG,MAAM,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,iBAAiB,EAAE,CAAC,CAAC;IAC5E,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACvB,IAAI,iBAAiB,KAAK,SAAS,EAAE,CAAC;YACpC,MAAM,IAAI,KAAK,CAAC,qFAAqF,CAAC,CAAC;QACzG,CAAC;QAED,IAAI,CAAC,QAAQ,CAAC,qBAAqB,EAAE,CAAC;YACpC,MAAM,IAAI,KAAK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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { Protocol, ProtocolOptions, RequestOptions } from "../shared/protocol.js";
|
| 2 |
+
import { Transport } from "../shared/transport.js";
|
| 3 |
+
import { CallToolRequest, CallToolResultSchema, ClientCapabilities, ClientNotification, ClientRequest, ClientResult, CompatibilityCallToolResultSchema, CompleteRequest, GetPromptRequest, Implementation, ListPromptsRequest, ListResourcesRequest, ListResourceTemplatesRequest, ListToolsRequest, LoggingLevel, Notification, ReadResourceRequest, Request, Result, ServerCapabilities, SubscribeRequest, UnsubscribeRequest } from "../types.js";
|
| 4 |
+
export type ClientOptions = ProtocolOptions & {
|
| 5 |
+
/**
|
| 6 |
+
* Capabilities to advertise as being supported by this client.
|
| 7 |
+
*/
|
| 8 |
+
capabilities?: ClientCapabilities;
|
| 9 |
+
};
|
| 10 |
+
/**
|
| 11 |
+
* An MCP client on top of a pluggable transport.
|
| 12 |
+
*
|
| 13 |
+
* The client will automatically begin the initialization flow with the server when connect() is called.
|
| 14 |
+
*
|
| 15 |
+
* To use with custom types, extend the base Request/Notification/Result types and pass them as type parameters:
|
| 16 |
+
*
|
| 17 |
+
* ```typescript
|
| 18 |
+
* // Custom schemas
|
| 19 |
+
* const CustomRequestSchema = RequestSchema.extend({...})
|
| 20 |
+
* const CustomNotificationSchema = NotificationSchema.extend({...})
|
| 21 |
+
* const CustomResultSchema = ResultSchema.extend({...})
|
| 22 |
+
*
|
| 23 |
+
* // Type aliases
|
| 24 |
+
* type CustomRequest = z.infer<typeof CustomRequestSchema>
|
| 25 |
+
* type CustomNotification = z.infer<typeof CustomNotificationSchema>
|
| 26 |
+
* type CustomResult = z.infer<typeof CustomResultSchema>
|
| 27 |
+
*
|
| 28 |
+
* // Create typed client
|
| 29 |
+
* const client = new Client<CustomRequest, CustomNotification, CustomResult>({
|
| 30 |
+
* name: "CustomClient",
|
| 31 |
+
* version: "1.0.0"
|
| 32 |
+
* })
|
| 33 |
+
* ```
|
| 34 |
+
*/
|
| 35 |
+
export declare class Client<RequestT extends Request = Request, NotificationT extends Notification = Notification, ResultT extends Result = Result> extends Protocol<ClientRequest | RequestT, ClientNotification | NotificationT, ClientResult | ResultT> {
|
| 36 |
+
private _clientInfo;
|
| 37 |
+
private _serverCapabilities?;
|
| 38 |
+
private _serverVersion?;
|
| 39 |
+
private _capabilities;
|
| 40 |
+
private _instructions?;
|
| 41 |
+
/**
|
| 42 |
+
* Initializes this client with the given name and version information.
|
| 43 |
+
*/
|
| 44 |
+
constructor(_clientInfo: Implementation, options?: ClientOptions);
|
| 45 |
+
/**
|
| 46 |
+
* Registers new capabilities. This can only be called before connecting to a transport.
|
| 47 |
+
*
|
| 48 |
+
* The new capabilities will be merged with any existing capabilities previously given (e.g., at initialization).
|
| 49 |
+
*/
|
| 50 |
+
registerCapabilities(capabilities: ClientCapabilities): void;
|
| 51 |
+
protected assertCapability(capability: keyof ServerCapabilities, method: string): void;
|
| 52 |
+
connect(transport: Transport): Promise<void>;
|
| 53 |
+
/**
|
| 54 |
+
* After initialization has completed, this will be populated with the server's reported capabilities.
|
| 55 |
+
*/
|
| 56 |
+
getServerCapabilities(): ServerCapabilities | undefined;
|
| 57 |
+
/**
|
| 58 |
+
* After initialization has completed, this will be populated with information about the server's name and version.
|
| 59 |
+
*/
|
| 60 |
+
getServerVersion(): Implementation | undefined;
|
| 61 |
+
/**
|
| 62 |
+
* After initialization has completed, this may be populated with information about the server's instructions.
|
| 63 |
+
*/
|
| 64 |
+
getInstructions(): string | undefined;
|
| 65 |
+
protected assertCapabilityForMethod(method: RequestT["method"]): void;
|
| 66 |
+
protected assertNotificationCapability(method: NotificationT["method"]): void;
|
| 67 |
+
protected assertRequestHandlerCapability(method: string): void;
|
| 68 |
+
ping(options?: RequestOptions): Promise<{
|
| 69 |
+
_meta?: import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough"> | undefined;
|
| 70 |
+
}>;
|
| 71 |
+
complete(params: CompleteRequest["params"], options?: RequestOptions): Promise<import("zod").objectOutputType<import("zod").objectUtil.extendShape<{
|
| 72 |
+
_meta: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
| 73 |
+
}, {
|
| 74 |
+
completion: import("zod").ZodObject<{
|
| 75 |
+
values: import("zod").ZodArray<import("zod").ZodString, "many">;
|
| 76 |
+
total: import("zod").ZodOptional<import("zod").ZodNumber>;
|
| 77 |
+
hasMore: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
| 78 |
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
| 79 |
+
values: import("zod").ZodArray<import("zod").ZodString, "many">;
|
| 80 |
+
total: import("zod").ZodOptional<import("zod").ZodNumber>;
|
| 81 |
+
hasMore: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
| 82 |
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
| 83 |
+
values: import("zod").ZodArray<import("zod").ZodString, "many">;
|
| 84 |
+
total: import("zod").ZodOptional<import("zod").ZodNumber>;
|
| 85 |
+
hasMore: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
| 86 |
+
}, import("zod").ZodTypeAny, "passthrough">>;
|
| 87 |
+
}>, import("zod").ZodTypeAny, "passthrough">>;
|
| 88 |
+
setLoggingLevel(level: LoggingLevel, options?: RequestOptions): Promise<{
|
| 89 |
+
_meta?: import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough"> | undefined;
|
| 90 |
+
}>;
|
| 91 |
+
getPrompt(params: GetPromptRequest["params"], options?: RequestOptions): Promise<import("zod").objectOutputType<import("zod").objectUtil.extendShape<{
|
| 92 |
+
_meta: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
| 93 |
+
}, {
|
| 94 |
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
| 95 |
+
messages: import("zod").ZodArray<import("zod").ZodObject<{
|
| 96 |
+
role: import("zod").ZodEnum<["user", "assistant"]>;
|
| 97 |
+
content: import("zod").ZodUnion<[import("zod").ZodObject<{
|
| 98 |
+
type: import("zod").ZodLiteral<"text">;
|
| 99 |
+
text: import("zod").ZodString;
|
| 100 |
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
| 101 |
+
type: import("zod").ZodLiteral<"text">;
|
| 102 |
+
text: import("zod").ZodString;
|
| 103 |
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
| 104 |
+
type: import("zod").ZodLiteral<"text">;
|
| 105 |
+
text: import("zod").ZodString;
|
| 106 |
+
}, import("zod").ZodTypeAny, "passthrough">>, import("zod").ZodObject<{
|
| 107 |
+
type: import("zod").ZodLiteral<"image">;
|
| 108 |
+
data: import("zod").ZodString;
|
| 109 |
+
mimeType: import("zod").ZodString;
|
| 110 |
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
| 111 |
+
type: import("zod").ZodLiteral<"image">;
|
| 112 |
+
data: import("zod").ZodString;
|
| 113 |
+
mimeType: import("zod").ZodString;
|
| 114 |
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
| 115 |
+
type: import("zod").ZodLiteral<"image">;
|
| 116 |
+
data: import("zod").ZodString;
|
| 117 |
+
mimeType: import("zod").ZodString;
|
| 118 |
+
}, import("zod").ZodTypeAny, "passthrough">>, import("zod").ZodObject<{
|
| 119 |
+
type: import("zod").ZodLiteral<"resource">;
|
| 120 |
+
resource: import("zod").ZodUnion<[import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
| 121 |
+
uri: import("zod").ZodString;
|
| 122 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 123 |
+
}, {
|
| 124 |
+
text: import("zod").ZodString;
|
| 125 |
+
}>, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<import("zod").objectUtil.extendShape<{
|
| 126 |
+
uri: import("zod").ZodString;
|
| 127 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 128 |
+
}, {
|
| 129 |
+
text: import("zod").ZodString;
|
| 130 |
+
}>, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<import("zod").objectUtil.extendShape<{
|
| 131 |
+
uri: import("zod").ZodString;
|
| 132 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 133 |
+
}, {
|
| 134 |
+
text: import("zod").ZodString;
|
| 135 |
+
}>, import("zod").ZodTypeAny, "passthrough">>, import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
| 136 |
+
uri: import("zod").ZodString;
|
| 137 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 138 |
+
}, {
|
| 139 |
+
blob: import("zod").ZodString;
|
| 140 |
+
}>, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<import("zod").objectUtil.extendShape<{
|
| 141 |
+
uri: import("zod").ZodString;
|
| 142 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 143 |
+
}, {
|
| 144 |
+
blob: import("zod").ZodString;
|
| 145 |
+
}>, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<import("zod").objectUtil.extendShape<{
|
| 146 |
+
uri: import("zod").ZodString;
|
| 147 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 148 |
+
}, {
|
| 149 |
+
blob: import("zod").ZodString;
|
| 150 |
+
}>, import("zod").ZodTypeAny, "passthrough">>]>;
|
| 151 |
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
| 152 |
+
type: import("zod").ZodLiteral<"resource">;
|
| 153 |
+
resource: import("zod").ZodUnion<[import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
| 154 |
+
uri: import("zod").ZodString;
|
| 155 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 156 |
+
}, {
|
| 157 |
+
text: import("zod").ZodString;
|
| 158 |
+
}>, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<import("zod").objectUtil.extendShape<{
|
| 159 |
+
uri: import("zod").ZodString;
|
| 160 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 161 |
+
}, {
|
| 162 |
+
text: import("zod").ZodString;
|
| 163 |
+
}>, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<import("zod").objectUtil.extendShape<{
|
| 164 |
+
uri: import("zod").ZodString;
|
| 165 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 166 |
+
}, {
|
| 167 |
+
text: import("zod").ZodString;
|
| 168 |
+
}>, import("zod").ZodTypeAny, "passthrough">>, import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
| 169 |
+
uri: import("zod").ZodString;
|
| 170 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 171 |
+
}, {
|
| 172 |
+
blob: import("zod").ZodString;
|
| 173 |
+
}>, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<import("zod").objectUtil.extendShape<{
|
| 174 |
+
uri: import("zod").ZodString;
|
| 175 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 176 |
+
}, {
|
| 177 |
+
blob: import("zod").ZodString;
|
| 178 |
+
}>, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<import("zod").objectUtil.extendShape<{
|
| 179 |
+
uri: import("zod").ZodString;
|
| 180 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 181 |
+
}, {
|
| 182 |
+
blob: import("zod").ZodString;
|
| 183 |
+
}>, import("zod").ZodTypeAny, "passthrough">>]>;
|
| 184 |
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
| 185 |
+
type: import("zod").ZodLiteral<"resource">;
|
| 186 |
+
resource: import("zod").ZodUnion<[import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
| 187 |
+
uri: import("zod").ZodString;
|
| 188 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 189 |
+
}, {
|
| 190 |
+
text: import("zod").ZodString;
|
| 191 |
+
}>, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<import("zod").objectUtil.extendShape<{
|
| 192 |
+
uri: import("zod").ZodString;
|
| 193 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 194 |
+
}, {
|
| 195 |
+
text: import("zod").ZodString;
|
| 196 |
+
}>, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<import("zod").objectUtil.extendShape<{
|
| 197 |
+
uri: import("zod").ZodString;
|
| 198 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 199 |
+
}, {
|
| 200 |
+
text: import("zod").ZodString;
|
| 201 |
+
}>, import("zod").ZodTypeAny, "passthrough">>, import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
| 202 |
+
uri: import("zod").ZodString;
|
| 203 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 204 |
+
}, {
|
| 205 |
+
blob: import("zod").ZodString;
|
| 206 |
+
}>, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<import("zod").objectUtil.extendShape<{
|
| 207 |
+
uri: import("zod").ZodString;
|
| 208 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 209 |
+
}, {
|
| 210 |
+
blob: import("zod").ZodString;
|
| 211 |
+
}>, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<import("zod").objectUtil.extendShape<{
|
| 212 |
+
uri: import("zod").ZodString;
|
| 213 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 214 |
+
}, {
|
| 215 |
+
blob: import("zod").ZodString;
|
| 216 |
+
}>, import("zod").ZodTypeAny, "passthrough">>]>;
|
| 217 |
+
}, import("zod").ZodTypeAny, "passthrough">>]>;
|
| 218 |
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
| 219 |
+
role: import("zod").ZodEnum<["user", "assistant"]>;
|
| 220 |
+
content: import("zod").ZodUnion<[import("zod").ZodObject<{
|
| 221 |
+
type: import("zod").ZodLiteral<"text">;
|
| 222 |
+
text: import("zod").ZodString;
|
| 223 |
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
| 224 |
+
type: import("zod").ZodLiteral<"text">;
|
| 225 |
+
text: import("zod").ZodString;
|
| 226 |
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
| 227 |
+
type: import("zod").ZodLiteral<"text">;
|
| 228 |
+
text: import("zod").ZodString;
|
| 229 |
+
}, import("zod").ZodTypeAny, "passthrough">>, import("zod").ZodObject<{
|
| 230 |
+
type: import("zod").ZodLiteral<"image">;
|
| 231 |
+
data: import("zod").ZodString;
|
| 232 |
+
mimeType: import("zod").ZodString;
|
| 233 |
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
| 234 |
+
type: import("zod").ZodLiteral<"image">;
|
| 235 |
+
data: import("zod").ZodString;
|
| 236 |
+
mimeType: import("zod").ZodString;
|
| 237 |
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
| 238 |
+
type: import("zod").ZodLiteral<"image">;
|
| 239 |
+
data: import("zod").ZodString;
|
| 240 |
+
mimeType: import("zod").ZodString;
|
| 241 |
+
}, import("zod").ZodTypeAny, "passthrough">>, import("zod").ZodObject<{
|
| 242 |
+
type: import("zod").ZodLiteral<"resource">;
|
| 243 |
+
resource: import("zod").ZodUnion<[import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
| 244 |
+
uri: import("zod").ZodString;
|
| 245 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 246 |
+
}, {
|
| 247 |
+
text: import("zod").ZodString;
|
| 248 |
+
}>, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<import("zod").objectUtil.extendShape<{
|
| 249 |
+
uri: import("zod").ZodString;
|
| 250 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 251 |
+
}, {
|
| 252 |
+
text: import("zod").ZodString;
|
| 253 |
+
}>, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<import("zod").objectUtil.extendShape<{
|
| 254 |
+
uri: import("zod").ZodString;
|
| 255 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 256 |
+
}, {
|
| 257 |
+
text: import("zod").ZodString;
|
| 258 |
+
}>, import("zod").ZodTypeAny, "passthrough">>, import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
| 259 |
+
uri: import("zod").ZodString;
|
| 260 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 261 |
+
}, {
|
| 262 |
+
blob: import("zod").ZodString;
|
| 263 |
+
}>, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<import("zod").objectUtil.extendShape<{
|
| 264 |
+
uri: import("zod").ZodString;
|
| 265 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 266 |
+
}, {
|
| 267 |
+
blob: import("zod").ZodString;
|
| 268 |
+
}>, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<import("zod").objectUtil.extendShape<{
|
| 269 |
+
uri: import("zod").ZodString;
|
| 270 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 271 |
+
}, {
|
| 272 |
+
blob: import("zod").ZodString;
|
| 273 |
+
}>, import("zod").ZodTypeAny, "passthrough">>]>;
|
| 274 |
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
| 275 |
+
type: import("zod").ZodLiteral<"resource">;
|
| 276 |
+
resource: import("zod").ZodUnion<[import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
| 277 |
+
uri: import("zod").ZodString;
|
| 278 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 279 |
+
}, {
|
| 280 |
+
text: import("zod").ZodString;
|
| 281 |
+
}>, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<import("zod").objectUtil.extendShape<{
|
| 282 |
+
uri: import("zod").ZodString;
|
| 283 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 284 |
+
}, {
|
| 285 |
+
text: import("zod").ZodString;
|
| 286 |
+
}>, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<import("zod").objectUtil.extendShape<{
|
| 287 |
+
uri: import("zod").ZodString;
|
| 288 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 289 |
+
}, {
|
| 290 |
+
text: import("zod").ZodString;
|
| 291 |
+
}>, import("zod").ZodTypeAny, "passthrough">>, import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
| 292 |
+
uri: import("zod").ZodString;
|
| 293 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 294 |
+
}, {
|
| 295 |
+
blob: import("zod").ZodString;
|
| 296 |
+
}>, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<import("zod").objectUtil.extendShape<{
|
| 297 |
+
uri: import("zod").ZodString;
|
| 298 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 299 |
+
}, {
|
| 300 |
+
blob: import("zod").ZodString;
|
| 301 |
+
}>, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<import("zod").objectUtil.extendShape<{
|
| 302 |
+
uri: import("zod").ZodString;
|
| 303 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 304 |
+
}, {
|
| 305 |
+
blob: import("zod").ZodString;
|
| 306 |
+
}>, import("zod").ZodTypeAny, "passthrough">>]>;
|
| 307 |
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
| 308 |
+
type: import("zod").ZodLiteral<"resource">;
|
| 309 |
+
resource: import("zod").ZodUnion<[import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
| 310 |
+
uri: import("zod").ZodString;
|
| 311 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 312 |
+
}, {
|
| 313 |
+
text: import("zod").ZodString;
|
| 314 |
+
}>, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<import("zod").objectUtil.extendShape<{
|
| 315 |
+
uri: import("zod").ZodString;
|
| 316 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 317 |
+
}, {
|
| 318 |
+
text: import("zod").ZodString;
|
| 319 |
+
}>, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<import("zod").objectUtil.extendShape<{
|
| 320 |
+
uri: import("zod").ZodString;
|
| 321 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 322 |
+
}, {
|
| 323 |
+
text: import("zod").ZodString;
|
| 324 |
+
}>, import("zod").ZodTypeAny, "passthrough">>, import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
| 325 |
+
uri: import("zod").ZodString;
|
| 326 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 327 |
+
}, {
|
| 328 |
+
blob: import("zod").ZodString;
|
| 329 |
+
}>, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<import("zod").objectUtil.extendShape<{
|
| 330 |
+
uri: import("zod").ZodString;
|
| 331 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 332 |
+
}, {
|
| 333 |
+
blob: import("zod").ZodString;
|
| 334 |
+
}>, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<import("zod").objectUtil.extendShape<{
|
| 335 |
+
uri: import("zod").ZodString;
|
| 336 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 337 |
+
}, {
|
| 338 |
+
blob: import("zod").ZodString;
|
| 339 |
+
}>, import("zod").ZodTypeAny, "passthrough">>]>;
|
| 340 |
+
}, import("zod").ZodTypeAny, "passthrough">>]>;
|
| 341 |
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
| 342 |
+
role: import("zod").ZodEnum<["user", "assistant"]>;
|
| 343 |
+
content: import("zod").ZodUnion<[import("zod").ZodObject<{
|
| 344 |
+
type: import("zod").ZodLiteral<"text">;
|
| 345 |
+
text: import("zod").ZodString;
|
| 346 |
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
| 347 |
+
type: import("zod").ZodLiteral<"text">;
|
| 348 |
+
text: import("zod").ZodString;
|
| 349 |
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
| 350 |
+
type: import("zod").ZodLiteral<"text">;
|
| 351 |
+
text: import("zod").ZodString;
|
| 352 |
+
}, import("zod").ZodTypeAny, "passthrough">>, import("zod").ZodObject<{
|
| 353 |
+
type: import("zod").ZodLiteral<"image">;
|
| 354 |
+
data: import("zod").ZodString;
|
| 355 |
+
mimeType: import("zod").ZodString;
|
| 356 |
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
| 357 |
+
type: import("zod").ZodLiteral<"image">;
|
| 358 |
+
data: import("zod").ZodString;
|
| 359 |
+
mimeType: import("zod").ZodString;
|
| 360 |
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
| 361 |
+
type: import("zod").ZodLiteral<"image">;
|
| 362 |
+
data: import("zod").ZodString;
|
| 363 |
+
mimeType: import("zod").ZodString;
|
| 364 |
+
}, import("zod").ZodTypeAny, "passthrough">>, import("zod").ZodObject<{
|
| 365 |
+
type: import("zod").ZodLiteral<"resource">;
|
| 366 |
+
resource: import("zod").ZodUnion<[import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
| 367 |
+
uri: import("zod").ZodString;
|
| 368 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 369 |
+
}, {
|
| 370 |
+
text: import("zod").ZodString;
|
| 371 |
+
}>, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<import("zod").objectUtil.extendShape<{
|
| 372 |
+
uri: import("zod").ZodString;
|
| 373 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 374 |
+
}, {
|
| 375 |
+
text: import("zod").ZodString;
|
| 376 |
+
}>, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<import("zod").objectUtil.extendShape<{
|
| 377 |
+
uri: import("zod").ZodString;
|
| 378 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 379 |
+
}, {
|
| 380 |
+
text: import("zod").ZodString;
|
| 381 |
+
}>, import("zod").ZodTypeAny, "passthrough">>, import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
| 382 |
+
uri: import("zod").ZodString;
|
| 383 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 384 |
+
}, {
|
| 385 |
+
blob: import("zod").ZodString;
|
| 386 |
+
}>, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<import("zod").objectUtil.extendShape<{
|
| 387 |
+
uri: import("zod").ZodString;
|
| 388 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 389 |
+
}, {
|
| 390 |
+
blob: import("zod").ZodString;
|
| 391 |
+
}>, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<import("zod").objectUtil.extendShape<{
|
| 392 |
+
uri: import("zod").ZodString;
|
| 393 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 394 |
+
}, {
|
| 395 |
+
blob: import("zod").ZodString;
|
| 396 |
+
}>, import("zod").ZodTypeAny, "passthrough">>]>;
|
| 397 |
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
| 398 |
+
type: import("zod").ZodLiteral<"resource">;
|
| 399 |
+
resource: import("zod").ZodUnion<[import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
| 400 |
+
uri: import("zod").ZodString;
|
| 401 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 402 |
+
}, {
|
| 403 |
+
text: import("zod").ZodString;
|
| 404 |
+
}>, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<import("zod").objectUtil.extendShape<{
|
| 405 |
+
uri: import("zod").ZodString;
|
| 406 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 407 |
+
}, {
|
| 408 |
+
text: import("zod").ZodString;
|
| 409 |
+
}>, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<import("zod").objectUtil.extendShape<{
|
| 410 |
+
uri: import("zod").ZodString;
|
| 411 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 412 |
+
}, {
|
| 413 |
+
text: import("zod").ZodString;
|
| 414 |
+
}>, import("zod").ZodTypeAny, "passthrough">>, import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
| 415 |
+
uri: import("zod").ZodString;
|
| 416 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 417 |
+
}, {
|
| 418 |
+
blob: import("zod").ZodString;
|
| 419 |
+
}>, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<import("zod").objectUtil.extendShape<{
|
| 420 |
+
uri: import("zod").ZodString;
|
| 421 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 422 |
+
}, {
|
| 423 |
+
blob: import("zod").ZodString;
|
| 424 |
+
}>, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<import("zod").objectUtil.extendShape<{
|
| 425 |
+
uri: import("zod").ZodString;
|
| 426 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 427 |
+
}, {
|
| 428 |
+
blob: import("zod").ZodString;
|
| 429 |
+
}>, import("zod").ZodTypeAny, "passthrough">>]>;
|
| 430 |
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
| 431 |
+
type: import("zod").ZodLiteral<"resource">;
|
| 432 |
+
resource: import("zod").ZodUnion<[import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
| 433 |
+
uri: import("zod").ZodString;
|
| 434 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 435 |
+
}, {
|
| 436 |
+
text: import("zod").ZodString;
|
| 437 |
+
}>, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<import("zod").objectUtil.extendShape<{
|
| 438 |
+
uri: import("zod").ZodString;
|
| 439 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 440 |
+
}, {
|
| 441 |
+
text: import("zod").ZodString;
|
| 442 |
+
}>, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<import("zod").objectUtil.extendShape<{
|
| 443 |
+
uri: import("zod").ZodString;
|
| 444 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 445 |
+
}, {
|
| 446 |
+
text: import("zod").ZodString;
|
| 447 |
+
}>, import("zod").ZodTypeAny, "passthrough">>, import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
| 448 |
+
uri: import("zod").ZodString;
|
| 449 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 450 |
+
}, {
|
| 451 |
+
blob: import("zod").ZodString;
|
| 452 |
+
}>, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<import("zod").objectUtil.extendShape<{
|
| 453 |
+
uri: import("zod").ZodString;
|
| 454 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 455 |
+
}, {
|
| 456 |
+
blob: import("zod").ZodString;
|
| 457 |
+
}>, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<import("zod").objectUtil.extendShape<{
|
| 458 |
+
uri: import("zod").ZodString;
|
| 459 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 460 |
+
}, {
|
| 461 |
+
blob: import("zod").ZodString;
|
| 462 |
+
}>, import("zod").ZodTypeAny, "passthrough">>]>;
|
| 463 |
+
}, import("zod").ZodTypeAny, "passthrough">>]>;
|
| 464 |
+
}, import("zod").ZodTypeAny, "passthrough">>, "many">;
|
| 465 |
+
}>, import("zod").ZodTypeAny, "passthrough">>;
|
| 466 |
+
listPrompts(params?: ListPromptsRequest["params"], options?: RequestOptions): Promise<import("zod").objectOutputType<import("zod").objectUtil.extendShape<import("zod").objectUtil.extendShape<{
|
| 467 |
+
_meta: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
| 468 |
+
}, {
|
| 469 |
+
nextCursor: import("zod").ZodOptional<import("zod").ZodString>;
|
| 470 |
+
}>, {
|
| 471 |
+
prompts: import("zod").ZodArray<import("zod").ZodObject<{
|
| 472 |
+
name: import("zod").ZodString;
|
| 473 |
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
| 474 |
+
arguments: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
| 475 |
+
name: import("zod").ZodString;
|
| 476 |
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
| 477 |
+
required: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
| 478 |
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
| 479 |
+
name: import("zod").ZodString;
|
| 480 |
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
| 481 |
+
required: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
| 482 |
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
| 483 |
+
name: import("zod").ZodString;
|
| 484 |
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
| 485 |
+
required: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
| 486 |
+
}, import("zod").ZodTypeAny, "passthrough">>, "many">>;
|
| 487 |
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
| 488 |
+
name: import("zod").ZodString;
|
| 489 |
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
| 490 |
+
arguments: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
| 491 |
+
name: import("zod").ZodString;
|
| 492 |
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
| 493 |
+
required: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
| 494 |
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
| 495 |
+
name: import("zod").ZodString;
|
| 496 |
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
| 497 |
+
required: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
| 498 |
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
| 499 |
+
name: import("zod").ZodString;
|
| 500 |
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
| 501 |
+
required: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
| 502 |
+
}, import("zod").ZodTypeAny, "passthrough">>, "many">>;
|
| 503 |
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
| 504 |
+
name: import("zod").ZodString;
|
| 505 |
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
| 506 |
+
arguments: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
| 507 |
+
name: import("zod").ZodString;
|
| 508 |
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
| 509 |
+
required: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
| 510 |
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
| 511 |
+
name: import("zod").ZodString;
|
| 512 |
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
| 513 |
+
required: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
| 514 |
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
| 515 |
+
name: import("zod").ZodString;
|
| 516 |
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
| 517 |
+
required: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
| 518 |
+
}, import("zod").ZodTypeAny, "passthrough">>, "many">>;
|
| 519 |
+
}, import("zod").ZodTypeAny, "passthrough">>, "many">;
|
| 520 |
+
}>, import("zod").ZodTypeAny, "passthrough">>;
|
| 521 |
+
listResources(params?: ListResourcesRequest["params"], options?: RequestOptions): Promise<import("zod").objectOutputType<import("zod").objectUtil.extendShape<import("zod").objectUtil.extendShape<{
|
| 522 |
+
_meta: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
| 523 |
+
}, {
|
| 524 |
+
nextCursor: import("zod").ZodOptional<import("zod").ZodString>;
|
| 525 |
+
}>, {
|
| 526 |
+
resources: import("zod").ZodArray<import("zod").ZodObject<{
|
| 527 |
+
uri: import("zod").ZodString;
|
| 528 |
+
name: import("zod").ZodString;
|
| 529 |
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
| 530 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 531 |
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
| 532 |
+
uri: import("zod").ZodString;
|
| 533 |
+
name: import("zod").ZodString;
|
| 534 |
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
| 535 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 536 |
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
| 537 |
+
uri: import("zod").ZodString;
|
| 538 |
+
name: import("zod").ZodString;
|
| 539 |
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
| 540 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 541 |
+
}, import("zod").ZodTypeAny, "passthrough">>, "many">;
|
| 542 |
+
}>, import("zod").ZodTypeAny, "passthrough">>;
|
| 543 |
+
listResourceTemplates(params?: ListResourceTemplatesRequest["params"], options?: RequestOptions): Promise<import("zod").objectOutputType<import("zod").objectUtil.extendShape<import("zod").objectUtil.extendShape<{
|
| 544 |
+
_meta: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
| 545 |
+
}, {
|
| 546 |
+
nextCursor: import("zod").ZodOptional<import("zod").ZodString>;
|
| 547 |
+
}>, {
|
| 548 |
+
resourceTemplates: import("zod").ZodArray<import("zod").ZodObject<{
|
| 549 |
+
uriTemplate: import("zod").ZodString;
|
| 550 |
+
name: import("zod").ZodString;
|
| 551 |
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
| 552 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 553 |
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
| 554 |
+
uriTemplate: import("zod").ZodString;
|
| 555 |
+
name: import("zod").ZodString;
|
| 556 |
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
| 557 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 558 |
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
| 559 |
+
uriTemplate: import("zod").ZodString;
|
| 560 |
+
name: import("zod").ZodString;
|
| 561 |
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
| 562 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 563 |
+
}, import("zod").ZodTypeAny, "passthrough">>, "many">;
|
| 564 |
+
}>, import("zod").ZodTypeAny, "passthrough">>;
|
| 565 |
+
readResource(params: ReadResourceRequest["params"], options?: RequestOptions): Promise<import("zod").objectOutputType<import("zod").objectUtil.extendShape<{
|
| 566 |
+
_meta: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
| 567 |
+
}, {
|
| 568 |
+
contents: import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
| 569 |
+
uri: import("zod").ZodString;
|
| 570 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 571 |
+
}, {
|
| 572 |
+
text: import("zod").ZodString;
|
| 573 |
+
}>, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<import("zod").objectUtil.extendShape<{
|
| 574 |
+
uri: import("zod").ZodString;
|
| 575 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 576 |
+
}, {
|
| 577 |
+
text: import("zod").ZodString;
|
| 578 |
+
}>, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<import("zod").objectUtil.extendShape<{
|
| 579 |
+
uri: import("zod").ZodString;
|
| 580 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 581 |
+
}, {
|
| 582 |
+
text: import("zod").ZodString;
|
| 583 |
+
}>, import("zod").ZodTypeAny, "passthrough">>, import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
| 584 |
+
uri: import("zod").ZodString;
|
| 585 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 586 |
+
}, {
|
| 587 |
+
blob: import("zod").ZodString;
|
| 588 |
+
}>, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<import("zod").objectUtil.extendShape<{
|
| 589 |
+
uri: import("zod").ZodString;
|
| 590 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 591 |
+
}, {
|
| 592 |
+
blob: import("zod").ZodString;
|
| 593 |
+
}>, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<import("zod").objectUtil.extendShape<{
|
| 594 |
+
uri: import("zod").ZodString;
|
| 595 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 596 |
+
}, {
|
| 597 |
+
blob: import("zod").ZodString;
|
| 598 |
+
}>, import("zod").ZodTypeAny, "passthrough">>]>, "many">;
|
| 599 |
+
}>, import("zod").ZodTypeAny, "passthrough">>;
|
| 600 |
+
subscribeResource(params: SubscribeRequest["params"], options?: RequestOptions): Promise<{
|
| 601 |
+
_meta?: import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough"> | undefined;
|
| 602 |
+
}>;
|
| 603 |
+
unsubscribeResource(params: UnsubscribeRequest["params"], options?: RequestOptions): Promise<{
|
| 604 |
+
_meta?: import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough"> | undefined;
|
| 605 |
+
}>;
|
| 606 |
+
callTool(params: CallToolRequest["params"], resultSchema?: typeof CallToolResultSchema | typeof CompatibilityCallToolResultSchema, options?: RequestOptions): Promise<import("zod").objectOutputType<import("zod").objectUtil.extendShape<{
|
| 607 |
+
_meta: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
| 608 |
+
}, {
|
| 609 |
+
content: import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodObject<{
|
| 610 |
+
type: import("zod").ZodLiteral<"text">;
|
| 611 |
+
text: import("zod").ZodString;
|
| 612 |
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
| 613 |
+
type: import("zod").ZodLiteral<"text">;
|
| 614 |
+
text: import("zod").ZodString;
|
| 615 |
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
| 616 |
+
type: import("zod").ZodLiteral<"text">;
|
| 617 |
+
text: import("zod").ZodString;
|
| 618 |
+
}, import("zod").ZodTypeAny, "passthrough">>, import("zod").ZodObject<{
|
| 619 |
+
type: import("zod").ZodLiteral<"image">;
|
| 620 |
+
data: import("zod").ZodString;
|
| 621 |
+
mimeType: import("zod").ZodString;
|
| 622 |
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
| 623 |
+
type: import("zod").ZodLiteral<"image">;
|
| 624 |
+
data: import("zod").ZodString;
|
| 625 |
+
mimeType: import("zod").ZodString;
|
| 626 |
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
| 627 |
+
type: import("zod").ZodLiteral<"image">;
|
| 628 |
+
data: import("zod").ZodString;
|
| 629 |
+
mimeType: import("zod").ZodString;
|
| 630 |
+
}, import("zod").ZodTypeAny, "passthrough">>, import("zod").ZodObject<{
|
| 631 |
+
type: import("zod").ZodLiteral<"resource">;
|
| 632 |
+
resource: import("zod").ZodUnion<[import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
| 633 |
+
uri: import("zod").ZodString;
|
| 634 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 635 |
+
}, {
|
| 636 |
+
text: import("zod").ZodString;
|
| 637 |
+
}>, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<import("zod").objectUtil.extendShape<{
|
| 638 |
+
uri: import("zod").ZodString;
|
| 639 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 640 |
+
}, {
|
| 641 |
+
text: import("zod").ZodString;
|
| 642 |
+
}>, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<import("zod").objectUtil.extendShape<{
|
| 643 |
+
uri: import("zod").ZodString;
|
| 644 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 645 |
+
}, {
|
| 646 |
+
text: import("zod").ZodString;
|
| 647 |
+
}>, import("zod").ZodTypeAny, "passthrough">>, import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
| 648 |
+
uri: import("zod").ZodString;
|
| 649 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 650 |
+
}, {
|
| 651 |
+
blob: import("zod").ZodString;
|
| 652 |
+
}>, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<import("zod").objectUtil.extendShape<{
|
| 653 |
+
uri: import("zod").ZodString;
|
| 654 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 655 |
+
}, {
|
| 656 |
+
blob: import("zod").ZodString;
|
| 657 |
+
}>, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<import("zod").objectUtil.extendShape<{
|
| 658 |
+
uri: import("zod").ZodString;
|
| 659 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 660 |
+
}, {
|
| 661 |
+
blob: import("zod").ZodString;
|
| 662 |
+
}>, import("zod").ZodTypeAny, "passthrough">>]>;
|
| 663 |
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
| 664 |
+
type: import("zod").ZodLiteral<"resource">;
|
| 665 |
+
resource: import("zod").ZodUnion<[import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
| 666 |
+
uri: import("zod").ZodString;
|
| 667 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 668 |
+
}, {
|
| 669 |
+
text: import("zod").ZodString;
|
| 670 |
+
}>, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<import("zod").objectUtil.extendShape<{
|
| 671 |
+
uri: import("zod").ZodString;
|
| 672 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 673 |
+
}, {
|
| 674 |
+
text: import("zod").ZodString;
|
| 675 |
+
}>, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<import("zod").objectUtil.extendShape<{
|
| 676 |
+
uri: import("zod").ZodString;
|
| 677 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 678 |
+
}, {
|
| 679 |
+
text: import("zod").ZodString;
|
| 680 |
+
}>, import("zod").ZodTypeAny, "passthrough">>, import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
| 681 |
+
uri: import("zod").ZodString;
|
| 682 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 683 |
+
}, {
|
| 684 |
+
blob: import("zod").ZodString;
|
| 685 |
+
}>, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<import("zod").objectUtil.extendShape<{
|
| 686 |
+
uri: import("zod").ZodString;
|
| 687 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 688 |
+
}, {
|
| 689 |
+
blob: import("zod").ZodString;
|
| 690 |
+
}>, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<import("zod").objectUtil.extendShape<{
|
| 691 |
+
uri: import("zod").ZodString;
|
| 692 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 693 |
+
}, {
|
| 694 |
+
blob: import("zod").ZodString;
|
| 695 |
+
}>, import("zod").ZodTypeAny, "passthrough">>]>;
|
| 696 |
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
| 697 |
+
type: import("zod").ZodLiteral<"resource">;
|
| 698 |
+
resource: import("zod").ZodUnion<[import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
| 699 |
+
uri: import("zod").ZodString;
|
| 700 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 701 |
+
}, {
|
| 702 |
+
text: import("zod").ZodString;
|
| 703 |
+
}>, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<import("zod").objectUtil.extendShape<{
|
| 704 |
+
uri: import("zod").ZodString;
|
| 705 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 706 |
+
}, {
|
| 707 |
+
text: import("zod").ZodString;
|
| 708 |
+
}>, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<import("zod").objectUtil.extendShape<{
|
| 709 |
+
uri: import("zod").ZodString;
|
| 710 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 711 |
+
}, {
|
| 712 |
+
text: import("zod").ZodString;
|
| 713 |
+
}>, import("zod").ZodTypeAny, "passthrough">>, import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
| 714 |
+
uri: import("zod").ZodString;
|
| 715 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 716 |
+
}, {
|
| 717 |
+
blob: import("zod").ZodString;
|
| 718 |
+
}>, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<import("zod").objectUtil.extendShape<{
|
| 719 |
+
uri: import("zod").ZodString;
|
| 720 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 721 |
+
}, {
|
| 722 |
+
blob: import("zod").ZodString;
|
| 723 |
+
}>, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<import("zod").objectUtil.extendShape<{
|
| 724 |
+
uri: import("zod").ZodString;
|
| 725 |
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
| 726 |
+
}, {
|
| 727 |
+
blob: import("zod").ZodString;
|
| 728 |
+
}>, import("zod").ZodTypeAny, "passthrough">>]>;
|
| 729 |
+
}, import("zod").ZodTypeAny, "passthrough">>]>, "many">;
|
| 730 |
+
isError: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodBoolean>>;
|
| 731 |
+
}>, import("zod").ZodTypeAny, "passthrough"> | import("zod").objectOutputType<import("zod").objectUtil.extendShape<{
|
| 732 |
+
_meta: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
| 733 |
+
}, {
|
| 734 |
+
toolResult: import("zod").ZodUnknown;
|
| 735 |
+
}>, import("zod").ZodTypeAny, "passthrough">>;
|
| 736 |
+
listTools(params?: ListToolsRequest["params"], options?: RequestOptions): Promise<import("zod").objectOutputType<import("zod").objectUtil.extendShape<import("zod").objectUtil.extendShape<{
|
| 737 |
+
_meta: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
| 738 |
+
}, {
|
| 739 |
+
nextCursor: import("zod").ZodOptional<import("zod").ZodString>;
|
| 740 |
+
}>, {
|
| 741 |
+
tools: import("zod").ZodArray<import("zod").ZodObject<{
|
| 742 |
+
name: import("zod").ZodString;
|
| 743 |
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
| 744 |
+
inputSchema: import("zod").ZodObject<{
|
| 745 |
+
type: import("zod").ZodLiteral<"object">;
|
| 746 |
+
properties: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
| 747 |
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
| 748 |
+
type: import("zod").ZodLiteral<"object">;
|
| 749 |
+
properties: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
| 750 |
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
| 751 |
+
type: import("zod").ZodLiteral<"object">;
|
| 752 |
+
properties: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
| 753 |
+
}, import("zod").ZodTypeAny, "passthrough">>;
|
| 754 |
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
| 755 |
+
name: import("zod").ZodString;
|
| 756 |
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
| 757 |
+
inputSchema: import("zod").ZodObject<{
|
| 758 |
+
type: import("zod").ZodLiteral<"object">;
|
| 759 |
+
properties: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
| 760 |
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
| 761 |
+
type: import("zod").ZodLiteral<"object">;
|
| 762 |
+
properties: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
| 763 |
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
| 764 |
+
type: import("zod").ZodLiteral<"object">;
|
| 765 |
+
properties: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
| 766 |
+
}, import("zod").ZodTypeAny, "passthrough">>;
|
| 767 |
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
| 768 |
+
name: import("zod").ZodString;
|
| 769 |
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
| 770 |
+
inputSchema: import("zod").ZodObject<{
|
| 771 |
+
type: import("zod").ZodLiteral<"object">;
|
| 772 |
+
properties: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
| 773 |
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
| 774 |
+
type: import("zod").ZodLiteral<"object">;
|
| 775 |
+
properties: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
| 776 |
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
| 777 |
+
type: import("zod").ZodLiteral<"object">;
|
| 778 |
+
properties: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
| 779 |
+
}, import("zod").ZodTypeAny, "passthrough">>;
|
| 780 |
+
}, import("zod").ZodTypeAny, "passthrough">>, "many">;
|
| 781 |
+
}>, import("zod").ZodTypeAny, "passthrough">>;
|
| 782 |
+
sendRootsListChanged(): Promise<void>;
|
| 783 |
+
}
|
| 784 |
+
//# sourceMappingURL=index.d.ts.map
|
crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/index.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EACR,eAAe,EACf,cAAc,EACf,MAAM,uBAAuB,CAAC;AAC/B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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
| 3 |
+
exports.Client = void 0;
|
| 4 |
+
const protocol_js_1 = require("../shared/protocol.js");
|
| 5 |
+
const types_js_1 = require("../types.js");
|
| 6 |
+
/**
|
| 7 |
+
* An MCP client on top of a pluggable transport.
|
| 8 |
+
*
|
| 9 |
+
* The client will automatically begin the initialization flow with the server when connect() is called.
|
| 10 |
+
*
|
| 11 |
+
* To use with custom types, extend the base Request/Notification/Result types and pass them as type parameters:
|
| 12 |
+
*
|
| 13 |
+
* ```typescript
|
| 14 |
+
* // Custom schemas
|
| 15 |
+
* const CustomRequestSchema = RequestSchema.extend({...})
|
| 16 |
+
* const CustomNotificationSchema = NotificationSchema.extend({...})
|
| 17 |
+
* const CustomResultSchema = ResultSchema.extend({...})
|
| 18 |
+
*
|
| 19 |
+
* // Type aliases
|
| 20 |
+
* type CustomRequest = z.infer<typeof CustomRequestSchema>
|
| 21 |
+
* type CustomNotification = z.infer<typeof CustomNotificationSchema>
|
| 22 |
+
* type CustomResult = z.infer<typeof CustomResultSchema>
|
| 23 |
+
*
|
| 24 |
+
* // Create typed client
|
| 25 |
+
* const client = new Client<CustomRequest, CustomNotification, CustomResult>({
|
| 26 |
+
* name: "CustomClient",
|
| 27 |
+
* version: "1.0.0"
|
| 28 |
+
* })
|
| 29 |
+
* ```
|
| 30 |
+
*/
|
| 31 |
+
class Client extends protocol_js_1.Protocol {
|
| 32 |
+
/**
|
| 33 |
+
* Initializes this client with the given name and version information.
|
| 34 |
+
*/
|
| 35 |
+
constructor(_clientInfo, options) {
|
| 36 |
+
var _a;
|
| 37 |
+
super(options);
|
| 38 |
+
this._clientInfo = _clientInfo;
|
| 39 |
+
this._capabilities = (_a = options === null || options === void 0 ? void 0 : options.capabilities) !== null && _a !== void 0 ? _a : {};
|
| 40 |
+
}
|
| 41 |
+
/**
|
| 42 |
+
* Registers new capabilities. This can only be called before connecting to a transport.
|
| 43 |
+
*
|
| 44 |
+
* The new capabilities will be merged with any existing capabilities previously given (e.g., at initialization).
|
| 45 |
+
*/
|
| 46 |
+
registerCapabilities(capabilities) {
|
| 47 |
+
if (this.transport) {
|
| 48 |
+
throw new Error("Cannot register capabilities after connecting to transport");
|
| 49 |
+
}
|
| 50 |
+
this._capabilities = (0, protocol_js_1.mergeCapabilities)(this._capabilities, capabilities);
|
| 51 |
+
}
|
| 52 |
+
assertCapability(capability, method) {
|
| 53 |
+
var _a;
|
| 54 |
+
if (!((_a = this._serverCapabilities) === null || _a === void 0 ? void 0 : _a[capability])) {
|
| 55 |
+
throw new Error(`Server does not support ${capability} (required for ${method})`);
|
| 56 |
+
}
|
| 57 |
+
}
|
| 58 |
+
async connect(transport) {
|
| 59 |
+
await super.connect(transport);
|
| 60 |
+
try {
|
| 61 |
+
const result = await this.request({
|
| 62 |
+
method: "initialize",
|
| 63 |
+
params: {
|
| 64 |
+
protocolVersion: types_js_1.LATEST_PROTOCOL_VERSION,
|
| 65 |
+
capabilities: this._capabilities,
|
| 66 |
+
clientInfo: this._clientInfo,
|
| 67 |
+
},
|
| 68 |
+
}, types_js_1.InitializeResultSchema);
|
| 69 |
+
if (result === undefined) {
|
| 70 |
+
throw new Error(`Server sent invalid initialize result: ${result}`);
|
| 71 |
+
}
|
| 72 |
+
if (!types_js_1.SUPPORTED_PROTOCOL_VERSIONS.includes(result.protocolVersion)) {
|
| 73 |
+
throw new Error(`Server's protocol version is not supported: ${result.protocolVersion}`);
|
| 74 |
+
}
|
| 75 |
+
this._serverCapabilities = result.capabilities;
|
| 76 |
+
this._serverVersion = result.serverInfo;
|
| 77 |
+
this._instructions = result.instructions;
|
| 78 |
+
await this.notification({
|
| 79 |
+
method: "notifications/initialized",
|
| 80 |
+
});
|
| 81 |
+
}
|
| 82 |
+
catch (error) {
|
| 83 |
+
// Disconnect if initialization fails.
|
| 84 |
+
void this.close();
|
| 85 |
+
throw error;
|
| 86 |
+
}
|
| 87 |
+
}
|
| 88 |
+
/**
|
| 89 |
+
* After initialization has completed, this will be populated with the server's reported capabilities.
|
| 90 |
+
*/
|
| 91 |
+
getServerCapabilities() {
|
| 92 |
+
return this._serverCapabilities;
|
| 93 |
+
}
|
| 94 |
+
/**
|
| 95 |
+
* After initialization has completed, this will be populated with information about the server's name and version.
|
| 96 |
+
*/
|
| 97 |
+
getServerVersion() {
|
| 98 |
+
return this._serverVersion;
|
| 99 |
+
}
|
| 100 |
+
/**
|
| 101 |
+
* After initialization has completed, this may be populated with information about the server's instructions.
|
| 102 |
+
*/
|
| 103 |
+
getInstructions() {
|
| 104 |
+
return this._instructions;
|
| 105 |
+
}
|
| 106 |
+
assertCapabilityForMethod(method) {
|
| 107 |
+
var _a, _b, _c, _d, _e;
|
| 108 |
+
switch (method) {
|
| 109 |
+
case "logging/setLevel":
|
| 110 |
+
if (!((_a = this._serverCapabilities) === null || _a === void 0 ? void 0 : _a.logging)) {
|
| 111 |
+
throw new Error(`Server does not support logging (required for ${method})`);
|
| 112 |
+
}
|
| 113 |
+
break;
|
| 114 |
+
case "prompts/get":
|
| 115 |
+
case "prompts/list":
|
| 116 |
+
if (!((_b = this._serverCapabilities) === null || _b === void 0 ? void 0 : _b.prompts)) {
|
| 117 |
+
throw new Error(`Server does not support prompts (required for ${method})`);
|
| 118 |
+
}
|
| 119 |
+
break;
|
| 120 |
+
case "resources/list":
|
| 121 |
+
case "resources/templates/list":
|
| 122 |
+
case "resources/read":
|
| 123 |
+
case "resources/subscribe":
|
| 124 |
+
case "resources/unsubscribe":
|
| 125 |
+
if (!((_c = this._serverCapabilities) === null || _c === void 0 ? void 0 : _c.resources)) {
|
| 126 |
+
throw new Error(`Server does not support resources (required for ${method})`);
|
| 127 |
+
}
|
| 128 |
+
if (method === "resources/subscribe" &&
|
| 129 |
+
!this._serverCapabilities.resources.subscribe) {
|
| 130 |
+
throw new Error(`Server does not support resource subscriptions (required for ${method})`);
|
| 131 |
+
}
|
| 132 |
+
break;
|
| 133 |
+
case "tools/call":
|
| 134 |
+
case "tools/list":
|
| 135 |
+
if (!((_d = this._serverCapabilities) === null || _d === void 0 ? void 0 : _d.tools)) {
|
| 136 |
+
throw new Error(`Server does not support tools (required for ${method})`);
|
| 137 |
+
}
|
| 138 |
+
break;
|
| 139 |
+
case "completion/complete":
|
| 140 |
+
if (!((_e = this._serverCapabilities) === null || _e === void 0 ? void 0 : _e.prompts)) {
|
| 141 |
+
throw new Error(`Server does not support prompts (required for ${method})`);
|
| 142 |
+
}
|
| 143 |
+
break;
|
| 144 |
+
case "initialize":
|
| 145 |
+
// No specific capability required for initialize
|
| 146 |
+
break;
|
| 147 |
+
case "ping":
|
| 148 |
+
// No specific capability required for ping
|
| 149 |
+
break;
|
| 150 |
+
}
|
| 151 |
+
}
|
| 152 |
+
assertNotificationCapability(method) {
|
| 153 |
+
var _a;
|
| 154 |
+
switch (method) {
|
| 155 |
+
case "notifications/roots/list_changed":
|
| 156 |
+
if (!((_a = this._capabilities.roots) === null || _a === void 0 ? void 0 : _a.listChanged)) {
|
| 157 |
+
throw new Error(`Client does not support roots list changed notifications (required for ${method})`);
|
| 158 |
+
}
|
| 159 |
+
break;
|
| 160 |
+
case "notifications/initialized":
|
| 161 |
+
// No specific capability required for initialized
|
| 162 |
+
break;
|
| 163 |
+
case "notifications/cancelled":
|
| 164 |
+
// Cancellation notifications are always allowed
|
| 165 |
+
break;
|
| 166 |
+
case "notifications/progress":
|
| 167 |
+
// Progress notifications are always allowed
|
| 168 |
+
break;
|
| 169 |
+
}
|
| 170 |
+
}
|
| 171 |
+
assertRequestHandlerCapability(method) {
|
| 172 |
+
switch (method) {
|
| 173 |
+
case "sampling/createMessage":
|
| 174 |
+
if (!this._capabilities.sampling) {
|
| 175 |
+
throw new Error(`Client does not support sampling capability (required for ${method})`);
|
| 176 |
+
}
|
| 177 |
+
break;
|
| 178 |
+
case "roots/list":
|
| 179 |
+
if (!this._capabilities.roots) {
|
| 180 |
+
throw new Error(`Client does not support roots capability (required for ${method})`);
|
| 181 |
+
}
|
| 182 |
+
break;
|
| 183 |
+
case "ping":
|
| 184 |
+
// No specific capability required for ping
|
| 185 |
+
break;
|
| 186 |
+
}
|
| 187 |
+
}
|
| 188 |
+
async ping(options) {
|
| 189 |
+
return this.request({ method: "ping" }, types_js_1.EmptyResultSchema, options);
|
| 190 |
+
}
|
| 191 |
+
async complete(params, options) {
|
| 192 |
+
return this.request({ method: "completion/complete", params }, types_js_1.CompleteResultSchema, options);
|
| 193 |
+
}
|
| 194 |
+
async setLoggingLevel(level, options) {
|
| 195 |
+
return this.request({ method: "logging/setLevel", params: { level } }, types_js_1.EmptyResultSchema, options);
|
| 196 |
+
}
|
| 197 |
+
async getPrompt(params, options) {
|
| 198 |
+
return this.request({ method: "prompts/get", params }, types_js_1.GetPromptResultSchema, options);
|
| 199 |
+
}
|
| 200 |
+
async listPrompts(params, options) {
|
| 201 |
+
return this.request({ method: "prompts/list", params }, types_js_1.ListPromptsResultSchema, options);
|
| 202 |
+
}
|
| 203 |
+
async listResources(params, options) {
|
| 204 |
+
return this.request({ method: "resources/list", params }, types_js_1.ListResourcesResultSchema, options);
|
| 205 |
+
}
|
| 206 |
+
async listResourceTemplates(params, options) {
|
| 207 |
+
return this.request({ method: "resources/templates/list", params }, types_js_1.ListResourceTemplatesResultSchema, options);
|
| 208 |
+
}
|
| 209 |
+
async readResource(params, options) {
|
| 210 |
+
return this.request({ method: "resources/read", params }, types_js_1.ReadResourceResultSchema, options);
|
| 211 |
+
}
|
| 212 |
+
async subscribeResource(params, options) {
|
| 213 |
+
return this.request({ method: "resources/subscribe", params }, types_js_1.EmptyResultSchema, options);
|
| 214 |
+
}
|
| 215 |
+
async unsubscribeResource(params, options) {
|
| 216 |
+
return this.request({ method: "resources/unsubscribe", params }, types_js_1.EmptyResultSchema, options);
|
| 217 |
+
}
|
| 218 |
+
async callTool(params, resultSchema = types_js_1.CallToolResultSchema, options) {
|
| 219 |
+
return this.request({ method: "tools/call", params }, resultSchema, options);
|
| 220 |
+
}
|
| 221 |
+
async listTools(params, options) {
|
| 222 |
+
return this.request({ method: "tools/list", params }, types_js_1.ListToolsResultSchema, options);
|
| 223 |
+
}
|
| 224 |
+
async sendRootsListChanged() {
|
| 225 |
+
return this.notification({ method: "notifications/roots/list_changed" });
|
| 226 |
+
}
|
| 227 |
+
}
|
| 228 |
+
exports.Client = Client;
|
| 229 |
+
//# sourceMappingURL=index.js.map
|
crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/client/index.ts"],"names":[],"mappings":";;;AAAA,uDAK+B;AAE/B,0CAkCqB;AASrB;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAa,MAIX,SAAQ,sBAIT;IAMC;;OAEG;IACH,YACU,WAA2B,EACnC,OAAuB;;QAEvB,KAAK,CAAC,OAAO,CAAC,CAAC;QAHP,gBAAW,GAAX,WAAW,CAAgB;QAInC,IAAI,CAAC,aAAa,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,YAAY,mCAAI,EAAE,CAAC;IACnD,CAAC;IAED;;;;OAIG;IACI,oBAAoB,CAAC,YAAgC;QAC1D,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YACnB,MAAM,IAAI,KAAK,CACb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QACxB,OAAO,IAAI,CAAC,YAAY,CAAC,EAAE,MAAM,EAAE,kCAAkC,EAAE,CAAC,CAAC;IAC3E,CAAC;CACF;AApWD,wBAoWC"}
|
crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/sse.d.ts
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { type ErrorEvent, type EventSourceInit } from "eventsource";
|
| 2 |
+
import { Transport } from "../shared/transport.js";
|
| 3 |
+
import { JSONRPCMessage } from "../types.js";
|
| 4 |
+
import { OAuthClientProvider } from "./auth.js";
|
| 5 |
+
export declare class SseError extends Error {
|
| 6 |
+
readonly code: number | undefined;
|
| 7 |
+
readonly event: ErrorEvent;
|
| 8 |
+
constructor(code: number | undefined, message: string | undefined, event: ErrorEvent);
|
| 9 |
+
}
|
| 10 |
+
/**
|
| 11 |
+
* Configuration options for the `SSEClientTransport`.
|
| 12 |
+
*/
|
| 13 |
+
export type SSEClientTransportOptions = {
|
| 14 |
+
/**
|
| 15 |
+
* An OAuth client provider to use for authentication.
|
| 16 |
+
*
|
| 17 |
+
* When an `authProvider` is specified and the SSE connection is started:
|
| 18 |
+
* 1. The connection is attempted with any existing access token from the `authProvider`.
|
| 19 |
+
* 2. If the access token has expired, the `authProvider` is used to refresh the token.
|
| 20 |
+
* 3. If token refresh fails or no access token exists, and auth is required, `OAuthClientProvider.redirectToAuthorization` is called, and an `UnauthorizedError` will be thrown from `connect`/`start`.
|
| 21 |
+
*
|
| 22 |
+
* After the user has finished authorizing via their user agent, and is redirected back to the MCP client application, call `SSEClientTransport.finishAuth` with the authorization code before retrying the connection.
|
| 23 |
+
*
|
| 24 |
+
* If an `authProvider` is not provided, and auth is required, an `UnauthorizedError` will be thrown.
|
| 25 |
+
*
|
| 26 |
+
* `UnauthorizedError` might also be thrown when sending any message over the SSE transport, indicating that the session has expired, and needs to be re-authed and reconnected.
|
| 27 |
+
*/
|
| 28 |
+
authProvider?: OAuthClientProvider;
|
| 29 |
+
/**
|
| 30 |
+
* Customizes the initial SSE request to the server (the request that begins the stream).
|
| 31 |
+
*
|
| 32 |
+
* NOTE: Setting this property will prevent an `Authorization` header from
|
| 33 |
+
* being automatically attached to the SSE request, if an `authProvider` is
|
| 34 |
+
* also given. This can be worked around by setting the `Authorization` header
|
| 35 |
+
* manually.
|
| 36 |
+
*/
|
| 37 |
+
eventSourceInit?: EventSourceInit;
|
| 38 |
+
/**
|
| 39 |
+
* Customizes recurring POST requests to the server.
|
| 40 |
+
*/
|
| 41 |
+
requestInit?: RequestInit;
|
| 42 |
+
};
|
| 43 |
+
/**
|
| 44 |
+
* Client transport for SSE: this will connect to a server using Server-Sent Events for receiving
|
| 45 |
+
* messages and make separate POST requests for sending messages.
|
| 46 |
+
*/
|
| 47 |
+
export declare class SSEClientTransport implements Transport {
|
| 48 |
+
private _eventSource?;
|
| 49 |
+
private _endpoint?;
|
| 50 |
+
private _abortController?;
|
| 51 |
+
private _url;
|
| 52 |
+
private _eventSourceInit?;
|
| 53 |
+
private _requestInit?;
|
| 54 |
+
private _authProvider?;
|
| 55 |
+
onclose?: () => void;
|
| 56 |
+
onerror?: (error: Error) => void;
|
| 57 |
+
onmessage?: (message: JSONRPCMessage) => void;
|
| 58 |
+
constructor(url: URL, opts?: SSEClientTransportOptions);
|
| 59 |
+
private _authThenStart;
|
| 60 |
+
private _commonHeaders;
|
| 61 |
+
private _startOrAuth;
|
| 62 |
+
start(): Promise<void>;
|
| 63 |
+
/**
|
| 64 |
+
* Call this method after the user has finished authorizing via their user agent and is redirected back to the MCP client application. This will exchange the authorization code for an access token, enabling the next connection attempt to successfully auth.
|
| 65 |
+
*/
|
| 66 |
+
finishAuth(authorizationCode: string): Promise<void>;
|
| 67 |
+
close(): Promise<void>;
|
| 68 |
+
send(message: JSONRPCMessage): Promise<void>;
|
| 69 |
+
}
|
| 70 |
+
//# sourceMappingURL=sse.d.ts.map
|
crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/sse.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"sse.d.ts","sourceRoot":"","sources":["../../../src/client/sse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AACjF,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAwB,MAAM,aAAa,CAAC;AACnE,OAAO,EAAoB,mBAAmB,EAAqB,MAAM,WAAW,CAAC;AAErF,qBAAa,QAAS,SAAQ,KAAK;aAEf,IAAI,EAAE,MAAM,GAAG,SAAS;aAExB,KAAK,EAAE,UAAU;gBAFjB,IAAI,EAAE,MAAM,GAAG,SAAS,EACxC,OAAO,EAAE,MAAM,GAAG,SAAS,EACX,KAAK,EAAE,UAAU;CAIpC;AAED;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC;;;;;;;;;;;;;OAaG;IACH,YAAY,CAAC,EAAE,mBAAmB,CAAC;IAEnC;;;;;;;OAOG;IACH,eAAe,CAAC,EAAE,eAAe,CAAC;IAElC;;OAEG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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
| 3 |
+
exports.SSEClientTransport = exports.SseError = void 0;
|
| 4 |
+
const eventsource_1 = require("eventsource");
|
| 5 |
+
const types_js_1 = require("../types.js");
|
| 6 |
+
const auth_js_1 = require("./auth.js");
|
| 7 |
+
class SseError extends Error {
|
| 8 |
+
constructor(code, message, event) {
|
| 9 |
+
super(`SSE error: ${message}`);
|
| 10 |
+
this.code = code;
|
| 11 |
+
this.event = event;
|
| 12 |
+
}
|
| 13 |
+
}
|
| 14 |
+
exports.SseError = SseError;
|
| 15 |
+
/**
|
| 16 |
+
* Client transport for SSE: this will connect to a server using Server-Sent Events for receiving
|
| 17 |
+
* messages and make separate POST requests for sending messages.
|
| 18 |
+
*/
|
| 19 |
+
class SSEClientTransport {
|
| 20 |
+
constructor(url, opts) {
|
| 21 |
+
this._url = url;
|
| 22 |
+
this._eventSourceInit = opts === null || opts === void 0 ? void 0 : opts.eventSourceInit;
|
| 23 |
+
this._requestInit = opts === null || opts === void 0 ? void 0 : opts.requestInit;
|
| 24 |
+
this._authProvider = opts === null || opts === void 0 ? void 0 : opts.authProvider;
|
| 25 |
+
}
|
| 26 |
+
async _authThenStart() {
|
| 27 |
+
var _a;
|
| 28 |
+
if (!this._authProvider) {
|
| 29 |
+
throw new auth_js_1.UnauthorizedError("No auth provider");
|
| 30 |
+
}
|
| 31 |
+
let result;
|
| 32 |
+
try {
|
| 33 |
+
result = await (0, auth_js_1.auth)(this._authProvider, { serverUrl: this._url });
|
| 34 |
+
}
|
| 35 |
+
catch (error) {
|
| 36 |
+
(_a = this.onerror) === null || _a === void 0 ? void 0 : _a.call(this, error);
|
| 37 |
+
throw error;
|
| 38 |
+
}
|
| 39 |
+
if (result !== "AUTHORIZED") {
|
| 40 |
+
throw new auth_js_1.UnauthorizedError();
|
| 41 |
+
}
|
| 42 |
+
return await this._startOrAuth();
|
| 43 |
+
}
|
| 44 |
+
async _commonHeaders() {
|
| 45 |
+
const headers = {};
|
| 46 |
+
if (this._authProvider) {
|
| 47 |
+
const tokens = await this._authProvider.tokens();
|
| 48 |
+
if (tokens) {
|
| 49 |
+
headers["Authorization"] = `Bearer ${tokens.access_token}`;
|
| 50 |
+
}
|
| 51 |
+
}
|
| 52 |
+
return headers;
|
| 53 |
+
}
|
| 54 |
+
_startOrAuth() {
|
| 55 |
+
return new Promise((resolve, reject) => {
|
| 56 |
+
var _a;
|
| 57 |
+
this._eventSource = new eventsource_1.EventSource(this._url.href, (_a = this._eventSourceInit) !== null && _a !== void 0 ? _a : {
|
| 58 |
+
fetch: (url, init) => this._commonHeaders().then((headers) => fetch(url, {
|
| 59 |
+
...init,
|
| 60 |
+
headers: {
|
| 61 |
+
...headers,
|
| 62 |
+
Accept: "text/event-stream"
|
| 63 |
+
}
|
| 64 |
+
})),
|
| 65 |
+
});
|
| 66 |
+
this._abortController = new AbortController();
|
| 67 |
+
this._eventSource.onerror = (event) => {
|
| 68 |
+
var _a;
|
| 69 |
+
if (event.code === 401 && this._authProvider) {
|
| 70 |
+
this._authThenStart().then(resolve, reject);
|
| 71 |
+
return;
|
| 72 |
+
}
|
| 73 |
+
const error = new SseError(event.code, event.message, event);
|
| 74 |
+
reject(error);
|
| 75 |
+
(_a = this.onerror) === null || _a === void 0 ? void 0 : _a.call(this, error);
|
| 76 |
+
};
|
| 77 |
+
this._eventSource.onopen = () => {
|
| 78 |
+
// The connection is open, but we need to wait for the endpoint to be received.
|
| 79 |
+
};
|
| 80 |
+
this._eventSource.addEventListener("endpoint", (event) => {
|
| 81 |
+
var _a;
|
| 82 |
+
const messageEvent = event;
|
| 83 |
+
try {
|
| 84 |
+
this._endpoint = new URL(messageEvent.data, this._url);
|
| 85 |
+
if (this._endpoint.origin !== this._url.origin) {
|
| 86 |
+
throw new Error(`Endpoint origin does not match connection origin: ${this._endpoint.origin}`);
|
| 87 |
+
}
|
| 88 |
+
}
|
| 89 |
+
catch (error) {
|
| 90 |
+
reject(error);
|
| 91 |
+
(_a = this.onerror) === null || _a === void 0 ? void 0 : _a.call(this, error);
|
| 92 |
+
void this.close();
|
| 93 |
+
return;
|
| 94 |
+
}
|
| 95 |
+
resolve();
|
| 96 |
+
});
|
| 97 |
+
this._eventSource.onmessage = (event) => {
|
| 98 |
+
var _a, _b;
|
| 99 |
+
const messageEvent = event;
|
| 100 |
+
let message;
|
| 101 |
+
try {
|
| 102 |
+
message = types_js_1.JSONRPCMessageSchema.parse(JSON.parse(messageEvent.data));
|
| 103 |
+
}
|
| 104 |
+
catch (error) {
|
| 105 |
+
(_a = this.onerror) === null || _a === void 0 ? void 0 : _a.call(this, error);
|
| 106 |
+
return;
|
| 107 |
+
}
|
| 108 |
+
(_b = this.onmessage) === null || _b === void 0 ? void 0 : _b.call(this, message);
|
| 109 |
+
};
|
| 110 |
+
});
|
| 111 |
+
}
|
| 112 |
+
async start() {
|
| 113 |
+
if (this._eventSource) {
|
| 114 |
+
throw new Error("SSEClientTransport already started! If using Client class, note that connect() calls start() automatically.");
|
| 115 |
+
}
|
| 116 |
+
return await this._startOrAuth();
|
| 117 |
+
}
|
| 118 |
+
/**
|
| 119 |
+
* Call this method after the user has finished authorizing via their user agent and is redirected back to the MCP client application. This will exchange the authorization code for an access token, enabling the next connection attempt to successfully auth.
|
| 120 |
+
*/
|
| 121 |
+
async finishAuth(authorizationCode) {
|
| 122 |
+
if (!this._authProvider) {
|
| 123 |
+
throw new auth_js_1.UnauthorizedError("No auth provider");
|
| 124 |
+
}
|
| 125 |
+
const result = await (0, auth_js_1.auth)(this._authProvider, { serverUrl: this._url, authorizationCode });
|
| 126 |
+
if (result !== "AUTHORIZED") {
|
| 127 |
+
throw new auth_js_1.UnauthorizedError("Failed to authorize");
|
| 128 |
+
}
|
| 129 |
+
}
|
| 130 |
+
async close() {
|
| 131 |
+
var _a, _b, _c;
|
| 132 |
+
(_a = this._abortController) === null || _a === void 0 ? void 0 : _a.abort();
|
| 133 |
+
(_b = this._eventSource) === null || _b === void 0 ? void 0 : _b.close();
|
| 134 |
+
(_c = this.onclose) === null || _c === void 0 ? void 0 : _c.call(this);
|
| 135 |
+
}
|
| 136 |
+
async send(message) {
|
| 137 |
+
var _a, _b, _c;
|
| 138 |
+
if (!this._endpoint) {
|
| 139 |
+
throw new Error("Not connected");
|
| 140 |
+
}
|
| 141 |
+
try {
|
| 142 |
+
const commonHeaders = await this._commonHeaders();
|
| 143 |
+
const headers = new Headers({ ...commonHeaders, ...(_a = this._requestInit) === null || _a === void 0 ? void 0 : _a.headers });
|
| 144 |
+
headers.set("content-type", "application/json");
|
| 145 |
+
const init = {
|
| 146 |
+
...this._requestInit,
|
| 147 |
+
method: "POST",
|
| 148 |
+
headers,
|
| 149 |
+
body: JSON.stringify(message),
|
| 150 |
+
signal: (_b = this._abortController) === null || _b === void 0 ? void 0 : _b.signal,
|
| 151 |
+
};
|
| 152 |
+
const response = await fetch(this._endpoint, init);
|
| 153 |
+
if (!response.ok) {
|
| 154 |
+
if (response.status === 401 && this._authProvider) {
|
| 155 |
+
const result = await (0, auth_js_1.auth)(this._authProvider, { serverUrl: this._url });
|
| 156 |
+
if (result !== "AUTHORIZED") {
|
| 157 |
+
throw new auth_js_1.UnauthorizedError();
|
| 158 |
+
}
|
| 159 |
+
// Purposely _not_ awaited, so we don't call onerror twice
|
| 160 |
+
return this.send(message);
|
| 161 |
+
}
|
| 162 |
+
const text = await response.text().catch(() => null);
|
| 163 |
+
throw new Error(`Error POSTing to endpoint (HTTP ${response.status}): ${text}`);
|
| 164 |
+
}
|
| 165 |
+
}
|
| 166 |
+
catch (error) {
|
| 167 |
+
(_c = this.onerror) === null || _c === void 0 ? void 0 : _c.call(this, error);
|
| 168 |
+
throw error;
|
| 169 |
+
}
|
| 170 |
+
}
|
| 171 |
+
}
|
| 172 |
+
exports.SSEClientTransport = SSEClientTransport;
|
| 173 |
+
//# sourceMappingURL=sse.js.map
|
crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/sse.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"sse.js","sourceRoot":"","sources":["../../../src/client/sse.ts"],"names":[],"mappings":";;;AAAA,6CAAiF;AAEjF,0CAAmE;AACnE,uCAAqF;AAErF,MAAa,QAAS,SAAQ,KAAK;IACjC,YACkB,IAAwB,EACxC,OAA2B,EACX,KAAiB;QAEjC,KAAK,CAAC,cAAc,OAA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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { IOType } from "node:child_process";
|
| 2 |
+
import { Stream } from "node:stream";
|
| 3 |
+
import { Transport } from "../shared/transport.js";
|
| 4 |
+
import { JSONRPCMessage } from "../types.js";
|
| 5 |
+
export type StdioServerParameters = {
|
| 6 |
+
/**
|
| 7 |
+
* The executable to run to start the server.
|
| 8 |
+
*/
|
| 9 |
+
command: string;
|
| 10 |
+
/**
|
| 11 |
+
* Command line arguments to pass to the executable.
|
| 12 |
+
*/
|
| 13 |
+
args?: string[];
|
| 14 |
+
/**
|
| 15 |
+
* The environment to use when spawning the process.
|
| 16 |
+
*
|
| 17 |
+
* If not specified, the result of getDefaultEnvironment() will be used.
|
| 18 |
+
*/
|
| 19 |
+
env?: Record<string, string>;
|
| 20 |
+
/**
|
| 21 |
+
* How to handle stderr of the child process. This matches the semantics of Node's `child_process.spawn`.
|
| 22 |
+
*
|
| 23 |
+
* The default is "inherit", meaning messages to stderr will be printed to the parent process's stderr.
|
| 24 |
+
*/
|
| 25 |
+
stderr?: IOType | Stream | number;
|
| 26 |
+
/**
|
| 27 |
+
* The working directory to use when spawning the process.
|
| 28 |
+
*
|
| 29 |
+
* If not specified, the current working directory will be inherited.
|
| 30 |
+
*/
|
| 31 |
+
cwd?: string;
|
| 32 |
+
};
|
| 33 |
+
/**
|
| 34 |
+
* Environment variables to inherit by default, if an environment is not explicitly given.
|
| 35 |
+
*/
|
| 36 |
+
export declare const DEFAULT_INHERITED_ENV_VARS: string[];
|
| 37 |
+
/**
|
| 38 |
+
* Returns a default environment object including only environment variables deemed safe to inherit.
|
| 39 |
+
*/
|
| 40 |
+
export declare function getDefaultEnvironment(): Record<string, string>;
|
| 41 |
+
/**
|
| 42 |
+
* Client transport for stdio: this will connect to a server by spawning a process and communicating with it over stdin/stdout.
|
| 43 |
+
*
|
| 44 |
+
* This transport is only available in Node.js environments.
|
| 45 |
+
*/
|
| 46 |
+
export declare class StdioClientTransport implements Transport {
|
| 47 |
+
private _process?;
|
| 48 |
+
private _abortController;
|
| 49 |
+
private _readBuffer;
|
| 50 |
+
private _serverParams;
|
| 51 |
+
onclose?: () => void;
|
| 52 |
+
onerror?: (error: Error) => void;
|
| 53 |
+
onmessage?: (message: JSONRPCMessage) => void;
|
| 54 |
+
constructor(server: StdioServerParameters);
|
| 55 |
+
/**
|
| 56 |
+
* Starts the server process and prepares to communicate with it.
|
| 57 |
+
*/
|
| 58 |
+
start(): Promise<void>;
|
| 59 |
+
/**
|
| 60 |
+
* The stderr stream of the child process, if `StdioServerParameters.stderr` was set to "pipe" or "overlapped".
|
| 61 |
+
*
|
| 62 |
+
* This is only available after the process has been started.
|
| 63 |
+
*/
|
| 64 |
+
get stderr(): Stream | null;
|
| 65 |
+
private processReadBuffer;
|
| 66 |
+
close(): Promise<void>;
|
| 67 |
+
send(message: JSONRPCMessage): Promise<void>;
|
| 68 |
+
}
|
| 69 |
+
//# sourceMappingURL=stdio.d.ts.map
|
crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/stdio.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"stdio.d.ts","sourceRoot":"","sources":["../../../src/client/stdio.ts"],"names":[],"mappings":"AAAA,OAAO,E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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
| 3 |
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
| 4 |
+
};
|
| 5 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
| 6 |
+
exports.StdioClientTransport = exports.DEFAULT_INHERITED_ENV_VARS = void 0;
|
| 7 |
+
exports.getDefaultEnvironment = getDefaultEnvironment;
|
| 8 |
+
const node_child_process_1 = require("node:child_process");
|
| 9 |
+
const node_process_1 = __importDefault(require("node:process"));
|
| 10 |
+
const stdio_js_1 = require("../shared/stdio.js");
|
| 11 |
+
/**
|
| 12 |
+
* Environment variables to inherit by default, if an environment is not explicitly given.
|
| 13 |
+
*/
|
| 14 |
+
exports.DEFAULT_INHERITED_ENV_VARS = node_process_1.default.platform === "win32"
|
| 15 |
+
? [
|
| 16 |
+
"APPDATA",
|
| 17 |
+
"HOMEDRIVE",
|
| 18 |
+
"HOMEPATH",
|
| 19 |
+
"LOCALAPPDATA",
|
| 20 |
+
"PATH",
|
| 21 |
+
"PROCESSOR_ARCHITECTURE",
|
| 22 |
+
"SYSTEMDRIVE",
|
| 23 |
+
"SYSTEMROOT",
|
| 24 |
+
"TEMP",
|
| 25 |
+
"USERNAME",
|
| 26 |
+
"USERPROFILE",
|
| 27 |
+
]
|
| 28 |
+
: /* list inspired by the default env inheritance of sudo */
|
| 29 |
+
["HOME", "LOGNAME", "PATH", "SHELL", "TERM", "USER"];
|
| 30 |
+
/**
|
| 31 |
+
* Returns a default environment object including only environment variables deemed safe to inherit.
|
| 32 |
+
*/
|
| 33 |
+
function getDefaultEnvironment() {
|
| 34 |
+
const env = {};
|
| 35 |
+
for (const key of exports.DEFAULT_INHERITED_ENV_VARS) {
|
| 36 |
+
const value = node_process_1.default.env[key];
|
| 37 |
+
if (value === undefined) {
|
| 38 |
+
continue;
|
| 39 |
+
}
|
| 40 |
+
if (value.startsWith("()")) {
|
| 41 |
+
// Skip functions, which are a security risk.
|
| 42 |
+
continue;
|
| 43 |
+
}
|
| 44 |
+
env[key] = value;
|
| 45 |
+
}
|
| 46 |
+
return env;
|
| 47 |
+
}
|
| 48 |
+
/**
|
| 49 |
+
* Client transport for stdio: this will connect to a server by spawning a process and communicating with it over stdin/stdout.
|
| 50 |
+
*
|
| 51 |
+
* This transport is only available in Node.js environments.
|
| 52 |
+
*/
|
| 53 |
+
class StdioClientTransport {
|
| 54 |
+
constructor(server) {
|
| 55 |
+
this._abortController = new AbortController();
|
| 56 |
+
this._readBuffer = new stdio_js_1.ReadBuffer();
|
| 57 |
+
this._serverParams = server;
|
| 58 |
+
}
|
| 59 |
+
/**
|
| 60 |
+
* Starts the server process and prepares to communicate with it.
|
| 61 |
+
*/
|
| 62 |
+
async start() {
|
| 63 |
+
if (this._process) {
|
| 64 |
+
throw new Error("StdioClientTransport already started! If using Client class, note that connect() calls start() automatically.");
|
| 65 |
+
}
|
| 66 |
+
return new Promise((resolve, reject) => {
|
| 67 |
+
var _a, _b, _c, _d, _e, _f;
|
| 68 |
+
this._process = (0, node_child_process_1.spawn)(this._serverParams.command, (_a = this._serverParams.args) !== null && _a !== void 0 ? _a : [], {
|
| 69 |
+
env: (_b = this._serverParams.env) !== null && _b !== void 0 ? _b : getDefaultEnvironment(),
|
| 70 |
+
stdio: ["pipe", "pipe", (_c = this._serverParams.stderr) !== null && _c !== void 0 ? _c : "inherit"],
|
| 71 |
+
shell: false,
|
| 72 |
+
signal: this._abortController.signal,
|
| 73 |
+
windowsHide: node_process_1.default.platform === "win32" && isElectron(),
|
| 74 |
+
cwd: this._serverParams.cwd,
|
| 75 |
+
});
|
| 76 |
+
this._process.on("error", (error) => {
|
| 77 |
+
var _a, _b;
|
| 78 |
+
if (error.name === "AbortError") {
|
| 79 |
+
// Expected when close() is called.
|
| 80 |
+
(_a = this.onclose) === null || _a === void 0 ? void 0 : _a.call(this);
|
| 81 |
+
return;
|
| 82 |
+
}
|
| 83 |
+
reject(error);
|
| 84 |
+
(_b = this.onerror) === null || _b === void 0 ? void 0 : _b.call(this, error);
|
| 85 |
+
});
|
| 86 |
+
this._process.on("spawn", () => {
|
| 87 |
+
resolve();
|
| 88 |
+
});
|
| 89 |
+
this._process.on("close", (_code) => {
|
| 90 |
+
var _a;
|
| 91 |
+
this._process = undefined;
|
| 92 |
+
(_a = this.onclose) === null || _a === void 0 ? void 0 : _a.call(this);
|
| 93 |
+
});
|
| 94 |
+
(_d = this._process.stdin) === null || _d === void 0 ? void 0 : _d.on("error", (error) => {
|
| 95 |
+
var _a;
|
| 96 |
+
(_a = this.onerror) === null || _a === void 0 ? void 0 : _a.call(this, error);
|
| 97 |
+
});
|
| 98 |
+
(_e = this._process.stdout) === null || _e === void 0 ? void 0 : _e.on("data", (chunk) => {
|
| 99 |
+
this._readBuffer.append(chunk);
|
| 100 |
+
this.processReadBuffer();
|
| 101 |
+
});
|
| 102 |
+
(_f = this._process.stdout) === null || _f === void 0 ? void 0 : _f.on("error", (error) => {
|
| 103 |
+
var _a;
|
| 104 |
+
(_a = this.onerror) === null || _a === void 0 ? void 0 : _a.call(this, error);
|
| 105 |
+
});
|
| 106 |
+
});
|
| 107 |
+
}
|
| 108 |
+
/**
|
| 109 |
+
* The stderr stream of the child process, if `StdioServerParameters.stderr` was set to "pipe" or "overlapped".
|
| 110 |
+
*
|
| 111 |
+
* This is only available after the process has been started.
|
| 112 |
+
*/
|
| 113 |
+
get stderr() {
|
| 114 |
+
var _a, _b;
|
| 115 |
+
return (_b = (_a = this._process) === null || _a === void 0 ? void 0 : _a.stderr) !== null && _b !== void 0 ? _b : null;
|
| 116 |
+
}
|
| 117 |
+
processReadBuffer() {
|
| 118 |
+
var _a, _b;
|
| 119 |
+
while (true) {
|
| 120 |
+
try {
|
| 121 |
+
const message = this._readBuffer.readMessage();
|
| 122 |
+
if (message === null) {
|
| 123 |
+
break;
|
| 124 |
+
}
|
| 125 |
+
(_a = this.onmessage) === null || _a === void 0 ? void 0 : _a.call(this, message);
|
| 126 |
+
}
|
| 127 |
+
catch (error) {
|
| 128 |
+
(_b = this.onerror) === null || _b === void 0 ? void 0 : _b.call(this, error);
|
| 129 |
+
}
|
| 130 |
+
}
|
| 131 |
+
}
|
| 132 |
+
async close() {
|
| 133 |
+
this._abortController.abort();
|
| 134 |
+
this._process = undefined;
|
| 135 |
+
this._readBuffer.clear();
|
| 136 |
+
}
|
| 137 |
+
send(message) {
|
| 138 |
+
return new Promise((resolve) => {
|
| 139 |
+
var _a;
|
| 140 |
+
if (!((_a = this._process) === null || _a === void 0 ? void 0 : _a.stdin)) {
|
| 141 |
+
throw new Error("Not connected");
|
| 142 |
+
}
|
| 143 |
+
const json = (0, stdio_js_1.serializeMessage)(message);
|
| 144 |
+
if (this._process.stdin.write(json)) {
|
| 145 |
+
resolve();
|
| 146 |
+
}
|
| 147 |
+
else {
|
| 148 |
+
this._process.stdin.once("drain", resolve);
|
| 149 |
+
}
|
| 150 |
+
});
|
| 151 |
+
}
|
| 152 |
+
}
|
| 153 |
+
exports.StdioClientTransport = StdioClientTransport;
|
| 154 |
+
function isElectron() {
|
| 155 |
+
return "type" in node_process_1.default;
|
| 156 |
+
}
|
| 157 |
+
//# sourceMappingURL=stdio.js.map
|
crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/stdio.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"stdio.js","sourceRoot":"","sources":["../../../src/client/stdio.ts"],"names":[],"mappings":";;;;;;AAgEA,sDAkBC;AAlFD,2DAAiE;AACjE,gEAAmC;AAEnC,iDAAkE;AAqClE;;GAEG;AACU,QAAA,0BAA0B,GACrC,sBAAO,CAAC,QAAQ,KAAK,OAAO;IAC1B,CAAC,CAAC;QACE,SAAS;QACT,WAAW;QACX,UAAU;QACV,cAAc;QACd,MAAM;QACN,wBAA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C;gBAC1B,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,CAAC;YACnC,CAAC;YAED,MAAM,IAAI,GAAG,IAAA,2BAAgB,EAAC,OAAO,CAAC,CAAC;YACvC,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;gBACpC,OAAO,EAAE,CAAC;YACZ,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YAC7C,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AArHD,oDAqHC;AAED,SAAS,UAAU;IACjB,OAAO,MAAM,IAAI,sBAAO,CAAC;AAC3B,CAAC"}
|
crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/websocket.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { Transport } from "../shared/transport.js";
|
| 2 |
+
import { JSONRPCMessage } from "../types.js";
|
| 3 |
+
/**
|
| 4 |
+
* Client transport for WebSocket: this will connect to a server over the WebSocket protocol.
|
| 5 |
+
*/
|
| 6 |
+
export declare class WebSocketClientTransport implements Transport {
|
| 7 |
+
private _socket?;
|
| 8 |
+
private _url;
|
| 9 |
+
onclose?: () => void;
|
| 10 |
+
onerror?: (error: Error) => void;
|
| 11 |
+
onmessage?: (message: JSONRPCMessage) => void;
|
| 12 |
+
constructor(url: URL);
|
| 13 |
+
start(): Promise<void>;
|
| 14 |
+
close(): Promise<void>;
|
| 15 |
+
send(message: JSONRPCMessage): Promise<void>;
|
| 16 |
+
}
|
| 17 |
+
//# sourceMappingURL=websocket.d.ts.map
|
crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/websocket.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"websocket.d.ts","sourceRoot":"","sources":["../../../src/client/websocket.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAwB,MAAM,aAAa,CAAC;AAInE;;GAEG;AACH,qBAAa,wBAAyB,YAAW,SAAS;IACxD,OAAO,CAAC,OAAO,CAAC,CAAY;IAC5B,OAAO,CAAC,IAAI,CAAM;IAElB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,CAAC;gBAElC,GAAG,EAAE,GAAG;IAIpB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAyChB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAI5B,IAAI,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;CAW7C"}
|
crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/websocket.js
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
| 3 |
+
exports.WebSocketClientTransport = void 0;
|
| 4 |
+
const types_js_1 = require("../types.js");
|
| 5 |
+
const SUBPROTOCOL = "mcp";
|
| 6 |
+
/**
|
| 7 |
+
* Client transport for WebSocket: this will connect to a server over the WebSocket protocol.
|
| 8 |
+
*/
|
| 9 |
+
class WebSocketClientTransport {
|
| 10 |
+
constructor(url) {
|
| 11 |
+
this._url = url;
|
| 12 |
+
}
|
| 13 |
+
start() {
|
| 14 |
+
if (this._socket) {
|
| 15 |
+
throw new Error("WebSocketClientTransport already started! If using Client class, note that connect() calls start() automatically.");
|
| 16 |
+
}
|
| 17 |
+
return new Promise((resolve, reject) => {
|
| 18 |
+
this._socket = new WebSocket(this._url, SUBPROTOCOL);
|
| 19 |
+
this._socket.onerror = (event) => {
|
| 20 |
+
var _a;
|
| 21 |
+
const error = "error" in event
|
| 22 |
+
? event.error
|
| 23 |
+
: new Error(`WebSocket error: ${JSON.stringify(event)}`);
|
| 24 |
+
reject(error);
|
| 25 |
+
(_a = this.onerror) === null || _a === void 0 ? void 0 : _a.call(this, error);
|
| 26 |
+
};
|
| 27 |
+
this._socket.onopen = () => {
|
| 28 |
+
resolve();
|
| 29 |
+
};
|
| 30 |
+
this._socket.onclose = () => {
|
| 31 |
+
var _a;
|
| 32 |
+
(_a = this.onclose) === null || _a === void 0 ? void 0 : _a.call(this);
|
| 33 |
+
};
|
| 34 |
+
this._socket.onmessage = (event) => {
|
| 35 |
+
var _a, _b;
|
| 36 |
+
let message;
|
| 37 |
+
try {
|
| 38 |
+
message = types_js_1.JSONRPCMessageSchema.parse(JSON.parse(event.data));
|
| 39 |
+
}
|
| 40 |
+
catch (error) {
|
| 41 |
+
(_a = this.onerror) === null || _a === void 0 ? void 0 : _a.call(this, error);
|
| 42 |
+
return;
|
| 43 |
+
}
|
| 44 |
+
(_b = this.onmessage) === null || _b === void 0 ? void 0 : _b.call(this, message);
|
| 45 |
+
};
|
| 46 |
+
});
|
| 47 |
+
}
|
| 48 |
+
async close() {
|
| 49 |
+
var _a;
|
| 50 |
+
(_a = this._socket) === null || _a === void 0 ? void 0 : _a.close();
|
| 51 |
+
}
|
| 52 |
+
send(message) {
|
| 53 |
+
return new Promise((resolve, reject) => {
|
| 54 |
+
var _a;
|
| 55 |
+
if (!this._socket) {
|
| 56 |
+
reject(new Error("Not connected"));
|
| 57 |
+
return;
|
| 58 |
+
}
|
| 59 |
+
(_a = this._socket) === null || _a === void 0 ? void 0 : _a.send(JSON.stringify(message));
|
| 60 |
+
resolve();
|
| 61 |
+
});
|
| 62 |
+
}
|
| 63 |
+
}
|
| 64 |
+
exports.WebSocketClientTransport = WebSocketClientTransport;
|
| 65 |
+
//# sourceMappingURL=websocket.js.map
|
crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/websocket.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"websocket.js","sourceRoot":"","sources":["../../../src/client/websocket.ts"],"names":[],"mappings":";;;AACA,0CAAmE;AAEnE,MAAM,WAAW,GAAG,KAAK,CAAC;AAE1B;;GAEG;AACH,MAAa,wBAAwB;IAQnC,YAAY,GAAQ;QAClB,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;IAClB,CAAC;IAED,KAAK;QACH,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACjB,MAAM,IAAI,KAAK,CACb,mHAAmH,CACpH,CAAC;QACJ,CAAC;QAED,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACrC,IAAI,CAAC,OAAO,GAAG,IAAI,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;YAErD,IAAI,CAAC,OAAO,CAAC,OAAO,GAAG,CAAC,KAAK,EAAE,EAAE;;g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,eAAe,CAAC,CAAC,CAAC;gBACnC,OAAO;YACT,CAAC;YAED,MAAA,IAAI,CAAC,OAAO,0CAAE,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC;YAC5C,OAAO,EAAE,CAAC;QACZ,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AApED,4DAoEC"}
|
crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/inMemory.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { Transport } from "./shared/transport.js";
|
| 2 |
+
import { JSONRPCMessage } from "./types.js";
|
| 3 |
+
/**
|
| 4 |
+
* In-memory transport for creating clients and servers that talk to each other within the same process.
|
| 5 |
+
*/
|
| 6 |
+
export declare class InMemoryTransport implements Transport {
|
| 7 |
+
private _otherTransport?;
|
| 8 |
+
private _messageQueue;
|
| 9 |
+
onclose?: () => void;
|
| 10 |
+
onerror?: (error: Error) => void;
|
| 11 |
+
onmessage?: (message: JSONRPCMessage) => void;
|
| 12 |
+
sessionId?: string;
|
| 13 |
+
/**
|
| 14 |
+
* Creates a pair of linked in-memory transports that can communicate with each other. One should be passed to a Client and one to a Server.
|
| 15 |
+
*/
|
| 16 |
+
static createLinkedPair(): [InMemoryTransport, InMemoryTransport];
|
| 17 |
+
start(): Promise<void>;
|
| 18 |
+
close(): Promise<void>;
|
| 19 |
+
send(message: JSONRPCMessage): Promise<void>;
|
| 20 |
+
}
|
| 21 |
+
//# sourceMappingURL=inMemory.d.ts.map
|
crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/inMemory.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"inMemory.d.ts","sourceRoot":"","sources":["../../src/inMemory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C;;GAEG;AACH,qBAAa,iBAAkB,YAAW,SAAS;IACjD,OAAO,CAAC,eAAe,CAAC,CAAoB;IAC5C,OAAO,CAAC,aAAa,CAAwB;IAE7C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,CAAC;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,MAAM,CAAC,gBAAgB,IAAI,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;IAQ3D,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAUtB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAOtB,IAAI,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;CAWnD"}
|
crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/inMemory.js
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
| 3 |
+
exports.InMemoryTransport = void 0;
|
| 4 |
+
/**
|
| 5 |
+
* In-memory transport for creating clients and servers that talk to each other within the same process.
|
| 6 |
+
*/
|
| 7 |
+
class InMemoryTransport {
|
| 8 |
+
constructor() {
|
| 9 |
+
this._messageQueue = [];
|
| 10 |
+
}
|
| 11 |
+
/**
|
| 12 |
+
* Creates a pair of linked in-memory transports that can communicate with each other. One should be passed to a Client and one to a Server.
|
| 13 |
+
*/
|
| 14 |
+
static createLinkedPair() {
|
| 15 |
+
const clientTransport = new InMemoryTransport();
|
| 16 |
+
const serverTransport = new InMemoryTransport();
|
| 17 |
+
clientTransport._otherTransport = serverTransport;
|
| 18 |
+
serverTransport._otherTransport = clientTransport;
|
| 19 |
+
return [clientTransport, serverTransport];
|
| 20 |
+
}
|
| 21 |
+
async start() {
|
| 22 |
+
var _a;
|
| 23 |
+
// Process any messages that were queued before start was called
|
| 24 |
+
while (this._messageQueue.length > 0) {
|
| 25 |
+
const message = this._messageQueue.shift();
|
| 26 |
+
if (message) {
|
| 27 |
+
(_a = this.onmessage) === null || _a === void 0 ? void 0 : _a.call(this, message);
|
| 28 |
+
}
|
| 29 |
+
}
|
| 30 |
+
}
|
| 31 |
+
async close() {
|
| 32 |
+
var _a;
|
| 33 |
+
const other = this._otherTransport;
|
| 34 |
+
this._otherTransport = undefined;
|
| 35 |
+
await (other === null || other === void 0 ? void 0 : other.close());
|
| 36 |
+
(_a = this.onclose) === null || _a === void 0 ? void 0 : _a.call(this);
|
| 37 |
+
}
|
| 38 |
+
async send(message) {
|
| 39 |
+
if (!this._otherTransport) {
|
| 40 |
+
throw new Error("Not connected");
|
| 41 |
+
}
|
| 42 |
+
if (this._otherTransport.onmessage) {
|
| 43 |
+
this._otherTransport.onmessage(message);
|
| 44 |
+
}
|
| 45 |
+
else {
|
| 46 |
+
this._otherTransport._messageQueue.push(message);
|
| 47 |
+
}
|
| 48 |
+
}
|
| 49 |
+
}
|
| 50 |
+
exports.InMemoryTransport = InMemoryTransport;
|
| 51 |
+
//# sourceMappingURL=inMemory.js.map
|
crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/inMemory.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"inMemory.js","sourceRoot":"","sources":["../../src/inMemory.ts"],"names":[],"mappings":";;;AAGA;;GAEG;AACH,MAAa,iBAAiB;IAA9B;QAEU,kBAAa,GAAqB,EAAE,CAAC;IA8C/C,CAAC;IAvCC;;OAEG;IACH,MAAM,CAAC,gBAAgB;QACrB,MAAM,eAAe,GAAG,IAAI,iBAAiB,EAAE,CAAC;QAChD,MAAM,eAAe,GAAG,IAAI,iBAAiB,EAAE,CAAC;QAChD,eAAe,CAAC,eAAe,GAAG,eAAe,CAAC;QAClD,eAAe,CAAC,eAAe,GAAG,eAAe,CAAC;QAClD,OAAO,CAAC,eAAe,EAAE,eAAe,CAAC,CAAC;IAC5C,CAAC;IAED,KAAK,CAAC,KAAK;;QACT,gEAAgE;QAChE,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACrC,MAAM,OAAO,GAAG,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,CAAC;YAC3C,IAAI,OAAO,EAAE,CAAC;gBACZ,MAAA,IAAI,CAAC,SAAS,qDAAG,OAAO,CAAC,CAAC;YAC5B,CAAC;QACH,CAAC;IACH,CAAC;IAED,KAAK,CAAC,KAAK;;QACT,MAAM,KAAK,GAAG,IAAI,CAAC,eAAe,CAAC;QACnC,IAAI,CAAC,eAAe,GAAG,SAAS,CAAC;QACjC,MAAM,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,KAAK,EAAE,CAAA,CAAC;QACrB,MAAA,IAAI,CAAC,OAAO,oDAAI,CAAC;IACnB,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,OAAuB;QAChC,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC;YAC1B,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,CAAC;QACnC,CAAC;QAED,IAAI,IAAI,CAAC,eAAe,CAAC,SAAS,EAAE,CAAC;YACnC,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QAC1C,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,eAAe,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACnD,CAAC;IACH,CAAC;CACF;AAhDD,8CAgDC"}
|
crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/package.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"type": "commonjs"}
|
crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/clients.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { OAuthClientInformationFull } from "../../shared/auth.js";
|
| 2 |
+
/**
|
| 3 |
+
* Stores information about registered OAuth clients for this server.
|
| 4 |
+
*/
|
| 5 |
+
export interface OAuthRegisteredClientsStore {
|
| 6 |
+
/**
|
| 7 |
+
* Returns information about a registered client, based on its ID.
|
| 8 |
+
*/
|
| 9 |
+
getClient(clientId: string): OAuthClientInformationFull | undefined | Promise<OAuthClientInformationFull | undefined>;
|
| 10 |
+
/**
|
| 11 |
+
* Registers a new client with the server. The client ID and secret will be automatically generated by the library. A modified version of the client information can be returned to reflect specific values enforced by the server.
|
| 12 |
+
*
|
| 13 |
+
* NOTE: Implementations should NOT delete expired client secrets in-place. Auth middleware provided by this library will automatically check the `client_secret_expires_at` field and reject requests with expired secrets. Any custom logic for authenticating clients should check the `client_secret_expires_at` field as well.
|
| 14 |
+
*
|
| 15 |
+
* If unimplemented, dynamic client registration is unsupported.
|
| 16 |
+
*/
|
| 17 |
+
registerClient?(client: OAuthClientInformationFull): OAuthClientInformationFull | Promise<OAuthClientInformationFull>;
|
| 18 |
+
}
|
| 19 |
+
//# sourceMappingURL=clients.d.ts.map
|
crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/clients.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"clients.d.ts","sourceRoot":"","sources":["../../../../src/server/auth/clients.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAElE;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C;;OAEG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,0BAA0B,GAAG,SAAS,GAAG,OAAO,CAAC,0BAA0B,GAAG,SAAS,CAAC,CAAC;IAEtH;;;;;;OAMG;IACH,cAAc,CAAC,CAAC,MAAM,EAAE,0BAA0B,GAAG,0BAA0B,GAAG,OAAO,CAAC,0BAA0B,CAAC,CAAC;CACvH"}
|
crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/clients.js
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
| 3 |
+
//# sourceMappingURL=clients.js.map
|
crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/clients.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"clients.js","sourceRoot":"","sources":["../../../../src/server/auth/clients.ts"],"names":[],"mappings":""}
|
crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/errors.d.ts
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { OAuthErrorResponse } from "../../shared/auth.js";
|
| 2 |
+
/**
|
| 3 |
+
* Base class for all OAuth errors
|
| 4 |
+
*/
|
| 5 |
+
export declare class OAuthError extends Error {
|
| 6 |
+
readonly errorCode: string;
|
| 7 |
+
readonly errorUri?: string | undefined;
|
| 8 |
+
constructor(errorCode: string, message: string, errorUri?: string | undefined);
|
| 9 |
+
/**
|
| 10 |
+
* Converts the error to a standard OAuth error response object
|
| 11 |
+
*/
|
| 12 |
+
toResponseObject(): OAuthErrorResponse;
|
| 13 |
+
}
|
| 14 |
+
/**
|
| 15 |
+
* Invalid request error - The request is missing a required parameter,
|
| 16 |
+
* includes an invalid parameter value, includes a parameter more than once,
|
| 17 |
+
* or is otherwise malformed.
|
| 18 |
+
*/
|
| 19 |
+
export declare class InvalidRequestError extends OAuthError {
|
| 20 |
+
constructor(message: string, errorUri?: string);
|
| 21 |
+
}
|
| 22 |
+
/**
|
| 23 |
+
* Invalid client error - Client authentication failed (e.g., unknown client, no client
|
| 24 |
+
* authentication included, or unsupported authentication method).
|
| 25 |
+
*/
|
| 26 |
+
export declare class InvalidClientError extends OAuthError {
|
| 27 |
+
constructor(message: string, errorUri?: string);
|
| 28 |
+
}
|
| 29 |
+
/**
|
| 30 |
+
* Invalid grant error - The provided authorization grant or refresh token is
|
| 31 |
+
* invalid, expired, revoked, does not match the redirection URI used in the
|
| 32 |
+
* authorization request, or was issued to another client.
|
| 33 |
+
*/
|
| 34 |
+
export declare class InvalidGrantError extends OAuthError {
|
| 35 |
+
constructor(message: string, errorUri?: string);
|
| 36 |
+
}
|
| 37 |
+
/**
|
| 38 |
+
* Unauthorized client error - The authenticated client is not authorized to use
|
| 39 |
+
* this authorization grant type.
|
| 40 |
+
*/
|
| 41 |
+
export declare class UnauthorizedClientError extends OAuthError {
|
| 42 |
+
constructor(message: string, errorUri?: string);
|
| 43 |
+
}
|
| 44 |
+
/**
|
| 45 |
+
* Unsupported grant type error - The authorization grant type is not supported
|
| 46 |
+
* by the authorization server.
|
| 47 |
+
*/
|
| 48 |
+
export declare class UnsupportedGrantTypeError extends OAuthError {
|
| 49 |
+
constructor(message: string, errorUri?: string);
|
| 50 |
+
}
|
| 51 |
+
/**
|
| 52 |
+
* Invalid scope error - The requested scope is invalid, unknown, malformed, or
|
| 53 |
+
* exceeds the scope granted by the resource owner.
|
| 54 |
+
*/
|
| 55 |
+
export declare class InvalidScopeError extends OAuthError {
|
| 56 |
+
constructor(message: string, errorUri?: string);
|
| 57 |
+
}
|
| 58 |
+
/**
|
| 59 |
+
* Access denied error - The resource owner or authorization server denied the request.
|
| 60 |
+
*/
|
| 61 |
+
export declare class AccessDeniedError extends OAuthError {
|
| 62 |
+
constructor(message: string, errorUri?: string);
|
| 63 |
+
}
|
| 64 |
+
/**
|
| 65 |
+
* Server error - The authorization server encountered an unexpected condition
|
| 66 |
+
* that prevented it from fulfilling the request.
|
| 67 |
+
*/
|
| 68 |
+
export declare class ServerError extends OAuthError {
|
| 69 |
+
constructor(message: string, errorUri?: string);
|
| 70 |
+
}
|
| 71 |
+
/**
|
| 72 |
+
* Temporarily unavailable error - The authorization server is currently unable to
|
| 73 |
+
* handle the request due to a temporary overloading or maintenance of the server.
|
| 74 |
+
*/
|
| 75 |
+
export declare class TemporarilyUnavailableError extends OAuthError {
|
| 76 |
+
constructor(message: string, errorUri?: string);
|
| 77 |
+
}
|
| 78 |
+
/**
|
| 79 |
+
* Unsupported response type error - The authorization server does not support
|
| 80 |
+
* obtaining an authorization code using this method.
|
| 81 |
+
*/
|
| 82 |
+
export declare class UnsupportedResponseTypeError extends OAuthError {
|
| 83 |
+
constructor(message: string, errorUri?: string);
|
| 84 |
+
}
|
| 85 |
+
/**
|
| 86 |
+
* Unsupported token type error - The authorization server does not support
|
| 87 |
+
* the requested token type.
|
| 88 |
+
*/
|
| 89 |
+
export declare class UnsupportedTokenTypeError extends OAuthError {
|
| 90 |
+
constructor(message: string, errorUri?: string);
|
| 91 |
+
}
|
| 92 |
+
/**
|
| 93 |
+
* Invalid token error - The access token provided is expired, revoked, malformed,
|
| 94 |
+
* or invalid for other reasons.
|
| 95 |
+
*/
|
| 96 |
+
export declare class InvalidTokenError extends OAuthError {
|
| 97 |
+
constructor(message: string, errorUri?: string);
|
| 98 |
+
}
|
| 99 |
+
/**
|
| 100 |
+
* Method not allowed error - The HTTP method used is not allowed for this endpoint.
|
| 101 |
+
* (Custom, non-standard error)
|
| 102 |
+
*/
|
| 103 |
+
export declare class MethodNotAllowedError extends OAuthError {
|
| 104 |
+
constructor(message: string, errorUri?: string);
|
| 105 |
+
}
|
| 106 |
+
/**
|
| 107 |
+
* Too many requests error - Rate limit exceeded.
|
| 108 |
+
* (Custom, non-standard error based on RFC 6585)
|
| 109 |
+
*/
|
| 110 |
+
export declare class TooManyRequestsError extends OAuthError {
|
| 111 |
+
constructor(message: string, errorUri?: string);
|
| 112 |
+
}
|
| 113 |
+
/**
|
| 114 |
+
* Invalid client metadata error - The client metadata is invalid.
|
| 115 |
+
* (Custom error for dynamic client registration - RFC 7591)
|
| 116 |
+
*/
|
| 117 |
+
export declare class InvalidClientMetadataError extends OAuthError {
|
| 118 |
+
constructor(message: string, errorUri?: string);
|
| 119 |
+
}
|
| 120 |
+
/**
|
| 121 |
+
* Insufficient scope error - The request requires higher privileges than provided by the access token.
|
| 122 |
+
*/
|
| 123 |
+
export declare class InsufficientScopeError extends OAuthError {
|
| 124 |
+
constructor(message: string, errorUri?: string);
|
| 125 |
+
}
|
| 126 |
+
//# sourceMappingURL=errors.d.ts.map
|
crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/errors.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../src/server/auth/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D;;GAEG;AACH,qBAAa,UAAW,SAAQ,KAAK;aAEjB,SAAS,EAAE,MAAM;aAEjB,QAAQ,CAAC,EAAE,MAAM;gBAFjB,SAAS,EAAE,MAAM,EACjC,OAAO,EAAE,MAAM,EACC,QAAQ,CAAC,EAAE,MAAM,YAAA;IAMnC;;OAEG;IACH,gBAAgB,IAAI,kBAAkB;CAYvC;AAED;;;;GAIG;AACH,qBAAa,mBAAoB,SAAQ,UAAU;gBACrC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM;CAG/C;AAED;;;GAGG;AACH,qBAAa,kBAAmB,SAAQ,U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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
| 3 |
+
exports.InsufficientScopeError = exports.InvalidClientMetadataError = exports.TooManyRequestsError = exports.MethodNotAllowedError = exports.InvalidTokenError = exports.UnsupportedTokenTypeError = exports.UnsupportedResponseTypeError = exports.TemporarilyUnavailableError = exports.ServerError = exports.AccessDeniedError = exports.InvalidScopeError = exports.UnsupportedGrantTypeError = exports.UnauthorizedClientError = exports.InvalidGrantError = exports.InvalidClientError = exports.InvalidRequestError = exports.OAuthError = void 0;
|
| 4 |
+
/**
|
| 5 |
+
* Base class for all OAuth errors
|
| 6 |
+
*/
|
| 7 |
+
class OAuthError extends Error {
|
| 8 |
+
constructor(errorCode, message, errorUri) {
|
| 9 |
+
super(message);
|
| 10 |
+
this.errorCode = errorCode;
|
| 11 |
+
this.errorUri = errorUri;
|
| 12 |
+
this.name = this.constructor.name;
|
| 13 |
+
}
|
| 14 |
+
/**
|
| 15 |
+
* Converts the error to a standard OAuth error response object
|
| 16 |
+
*/
|
| 17 |
+
toResponseObject() {
|
| 18 |
+
const response = {
|
| 19 |
+
error: this.errorCode,
|
| 20 |
+
error_description: this.message
|
| 21 |
+
};
|
| 22 |
+
if (this.errorUri) {
|
| 23 |
+
response.error_uri = this.errorUri;
|
| 24 |
+
}
|
| 25 |
+
return response;
|
| 26 |
+
}
|
| 27 |
+
}
|
| 28 |
+
exports.OAuthError = OAuthError;
|
| 29 |
+
/**
|
| 30 |
+
* Invalid request error - The request is missing a required parameter,
|
| 31 |
+
* includes an invalid parameter value, includes a parameter more than once,
|
| 32 |
+
* or is otherwise malformed.
|
| 33 |
+
*/
|
| 34 |
+
class InvalidRequestError extends OAuthError {
|
| 35 |
+
constructor(message, errorUri) {
|
| 36 |
+
super("invalid_request", message, errorUri);
|
| 37 |
+
}
|
| 38 |
+
}
|
| 39 |
+
exports.InvalidRequestError = InvalidRequestError;
|
| 40 |
+
/**
|
| 41 |
+
* Invalid client error - Client authentication failed (e.g., unknown client, no client
|
| 42 |
+
* authentication included, or unsupported authentication method).
|
| 43 |
+
*/
|
| 44 |
+
class InvalidClientError extends OAuthError {
|
| 45 |
+
constructor(message, errorUri) {
|
| 46 |
+
super("invalid_client", message, errorUri);
|
| 47 |
+
}
|
| 48 |
+
}
|
| 49 |
+
exports.InvalidClientError = InvalidClientError;
|
| 50 |
+
/**
|
| 51 |
+
* Invalid grant error - The provided authorization grant or refresh token is
|
| 52 |
+
* invalid, expired, revoked, does not match the redirection URI used in the
|
| 53 |
+
* authorization request, or was issued to another client.
|
| 54 |
+
*/
|
| 55 |
+
class InvalidGrantError extends OAuthError {
|
| 56 |
+
constructor(message, errorUri) {
|
| 57 |
+
super("invalid_grant", message, errorUri);
|
| 58 |
+
}
|
| 59 |
+
}
|
| 60 |
+
exports.InvalidGrantError = InvalidGrantError;
|
| 61 |
+
/**
|
| 62 |
+
* Unauthorized client error - The authenticated client is not authorized to use
|
| 63 |
+
* this authorization grant type.
|
| 64 |
+
*/
|
| 65 |
+
class UnauthorizedClientError extends OAuthError {
|
| 66 |
+
constructor(message, errorUri) {
|
| 67 |
+
super("unauthorized_client", message, errorUri);
|
| 68 |
+
}
|
| 69 |
+
}
|
| 70 |
+
exports.UnauthorizedClientError = UnauthorizedClientError;
|
| 71 |
+
/**
|
| 72 |
+
* Unsupported grant type error - The authorization grant type is not supported
|
| 73 |
+
* by the authorization server.
|
| 74 |
+
*/
|
| 75 |
+
class UnsupportedGrantTypeError extends OAuthError {
|
| 76 |
+
constructor(message, errorUri) {
|
| 77 |
+
super("unsupported_grant_type", message, errorUri);
|
| 78 |
+
}
|
| 79 |
+
}
|
| 80 |
+
exports.UnsupportedGrantTypeError = UnsupportedGrantTypeError;
|
| 81 |
+
/**
|
| 82 |
+
* Invalid scope error - The requested scope is invalid, unknown, malformed, or
|
| 83 |
+
* exceeds the scope granted by the resource owner.
|
| 84 |
+
*/
|
| 85 |
+
class InvalidScopeError extends OAuthError {
|
| 86 |
+
constructor(message, errorUri) {
|
| 87 |
+
super("invalid_scope", message, errorUri);
|
| 88 |
+
}
|
| 89 |
+
}
|
| 90 |
+
exports.InvalidScopeError = InvalidScopeError;
|
| 91 |
+
/**
|
| 92 |
+
* Access denied error - The resource owner or authorization server denied the request.
|
| 93 |
+
*/
|
| 94 |
+
class AccessDeniedError extends OAuthError {
|
| 95 |
+
constructor(message, errorUri) {
|
| 96 |
+
super("access_denied", message, errorUri);
|
| 97 |
+
}
|
| 98 |
+
}
|
| 99 |
+
exports.AccessDeniedError = AccessDeniedError;
|
| 100 |
+
/**
|
| 101 |
+
* Server error - The authorization server encountered an unexpected condition
|
| 102 |
+
* that prevented it from fulfilling the request.
|
| 103 |
+
*/
|
| 104 |
+
class ServerError extends OAuthError {
|
| 105 |
+
constructor(message, errorUri) {
|
| 106 |
+
super("server_error", message, errorUri);
|
| 107 |
+
}
|
| 108 |
+
}
|
| 109 |
+
exports.ServerError = ServerError;
|
| 110 |
+
/**
|
| 111 |
+
* Temporarily unavailable error - The authorization server is currently unable to
|
| 112 |
+
* handle the request due to a temporary overloading or maintenance of the server.
|
| 113 |
+
*/
|
| 114 |
+
class TemporarilyUnavailableError extends OAuthError {
|
| 115 |
+
constructor(message, errorUri) {
|
| 116 |
+
super("temporarily_unavailable", message, errorUri);
|
| 117 |
+
}
|
| 118 |
+
}
|
| 119 |
+
exports.TemporarilyUnavailableError = TemporarilyUnavailableError;
|
| 120 |
+
/**
|
| 121 |
+
* Unsupported response type error - The authorization server does not support
|
| 122 |
+
* obtaining an authorization code using this method.
|
| 123 |
+
*/
|
| 124 |
+
class UnsupportedResponseTypeError extends OAuthError {
|
| 125 |
+
constructor(message, errorUri) {
|
| 126 |
+
super("unsupported_response_type", message, errorUri);
|
| 127 |
+
}
|
| 128 |
+
}
|
| 129 |
+
exports.UnsupportedResponseTypeError = UnsupportedResponseTypeError;
|
| 130 |
+
/**
|
| 131 |
+
* Unsupported token type error - The authorization server does not support
|
| 132 |
+
* the requested token type.
|
| 133 |
+
*/
|
| 134 |
+
class UnsupportedTokenTypeError extends OAuthError {
|
| 135 |
+
constructor(message, errorUri) {
|
| 136 |
+
super("unsupported_token_type", message, errorUri);
|
| 137 |
+
}
|
| 138 |
+
}
|
| 139 |
+
exports.UnsupportedTokenTypeError = UnsupportedTokenTypeError;
|
| 140 |
+
/**
|
| 141 |
+
* Invalid token error - The access token provided is expired, revoked, malformed,
|
| 142 |
+
* or invalid for other reasons.
|
| 143 |
+
*/
|
| 144 |
+
class InvalidTokenError extends OAuthError {
|
| 145 |
+
constructor(message, errorUri) {
|
| 146 |
+
super("invalid_token", message, errorUri);
|
| 147 |
+
}
|
| 148 |
+
}
|
| 149 |
+
exports.InvalidTokenError = InvalidTokenError;
|
| 150 |
+
/**
|
| 151 |
+
* Method not allowed error - The HTTP method used is not allowed for this endpoint.
|
| 152 |
+
* (Custom, non-standard error)
|
| 153 |
+
*/
|
| 154 |
+
class MethodNotAllowedError extends OAuthError {
|
| 155 |
+
constructor(message, errorUri) {
|
| 156 |
+
super("method_not_allowed", message, errorUri);
|
| 157 |
+
}
|
| 158 |
+
}
|
| 159 |
+
exports.MethodNotAllowedError = MethodNotAllowedError;
|
| 160 |
+
/**
|
| 161 |
+
* Too many requests error - Rate limit exceeded.
|
| 162 |
+
* (Custom, non-standard error based on RFC 6585)
|
| 163 |
+
*/
|
| 164 |
+
class TooManyRequestsError extends OAuthError {
|
| 165 |
+
constructor(message, errorUri) {
|
| 166 |
+
super("too_many_requests", message, errorUri);
|
| 167 |
+
}
|
| 168 |
+
}
|
| 169 |
+
exports.TooManyRequestsError = TooManyRequestsError;
|
| 170 |
+
/**
|
| 171 |
+
* Invalid client metadata error - The client metadata is invalid.
|
| 172 |
+
* (Custom error for dynamic client registration - RFC 7591)
|
| 173 |
+
*/
|
| 174 |
+
class InvalidClientMetadataError extends OAuthError {
|
| 175 |
+
constructor(message, errorUri) {
|
| 176 |
+
super("invalid_client_metadata", message, errorUri);
|
| 177 |
+
}
|
| 178 |
+
}
|
| 179 |
+
exports.InvalidClientMetadataError = InvalidClientMetadataError;
|
| 180 |
+
/**
|
| 181 |
+
* Insufficient scope error - The request requires higher privileges than provided by the access token.
|
| 182 |
+
*/
|
| 183 |
+
class InsufficientScopeError extends OAuthError {
|
| 184 |
+
constructor(message, errorUri) {
|
| 185 |
+
super("insufficient_scope", message, errorUri);
|
| 186 |
+
}
|
| 187 |
+
}
|
| 188 |
+
exports.InsufficientScopeError = InsufficientScopeError;
|
| 189 |
+
//# sourceMappingURL=errors.js.map
|
crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/errors.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../../src/server/auth/errors.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACH,MAAa,UAAW,SAAQ,KAAK;IACnC,YACkB,SAAiB,EACjC,OAAe,EACC,QAAiB;QAEjC,KAA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AC,eAAe,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;IAC5C,CAAC;CACF;AAJD,8CAIC;AAED;;;GAGG;AACH,MAAa,qBAAsB,SAAQ,UAAU;IACnD,YAAY,OAAe,EAAE,QAAiB;QAC5C,KAAK,CAAC,oBAAoB,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;IACjD,CAAC;CACF;AAJD,sDAIC;AAED;;;GAGG;AACH,MAAa,oBAAqB,SAAQ,UAAU;IAClD,YAAY,OAAe,EAAE,QAAiB;QAC5C,KAAK,CAAC,mBAAmB,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;IAChD,CAAC;CACF;AAJD,oDAIC;AAED;;;GAGG;AACH,MAAa,0BAA2B,SAAQ,UAAU;IACxD,YAAY,OAAe,EAAE,QAAiB;QAC5C,KAAK,CAAC,yBAAyB,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;IACtD,CAAC;CACF;AAJD,gEAIC;AAED;;GAEG;AACH,MAAa,sBAAuB,SAAQ,UAAU;IACpD,YAAY,OAAe,EAAE,QAAiB;QAC5C,KAAK,CAAC,oBAAoB,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;IACjD,CAAC;CACF;AAJD,wDAIC"}
|
crypto-indicators-mcp/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/authorize.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { RequestHandler } from "express";
|
| 2 |
+
import { OAuthServerProvider } from "../provider.js";
|
| 3 |
+
import { Options as RateLimitOptions } from "express-rate-limit";
|
| 4 |
+
export type AuthorizationHandlerOptions = {
|
| 5 |
+
provider: OAuthServerProvider;
|
| 6 |
+
/**
|
| 7 |
+
* Rate limiting configuration for the authorization endpoint.
|
| 8 |
+
* Set to false to disable rate limiting for this endpoint.
|
| 9 |
+
*/
|
| 10 |
+
rateLimit?: Partial<RateLimitOptions> | false;
|
| 11 |
+
};
|
| 12 |
+
export declare function authorizationHandler({ provider, rateLimit: rateLimitConfig }: AuthorizationHandlerOptions): RequestHandler;
|
| 13 |
+
//# sourceMappingURL=authorize.d.ts.map
|