@aibtc/mcp-server 1.70.1 → 1.72.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 (134) hide show
  1. package/README.md +45 -8
  2. package/dist/bridge/index.js +4 -4
  3. package/dist/config/contracts.d.ts +4 -4
  4. package/dist/config/contracts.js +2 -2
  5. package/dist/config/networks.js +4 -1
  6. package/dist/endpoints/registry.d.ts +8 -26
  7. package/dist/endpoints/registry.js +7 -932
  8. package/dist/index.js +118 -42
  9. package/dist/services/stacking.service.d.ts +144 -45
  10. package/dist/services/stacking.service.js +416 -123
  11. package/dist/services/x402-discovery.service.d.ts +81 -0
  12. package/dist/services/x402-discovery.service.js +170 -0
  13. package/dist/tools/arxiv-research.tools.d.ts +1 -1
  14. package/dist/tools/arxiv-research.tools.js +6 -6
  15. package/dist/tools/at-stake-legion.tools.d.ts +1 -1
  16. package/dist/tools/at-stake-legion.tools.js +14 -14
  17. package/dist/tools/at-stake.tools.d.ts +1 -1
  18. package/dist/tools/at-stake.tools.js +17 -17
  19. package/dist/tools/bitcoin.tools.d.ts +1 -1
  20. package/dist/tools/bitcoin.tools.js +12 -12
  21. package/dist/tools/bitflow.tools.d.ts +1 -1
  22. package/dist/tools/bitflow.tools.js +21 -21
  23. package/dist/tools/bns.tools.d.ts +1 -1
  24. package/dist/tools/bns.tools.js +18 -18
  25. package/dist/tools/bounty-hint.d.ts +1 -1
  26. package/dist/tools/bounty-scanner.tools.d.ts +1 -1
  27. package/dist/tools/bounty-scanner.tools.js +20 -20
  28. package/dist/tools/child-inscription.tools.d.ts +1 -1
  29. package/dist/tools/child-inscription.tools.js +6 -6
  30. package/dist/tools/competition.tools.d.ts +1 -1
  31. package/dist/tools/competition.tools.js +4 -4
  32. package/dist/tools/contract.tools.d.ts +1 -1
  33. package/dist/tools/contract.tools.js +8 -8
  34. package/dist/tools/credentials.tools.d.ts +1 -1
  35. package/dist/tools/credentials.tools.js +8 -8
  36. package/dist/tools/defi.tools.d.ts +1 -1
  37. package/dist/tools/defi.tools.js +21 -21
  38. package/dist/tools/dual-stacking.tools.d.ts +1 -1
  39. package/dist/tools/dual-stacking.tools.js +7 -7
  40. package/dist/tools/earning.tools.d.ts +1 -1
  41. package/dist/tools/earning.tools.js +5 -5
  42. package/dist/tools/endpoint.tools.d.ts +1 -1
  43. package/dist/tools/endpoint.tools.js +92 -49
  44. package/dist/tools/identity.tools.d.ts +1 -1
  45. package/dist/tools/identity.tools.js +19 -19
  46. package/dist/tools/inbox-x402.tools.d.ts +1 -1
  47. package/dist/tools/inbox-x402.tools.js +2 -2
  48. package/dist/tools/inbox.tools.d.ts +1 -1
  49. package/dist/tools/inbox.tools.js +2 -2
  50. package/dist/tools/index.d.ts +6 -3
  51. package/dist/tools/index.js +69 -58
  52. package/dist/tools/inference-marketplace.tools.d.ts +1 -1
  53. package/dist/tools/inference-marketplace.tools.js +10 -10
  54. package/dist/tools/jingswap.tools.d.ts +1 -1
  55. package/dist/tools/jingswap.tools.js +30 -30
  56. package/dist/tools/legion.tools.d.ts +1 -1
  57. package/dist/tools/legion.tools.js +20 -20
  58. package/dist/tools/lightning.tools.d.ts +1 -1
  59. package/dist/tools/lightning.tools.js +14 -14
  60. package/dist/tools/mempool.tools.d.ts +1 -1
  61. package/dist/tools/mempool.tools.js +5 -5
  62. package/dist/tools/news.tools.d.ts +1 -1
  63. package/dist/tools/news.tools.js +2 -1
  64. package/dist/tools/nft.tools.d.ts +1 -1
  65. package/dist/tools/nft.tools.js +12 -12
  66. package/dist/tools/nonce.tools.d.ts +1 -1
  67. package/dist/tools/nonce.tools.js +8 -8
  68. package/dist/tools/nostr.tools.d.ts +1 -1
  69. package/dist/tools/nostr.tools.js +12 -12
  70. package/dist/tools/openrouter.tools.d.ts +1 -1
  71. package/dist/tools/openrouter.tools.js +4 -4
  72. package/dist/tools/ordinals-marketplace.tools.d.ts +1 -1
  73. package/dist/tools/ordinals-marketplace.tools.js +10 -10
  74. package/dist/tools/ordinals-p2p.tools.d.ts +1 -1
  75. package/dist/tools/ordinals-p2p.tools.js +18 -18
  76. package/dist/tools/ordinals.tools.d.ts +1 -1
  77. package/dist/tools/ordinals.tools.js +8 -8
  78. package/dist/tools/pillar-direct.tools.d.ts +1 -1
  79. package/dist/tools/pillar-direct.tools.js +59 -38
  80. package/dist/tools/pillar.tools.d.ts +1 -1
  81. package/dist/tools/pillar.tools.js +28 -26
  82. package/dist/tools/profiles.d.ts +51 -0
  83. package/dist/tools/profiles.js +111 -0
  84. package/dist/tools/psbt.tools.d.ts +1 -1
  85. package/dist/tools/psbt.tools.js +8 -8
  86. package/dist/tools/query.tools.d.ts +1 -1
  87. package/dist/tools/query.tools.js +12 -12
  88. package/dist/tools/relay-diagnostic.tools.d.ts +1 -1
  89. package/dist/tools/relay-diagnostic.tools.js +3 -3
  90. package/dist/tools/reputation.tools.d.ts +1 -1
  91. package/dist/tools/reputation.tools.js +22 -22
  92. package/dist/tools/runes.tools.d.ts +1 -1
  93. package/dist/tools/runes.tools.js +18 -18
  94. package/dist/tools/sbtc.tools.d.ts +1 -1
  95. package/dist/tools/sbtc.tools.js +14 -33
  96. package/dist/tools/scaffold.tools.d.ts +1 -1
  97. package/dist/tools/scaffold.tools.js +4 -4
  98. package/dist/tools/settings.tools.d.ts +1 -1
  99. package/dist/tools/settings.tools.js +9 -9
  100. package/dist/tools/signing.tools.d.ts +1 -1
  101. package/dist/tools/signing.tools.js +20 -20
  102. package/dist/tools/skill-mappings.js +4 -0
  103. package/dist/tools/souldinals.tools.d.ts +1 -1
  104. package/dist/tools/souldinals.tools.js +10 -10
  105. package/dist/tools/stacking-lottery.tools.d.ts +1 -1
  106. package/dist/tools/stacking-lottery.tools.js +11 -11
  107. package/dist/tools/stacking.tools.d.ts +1 -1
  108. package/dist/tools/stacking.tools.js +358 -50
  109. package/dist/tools/stacks-market.tools.d.ts +1 -1
  110. package/dist/tools/stacks-market.tools.js +22 -22
  111. package/dist/tools/styx.tools.d.ts +1 -1
  112. package/dist/tools/styx.tools.js +11 -11
  113. package/dist/tools/taproot-multisig.tools.d.ts +1 -1
  114. package/dist/tools/taproot-multisig.tools.js +5 -5
  115. package/dist/tools/tenero.tools.d.ts +1 -1
  116. package/dist/tools/tenero.tools.js +22 -22
  117. package/dist/tools/tokens.tools.d.ts +1 -1
  118. package/dist/tools/tokens.tools.js +10 -10
  119. package/dist/tools/transfer.tools.d.ts +1 -1
  120. package/dist/tools/transfer.tools.js +4 -4
  121. package/dist/tools/wallet-management.tools.d.ts +1 -1
  122. package/dist/tools/wallet-management.tools.js +16 -16
  123. package/dist/tools/wallet.tools.d.ts +1 -1
  124. package/dist/tools/wallet.tools.js +2 -2
  125. package/dist/tools/yield-dashboard.tools.d.ts +1 -1
  126. package/dist/tools/yield-dashboard.tools.js +18 -27
  127. package/dist/tools/yield-hunter.tools.d.ts +1 -1
  128. package/dist/tools/yield-hunter.tools.js +6 -6
  129. package/dist/utils/bitcoin.d.ts +8 -0
  130. package/dist/utils/bitcoin.js +24 -0
  131. package/dist/utils/fee.js +1 -1
  132. package/package.json +8 -7
  133. package/skill/SKILL.md +1 -1
  134. package/skill/references/stacks-defi.md +1 -1
