@0xinsider/mcp 3.6.2 → 3.9.0

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.
Files changed (87) hide show
  1. package/README.md +60 -18
  2. package/dist/catalog.generated.d.ts +56 -0
  3. package/dist/catalog.generated.d.ts.map +1 -1
  4. package/dist/catalog.generated.js +70 -0
  5. package/dist/catalog.generated.js.map +1 -1
  6. package/dist/client.d.ts +3 -0
  7. package/dist/client.d.ts.map +1 -1
  8. package/dist/client.js.map +1 -1
  9. package/dist/constants.d.ts +1 -1
  10. package/dist/constants.js +1 -1
  11. package/dist/product-cli/index.d.ts.map +1 -1
  12. package/dist/product-cli/index.js +181 -26
  13. package/dist/product-cli/index.js.map +1 -1
  14. package/dist/product-cli/operations.d.ts +24 -0
  15. package/dist/product-cli/operations.d.ts.map +1 -0
  16. package/dist/product-cli/operations.js +239 -0
  17. package/dist/product-cli/operations.js.map +1 -0
  18. package/dist/prompts/index.js +2 -2
  19. package/dist/sdk/client.d.ts +262 -151
  20. package/dist/sdk/client.d.ts.map +1 -1
  21. package/dist/sdk/client.js +284 -145
  22. package/dist/sdk/client.js.map +1 -1
  23. package/dist/sdk/errors.d.ts +6 -5
  24. package/dist/sdk/errors.d.ts.map +1 -1
  25. package/dist/sdk/errors.js +13 -5
  26. package/dist/sdk/errors.js.map +1 -1
  27. package/dist/sdk/index.d.ts +4 -26
  28. package/dist/sdk/index.d.ts.map +1 -1
  29. package/dist/sdk/index.js +2 -1
  30. package/dist/sdk/index.js.map +1 -1
  31. package/dist/sdk/pagination.d.ts +3 -3
  32. package/dist/sdk/pagination.js +2 -2
  33. package/dist/sdk/schema.d.ts +1496 -212
  34. package/dist/sdk/schema.d.ts.map +1 -1
  35. package/dist/sdk/webhooks.d.ts +8 -60
  36. package/dist/sdk/webhooks.d.ts.map +1 -1
  37. package/dist/sdk/webhooks.js.map +1 -1
  38. package/dist/server.d.ts.map +1 -1
  39. package/dist/server.js +21 -4
  40. package/dist/server.js.map +1 -1
  41. package/dist/tools/account.d.ts +5 -0
  42. package/dist/tools/account.d.ts.map +1 -0
  43. package/dist/tools/account.js +53 -0
  44. package/dist/tools/account.js.map +1 -0
  45. package/dist/tools/category-leaderboards.d.ts +5 -0
  46. package/dist/tools/category-leaderboards.d.ts.map +1 -0
  47. package/dist/tools/category-leaderboards.js +71 -0
  48. package/dist/tools/category-leaderboards.js.map +1 -0
  49. package/dist/tools/explore-markets.js +2 -2
  50. package/dist/tools/explore-markets.js.map +1 -1
  51. package/dist/tools/games.d.ts +4 -0
  52. package/dist/tools/games.d.ts.map +1 -1
  53. package/dist/tools/games.js +152 -6
  54. package/dist/tools/games.js.map +1 -1
  55. package/dist/tools/get-insider-radar.js +1 -1
  56. package/dist/tools/get-insider-radar.js.map +1 -1
  57. package/dist/tools/get-leaderboard.d.ts.map +1 -1
  58. package/dist/tools/get-leaderboard.js +36 -18
  59. package/dist/tools/get-leaderboard.js.map +1 -1
  60. package/dist/tools/get-market-flow.js +1 -1
  61. package/dist/tools/get-trader-pnl.js +3 -3
  62. package/dist/tools/get-trader-pnl.js.map +1 -1
  63. package/dist/tools/get-trader.js +3 -3
  64. package/dist/tools/get-trending-wallets.js +1 -1
  65. package/dist/tools/get-whale-trades.d.ts.map +1 -1
  66. package/dist/tools/get-whale-trades.js +14 -4
  67. package/dist/tools/get-whale-trades.js.map +1 -1
  68. package/dist/tools/market-reads.d.ts +2 -0
  69. package/dist/tools/market-reads.d.ts.map +1 -1
  70. package/dist/tools/market-reads.js +58 -4
  71. package/dist/tools/market-reads.js.map +1 -1
  72. package/dist/tools/pick-of-the-day.d.ts +1 -0
  73. package/dist/tools/pick-of-the-day.d.ts.map +1 -1
  74. package/dist/tools/pick-of-the-day.js +22 -2
  75. package/dist/tools/pick-of-the-day.js.map +1 -1
  76. package/dist/tools/read-parity.d.ts +1 -0
  77. package/dist/tools/read-parity.d.ts.map +1 -1
  78. package/dist/tools/read-parity.js +55 -14
  79. package/dist/tools/read-parity.js.map +1 -1
  80. package/dist/tools/search-markets.js +4 -4
  81. package/dist/tools/search-markets.js.map +1 -1
  82. package/dist/tools/sport-leaderboards.d.ts +5 -0
  83. package/dist/tools/sport-leaderboards.d.ts.map +1 -0
  84. package/dist/tools/sport-leaderboards.js +65 -0
  85. package/dist/tools/sport-leaderboards.js.map +1 -0
  86. package/dist/tools/trader-reads.js +1 -1
  87. package/package.json +5 -5
