@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
@@ -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
@@ -279,7 +279,7 @@ Read-only. Mainnet-only. Requires an unlocked wallet for address context.
279
279
 
280
280
  Note: ALEX LP and Bitflow LP position values are 0 — these protocols do not
281
281
  expose user LP positions via read-only calls. APY figures are still returned.`,
282
- inputSchema: {},
282
+ inputSchema: z.object({}),
283
283
  }, async () => {
284
284
  try {
285
285
  if (NETWORK !== "mainnet") {
@@ -355,7 +355,7 @@ Known limitations:
355
355
  - ALEX LP and Bitflow LP: valueSats shows 0 (protocol does not expose user
356
356
  LP balances via read-only calls). APY is still returned.
357
357
  - Stacking: denominated in microSTX, not sats.`,
358
- inputSchema: {},
358
+ inputSchema: z.object({}),
359
359
  }, async () => {
360
360
  try {
361
361
  if (NETWORK !== "mainnet") {
@@ -406,7 +406,7 @@ Data sources:
406
406
  - STX Stacking: static 8.0% estimate
407
407
 
408
408
  Mainnet data only (contract addresses are mainnet-specific).`,
409
- inputSchema: {},
409
+ inputSchema: z.object({}),
410
410
  }, async () => {
411
411
  try {
412
412
  // APY breakdown does not require a wallet — use burn address as dummy
@@ -465,13 +465,13 @@ Risk tolerance levels:
465
465
  - high: Zest 50%, ALEX 30%, Bitflow 20%, Stacking 0%
466
466
 
467
467
  Read-only. Mainnet-only. Requires an unlocked wallet for address context.`,
468
- inputSchema: {
468
+ inputSchema: z.object({
469
469
  riskTolerance: z
470
470
  .enum(["low", "medium", "high"])
471
471
  .optional()
472
472
  .default("medium")
473
473
  .describe("Risk tolerance level: low, medium, or high (default: medium)"),
474
- },
474
+ }),
475
475
  }, async ({ riskTolerance }) => {
476
476
  try {
477
477
  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 registerYieldHunterTools(server: McpServer): void;
3
3
  //# sourceMappingURL=yield-hunter.tools.d.ts.map
@@ -273,7 +273,7 @@ Default settings:
273
273
  - Deposit threshold: 10,000 sats (0.0001 sBTC)
274
274
  - Reserve: 0 sats (deposit all sBTC to maximize yield)
275
275
  - Check interval: 10 minutes`,
276
- inputSchema: {
276
+ inputSchema: z.object({
277
277
  threshold: z
278
278
  .string()
279
279
  .optional()
@@ -286,7 +286,7 @@ Default settings:
286
286
  .number()
287
287
  .optional()
288
288
  .describe("Check interval in seconds. Default: 600 (10 minutes)"),
289
- },
289
+ }),
290
290
  }, async ({ threshold, reserve, interval }) => {
291
291
  try {
292
292
  if (NETWORK !== "mainnet") {
@@ -363,7 +363,7 @@ Default settings:
363
363
 
364
364
  Stops the background process that monitors and deposits sBTC.
365
365
  Your existing Zest positions remain untouched.`,
366
- inputSchema: {},
366
+ inputSchema: z.object({}),
367
367
  }, async () => {
368
368
  try {
369
369
  if (!state.running) {
@@ -403,7 +403,7 @@ Shows:
403
403
  - Statistics (checks run, deposits made)
404
404
  - Recent activity logs
405
405
  - Current Zest position`,
406
- inputSchema: {},
406
+ inputSchema: z.object({}),
407
407
  }, async () => {
408
408
  try {
409
409
  const status = await getFullStatus();
@@ -419,7 +419,7 @@ Shows:
419
419
 
420
420
  Adjust the deposit threshold, reserve, or check interval.
421
421
  Changes take effect on the next check cycle.`,
422
- inputSchema: {
422
+ inputSchema: z.object({
423
423
  threshold: z
424
424
  .string()
425
425
  .optional()
@@ -432,7 +432,7 @@ Changes take effect on the next check cycle.`,
432
432
  .number()
433
433
  .optional()
434
434
  .describe("Check interval in seconds"),
435
- },
435
+ }),
436
436
  }, async ({ threshold, reserve, interval }) => {
437
437
  try {
438
438
  const changes = [];
package/dist/utils/fee.js CHANGED
@@ -88,7 +88,7 @@ export async function resolveFee(fee, network, txType = "all") {
88
88
  const clamps = FEE_CLAMPS[txType];
89
89
  const multipliers = { low: 1n, medium: 2n, high: 3n };
90
90
  const fallbackFee = clamps.floor * multipliers[fee.toLowerCase()];
91
- console.info(`Using fallback fee: ${fallbackFee} uSTX (${fee} preset, ${txType} type)`);
91
+ console.error(`Using fallback fee: ${fallbackFee} uSTX (${fee} preset, ${txType} type)`);
92
92
  return fallbackFee;
93
93
  }
94
94
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aibtc/mcp-server",
3
- "version": "1.71.0",
3
+ "version": "1.72.0",
4
4
  "description": "Bitcoin-native MCP server for AI agents: BTC/STX wallets, DeFi yield, sBTC peg, NFTs, and x402 payments.",
5
5
  "mcpName": "io.github.aibtcdev/mcp-server",
6
6
  "type": "module",
@@ -52,7 +52,8 @@
52
52
  "@bitflowlabs/core-sdk": "^3.0.0",
53
53
  "@buildonspark/spark-sdk": "^0.7.14",
54
54
  "@faktoryfun/styx-sdk": "^1.3.5",
55
- "@modelcontextprotocol/sdk": "^1.27.1",
55
+ "@modelcontextprotocol/client": "^2.1.0",
56
+ "@modelcontextprotocol/server": "^2.1.0",
56
57
  "@noble/curves": "^2.0.1",
57
58
  "@noble/hashes": "^2.0.1",
58
59
  "@scure/base": "^2.0.0",
@@ -75,7 +76,7 @@
75
76
  "tslib": "^2.8.1",
76
77
  "ws": "^8.21.0",
77
78
  "x402-stacks": "^2.0.3",
78
- "zod": "^4.3.6"
79
+ "zod": "^4.6.5"
79
80
  },
80
81
  "devDependencies": {
81
82
  "@types/node": "^22.19.13",
package/skill/SKILL.md CHANGED
@@ -4,7 +4,7 @@ description: Bitcoin L1 wallet for agents - check balances, send BTC, manage UTX
4
4
  license: MIT
5
5
  metadata:
6
6
  author: aibtcdev
7
- version: 1.71.0 # x-release-please-version
7
+ version: 1.72.0 # x-release-please-version
8
8
  npm: "@aibtc/mcp-server"
9
9
  github: https://github.com/aibtcdev/aibtc-mcp-server
10
10
  ---