@@ -33,12 +33,12 @@ export function registerStyxTools(server) {
33
33
  server.registerTool("styx_pool_status", {
34
34
  description: "Get current Styx pool liquidity and status. " +
35
35
  "Shows realAvailable and estimatedAvailable BTC in the pool.",
36
- inputSchema: {
36
+ inputSchema: z.object({
37
37
  pool: z
38
38
  .string()
39
39
  .optional()
40
40
  .describe('Pool ID: "main" (300k sat max) or "aibtc" (1M sat max). Defaults to "main".'),
41
- },
41
+ }),
42
42
  }, async ({ pool = "main" }) => {
43
43
  try {
44
44
  const status = await styxSDK.getPoolStatus(pool);
@@ -62,7 +62,7 @@ export function registerStyxTools(server) {
62
62
  description: "List all available Styx pools with their configurations. " +
63
63
  "Pools: main (up to 300k sats, sbtc/usda/pepe), aibtc (up to 1M sats, sbtc/aibtc). " +
64
64
  "Minimum deposit: 10,000 sats for both pools.",
65
- inputSchema: {},
65
+ inputSchema: z.object({}),
66
66
  }, async () => {
67
67
  try {
68
68
  const pools = await styxSDK.getAvailablePools();
@@ -77,7 +77,7 @@ export function registerStyxTools(server) {
77
77
  // ---------------------------------------------------------------------------
78
78
  server.registerTool("styx_fees", {
79
79
  description: "Get current Bitcoin network fee estimates (sat/vB) from Styx: low, medium, high.",
80
- inputSchema: {},
80
+ inputSchema: z.object({}),
81
81
  }, async () => {
82
82
  try {
83
83
  const fees = await styxSDK.getFeeEstimates();
@@ -92,7 +92,7 @@ export function registerStyxTools(server) {
92
92
  // ---------------------------------------------------------------------------
93
93
  server.registerTool("styx_price", {
94
94
  description: "Get current BTC price in USD from Styx.",
95
- inputSchema: {},
95
+ inputSchema: z.object({}),
96
96
  }, async () => {
97
97
  try {
98
98
  const price = await styxSDK.getBTCPrice();
@@ -112,7 +112,7 @@ export function registerStyxTools(server) {
112
112
  "Requires an unlocked wallet with sufficient BTC balance. " +
113
113
  "On mainnet, ordinal UTXOs are automatically filtered out to protect inscriptions. " +
114
114
  "Minimum deposit: 10,000 sats. Pool limits: main=300k sats, aibtc=1M sats.",
115
- inputSchema: {
115
+ inputSchema: z.object({
116
116
  amount: z
117
117
  .coerce
118
118
  .number()
@@ -136,7 +136,7 @@ export function registerStyxTools(server) {
136
136
  .enum(["low", "medium", "high"])
137
137
  .optional()
138
138
  .describe('Fee priority: "low", "medium", or "high". Defaults to "medium".'),
139
- },
139
+ }),
140
140
  }, async ({ amount, stxReceiver, btcSender, pool = "main", fee = "medium" }) => {
141
141
  let depositId;
142
142
  let broadcastTxid;
@@ -313,10 +313,10 @@ export function registerStyxTools(server) {
313
313
  // ---------------------------------------------------------------------------
314
314
  server.registerTool("styx_status", {
315
315
  description: "Check the status of a Styx BTC→sBTC deposit by deposit ID or Bitcoin transaction ID.",
316
- inputSchema: {
316
+ inputSchema: z.object({
317
317
  id: z.string().optional().describe("Styx deposit ID"),
318
318
  txid: z.string().optional().describe("Bitcoin transaction ID"),
319
- },
319
+ }),
320
320
  }, async ({ id, txid }) => {
321
321
  try {
322
322
  if (!id && !txid) {
@@ -356,12 +356,12 @@ export function registerStyxTools(server) {
356
356
  server.registerTool("styx_history", {
357
357
  description: "Get BTC→sBTC deposit history for a Stacks address via Styx. " +
358
358
  "Uses the active wallet's Stacks address if no address is provided.",
359
- inputSchema: {
359
+ inputSchema: z.object({
360
360
  address: z
361
361
  .string()
362
362
  .optional()
363
363
  .describe("Stacks address to query. Uses active wallet if omitted."),
364
- },
364
+ }),
365
365
  }, async ({ address }) => {
366
366
  try {
367
367
  let resolvedAddress = address;
@@ -12,6 +12,6 @@
12
12
  * - taproot_multisig_guide: Return a step-by-step guide for M-of-N Taproot multisig
13
13
  * coordination using OP_CHECKSIGADD (BIP-341/342). Read-only.
14
14
  */
15
- import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
15
+ import { McpServer } from "@modelcontextprotocol/server";
16
16
  export declare function registerTaprootMultisigTools(server: McpServer): void;
17
17
  //# sourceMappingURL=taproot-multisig.tools.d.ts.map
@@ -25,7 +25,7 @@ export function registerTaprootMultisigTools(server) {
25
25
  "BIP-86 derivation path m/86'/0'/0'/0/0. " +
26
26
  "Share this pubkey with co-signers to construct a Taproot multisig script tree. " +
27
27
  "Requires the wallet to be unlocked (use wallet_unlock first).",
28
- inputSchema: {},
28
+ inputSchema: z.object({}),
29
29
  }, async () => {
30
30
  try {
31
31
  const walletManager = getWalletManager();
@@ -56,7 +56,7 @@ export function registerTaprootMultisigTools(server) {
56
56
  description: "Verify a Schnorr co-signature against a BIP-341 sighash. " +
57
57
  "Use this to confirm that a co-signer's signature is valid before combining and broadcasting. " +
58
58
  "Read-only — no wallet unlock required.",
59
- inputSchema: {
59
+ inputSchema: z.object({
60
60
  sighash: z
61
61
  .string()
62
62
  .length(64)
@@ -74,7 +74,7 @@ export function registerTaprootMultisigTools(server) {
74
74
  .regex(/^[0-9a-fA-F]+$/, "must be valid hex")
75
75
  .describe("Signer's x-only public key as 32-byte hex string (64 hex chars). " +
76
76
  "Obtain via taproot_get_pubkey from each co-signer."),
77
- },
77
+ }),
78
78
  }, async ({ sighash, signature, pubkey }) => {
79
79
  try {
80
80
  const sighashBytes = Buffer.from(sighash, "hex");
@@ -110,7 +110,7 @@ export function registerTaprootMultisigTools(server) {
110
110
  server.registerTool("taproot_multisig_guide", {
111
111
  description: "Return a step-by-step guide for M-of-N Taproot multisig coordination between agents " +
112
112
  "using OP_CHECKSIGADD (BIP-341/342). Read-only — no wallet needed.",
113
- inputSchema: {
113
+ inputSchema: z.object({
114
114
  m: z
115
115
  .number()
116
116
  .int()
@@ -127,7 +127,7 @@ export function registerTaprootMultisigTools(server) {
127
127
  .optional()
128
128
  .default(3)
129
129
  .describe("Total number of co-signers (default: 3)."),
130
- },
130
+ }),
131
131
  }, async ({ m, n }) => {
132
132
  if (m > n) {
133
133
  return createErrorResponse(new Error(`Invalid parameters: m (${m}) cannot exceed n (${n}).`));
@@ -17,6 +17,6 @@
17
17
  * - tenero_holder_stats — Token holder distribution and concentration stats
18
18
  * - tenero_search — Search tokens, pools, and wallets by name or address
19
19
  */
20
- import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
20
+ import { McpServer } from "@modelcontextprotocol/server";
21
21
  export declare function registerTeneroTools(server: McpServer): void;
22
22
  //# sourceMappingURL=tenero.tools.d.ts.map
@@ -25,7 +25,7 @@ export function registerTeneroTools(server) {
25
25
  server.registerTool("tenero_token_info", {
26
26
  description: "Get token details including metadata, current price, market cap, and 24h volume. " +
27
27
  "Powered by the Tenero API (api.tenero.io). No authentication required.",
28
- inputSchema: {
28
+ inputSchema: z.object({
29
29
  contractId: z
30
30
  .string()
31
31
  .describe("Token contract address in format PRINCIPAL.contract-name " +
@@ -35,7 +35,7 @@ export function registerTeneroTools(server) {
35
35
  .optional()
36
36
  .default("stacks")
37
37
  .describe("Chain to query: stacks, spark, or sportsfun (default: stacks)"),
38
- },
38
+ }),
39
39
  }, async ({ contractId, chain }) => {
40
40
  try {
41
41
  const data = await getTokenInfo(contractId, chain);
@@ -50,7 +50,7 @@ export function registerTeneroTools(server) {
50
50
  description: "Get token market summary including price history, 24h volume, and pool liquidity. " +
51
51
  "Returns weighted price across all pools trading this token. " +
52
52
  "Powered by the Tenero API (api.tenero.io). No authentication required.",
53
- inputSchema: {
53
+ inputSchema: z.object({
54
54
  contractId: z
55
55
  .string()
56
56
  .describe("Token contract address in format PRINCIPAL.contract-name " +
@@ -60,7 +60,7 @@ export function registerTeneroTools(server) {
60
60
  .optional()
61
61
  .default("stacks")
62
62
  .describe("Chain to query: stacks, spark, or sportsfun (default: stacks)"),
63
- },
63
+ }),
64
64
  }, async ({ contractId, chain }) => {
65
65
  try {
66
66
  const data = await getMarketSummary(contractId, chain);
@@ -76,13 +76,13 @@ export function registerTeneroTools(server) {
76
76
  "buy/sell netflow, unique traders, and active pools. " +
77
77
  "Returns a time series of daily stats for recent periods. " +
78
78
  "Powered by the Tenero API (api.tenero.io). No authentication required.",
79
- inputSchema: {
79
+ inputSchema: z.object({
80
80
  chain: z
81
81
  .string()
82
82
  .optional()
83
83
  .default("stacks")
84
84
  .describe("Chain to query: stacks, spark, or sportsfun (default: stacks)"),
85
- },
85
+ }),
86
86
  }, async ({ chain }) => {
87
87
  try {
88
88
  const data = await getMarketStats(chain);
@@ -97,7 +97,7 @@ export function registerTeneroTools(server) {
97
97
  description: "List top gaining tokens by 24h price change percentage on the Stacks ecosystem. " +
98
98
  "Useful for spotting momentum and trending assets. " +
99
99
  "Powered by the Tenero API (api.tenero.io). No authentication required.",
100
- inputSchema: {
100
+ inputSchema: z.object({
101
101
  limit: z
102
102
  .number()
103
103
  .int()
@@ -111,7 +111,7 @@ export function registerTeneroTools(server) {
111
111
  .optional()
112
112
  .default("stacks")
113
113
  .describe("Chain to query: stacks, spark, or sportsfun (default: stacks)"),
114
- },
114
+ }),
115
115
  }, async ({ limit, chain }) => {
116
116
  try {
117
117
  const data = await getTopGainers(limit, chain);
@@ -126,7 +126,7 @@ export function registerTeneroTools(server) {
126
126
  description: "List top losing tokens by 24h price change percentage on the Stacks ecosystem. " +
127
127
  "Useful for identifying underperforming assets or potential reversal candidates. " +
128
128
  "Powered by the Tenero API (api.tenero.io). No authentication required.",
129
- inputSchema: {
129
+ inputSchema: z.object({
130
130
  limit: z
131
131
  .number()
132
132
  .int()
@@ -140,7 +140,7 @@ export function registerTeneroTools(server) {
140
140
  .optional()
141
141
  .default("stacks")
142
142
  .describe("Chain to query: stacks, spark, or sportsfun (default: stacks)"),
143
- },
143
+ }),
144
144
  }, async ({ limit, chain }) => {
145
145
  try {
146
146
  const data = await getTopLosers(limit, chain);
@@ -155,7 +155,7 @@ export function registerTeneroTools(server) {
155
155
  description: "List trending DEX liquidity pools by volume over the last hour. " +
156
156
  "Includes pool platform, token pair, volume, and liquidity details. " +
157
157
  "Powered by the Tenero API (api.tenero.io). No authentication required.",
158
- inputSchema: {
158
+ inputSchema: z.object({
159
159
  limit: z
160
160
  .number()
161
161
  .int()
@@ -169,7 +169,7 @@ export function registerTeneroTools(server) {
169
169
  .optional()
170
170
  .default("stacks")
171
171
  .describe("Chain to query: stacks, spark, or sportsfun (default: stacks)"),
172
- },
172
+ }),
173
173
  }, async ({ limit, chain }) => {
174
174
  try {
175
175
  const data = await getTrendingPools(limit, chain);
@@ -184,7 +184,7 @@ export function registerTeneroTools(server) {
184
184
  description: "Get trade history for a Stacks wallet address. " +
185
185
  "Returns recent buy/sell events with token, pool, and USD value details. " +
186
186
  "Powered by the Tenero API (api.tenero.io). No authentication required.",
187
- inputSchema: {
187
+ inputSchema: z.object({
188
188
  address: z
189
189
  .string()
190
190
  .describe("Stacks wallet address (SP... or SM...)"),
@@ -201,7 +201,7 @@ export function registerTeneroTools(server) {
201
201
  .optional()
202
202
  .default("stacks")
203
203
  .describe("Chain to query: stacks, spark, or sportsfun (default: stacks)"),
204
- },
204
+ }),
205
205
  }, async ({ address, limit, chain }) => {
206
206
  try {
207
207
  const data = await getWalletTrades(address, limit, chain);
@@ -216,7 +216,7 @@ export function registerTeneroTools(server) {
216
216
  description: "Get token holdings with current USD value for a Stacks wallet address. " +
217
217
  "Shows portfolio composition including token balances and estimated values. " +
218
218
  "Powered by the Tenero API (api.tenero.io). No authentication required.",
219
- inputSchema: {
219
+ inputSchema: z.object({
220
220
  address: z
221
221
  .string()
222
222
  .describe("Stacks wallet address (SP... or SM...)"),
@@ -225,7 +225,7 @@ export function registerTeneroTools(server) {
225
225
  .optional()
226
226
  .default("stacks")
227
227
  .describe("Chain to query: stacks, spark, or sportsfun (default: stacks)"),
228
- },
228
+ }),
229
229
  }, async ({ address, chain }) => {
230
230
  try {
231
231
  const data = await getWalletHoldings(address, chain);
@@ -240,7 +240,7 @@ export function registerTeneroTools(server) {
240
240
  description: "Get recent large/whale trades above threshold value on the Stacks ecosystem. " +
241
241
  "Useful for tracking smart money and large market movements. " +
242
242
  "Powered by the Tenero API (api.tenero.io). No authentication required.",
243
- inputSchema: {
243
+ inputSchema: z.object({
244
244
  limit: z
245
245
  .number()
246
246
  .int()
@@ -254,7 +254,7 @@ export function registerTeneroTools(server) {
254
254
  .optional()
255
255
  .default("stacks")
256
256
  .describe("Chain to query: stacks, spark, or sportsfun (default: stacks)"),
257
- },
257
+ }),
258
258
  }, async ({ limit, chain }) => {
259
259
  try {
260
260
  const data = await getWhaleTrades(limit, chain);
@@ -269,7 +269,7 @@ export function registerTeneroTools(server) {
269
269
  description: "Get token holder distribution and concentration statistics. " +
270
270
  "Shows total holders, top holder percentages, and Gini coefficient. " +
271
271
  "Powered by the Tenero API (api.tenero.io). No authentication required.",
272
- inputSchema: {
272
+ inputSchema: z.object({
273
273
  contractId: z
274
274
  .string()
275
275
  .describe("Token contract address in format PRINCIPAL.contract-name " +
@@ -279,7 +279,7 @@ export function registerTeneroTools(server) {
279
279
  .optional()
280
280
  .default("stacks")
281
281
  .describe("Chain to query: stacks, spark, or sportsfun (default: stacks)"),
282
- },
282
+ }),
283
283
  }, async ({ contractId, chain }) => {
284
284
  try {
285
285
  const data = await getHolderStats(contractId, chain);
@@ -294,7 +294,7 @@ export function registerTeneroTools(server) {
294
294
  description: "Search tokens, pools, and wallets by name, symbol, or contract address. " +
295
295
  "Returns matching tokens with metadata and pricing information. " +
296
296
  "Powered by the Tenero API (api.tenero.io). No authentication required.",
297
- inputSchema: {
297
+ inputSchema: z.object({
298
298
  query: z
299
299
  .string()
300
300
  .min(1)
@@ -304,7 +304,7 @@ export function registerTeneroTools(server) {
304
304
  .optional()
305
305
  .default("stacks")
306
306
  .describe("Chain to query: stacks, spark, or sportsfun (default: stacks)"),
307
- },
307
+ }),
308
308
  }, async ({ query, chain }) => {
309
309
  try {
310
310
  const data = await searchTokens(query, chain);
@@ -1,3 +1,3 @@
1
- import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
1
+ import { McpServer } from "@modelcontextprotocol/server";
2
2
  export declare function registerTokenTools(server: McpServer): void;
3
3
  //# sourceMappingURL=tokens.tools.d.ts.map
@@ -10,13 +10,13 @@ export function registerTokenTools(server) {
10
10
 
11
11
  Supports well-known tokens by symbol: sBTC, USDCx, ALEX, DIKO
12
12
  Or use the full contract ID: address.contract-name`,
13
- inputSchema: {
13
+ inputSchema: z.object({
14
14
  token: z.string().describe("Token symbol (e.g., 'USDCx', 'sBTC') or contract ID"),
15
15
  address: z
16
16
  .string()
17
17
  .optional()
18
18
  .describe("Wallet address to check. Uses configured wallet if not provided."),
19
- },
19
+ }),
20
20
  }, async ({ token, address }) => {
21
21
  try {
22
22
  const tokensService = getTokensService(NETWORK);
@@ -47,7 +47,7 @@ Or use the full contract ID: address.contract-name`,
47
47
 
48
48
  Supports well-known tokens by symbol: sBTC, USDCx, ALEX, DIKO
49
49
  Or use the full contract ID.`,
50
- inputSchema: {
50
+ inputSchema: z.object({
51
51
  token: z.string().describe("Token symbol (e.g., 'USDCx') or contract ID"),
52
52
  recipient: z.string().describe("The recipient's Stacks address"),
53
53
  amount: z.string().describe("Amount in smallest unit (depends on token decimals)"),
@@ -56,7 +56,7 @@ Or use the full contract ID.`,
56
56
  .string()
57
57
  .optional()
58
58
  .describe("Optional fee: 'low' | 'medium' | 'high' preset or micro-STX amount. If omitted, auto-estimated."),
59
- },
59
+ }),
60
60
  }, async ({ token, recipient, amount, memo, fee }) => {
61
61
  try {
62
62
  const tokensService = getTokensService(NETWORK);
@@ -82,9 +82,9 @@ Or use the full contract ID.`,
82
82
  // Get token info
83
83
  server.registerTool("get_token_info", {
84
84
  description: "Get metadata for a SIP-010 token (name, symbol, decimals, supply).",
85
- inputSchema: {
85
+ inputSchema: z.object({
86
86
  token: z.string().describe("Token symbol or contract ID"),
87
- },
87
+ }),
88
88
  }, async ({ token }) => {
89
89
  try {
90
90
  const tokensService = getTokensService(NETWORK);
@@ -107,12 +107,12 @@ Or use the full contract ID.`,
107
107
  // List user tokens
108
108
  server.registerTool("list_user_tokens", {
109
109
  description: "List all fungible tokens owned by an address.",
110
- inputSchema: {
110
+ inputSchema: z.object({
111
111
  address: z
112
112
  .string()
113
113
  .optional()
114
114
  .describe("Wallet address to check. Uses configured wallet if not provided."),
115
- },
115
+ }),
116
116
  }, async ({ address }) => {
117
117
  try {
118
118
  const tokensService = getTokensService(NETWORK);
@@ -135,11 +135,11 @@ Or use the full contract ID.`,
135
135
  // Get token holders
136
136
  server.registerTool("get_token_holders", {
137
137
  description: "Get the top holders of a SIP-010 token.",
138
- inputSchema: {
138
+ inputSchema: z.object({
139
139
  token: z.string().describe("Token symbol or contract ID"),
140
140
  limit: z.number().optional().default(20).describe("Maximum number of holders to return"),
141
141
  offset: z.number().optional().default(0).describe("Offset for pagination"),
142
- },
142
+ }),
143
143
  }, async ({ token, limit, offset }) => {
144
144
  try {
145
145
  const tokensService = getTokensService(NETWORK);
@@ -1,3 +1,3 @@
1
- import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
1
+ import { McpServer } from "@modelcontextprotocol/server";
2
2
  export declare function registerTransferTools(server: McpServer): void;
3
3
  //# sourceMappingURL=transfer.tools.d.ts.map
@@ -12,7 +12,7 @@ export function registerTransferTools(server) {
12
12
 
13
13
  Example: To send 2 STX, use amount "2000000" (micro-STX).
14
14
  1 STX = 1,000,000 micro-STX`,
15
- inputSchema: {
15
+ inputSchema: z.object({
16
16
  recipient: z.string().describe("The recipient's Stacks address (starts with SP or ST)"),
17
17
  amount: z
18
18
  .string()
@@ -23,7 +23,7 @@ Example: To send 2 STX, use amount "2000000" (micro-STX).
23
23
  .optional()
24
24
  .describe("Optional fee: 'low' | 'medium' | 'high' preset or micro-STX amount. Clamped to 3,000 uSTX max for STX transfers. If omitted, medium-priority fee is auto-resolved. Ignored when sponsored=true."),
25
25
  sponsored: sponsoredSchema,
26
- },
26
+ }),
27
27
  }, async ({ recipient, amount, memo, fee, sponsored }) => {
28
28
  try {
29
29
  const account = await getAccount();
@@ -57,9 +57,9 @@ Example: To send 2 STX, use amount "2000000" (micro-STX).
57
57
  // Broadcast pre-signed transaction
58
58
  server.registerTool("broadcast_transaction", {
59
59
  description: "Broadcast a pre-signed Stacks transaction to the network.",
60
- inputSchema: {
60
+ inputSchema: z.object({
61
61
  signedTx: z.string().describe("The signed transaction as a hex string"),
62
- },
62
+ }),
63
63
  }, async ({ signedTx }) => {
64
64
  try {
65
65
  const result = await broadcastSignedTransaction(signedTx, NETWORK);
@@ -1,4 +1,4 @@
1
- import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
1
+ import { McpServer } from "@modelcontextprotocol/server";
2
2
  /**
3
3
  * Register wallet management tools
4
4
  */
@@ -55,7 +55,7 @@ export function registerWalletManagementTools(server) {
55
55
  description: `Create a new wallet for the agent with a generated BIP39 24-word mnemonic.
56
56
  The wallet is encrypted locally and stored in ~/.aibtc/.
57
57
  IMPORTANT: Save the mnemonic securely - it will only be shown once!`,
58
- inputSchema: {
58
+ inputSchema: z.object({
59
59
  name: z.string().describe("Name for the wallet (e.g., 'main', 'trading')"),
60
60
  password: z
61
61
  .string()
@@ -65,7 +65,7 @@ IMPORTANT: Save the mnemonic securely - it will only be shown once!`,
65
65
  .enum(["mainnet", "testnet"])
66
66
  .optional()
67
67
  .describe("Network for the wallet (default: current network)"),
68
- },
68
+ }),
69
69
  }, async ({ name, password, network }) => {
70
70
  try {
71
71
  const walletManager = getWalletManager();
@@ -103,7 +103,7 @@ IMPORTANT: Save the mnemonic securely - it will only be shown once!`,
103
103
  server.registerTool("wallet_import", {
104
104
  description: `Import an existing wallet for the agent using a BIP39 mnemonic phrase.
105
105
  The wallet is encrypted locally and stored in ~/.aibtc/.`,
106
- inputSchema: {
106
+ inputSchema: z.object({
107
107
  name: z.string().describe("Name for the wallet"),
108
108
  mnemonic: z.string().describe("24-word BIP39 mnemonic phrase - WARNING: sensitive value"),
109
109
  password: z
@@ -114,7 +114,7 @@ The wallet is encrypted locally and stored in ~/.aibtc/.`,
114
114
  .enum(["mainnet", "testnet"])
115
115
  .optional()
116
116
  .describe("Network for the wallet (default: current network)"),
117
- },
117
+ }),
118
118
  }, async ({ name, mnemonic, password, network }) => {
119
119
  try {
120
120
  const walletManager = getWalletManager();
@@ -147,13 +147,13 @@ The wallet is encrypted locally and stored in ~/.aibtc/.`,
147
147
  server.registerTool("wallet_unlock", {
148
148
  description: `Unlock the agent's wallet to enable transactions.
149
149
  If no wallet ID is provided, unlocks the active wallet.`,
150
- inputSchema: {
150
+ inputSchema: z.object({
151
151
  walletId: z
152
152
  .string()
153
153
  .optional()
154
154
  .describe("Wallet ID to unlock (uses active wallet if not specified)"),
155
155
  password: z.string().describe("Wallet password - WARNING: sensitive value"),
156
- },
156
+ }),
157
157
  }, async ({ walletId, password }) => {
158
158
  try {
159
159
  const walletManager = getWalletManager();
@@ -251,9 +251,9 @@ If no wallet ID is provided, unlocks the active wallet.`,
251
251
  server.registerTool("wallet_switch", {
252
252
  description: `Switch to a different wallet.
253
253
  Note: The new wallet will need to be unlocked before use.`,
254
- inputSchema: {
254
+ inputSchema: z.object({
255
255
  walletId: z.string().describe("Wallet ID to switch to"),
256
- },
256
+ }),
257
257
  }, async ({ walletId }) => {
258
258
  try {
259
259
  const walletManager = getWalletManager();
@@ -280,13 +280,13 @@ Note: The new wallet will need to be unlocked before use.`,
280
280
  server.registerTool("wallet_delete", {
281
281
  description: `Permanently delete a wallet.
282
282
  WARNING: This cannot be undone! Make sure you have backed up your mnemonic.`,
283
- inputSchema: {
283
+ inputSchema: z.object({
284
284
  walletId: z.string().describe("Wallet ID to delete"),
285
285
  password: z.string().describe("Wallet password for confirmation - WARNING: sensitive value"),
286
286
  confirm: z
287
287
  .literal("DELETE")
288
288
  .describe("Type 'DELETE' to confirm deletion"),
289
- },
289
+ }),
290
290
  }, async ({ walletId, password, confirm }) => {
291
291
  try {
292
292
  if (confirm !== "DELETE") {
@@ -315,7 +315,7 @@ WARNING: This cannot be undone! Make sure you have backed up your mnemonic.`,
315
315
  server.registerTool("wallet_export", {
316
316
  description: `Export the mnemonic phrase for a wallet.
317
317
  WARNING: Only use this in a secure environment! Anyone with the mnemonic can access your funds.`,
318
- inputSchema: {
318
+ inputSchema: z.object({
319
319
  walletId: z
320
320
  .string()
321
321
  .optional()
@@ -324,7 +324,7 @@ WARNING: Only use this in a secure environment! Anyone with the mnemonic can acc
324
324
  confirm: z
325
325
  .literal("I_UNDERSTAND_THE_RISKS")
326
326
  .describe("Type 'I_UNDERSTAND_THE_RISKS' to confirm"),
327
- },
327
+ }),
328
328
  }, async ({ walletId, password, confirm }) => {
329
329
  try {
330
330
  if (confirm !== "I_UNDERSTAND_THE_RISKS") {
@@ -359,7 +359,7 @@ WARNING: Only use this in a secure environment! Anyone with the mnemonic can acc
359
359
  description: `Change the password for a wallet's encrypted keystore.
360
360
  Performs an atomic operation: backs up the keystore, re-encrypts with the new password, verifies the round-trip, then cleans up. If anything fails, the original keystore is restored.
361
361
  If the wallet is currently unlocked, it will be locked after rotation (requires re-unlock with new password).`,
362
- inputSchema: {
362
+ inputSchema: z.object({
363
363
  walletId: z
364
364
  .string()
365
365
  .optional()
@@ -369,7 +369,7 @@ If the wallet is currently unlocked, it will be locked after rotation (requires
369
369
  .string()
370
370
  .min(8)
371
371
  .describe("New password (minimum 8 characters) - WARNING: sensitive value"),
372
- },
372
+ }),
373
373
  }, async ({ walletId, oldPassword, newPassword }) => {
374
374
  try {
375
375
  const walletManager = getWalletManager();
@@ -398,12 +398,12 @@ If the wallet is currently unlocked, it will be locked after rotation (requires
398
398
  */
399
399
  server.registerTool("wallet_set_timeout", {
400
400
  description: "Set how long the agent's wallet stays unlocked before automatically locking. Set to 0 to disable auto-lock.",
401
- inputSchema: {
401
+ inputSchema: z.object({
402
402
  minutes: z
403
403
  .number()
404
404
  .min(0)
405
405
  .describe("Minutes until auto-lock (0 = never auto-lock)"),
406
- },
406
+ }),
407
407
  }, async ({ minutes }) => {
408
408
  try {
409
409
  const walletManager = getWalletManager();
@@ -1,3 +1,3 @@
1
- import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
1
+ import { McpServer } from "@modelcontextprotocol/server";
2
2
  export declare function registerWalletTools(server: McpServer): void;
3
3
  //# sourceMappingURL=wallet.tools.d.ts.map
@@ -90,12 +90,12 @@ export function registerWalletTools(server) {
90
90
  // Get STX balance
91
91
  server.registerTool("get_stx_balance", {
92
92
  description: "Get the STX balance for a wallet address.",
93
- inputSchema: {
93
+ inputSchema: z.object({
94
94
  address: z
95
95
  .string()
96
96
  .optional()
97
97
  .describe("Wallet address to check. Uses configured wallet if not provided."),
98
- },
98
+ }),
99
99
  }, async ({ address }) => {
100
100
  try {
101
101
  const walletAddress = address || (await getWalletAddress());
@@ -12,6 +12,6 @@
12
12
  *
13
13
  * Mirrors the yield-dashboard skill (aibtcdev/skills/yield-dashboard/).
14
14
  */
15
- import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
15
+ import { McpServer } from "@modelcontextprotocol/server";
16
16
  export declare function registerYieldDashboardTools(server: McpServer): void;
17
17
  //# sourceMappingURL=yield-dashboard.tools.d.ts.map