@@ -0,0 +1,5 @@
1
+ import { McpServer } from "@modelcontextprotocol/server";
2
+ import { ApiClient } from "../client.js";
3
+ export declare function registerGetLeaderboardLeagues(server: McpServer, client: ApiClient): void;
4
+ export declare function registerGetSportLeaderboard(server: McpServer, client: ApiClient): void;
5
+ //# sourceMappingURL=sport-leaderboards.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sport-leaderboards.d.ts","sourceRoot":"","sources":["../../src/tools/sport-leaderboards.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAEzD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAczC,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,GAAG,IAAI,CAwBxF;AAED,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,GAAG,IAAI,CAsCtF"}
@@ -0,0 +1,65 @@
1
+ import { z } from "zod";
2
+ import { fail, ok, withMeta } from "./result.js";
3
+ // Sport and league boards over stdio (#32157). They mirror the remote entries
4
+ // in backend/src/mcp/tools/contract.rs; scripts/mcp-catalog-parity.mjs proves
5
+ // the two tool lists match, and the description text is kept in step by hand.
6
+ const readAnnotations = {
7
+ readOnlyHint: true,
8
+ destructiveHint: false,
9
+ idempotentHint: true,
10
+ openWorldHint: false,
11
+ };
12
+ export function registerGetLeaderboardLeagues(server, client) {
13
+ server.registerTool("get_leaderboard_leagues", {
14
+ title: "List Leaderboard Leagues",
15
+ description: `List every league that has its own skill leaderboard, grouped by sport, most ranked wallets first. Each row's sport and slug are the sport and league arguments of get_sport_leaderboard. A league is listed once its edge sort ranks at least min_ranked wallets.
16
+
17
+ A ranking being rebuilt returns read_model_warming with a retry time.
18
+
19
+ Args: none
20
+
21
+ Returns: min_ranked, min_resolved, refreshed_at and leagues[] (category, sport, slug, name, ranked_traders, total_traders).`,
22
+ inputSchema: z.object({}),
23
+ annotations: readAnnotations,
24
+ }, async (_args, ctx) => {
25
+ try {
26
+ const response = await client.request("/api/v1/leaderboard/leagues", undefined, undefined, { signal: ctx.mcpReq.signal });
27
+ return ok(withMeta(response.data, response.meta));
28
+ }
29
+ catch (error) {
30
+ return fail(error);
31
+ }
32
+ });
33
+ }
34
+ export function registerGetSportLeaderboard(server, client) {
35
+ server.registerTool("get_sport_leaderboard", {
36
+ title: "Get Sport Leaderboard",
37
+ description: `Get one sport's skill leaderboard, or with league one league's: the board the site's sport pages show. Wallets need min_resolved resolved markets in the sport or league. sort edge (the default) ranks edge_skill, the edge over the price paid pulled toward the board's edge_average by how much of the record is noise; a wallet without a ranked edge sorts after the ranked ones. sort pnl ranks realized P&L and win_rate the Wilson lower bound of the win rate. Boards are ranked to 100 wallets.
38
+
39
+ A sport outside sports and esports is not_found on sport; a league the sport has no board for is not_found on league (get_leaderboard_leagues lists them).
40
+
41
+ Args:
42
+ - sport (string, required): Sport slug, e.g. soccer, basketball, football, esports; an alias such as nba reads its sport's board
43
+ - league (string, optional): League slug of the sport, e.g. premier-league
44
+ - sort (string, optional): edge (default), pnl or win_rate
45
+ - limit (number, 1-100, default 20): Rows from the top of the board
46
+
47
+ Returns: sport, category, league, sort, min_resolved, limit, total_traders, edge_average, volume_scope, as_of and rows[] (rank, id, address, username, platform, grade, n_resolved, wins, losses, win_rate, win_rate_wilson_lb, price_edge, edge_hold, edge_skill, pnl, volume, cost, roi, last_category_trade_at).`,
48
+ inputSchema: z.object({
49
+ sport: z.string().trim().min(1).describe("Sport slug, e.g. soccer, basketball, football or esports; an alias such as nba reads its sport's board"),
50
+ league: z.string().trim().min(1).optional().describe("League slug of the sport from get_leaderboard_leagues, e.g. premier-league; omit for the sport board"),
51
+ sort: z.enum(["edge", "pnl", "win_rate"]).default("edge").describe("Ranking axis: edge over the price paid (default), realized P&L, or win rate"),
52
+ limit: z.number().int().min(1).max(100).default(20).describe("Rows from the top of the board (1-100, default 20)"),
53
+ }),
54
+ annotations: readAnnotations,
55
+ }, async ({ sport, league, sort, limit }, ctx) => {
56
+ try {
57
+ const response = await client.request(`/api/v1/leaderboard/sports/${encodeURIComponent(sport)}`, { league, sort, limit }, undefined, { signal: ctx.mcpReq.signal });
58
+ return ok(withMeta(response.data, response.meta));
59
+ }
60
+ catch (error) {
61
+ return fail(error);
62
+ }
63
+ });
64
+ }
65
+ //# sourceMappingURL=sport-leaderboards.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sport-leaderboards.js","sourceRoot":"","sources":["../../src/tools/sport-leaderboards.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEjD,8EAA8E;AAC9E,8EAA8E;AAC9E,8EAA8E;AAE9E,MAAM,eAAe,GAAG;IACtB,YAAY,EAAE,IAAI;IAClB,eAAe,EAAE,KAAK;IACtB,cAAc,EAAE,IAAI;IACpB,aAAa,EAAE,KAAK;CACZ,CAAC;AAEX,MAAM,UAAU,6BAA6B,CAAC,MAAiB,EAAE,MAAiB;IAChF,MAAM,CAAC,YAAY,CACjB,yBAAyB,EACzB;QACE,KAAK,EAAE,0BAA0B;QACjC,WAAW,EAAE;;;;;;4HAMyG;QACtH,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;QACzB,WAAW,EAAE,eAAe;KAC7B,EACD,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE;QACnB,IAAI,CAAC;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AAe;KAC7B,EACD,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;QAC5C,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,OAAO,CACnC,8BAA8B,kBAAkB,CAAC,KAAK,CAAC,EAAE,EACzD,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,EACvB,SAAS,EACT,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,CAC9B,CAAC;YACF,OAAO,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;QACpD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC;QACrB,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -22,7 +22,7 @@ function traderPath(address, suffix) {
22
22
  export function registerGetTraderContext(server, client) {
23
23
  server.registerTool("get_trader_context", {
24
24
  title: "Get trader context",
25
- description: `One structured context object for a trader: the full get_trader profile plus position_summary (sync coverage and realized and unrealized P&L rollups with an as_of open-position clock), data_as_of and a freshness_note on what the point-in-time snapshot covers. position_summary is absent when the trader is not tracked locally or native net economics is unavailable. A wallet address with no trader yet returns sync_status "unknown" on the nested trader; a username or trader id that matches no trader is a not_found error.
25
+ description: `One structured context object for a trader: the full get_trader profile plus position_summary (sync coverage and realized and unrealized P&L rollups with an as_of open-position clock), data_as_of and a freshness_note on what the point-in-time snapshot covers. position_summary is absent when the trader is not tracked locally or native net economics is unavailable. Its open-position figures (markets_open, unrealized_mtm, cost_basis_locked) cover the wallet's sports and esports markets, each judged when read; markets_synced, markets_resolved and the resolved win figures count every stored market, which can include markets of other categories, and sync_coverage adds markets_pruned and markets_unstored, its deleted and its unstored markets of other categories, and markets_combo, its combo markets, to markets_synced; markets_total, total_realized_pnl and synced_realized_pnl cover every Polymarket market of the wallet. A wallet address with no trader yet returns sync_status "unknown" on the nested trader; a username or trader id that matches no trader is a not_found error.
26
26
 
27
27
  Args:
28
28
  - address (string, required): Wallet address (0x...), username, or trd_-prefixed trader id
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xinsider/mcp",
3
- "version": "3.6.2",
3
+ "version": "3.9.0",
4
4
  "mcpName": "io.github.0xinsider/mcp",
5
5
  "description": "Official 0xinsider CLI and MCP server: Polymarket analytics & infrastructure for sports and esports markets",
6
6
  "type": "module",
@@ -58,16 +58,16 @@
58
58
  "README.md"
59
59
  ],
60
60
  "dependencies": {
61
- "@modelcontextprotocol/server": "^2.3.1",
62
- "zod": "^4.6.5"
61
+ "@modelcontextprotocol/server": "^2.4.0",
62
+ "zod": "^4.6.7"
63
63
  },
64
64
  "devDependencies": {
65
65
  "@types/node": "^22.20.5",
66
66
  "semver": "^7.8.5",
67
67
  "tsx": "^4.23.15",
68
68
  "typescript": "^7.0.2",
69
- "oxlint": "1.85.0",
70
- "oxlint-tsgolint": "7.0.2002"
69
+ "oxlint": "1.89.0",
70
+ "oxlint-tsgolint": "7.0.2005"
71
71
  },
72
72
  "imports": {
73
73
  "#sdk": "./dist/sdk/index.js"