bykaranteli-mcp 0.36.2 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/README.md +6 -4
- package/dist/index.js +28 -16
- package/dist/tools.d.ts +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,28 @@
|
|
|
2
2
|
|
|
3
3
|
Notable changes to the `bykaranteli-mcp` package. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and versions follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html). Dates are UTC and come from the git tag of each release (the version commit where no tag exists). The tool count is the number of tools the server registers in that release.
|
|
4
4
|
|
|
5
|
+
## [1.0.1] - 2026-10-23
|
|
6
|
+
|
|
7
|
+
68 tools.
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- The stderr line for a frame the server could not use collapses whitespace before it is cut to 300 characters (a validation issue list spanned nineteen short lines; security review of the 1.0.0 release).
|
|
12
|
+
- `serveStdio` is called with `legacy: "serve"` spelled out (the SDK's default), so a later change of that default cannot drop the 2025-era clients unnoticed (independent review of the 1.0.0 release).
|
|
13
|
+
|
|
14
|
+
## [1.0.0] - 2026-10-23
|
|
15
|
+
|
|
16
|
+
68 tools.
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- The server moved from the maintenance line of the MCP TypeScript SDK (`@modelcontextprotocol/sdk` 1.32) to its stable line, `@modelcontextprotocol/server` 2.3, which implements the 2026-07-28 revision of the protocol. The tools, their names, descriptions, inputs and answers are unchanged.
|
|
21
|
+
- Both protocol eras are served: a client that opens with the 2025-era `initialize` handshake (every client released before the 2026-07-28 revision) is served exactly as 0.36 served it, on the revision it negotiates; a client that opens with a 2026-07-28 per-request envelope (`server/discover` first) is served on that revision, with `resultType`, the cache fields on the cacheable results and the server identity in `_meta`. The era is decided by the opening exchange and pinned for the connection.
|
|
22
|
+
- Node.js 20 or newer is required (the SDK's floor; the 0.x releases ran on 18).
|
|
23
|
+
- Tool input errors no longer carry the `MCP error -32602:` prefix the 1.x SDK added to the text: a tool error now starts with `Input validation error: Invalid arguments for tool <name>: ...`, and the 2,000-element ceiling reads `Invalid arguments for tool <name>: arguments contain more than the maximum of 2000 elements`. A call to a tool name the server does not have is a JSON-RPC error (`-32602`, `Tool <name> not found`) instead of a tool error result.
|
|
24
|
+
- Advertised input schemas carry `$schema` (JSON Schema 2020-12) and no longer carry `additionalProperties: false` (the SDK's conversion); the properties, types, enums and descriptions are unchanged.
|
|
25
|
+
- The README's OAuth paragraph names client metadata documents, which the hosted endpoint's authorization server accepts from this release's web deployment on.
|
|
26
|
+
|
|
5
27
|
## [0.36.2] - 2026-10-23
|
|
6
28
|
|
|
7
29
|
68 tools.
|
package/README.md
CHANGED
|
@@ -20,9 +20,11 @@ listing the tools work without one. The key travels one of three ways:
|
|
|
20
20
|
|
|
21
21
|
Or sign in with OAuth 2.1 where the client offers it (claude.ai custom
|
|
22
22
|
connectors: Authentication, Sign in; ChatGPT connectors: OAuth): the client
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
identifies itself with its client metadata document (an https client id the
|
|
24
|
+
authorization server reads, the way the 2026-07-28 MCP revision prefers) or
|
|
25
|
+
registers itself (RFC 7591), always with PKCE S256; you approve it once on
|
|
26
|
+
bykaranteli.com and it runs on a key of your own account, which the Data and
|
|
27
|
+
API page lists under connected apps. Discovery:
|
|
26
28
|
<https://mcp.bykaranteli.com/.well-known/oauth-protected-resource>.
|
|
27
29
|
|
|
28
30
|
A free account covers the API and the hosted MCP on one monthly counter;
|
|
@@ -58,7 +60,7 @@ Add to `claude_desktop_config.json`:
|
|
|
58
60
|
|
|
59
61
|
Any stdio MCP client works: command `npx`, args `["-y", "bykaranteli-mcp"]`, env `BYKARANTELI_API_KEY`.
|
|
60
62
|
|
|
61
|
-
Requires Node.js
|
|
63
|
+
Requires Node.js 20 or newer (1.0.0; the 0.x releases ran on 18). The server speaks both the 2026-07-28 revision of the protocol and the 2025-era `initialize` handshake, so every MCP client released so far connects unchanged.
|
|
62
64
|
|
|
63
65
|
## Tools
|
|
64
66
|
|
package/dist/index.js
CHANGED
|
@@ -8,23 +8,28 @@
|
|
|
8
8
|
* generated-at timestamp; quote it when citing values.
|
|
9
9
|
*/
|
|
10
10
|
import { createRequire } from "node:module";
|
|
11
|
-
import { McpServer } from "@modelcontextprotocol/
|
|
12
|
-
import {
|
|
11
|
+
import { McpServer } from "@modelcontextprotocol/server";
|
|
12
|
+
import { serveStdio } from "@modelcontextprotocol/server/stdio";
|
|
13
13
|
import { registerByKaranteliTools } from "./tools.js";
|
|
14
14
|
// Single source of truth for the version: package.json ships in the tarball
|
|
15
15
|
// and sits one level above both src/ and dist/.
|
|
16
16
|
const { version: VERSION } = createRequire(import.meta.url)("../package.json");
|
|
17
17
|
const BASE_URL = (process.env.BYKARANTELI_BASE_URL ?? "https://bykaranteli.com").replace(/\/+$/, "");
|
|
18
|
-
/* GHSA-46jr (SDK 1.32.0): the combined number of array elements and object members one tools/call
|
|
19
|
-
* payload may carry; above it the
|
|
20
|
-
* (a few dozen members); the hosted endpoint sets the same ceiling. */
|
|
18
|
+
/* GHSA-46jr (SDK 1.32.0, kept on 2.x): the combined number of array elements and object members one tools/call
|
|
19
|
+
* `arguments` payload may carry; above it the server answers a tool error (isError) before validation. The largest
|
|
20
|
+
* real input is an alert recipe (a few dozen members); the hosted endpoint sets the same ceiling. */
|
|
21
21
|
const MAX_TOOL_INPUT_ELEMENTS = 2_000;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
22
|
+
/* One server per connection (1.0.0, SDK 2.x). serveStdio owns the era decision: a client that opens with the
|
|
23
|
+
* 2025-era `initialize` handshake (every client released before the 2026-07-28 revision) is served exactly as the
|
|
24
|
+
* 0.x releases served it; a client that opens with a 2026-07-28 per-request envelope (`server/discover` is the
|
|
25
|
+
* modern probe) is served on that revision, with the same tools. The factory is called once per connection, plus
|
|
26
|
+
* once for a discarded probe instance, so it registers the tools afresh each time. */
|
|
27
|
+
function buildServer() {
|
|
28
|
+
const server = new McpServer({ name: "bykaranteli", version: VERSION }, { maxToolInputElements: MAX_TOOL_INPUT_ELEMENTS });
|
|
29
|
+
registerByKaranteliTools(server, { version: VERSION });
|
|
30
|
+
return server;
|
|
31
|
+
}
|
|
32
|
+
function main() {
|
|
28
33
|
// If the host dies while a response is in flight, exit quietly instead of
|
|
29
34
|
// crashing with an unhandled EPIPE from the stdout pipe. Non-EPIPE stream
|
|
30
35
|
// errors would be swallowed once a listener exists, so log and exit nonzero.
|
|
@@ -34,12 +39,19 @@ async function main() {
|
|
|
34
39
|
console.error("bykaranteli-mcp stdout error:", err);
|
|
35
40
|
process.exit(1);
|
|
36
41
|
});
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
42
|
+
// stdout is the JSON-RPC channel; log to stderr only. Out-of-band protocol errors (a frame the server could not
|
|
43
|
+
// use) are reported there too, cut short: the SDK builds some messages from the client's own frame.
|
|
44
|
+
serveStdio(buildServer, {
|
|
45
|
+
// The SDK's default, named so a later default change cannot silently drop the 2025-era clients.
|
|
46
|
+
legacy: "serve",
|
|
47
|
+
onerror: (err) => console.error(`bykaranteli-mcp: ${String(err.message ?? err).replace(/\s+/g, " ").slice(0, 300)}`),
|
|
48
|
+
});
|
|
40
49
|
console.error(`bykaranteli-mcp ready (base: ${BASE_URL})`);
|
|
41
50
|
}
|
|
42
|
-
|
|
51
|
+
try {
|
|
52
|
+
main();
|
|
53
|
+
}
|
|
54
|
+
catch (err) {
|
|
43
55
|
console.error("bykaranteli-mcp fatal:", err);
|
|
44
56
|
process.exit(1);
|
|
45
|
-
}
|
|
57
|
+
}
|
package/dist/tools.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* bykaranteli.com both call registerByKaranteliTools on their own server
|
|
5
5
|
* instance, so every tool has exactly one definition.
|
|
6
6
|
*/
|
|
7
|
-
import type { McpServer } from "@modelcontextprotocol/
|
|
7
|
+
import type { McpServer } from "@modelcontextprotocol/server";
|
|
8
8
|
export type RegisterOptions = {
|
|
9
9
|
/** Override the API origin used for OUTBOUND fetches (the hosted endpoint
|
|
10
10
|
* points this at the container-internal origin). */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bykaranteli-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.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. 68 read-only and account tools (the alert and watchlist tools act on your own account), free account key, paid depth via plans or x402.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"prepare": "npm run build"
|
|
21
21
|
},
|
|
22
22
|
"engines": {
|
|
23
|
-
"node": ">=
|
|
23
|
+
"node": ">=20"
|
|
24
24
|
},
|
|
25
25
|
"keywords": [
|
|
26
26
|
"mcp",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"url": "https://github.com/bykarantelicom/bykaranteli-mcp/issues"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@modelcontextprotocol/
|
|
50
|
+
"@modelcontextprotocol/server": "^2.3.1",
|
|
51
51
|
"zod": "^4.3.6"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|