bykaranteli-mcp 0.25.0 → 0.26.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -12
- package/dist/tools.d.ts +9 -0
- package/dist/tools.js +21 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,19 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
MCP (Model Context Protocol) server for **live crypto derivatives data**: funding rates, cross-exchange funding arbitrage, open interest pressure, liquidations, options, ETF flows, Fear & Greed and BTC dominance.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
45 read-only tools over the public JSON API of [bykaranteli.com](https://bykaranteli.com/developers). Since 2026-09-17 the API asks programs for an account key: a **free key** comes with any verified account at <https://bykaranteli.com/dashboard/api> (30 requests a minute, public depth), and the Builder, Business and Scale plans raise the rate and unlock member depth (LiqMap on seven timeframes, 5-minute series, the x402 catalog included). Set it as `BYKARANTELI_API_KEY`. Data covers Binance USDT-M perpetuals (funding arbitrage additionally compares OKX, Bybit, Gate, HTX, BingX, Kraken, MEXC and Bitget).
|
|
6
6
|
|
|
7
7
|
## Hosted endpoint (no install)
|
|
8
8
|
|
|
9
9
|
Paste `https://mcp.bykaranteli.com` as a custom connector in any MCP-capable
|
|
10
|
-
assistant. Same
|
|
10
|
+
assistant. Same 45 tools, nothing to install. Without a key it runs on the
|
|
11
|
+
shared Free pool; a connector header `Authorization: Bearer bk_...` (Builder
|
|
12
|
+
and above) brings your own rate limit and member depth.
|
|
11
13
|
|
|
12
14
|
## Quick start
|
|
13
15
|
|
|
14
16
|
### Claude Code
|
|
15
17
|
|
|
16
18
|
```bash
|
|
17
|
-
claude mcp add bykaranteli -- npx -y bykaranteli-mcp
|
|
19
|
+
claude mcp add bykaranteli -e BYKARANTELI_API_KEY=bk_... -- npx -y bykaranteli-mcp
|
|
18
20
|
```
|
|
19
21
|
|
|
20
22
|
### Claude Desktop
|
|
@@ -26,7 +28,8 @@ Add to `claude_desktop_config.json`:
|
|
|
26
28
|
"mcpServers": {
|
|
27
29
|
"bykaranteli": {
|
|
28
30
|
"command": "npx",
|
|
29
|
-
"args": ["-y", "bykaranteli-mcp"]
|
|
31
|
+
"args": ["-y", "bykaranteli-mcp"],
|
|
32
|
+
"env": { "BYKARANTELI_API_KEY": "bk_..." }
|
|
30
33
|
}
|
|
31
34
|
}
|
|
32
35
|
}
|
|
@@ -34,7 +37,7 @@ Add to `claude_desktop_config.json`:
|
|
|
34
37
|
|
|
35
38
|
### Cursor / other MCP clients
|
|
36
39
|
|
|
37
|
-
Any stdio MCP client works: command `npx`, args `["-y", "bykaranteli-mcp"]`.
|
|
40
|
+
Any stdio MCP client works: command `npx`, args `["-y", "bykaranteli-mcp"]`, env `BYKARANTELI_API_KEY`.
|
|
38
41
|
|
|
39
42
|
Requires Node.js 18 or newer.
|
|
40
43
|
|
|
@@ -94,6 +97,7 @@ All responses are JSON and carry a `generatedAt` timestamp plus a `source` URL t
|
|
|
94
97
|
|
|
95
98
|
| Env var | Default | Purpose |
|
|
96
99
|
|---|---|---|
|
|
100
|
+
| `BYKARANTELI_API_KEY` | none | Account key (`bk_...`) sent as `Authorization: Bearer`. Free at <https://bykaranteli.com/dashboard/api>; required for programs from 2026-09-17 |
|
|
97
101
|
| `BYKARANTELI_BASE_URL` | `https://bykaranteli.com` | Override the API host (testing only) |
|
|
98
102
|
|
|
99
103
|
## Data notes
|
|
@@ -112,12 +116,20 @@ node dist/index.js # speaks MCP over stdio
|
|
|
112
116
|
|
|
113
117
|
## License
|
|
114
118
|
|
|
115
|
-
MIT.
|
|
119
|
+
Server: MIT. Data: personal and research use with attribution "ByKaranteli (bykaranteli.com)"; commercial use with the Business plan. Licence text: <https://bykaranteli.com/data#license>.
|
|
116
120
|
|
|
117
|
-
##
|
|
121
|
+
## Plans and paid depth
|
|
118
122
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
123
|
+
| Plan | Price | Rate | Depth |
|
|
124
|
+
|---|---|---|---|
|
|
125
|
+
| Free API | $0 | 30 / min | public pages |
|
|
126
|
+
| Builder | $49 / mo | 300 / min | member depth, x402 catalog included |
|
|
127
|
+
| Business | $149 / mo | 1,200 / min | member depth, commercial licence, monthly bulk |
|
|
128
|
+
| Scale | $399 / mo | 3,000 / min | member depth, derived redistribution, daily raw |
|
|
129
|
+
|
|
130
|
+
Full table: <https://bykaranteli.com/developers#tiers>. For recorded history and
|
|
131
|
+
raw records beyond the live snapshots, bykaranteli.com also exposes pay-per-call
|
|
132
|
+
x402 endpoints for anonymous agents (USDC on Solana or Base, priced per call,
|
|
133
|
+
no account): <https://bykaranteli.com/developers#x402> · machine catalog:
|
|
134
|
+
<https://bykaranteli.com/api/x402>. Builder and higher keys call those routes
|
|
135
|
+
unpaid within their plan limits.
|
package/dist/tools.d.ts
CHANGED
|
@@ -15,5 +15,14 @@ export type RegisterOptions = {
|
|
|
15
15
|
publicUrl?: string;
|
|
16
16
|
/** Version string for the outbound user-agent. */
|
|
17
17
|
version?: string;
|
|
18
|
+
/** Account API key (bk_...) sent as Authorization: Bearer on every fetch.
|
|
19
|
+
* Since 2026-09-17 the public API asks programs for one; a free key comes
|
|
20
|
+
* with any verified account (https://bykaranteli.com/dashboard/api) and paid
|
|
21
|
+
* plans raise the rate and unlock member depth. Falls back to the
|
|
22
|
+
* BYKARANTELI_API_KEY environment variable. */
|
|
23
|
+
apiKey?: string;
|
|
24
|
+
/** Per-call Authorization value, for hosts that forward their caller's key
|
|
25
|
+
* (the hosted endpoint). Takes precedence over apiKey when it returns one. */
|
|
26
|
+
authorizationProvider?: () => string | undefined;
|
|
18
27
|
};
|
|
19
28
|
export declare function registerByKaranteliTools(server: McpServer, options?: RegisterOptions): void;
|
package/dist/tools.js
CHANGED
|
@@ -10,6 +10,13 @@ export function registerByKaranteliTools(server, options) {
|
|
|
10
10
|
const PUBLIC_URL = (options?.publicUrl ?? process.env.BYKARANTELI_PUBLIC_URL ?? "https://bykaranteli.com").replace(/\/+$/, "");
|
|
11
11
|
const USER_AGENT = `bykaranteli-mcp/${options?.version ?? "dev"} (+https://github.com/bykarantelicom/bykaranteli-mcp)`;
|
|
12
12
|
const TIMEOUT_MS = 15_000;
|
|
13
|
+
const STATIC_KEY = (options?.apiKey ?? process.env.BYKARANTELI_API_KEY ?? "").trim();
|
|
14
|
+
const authorizationFor = () => {
|
|
15
|
+
const forwarded = options?.authorizationProvider?.();
|
|
16
|
+
if (forwarded)
|
|
17
|
+
return forwarded;
|
|
18
|
+
return STATIC_KEY ? `Bearer ${STATIC_KEY}` : undefined;
|
|
19
|
+
};
|
|
13
20
|
// Read-only GET tools over an open-world public API, all of them.
|
|
14
21
|
const READ_ONLY = { readOnlyHint: true, openWorldHint: true };
|
|
15
22
|
/** Invalid tool input (not a network problem): no retry hint in the error. */
|
|
@@ -19,9 +26,14 @@ export function registerByKaranteliTools(server, options) {
|
|
|
19
26
|
const controller = new AbortController();
|
|
20
27
|
const timer = setTimeout(() => controller.abort(new Error(`${path} timed out after ${TIMEOUT_MS / 1000}s`)), TIMEOUT_MS);
|
|
21
28
|
try {
|
|
29
|
+
const authorization = authorizationFor();
|
|
22
30
|
const res = await fetch(`${BASE_URL}${path}`, {
|
|
23
31
|
signal: controller.signal,
|
|
24
|
-
headers: {
|
|
32
|
+
headers: {
|
|
33
|
+
accept: "application/json",
|
|
34
|
+
"user-agent": USER_AGENT,
|
|
35
|
+
...(authorization ? { authorization } : {}),
|
|
36
|
+
},
|
|
25
37
|
});
|
|
26
38
|
if (!res.ok) {
|
|
27
39
|
/* Carry the route's own error body (audit P3 #412): "HTTP 400" alone
|
|
@@ -749,7 +761,7 @@ export function registerByKaranteliTools(server, options) {
|
|
|
749
761
|
server.registerTool("get_new_listings", {
|
|
750
762
|
title: "New and delisted perpetual contracts",
|
|
751
763
|
description: "Call this when the user asks what new perpetuals were listed, which exchange listed a coin first, or about delistings. Returns listings and delistings across six exchanges from the hourly scan.",
|
|
752
|
-
inputSchema: { days: z.number().int().min(1).max(30).optional().describe("Window in days, 1-30 (default 30). Longer listing history is the
|
|
764
|
+
inputSchema: { days: z.number().int().min(1).max(30).optional().describe("Window in days, 1-30 (default 30). Longer listing history is the listings dataset at bykaranteli.com/data.") },
|
|
753
765
|
annotations: READ_ONLY,
|
|
754
766
|
}, async (args) => {
|
|
755
767
|
try {
|
|
@@ -790,7 +802,7 @@ export function registerByKaranteliTools(server, options) {
|
|
|
790
802
|
});
|
|
791
803
|
server.registerTool("get_liqmap", {
|
|
792
804
|
title: "LiqMap: estimated liquidation clusters with real prints overlaid",
|
|
793
|
-
description: "Call this when the user asks where liquidation clusters or liquidity pools sit for a perpetual, where leveraged longs/shorts would get liquidated, or for a liquidation heatmap reading. Returns the
|
|
805
|
+
description: "Call this when the user asks where liquidation clusters or liquidity pools sit for a perpetual, where leveraged longs/shorts would get liquidated, or for a liquidation heatmap reading. Returns the LiqMap snapshot for one symbol: modeled liquidation levels by price, zone aggregates and real liquidation prints from six venues. Without an account key (or on the Free plan) the 24h view; with a Builder or higher key (BYKARANTELI_API_KEY) every timeframe from 1h to 30d.",
|
|
794
806
|
inputSchema: {
|
|
795
807
|
symbol: z
|
|
796
808
|
.string()
|
|
@@ -799,13 +811,17 @@ export function registerByKaranteliTools(server, options) {
|
|
|
799
811
|
.regex(/^[A-Z0-9]{2,20}$/)
|
|
800
812
|
.optional()
|
|
801
813
|
.describe("Symbol like BTCUSDT (bare BTC accepted). Default BTCUSDT."),
|
|
814
|
+
timeframe: z
|
|
815
|
+
.enum(["1h", "4h", "12h", "24h", "3d", "1w", "30d"])
|
|
816
|
+
.optional()
|
|
817
|
+
.describe("Model window. Default 24h, the only one served without a Builder or higher key."),
|
|
802
818
|
},
|
|
803
819
|
annotations: READ_ONLY,
|
|
804
|
-
}, async ({ symbol }) => {
|
|
820
|
+
}, async ({ symbol, timeframe }) => {
|
|
805
821
|
try {
|
|
806
822
|
const raw = symbol ?? "BTCUSDT";
|
|
807
823
|
const sym = raw.endsWith("USDT") ? raw : `${raw}USDT`;
|
|
808
|
-
const path = `/api/liqmap/public?symbol=${encodeURIComponent(sym)}&timeframe
|
|
824
|
+
const path = `/api/liqmap/public?symbol=${encodeURIComponent(sym)}&timeframe=${encodeURIComponent(timeframe ?? "24h")}`;
|
|
809
825
|
const data = await fetchJson(path);
|
|
810
826
|
return ok({ ...data, source: `${PUBLIC_URL}/liqmap/${sym.replace(/USDT$/, "").toLowerCase()}` });
|
|
811
827
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bykaranteli-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.1",
|
|
4
4
|
"description": "MCP server for live crypto derivatives data from bykaranteli.com: funding rates, funding arbitrage, open interest pressure, liquidations, options, ETF flows, Fear & Greed and BTC dominance. Free, no API key.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|