@aibtc/mcp-server 1.71.0 → 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 (122) hide show
  1. package/README.md +36 -3
  2. package/dist/bridge/index.js +2 -2
  3. package/dist/config/networks.js +4 -1
  4. package/dist/index.js +118 -42
  5. package/dist/tools/arxiv-research.tools.d.ts +1 -1
  6. package/dist/tools/arxiv-research.tools.js +6 -6
  7. package/dist/tools/at-stake-legion.tools.d.ts +1 -1
  8. package/dist/tools/at-stake-legion.tools.js +14 -14
  9. package/dist/tools/at-stake.tools.d.ts +1 -1
  10. package/dist/tools/at-stake.tools.js +17 -17
  11. package/dist/tools/bitcoin.tools.d.ts +1 -1
  12. package/dist/tools/bitcoin.tools.js +12 -12
  13. package/dist/tools/bitflow.tools.d.ts +1 -1
  14. package/dist/tools/bitflow.tools.js +21 -21
  15. package/dist/tools/bns.tools.d.ts +1 -1
  16. package/dist/tools/bns.tools.js +18 -18
  17. package/dist/tools/bounty-hint.d.ts +1 -1
  18. package/dist/tools/bounty-scanner.tools.d.ts +1 -1
  19. package/dist/tools/bounty-scanner.tools.js +20 -20
  20. package/dist/tools/child-inscription.tools.d.ts +1 -1
  21. package/dist/tools/child-inscription.tools.js +6 -6
  22. package/dist/tools/competition.tools.d.ts +1 -1
  23. package/dist/tools/competition.tools.js +4 -4
  24. package/dist/tools/contract.tools.d.ts +1 -1
  25. package/dist/tools/contract.tools.js +8 -8
  26. package/dist/tools/credentials.tools.d.ts +1 -1
  27. package/dist/tools/credentials.tools.js +8 -8
  28. package/dist/tools/defi.tools.d.ts +1 -1
  29. package/dist/tools/defi.tools.js +21 -21
  30. package/dist/tools/dual-stacking.tools.d.ts +1 -1
  31. package/dist/tools/dual-stacking.tools.js +7 -7
  32. package/dist/tools/earning.tools.d.ts +1 -1
  33. package/dist/tools/earning.tools.js +2 -2
  34. package/dist/tools/endpoint.tools.d.ts +1 -1
  35. package/dist/tools/endpoint.tools.js +14 -13
  36. package/dist/tools/identity.tools.d.ts +1 -1
  37. package/dist/tools/identity.tools.js +19 -19
  38. package/dist/tools/inbox-x402.tools.d.ts +1 -1
  39. package/dist/tools/inbox-x402.tools.js +2 -2
  40. package/dist/tools/inbox.tools.d.ts +1 -1
  41. package/dist/tools/inbox.tools.js +2 -2
  42. package/dist/tools/index.d.ts +6 -3
  43. package/dist/tools/index.js +69 -58
  44. package/dist/tools/inference-marketplace.tools.d.ts +1 -1
  45. package/dist/tools/inference-marketplace.tools.js +10 -10
  46. package/dist/tools/jingswap.tools.d.ts +1 -1
  47. package/dist/tools/jingswap.tools.js +30 -30
  48. package/dist/tools/legion.tools.d.ts +1 -1
  49. package/dist/tools/legion.tools.js +20 -20
  50. package/dist/tools/lightning.tools.d.ts +1 -1
  51. package/dist/tools/lightning.tools.js +14 -14
  52. package/dist/tools/mempool.tools.d.ts +1 -1
  53. package/dist/tools/mempool.tools.js +5 -5
  54. package/dist/tools/news.tools.d.ts +1 -1
  55. package/dist/tools/news.tools.js +2 -1
  56. package/dist/tools/nft.tools.d.ts +1 -1
  57. package/dist/tools/nft.tools.js +12 -12
  58. package/dist/tools/nonce.tools.d.ts +1 -1
  59. package/dist/tools/nonce.tools.js +8 -8
  60. package/dist/tools/nostr.tools.d.ts +1 -1
  61. package/dist/tools/nostr.tools.js +12 -12
  62. package/dist/tools/openrouter.tools.d.ts +1 -1
  63. package/dist/tools/openrouter.tools.js +4 -4
  64. package/dist/tools/ordinals-marketplace.tools.d.ts +1 -1
  65. package/dist/tools/ordinals-marketplace.tools.js +10 -10
  66. package/dist/tools/ordinals-p2p.tools.d.ts +1 -1
  67. package/dist/tools/ordinals-p2p.tools.js +18 -18
  68. package/dist/tools/ordinals.tools.d.ts +1 -1
  69. package/dist/tools/ordinals.tools.js +8 -8
  70. package/dist/tools/pillar-direct.tools.d.ts +1 -1
  71. package/dist/tools/pillar-direct.tools.js +36 -36
  72. package/dist/tools/pillar.tools.d.ts +1 -1
  73. package/dist/tools/pillar.tools.js +28 -26
  74. package/dist/tools/profiles.d.ts +51 -0
  75. package/dist/tools/profiles.js +111 -0
  76. package/dist/tools/psbt.tools.d.ts +1 -1
  77. package/dist/tools/psbt.tools.js +8 -8
  78. package/dist/tools/query.tools.d.ts +1 -1
  79. package/dist/tools/query.tools.js +12 -12
  80. package/dist/tools/relay-diagnostic.tools.d.ts +1 -1
  81. package/dist/tools/relay-diagnostic.tools.js +3 -3
  82. package/dist/tools/reputation.tools.d.ts +1 -1
  83. package/dist/tools/reputation.tools.js +22 -22
  84. package/dist/tools/runes.tools.d.ts +1 -1
  85. package/dist/tools/runes.tools.js +18 -18
  86. package/dist/tools/sbtc.tools.d.ts +1 -1
  87. package/dist/tools/sbtc.tools.js +12 -12
  88. package/dist/tools/scaffold.tools.d.ts +1 -1
  89. package/dist/tools/scaffold.tools.js +4 -4
  90. package/dist/tools/settings.tools.d.ts +1 -1
  91. package/dist/tools/settings.tools.js +9 -9
  92. package/dist/tools/signing.tools.d.ts +1 -1
  93. package/dist/tools/signing.tools.js +20 -20
  94. package/dist/tools/souldinals.tools.d.ts +1 -1
  95. package/dist/tools/souldinals.tools.js +10 -10
  96. package/dist/tools/stacking-lottery.tools.d.ts +1 -1
  97. package/dist/tools/stacking-lottery.tools.js +11 -11
  98. package/dist/tools/stacking.tools.d.ts +1 -1
  99. package/dist/tools/stacking.tools.js +13 -13
  100. package/dist/tools/stacks-market.tools.d.ts +1 -1
  101. package/dist/tools/stacks-market.tools.js +22 -22
  102. package/dist/tools/styx.tools.d.ts +1 -1
  103. package/dist/tools/styx.tools.js +11 -11
  104. package/dist/tools/taproot-multisig.tools.d.ts +1 -1
  105. package/dist/tools/taproot-multisig.tools.js +5 -5
  106. package/dist/tools/tenero.tools.d.ts +1 -1
  107. package/dist/tools/tenero.tools.js +22 -22
  108. package/dist/tools/tokens.tools.d.ts +1 -1
  109. package/dist/tools/tokens.tools.js +10 -10
  110. package/dist/tools/transfer.tools.d.ts +1 -1
  111. package/dist/tools/transfer.tools.js +4 -4
  112. package/dist/tools/wallet-management.tools.d.ts +1 -1
  113. package/dist/tools/wallet-management.tools.js +16 -16
  114. package/dist/tools/wallet.tools.d.ts +1 -1
  115. package/dist/tools/wallet.tools.js +2 -2
  116. package/dist/tools/yield-dashboard.tools.d.ts +1 -1
  117. package/dist/tools/yield-dashboard.tools.js +5 -5
  118. package/dist/tools/yield-hunter.tools.d.ts +1 -1
  119. package/dist/tools/yield-hunter.tools.js +6 -6
  120. package/dist/utils/fee.js +1 -1
  121. package/package.json +4 -3
  122. package/skill/SKILL.md +1 -1
@@ -56,7 +56,7 @@ export function registerAtStakeTools(server) {
56
56
  "no admin key and no oracle: it settles YES only on a Bitcoin SPV proof, and NO " +
57
57
  "by anyone calling resolve-idle after the close height.\n\n" +
58
58
  "Read-only, no wallet needed.",
59
- inputSchema: {},
59
+ inputSchema: z.object({}),
60
60
  }, async () => {
61
61
  try {
62
62
  const [market, burnHeight] = await Promise.all([
@@ -108,12 +108,12 @@ export function registerAtStakeTools(server) {
108
108
  "position is the DIFFERENCE between the two.\n\n" +
109
109
  "Read-only. Defaults to the unlocked wallet, which requires one; pass an address " +
110
110
  "to read anyone without unlocking.",
111
- inputSchema: {
111
+ inputSchema: z.object({
112
112
  address: z
113
113
  .string()
114
114
  .optional()
115
115
  .describe("Stacks address to read. Defaults to the unlocked wallet."),
116
- },
116
+ }),
117
117
  }, async ({ address }) => {
118
118
  try {
119
119
  const who = address ?? (await getAtStakeAccount()).address;
@@ -168,7 +168,7 @@ export function registerAtStakeTools(server) {
168
168
  "arguing either side in a legion should be reading these on Bitcoin directly " +
169
169
  "rather than taking the market's word for the balances.\n\n" +
170
170
  "Read-only, no wallet needed.",
171
- inputSchema: {},
171
+ inputSchema: z.object({}),
172
172
  }, async () => {
173
173
  try {
174
174
  const [addresses, scripts, indices] = await Promise.all([
@@ -210,14 +210,14 @@ export function registerAtStakeTools(server) {
210
210
  "Reversible before the market resolves: atstake_merge_complete_set hands any " +
211
211
  "matched pair back for its sat. Spends real sBTC and meters against the " +
212
212
  "wallet's sats rail. Requires an unlocked wallet.",
213
- inputSchema: {
213
+ inputSchema: z.object({
214
214
  sats: z
215
215
  .number()
216
216
  .int()
217
217
  .positive()
218
218
  .describe("sBTC sats to escrow. Mints this many shares of EACH side. The legion " +
219
219
  "minimum is 1,000."),
220
- },
220
+ }),
221
221
  }, async ({ sats }) => {
222
222
  try {
223
223
  const account = await getAtStakeAccount();
@@ -279,13 +279,13 @@ export function registerAtStakeTools(server) {
279
279
  "position, never the directional part.\n\n" +
280
280
  "Only works while the market is open — after resolve, use atstake_redeem. " +
281
281
  "Requires an unlocked wallet.",
282
- inputSchema: {
282
+ inputSchema: z.object({
283
283
  sats: z
284
284
  .number()
285
285
  .int()
286
286
  .positive()
287
287
  .describe("Matched pairs to merge back into sBTC."),
288
- },
288
+ }),
289
289
  }, async ({ sats }) => {
290
290
  try {
291
291
  const account = await getAtStakeAccount();
@@ -347,7 +347,7 @@ export function registerAtStakeTools(server) {
347
347
  "comes back in full via atstake_cancel_bid if it never fills.\n\n" +
348
348
  "One resting bid per side at a time. Spends real sBTC and meters against the " +
349
349
  "wallet's sats rail. Requires an unlocked wallet.",
350
- inputSchema: {
350
+ inputSchema: z.object({
351
351
  side: SIDE_ARG,
352
352
  amount: z
353
353
  .number()
@@ -360,7 +360,7 @@ export function registerAtStakeTools(server) {
360
360
  .positive()
361
361
  .describe("sBTC escrowed for the whole bid. Must be less than `amount` — the implied " +
362
362
  "price per share is total_sats/amount."),
363
- },
363
+ }),
364
364
  }, async ({ side, amount, total_sats }) => {
365
365
  try {
366
366
  const chosen = resolveSide(side);
@@ -424,13 +424,13 @@ export function registerAtStakeTools(server) {
424
424
  description: "Read a resting bid: shares wanted, sBTC escrowed, and the price that implies.\n\n" +
425
425
  "Read-only. Defaults to the unlocked wallet, which requires one; pass an address " +
426
426
  "to read anyone without unlocking.",
427
- inputSchema: {
427
+ inputSchema: z.object({
428
428
  side: SIDE_ARG,
429
429
  address: z
430
430
  .string()
431
431
  .optional()
432
432
  .describe("Bidder to read. Defaults to the unlocked wallet."),
433
- },
433
+ }),
434
434
  }, async ({ side, address }) => {
435
435
  try {
436
436
  const chosen = resolveSide(side);
@@ -465,7 +465,7 @@ export function registerAtStakeTools(server) {
465
465
  server.registerTool("atstake_cancel_bid", {
466
466
  description: "Withdraw a resting bid and get the unfilled escrow back.\n\n" +
467
467
  "Requires an unlocked wallet.",
468
- inputSchema: { side: SIDE_ARG },
468
+ inputSchema: z.object({ side: SIDE_ARG }),
469
469
  }, async ({ side }) => {
470
470
  try {
471
471
  const chosen = resolveSide(side);
@@ -516,11 +516,11 @@ export function registerAtStakeTools(server) {
516
516
  "Shares are map entries, not a SIP-010 token, so no fungible-token " +
517
517
  "post-condition can guard this and none is signed. Only works while the market " +
518
518
  "trades. Requires an unlocked wallet.",
519
- inputSchema: {
519
+ inputSchema: z.object({
520
520
  side: SIDE_ARG,
521
521
  amount: z.number().int().positive().describe("Shares to send."),
522
522
  to: z.string().describe("Recipient Stacks principal."),
523
- },
523
+ }),
524
524
  }, async ({ side, amount, to }) => {
525
525
  try {
526
526
  const chosen = resolveSide(side);
@@ -580,7 +580,7 @@ export function registerAtStakeTools(server) {
580
580
  "Only callable after the market resolves. Redeeming burns the whole position in " +
581
581
  "one call, so there is nothing left to redeem a second time.\n\n" +
582
582
  "Requires an unlocked wallet.",
583
- inputSchema: {},
583
+ inputSchema: z.object({}),
584
584
  }, async () => {
585
585
  try {
586
586
  const account = await getAtStakeAccount();
@@ -639,7 +639,7 @@ export function registerAtStakeTools(server) {
639
639
  "their vaults either.\n\n" +
640
640
  "It pays the caller nothing and costs them gas. Moves no assets. Requires an " +
641
641
  "unlocked wallet.",
642
- inputSchema: {},
642
+ inputSchema: z.object({}),
643
643
  }, async () => {
644
644
  try {
645
645
  const account = await getAtStakeAccount();
@@ -10,6 +10,6 @@
10
10
  * Data is fetched from mempool.space API (no authentication required).
11
11
  * Transfer operations require an unlocked wallet.
12
12
  */
13
- import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
13
+ import { McpServer } from "@modelcontextprotocol/server";
14
14
  export declare function registerBitcoinTools(server: McpServer): void;
15
15
  //# sourceMappingURL=bitcoin.tools.d.ts.map
@@ -92,13 +92,13 @@ export function registerBitcoinTools(server) {
92
92
  server.registerTool("get_btc_balance", {
93
93
  description: "Get the BTC balance for a Bitcoin address. " +
94
94
  "Returns both total balance (including unconfirmed) and confirmed balance.",
95
- inputSchema: {
95
+ inputSchema: z.object({
96
96
  address: z
97
97
  .string()
98
98
  .optional()
99
99
  .describe("Bitcoin address to check (bc1... for mainnet, tb1... for testnet). " +
100
100
  "Uses wallet's Bitcoin address if not provided."),
101
- },
101
+ }),
102
102
  }, async ({ address }) => {
103
103
  try {
104
104
  const btcAddress = await getBtcAddress(address);
@@ -181,7 +181,7 @@ export function registerBitcoinTools(server) {
181
181
  server.registerTool("get_btc_utxos", {
182
182
  description: "List all UTXOs (Unspent Transaction Outputs) for a Bitcoin address. " +
183
183
  "Useful for debugging, transparency, and understanding transaction inputs.",
184
- inputSchema: {
184
+ inputSchema: z.object({
185
185
  address: z
186
186
  .string()
187
187
  .optional()
@@ -191,7 +191,7 @@ export function registerBitcoinTools(server) {
191
191
  .optional()
192
192
  .default(false)
193
193
  .describe("Only return confirmed UTXOs (default: false)"),
194
- },
194
+ }),
195
195
  }, async ({ address, confirmedOnly }) => {
196
196
  try {
197
197
  const btcAddress = await getBtcAddress(address);
@@ -219,7 +219,7 @@ export function registerBitcoinTools(server) {
219
219
  "Requires an unlocked wallet with BTC balance. " +
220
220
  "By default, only uses cardinal UTXOs (safe to spend - no inscriptions). " +
221
221
  "Set includeOrdinals=true to allow spending ordinal UTXOs (advanced users only).",
222
- inputSchema: {
222
+ inputSchema: z.object({
223
223
  recipient: z
224
224
  .string()
225
225
  .describe("Bitcoin address to send to (bc1... for mainnet, tb1... for testnet)"),
@@ -242,7 +242,7 @@ export function registerBitcoinTools(server) {
242
242
  .default(false)
243
243
  .describe("Include ordinal UTXOs (contains inscriptions). Default: false (cardinal only). " +
244
244
  "WARNING: Setting this to true may destroy valuable inscriptions!"),
245
- },
245
+ }),
246
246
  }, async ({ recipient, amount, feeRate, includeOrdinals }) => {
247
247
  try {
248
248
  validateRecipientNetwork(recipient);
@@ -350,7 +350,7 @@ export function registerBitcoinTools(server) {
350
350
  "Cardinal UTXOs are regular Bitcoin outputs that do not contain ordinal inscriptions or rune balances. " +
351
351
  "These UTXOs can be safely used for regular Bitcoin transfers and fees. " +
352
352
  "Backed by the Unisat indexer; set UNISAT_API_KEY to lift free-tier rate limits.",
353
- inputSchema: {
353
+ inputSchema: z.object({
354
354
  address: z
355
355
  .string()
356
356
  .optional()
@@ -360,7 +360,7 @@ export function registerBitcoinTools(server) {
360
360
  .optional()
361
361
  .default(false)
362
362
  .describe("Only return confirmed UTXOs (default: false)"),
363
- },
363
+ }),
364
364
  }, async ({ address, confirmedOnly }) => {
365
365
  try {
366
366
  const btcAddress = await getBtcAddress(address);
@@ -388,7 +388,7 @@ export function registerBitcoinTools(server) {
388
388
  description: "Get ordinal UTXOs (contain inscriptions or runes - do not spend). " +
389
389
  "Ordinal UTXOs carry inscriptions or rune balances and should not be spent in regular transfers. " +
390
390
  "Backed by the Unisat indexer; set UNISAT_API_KEY to lift free-tier rate limits.",
391
- inputSchema: {
391
+ inputSchema: z.object({
392
392
  address: z
393
393
  .string()
394
394
  .optional()
@@ -398,7 +398,7 @@ export function registerBitcoinTools(server) {
398
398
  .optional()
399
399
  .default(false)
400
400
  .describe("Only return confirmed UTXOs (default: false)"),
401
- },
401
+ }),
402
402
  }, async ({ address, confirmedOnly }) => {
403
403
  try {
404
404
  const btcAddress = await getBtcAddress(address);
@@ -426,12 +426,12 @@ export function registerBitcoinTools(server) {
426
426
  description: "Get all inscriptions owned by a Bitcoin address. " +
427
427
  "Returns inscription IDs, content types, and metadata. " +
428
428
  "Backed by the Unisat indexer; set UNISAT_API_KEY to lift free-tier rate limits.",
429
- inputSchema: {
429
+ inputSchema: z.object({
430
430
  address: z
431
431
  .string()
432
432
  .optional()
433
433
  .describe("Bitcoin address to check. Uses wallet's Bitcoin address if not provided."),
434
- },
434
+ }),
435
435
  }, async ({ address }) => {
436
436
  try {
437
437
  const btcAddress = await getBtcAddress(address);
@@ -1,3 +1,3 @@
1
- import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
1
+ import { McpServer } from "@modelcontextprotocol/server";
2
2
  export declare function registerBitflowTools(server: McpServer): void;
3
3
  //# sourceMappingURL=bitflow.tools.d.ts.map
@@ -194,7 +194,7 @@ Returns price, volume, and liquidity data for all trading pairs.
194
194
  This endpoint does NOT require an API key.
195
195
 
196
196
  Note: Bitflow is only available on mainnet.`,
197
- inputSchema: {
197
+ inputSchema: z.object({
198
198
  baseCurrency: z
199
199
  .string()
200
200
  .optional()
@@ -203,7 +203,7 @@ Note: Bitflow is only available on mainnet.`,
203
203
  .string()
204
204
  .optional()
205
205
  .describe("Optional: filter by target currency contract ID"),
206
- },
206
+ }),
207
207
  }, async ({ baseCurrency, targetCurrency }) => {
208
208
  try {
209
209
  if (NETWORK !== "mainnet") {
@@ -250,7 +250,7 @@ Returns the list of tokens that can be swapped on Bitflow DEX.
250
250
  No API key required — uses public endpoints (500 req/min).
251
251
 
252
252
  Note: Bitflow is only available on mainnet.`,
253
- inputSchema: {},
253
+ inputSchema: z.object({}),
254
254
  }, async () => {
255
255
  try {
256
256
  if (NETWORK !== "mainnet") {
@@ -279,9 +279,9 @@ Returns all tokens that can be received when swapping from the specified token.
279
279
  No API key required — uses public endpoints (500 req/min).
280
280
 
281
281
  Note: Bitflow is only available on mainnet.`,
282
- inputSchema: {
282
+ inputSchema: z.object({
283
283
  tokenId: z.string().describe("The input token ID (contract address)"),
284
- },
284
+ }),
285
285
  }, async ({ tokenId }) => {
286
286
  try {
287
287
  if (NETWORK !== "mainnet") {
@@ -311,7 +311,7 @@ Returns the expected output amount and best route for swapping tokens.
311
311
  No API key required — uses public endpoints (500 req/min).
312
312
 
313
313
  Note: Bitflow is only available on mainnet.`,
314
- inputSchema: {
314
+ inputSchema: z.object({
315
315
  tokenX: z.string().describe("Input token ID (e.g. 'token-stx', 'token-sbtc')"),
316
316
  tokenY: z.string().describe("Output token ID (e.g. 'token-sbtc', 'token-aeusdc')"),
317
317
  amountIn: z
@@ -320,7 +320,7 @@ Note: Bitflow is only available on mainnet.`,
320
320
  amountUnit: z
321
321
  .enum(["human", "base"])
322
322
  .describe("Required. Amount units: 'human' (frontend-style decimal, e.g. '2' for 2 STX) or 'base' (smallest integer units, e.g. '2000000' for 2 STX)."),
323
- },
323
+ }),
324
324
  }, async ({ tokenX, tokenY, amountIn, amountUnit }) => {
325
325
  try {
326
326
  if (NETWORK !== "mainnet") {
@@ -365,10 +365,10 @@ including multi-hop routes through intermediate tokens.
365
365
  No API key required — uses public endpoints (500 req/min).
366
366
 
367
367
  Note: Bitflow is only available on mainnet.`,
368
- inputSchema: {
368
+ inputSchema: z.object({
369
369
  tokenX: z.string().describe("Input token ID (e.g. 'token-stx', 'token-sbtc')"),
370
370
  tokenY: z.string().describe("Output token ID (e.g. 'token-sbtc', 'token-aeusdc')"),
371
- },
371
+ }),
372
372
  }, async ({ tokenX, tokenY }) => {
373
373
  try {
374
374
  if (NETWORK !== "mainnet") {
@@ -404,7 +404,7 @@ No API key required — uses public endpoints (500 req/min).
404
404
  Requires an unlocked wallet with sufficient token balance.
405
405
 
406
406
  Note: Bitflow is only available on mainnet.`,
407
- inputSchema: {
407
+ inputSchema: z.object({
408
408
  tokenX: z.string().describe("Input token ID (contract address)"),
409
409
  tokenY: z.string().describe("Output token ID (contract address)"),
410
410
  amountIn: z
@@ -427,7 +427,7 @@ Note: Bitflow is only available on mainnet.`,
427
427
  .optional()
428
428
  .default(false)
429
429
  .describe("Set true to execute swaps with price impact above 5%"),
430
- },
430
+ }),
431
431
  }, async ({ tokenX, tokenY, amountIn, amountUnit, slippageTolerance, fee, confirmHighImpact }) => {
432
432
  try {
433
433
  if (NETWORK !== "mainnet") {
@@ -487,12 +487,12 @@ Keeper contracts enable scheduled/automated token swaps.
487
487
  No API key required — uses public endpoints (500 req/min).
488
488
 
489
489
  Note: Bitflow is only available on mainnet.`,
490
- inputSchema: {
490
+ inputSchema: z.object({
491
491
  stacksAddress: z
492
492
  .string()
493
493
  .optional()
494
494
  .describe("Stacks address (uses wallet if not specified)"),
495
- },
495
+ }),
496
496
  }, async ({ stacksAddress }) => {
497
497
  try {
498
498
  if (NETWORK !== "mainnet") {
@@ -523,7 +523,7 @@ Creates a pending order that will be executed by the Keeper service.
523
523
  No API key required — uses public endpoints (500 req/min).
524
524
 
525
525
  Note: Bitflow is only available on mainnet.`,
526
- inputSchema: {
526
+ inputSchema: z.object({
527
527
  contractIdentifier: z.string().describe("Keeper contract identifier"),
528
528
  actionType: z.string().describe("Action type (e.g., 'SWAP_XYK_SWAP_HELPER')"),
529
529
  fundingTokens: z
@@ -539,7 +539,7 @@ Note: Bitflow is only available on mainnet.`,
539
539
  .optional()
540
540
  .default(true)
541
541
  .describe("Auto-adjust minimum received based on market (default true)"),
542
- },
542
+ }),
543
543
  }, async ({ contractIdentifier, actionType, fundingTokens, actionAmount, minReceivedAmount, autoAdjust }) => {
544
544
  try {
545
545
  if (NETWORK !== "mainnet") {
@@ -585,9 +585,9 @@ Retrieves the status and details of a specific order.
585
585
  No API key required — uses public endpoints (500 req/min).
586
586
 
587
587
  Note: Bitflow is only available on mainnet.`,
588
- inputSchema: {
588
+ inputSchema: z.object({
589
589
  orderId: z.string().describe("The order ID to retrieve"),
590
- },
590
+ }),
591
591
  }, async ({ orderId }) => {
592
592
  try {
593
593
  if (NETWORK !== "mainnet") {
@@ -615,9 +615,9 @@ Cancels a pending order before execution.
615
615
  No API key required — uses public endpoints (500 req/min).
616
616
 
617
617
  Note: Bitflow is only available on mainnet.`,
618
- inputSchema: {
618
+ inputSchema: z.object({
619
619
  orderId: z.string().describe("The order ID to cancel"),
620
- },
620
+ }),
621
621
  }, async ({ orderId }) => {
622
622
  try {
623
623
  if (NETWORK !== "mainnet") {
@@ -646,12 +646,12 @@ Retrieves user's keeper contracts and order history.
646
646
  No API key required — uses public endpoints (500 req/min).
647
647
 
648
648
  Note: Bitflow is only available on mainnet.`,
649
- inputSchema: {
649
+ inputSchema: z.object({
650
650
  stacksAddress: z
651
651
  .string()
652
652
  .optional()
653
653
  .describe("Stacks address (uses wallet if not specified)"),
654
- },
654
+ }),
655
655
  }, async ({ stacksAddress }) => {
656
656
  try {
657
657
  if (NETWORK !== "mainnet") {
@@ -1,3 +1,3 @@
1
- import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
1
+ import { McpServer } from "@modelcontextprotocol/server";
2
2
  export declare function registerBnsTools(server: McpServer): void;
3
3
  //# sourceMappingURL=bns.tools.d.ts.map
@@ -7,9 +7,9 @@ export function registerBnsTools(server) {
7
7
  // Lookup BNS name
8
8
  server.registerTool("lookup_bns_name", {
9
9
  description: "Resolve a .btc domain name to its Stacks address.",
10
- inputSchema: {
10
+ inputSchema: z.object({
11
11
  name: z.string().describe("BNS name to lookup (e.g., 'alice.btc' or 'alice')"),
12
- },
12
+ }),
13
13
  }, async ({ name }) => {
14
14
  try {
15
15
  const bnsService = getBnsService(NETWORK);
@@ -37,12 +37,12 @@ export function registerBnsTools(server) {
37
37
  // Reverse BNS lookup
38
38
  server.registerTool("reverse_bns_lookup", {
39
39
  description: "Get the BNS domain names owned by an address.",
40
- inputSchema: {
40
+ inputSchema: z.object({
41
41
  address: z
42
42
  .string()
43
43
  .optional()
44
44
  .describe("Stacks address to lookup. Uses configured wallet if not provided."),
45
- },
45
+ }),
46
46
  }, async ({ address }) => {
47
47
  try {
48
48
  const bnsService = getBnsService(NETWORK);
@@ -62,9 +62,9 @@ export function registerBnsTools(server) {
62
62
  // Get BNS name info
63
63
  server.registerTool("get_bns_info", {
64
64
  description: "Get detailed information about a BNS domain name.",
65
- inputSchema: {
65
+ inputSchema: z.object({
66
66
  name: z.string().describe("BNS name to lookup (e.g., 'alice.btc')"),
67
- },
67
+ }),
68
68
  }, async ({ name }) => {
69
69
  try {
70
70
  const bnsService = getBnsService(NETWORK);
@@ -89,9 +89,9 @@ export function registerBnsTools(server) {
89
89
  // Check BNS availability
90
90
  server.registerTool("check_bns_availability", {
91
91
  description: "Check if a BNS domain name is available for registration.",
92
- inputSchema: {
92
+ inputSchema: z.object({
93
93
  name: z.string().describe("BNS name to check (e.g., 'alice')"),
94
- },
94
+ }),
95
95
  }, async ({ name }) => {
96
96
  try {
97
97
  const bnsService = getBnsService(NETWORK);
@@ -109,9 +109,9 @@ export function registerBnsTools(server) {
109
109
  // Get BNS price
110
110
  server.registerTool("get_bns_price", {
111
111
  description: "Get the registration price for a BNS domain name.",
112
- inputSchema: {
112
+ inputSchema: z.object({
113
113
  name: z.string().describe("BNS name to check (e.g., 'alice')"),
114
- },
114
+ }),
115
115
  }, async ({ name }) => {
116
116
  try {
117
117
  const bnsService = getBnsService(NETWORK);
@@ -133,12 +133,12 @@ export function registerBnsTools(server) {
133
133
  // List user domains
134
134
  server.registerTool("list_user_domains", {
135
135
  description: "List all BNS domains owned by an address.",
136
- inputSchema: {
136
+ inputSchema: z.object({
137
137
  address: z
138
138
  .string()
139
139
  .optional()
140
140
  .describe("Stacks address to check. Uses configured wallet if not provided."),
141
- },
141
+ }),
142
142
  }, async ({ address }) => {
143
143
  try {
144
144
  const bnsService = getBnsService(NETWORK);
@@ -161,7 +161,7 @@ export function registerBnsTools(server) {
161
161
  "This is the RECOMMENDED method — no preorder/register wait needed. " +
162
162
  "Burns the name price in STX and mints the BNS NFT atomically. " +
163
163
  "Works for all open namespaces (BNS V2).",
164
- inputSchema: {
164
+ inputSchema: z.object({
165
165
  name: z
166
166
  .string()
167
167
  .describe("BNS name to claim (e.g., 'myname' or 'myname.btc')"),
@@ -169,7 +169,7 @@ export function registerBnsTools(server) {
169
169
  .string()
170
170
  .optional()
171
171
  .describe("Optional recipient address. Defaults to the wallet's own address."),
172
- },
172
+ }),
173
173
  }, async ({ name, sendTo }) => {
174
174
  try {
175
175
  const bnsService = getBnsService(NETWORK);
@@ -211,7 +211,7 @@ export function registerBnsTools(server) {
211
211
  "Use this 2-step flow only for non-.btc namespaces or if claim-fast is unavailable. " +
212
212
  "After preorder is confirmed (~10 minutes), call register_bns_name with the same salt. " +
213
213
  "IMPORTANT: Save the returned salt - you'll need it for the register step!",
214
- inputSchema: {
214
+ inputSchema: z.object({
215
215
  name: z
216
216
  .string()
217
217
  .describe("BNS name to preorder (e.g., 'myname' or 'myname.btc')"),
@@ -219,7 +219,7 @@ export function registerBnsTools(server) {
219
219
  .string()
220
220
  .optional()
221
221
  .describe("Optional salt for the preorder hash. If not provided, a random salt will be generated."),
222
- },
222
+ }),
223
223
  }, async ({ name, salt }) => {
224
224
  try {
225
225
  const bnsService = getBnsService(NETWORK);
@@ -262,14 +262,14 @@ export function registerBnsTools(server) {
262
262
  "You MUST use the same salt from the preorder step. " +
263
263
  "Only call this after the preorder transaction has been confirmed on-chain (~10 minutes). " +
264
264
  "Auto-detects contract version: V2 for .btc names, V1 for other namespaces.",
265
- inputSchema: {
265
+ inputSchema: z.object({
266
266
  name: z
267
267
  .string()
268
268
  .describe("BNS name to register (must match the preordered name)"),
269
269
  salt: z
270
270
  .string()
271
271
  .describe("The hex salt used in the preorder step (REQUIRED - must match exactly)"),
272
- },
272
+ }),
273
273
  }, async ({ name, salt }) => {
274
274
  try {
275
275
  const bnsService = getBnsService(NETWORK);
@@ -15,7 +15,7 @@
15
15
  * added to successful results — never to errors, and never touching the tool's
16
16
  * own JSON payload.
17
17
  */
18
- import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
18
+ import { McpServer } from "@modelcontextprotocol/server";
19
19
  /**
20
20
  * Tools that move or spend value. A hint is appended to their successful output.
21
21
  */
@@ -35,6 +35,6 @@
35
35
  *
36
36
  * Reference: https://aibtc.com/docs/bounties.txt, https://aibtc.com/api/openapi.json
37
37
  */
38
- import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
38
+ import { McpServer } from "@modelcontextprotocol/server";
39
39
  export declare function registerBountyScannerTools(server: McpServer): void;
40
40
  //# sourceMappingURL=bounty-scanner.tools.d.ts.map