@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.
- package/README.md +36 -3
- package/dist/bridge/index.js +2 -2
- package/dist/config/networks.js +4 -1
- package/dist/index.js +118 -42
- package/dist/tools/arxiv-research.tools.d.ts +1 -1
- package/dist/tools/arxiv-research.tools.js +6 -6
- package/dist/tools/at-stake-legion.tools.d.ts +1 -1
- package/dist/tools/at-stake-legion.tools.js +14 -14
- package/dist/tools/at-stake.tools.d.ts +1 -1
- package/dist/tools/at-stake.tools.js +17 -17
- package/dist/tools/bitcoin.tools.d.ts +1 -1
- package/dist/tools/bitcoin.tools.js +12 -12
- package/dist/tools/bitflow.tools.d.ts +1 -1
- package/dist/tools/bitflow.tools.js +21 -21
- package/dist/tools/bns.tools.d.ts +1 -1
- package/dist/tools/bns.tools.js +18 -18
- package/dist/tools/bounty-hint.d.ts +1 -1
- package/dist/tools/bounty-scanner.tools.d.ts +1 -1
- package/dist/tools/bounty-scanner.tools.js +20 -20
- package/dist/tools/child-inscription.tools.d.ts +1 -1
- package/dist/tools/child-inscription.tools.js +6 -6
- package/dist/tools/competition.tools.d.ts +1 -1
- package/dist/tools/competition.tools.js +4 -4
- package/dist/tools/contract.tools.d.ts +1 -1
- package/dist/tools/contract.tools.js +8 -8
- package/dist/tools/credentials.tools.d.ts +1 -1
- package/dist/tools/credentials.tools.js +8 -8
- package/dist/tools/defi.tools.d.ts +1 -1
- package/dist/tools/defi.tools.js +21 -21
- package/dist/tools/dual-stacking.tools.d.ts +1 -1
- package/dist/tools/dual-stacking.tools.js +7 -7
- package/dist/tools/earning.tools.d.ts +1 -1
- package/dist/tools/earning.tools.js +2 -2
- package/dist/tools/endpoint.tools.d.ts +1 -1
- package/dist/tools/endpoint.tools.js +14 -13
- package/dist/tools/identity.tools.d.ts +1 -1
- package/dist/tools/identity.tools.js +19 -19
- package/dist/tools/inbox-x402.tools.d.ts +1 -1
- package/dist/tools/inbox-x402.tools.js +2 -2
- package/dist/tools/inbox.tools.d.ts +1 -1
- package/dist/tools/inbox.tools.js +2 -2
- package/dist/tools/index.d.ts +6 -3
- package/dist/tools/index.js +69 -58
- package/dist/tools/inference-marketplace.tools.d.ts +1 -1
- package/dist/tools/inference-marketplace.tools.js +10 -10
- package/dist/tools/jingswap.tools.d.ts +1 -1
- package/dist/tools/jingswap.tools.js +30 -30
- package/dist/tools/legion.tools.d.ts +1 -1
- package/dist/tools/legion.tools.js +20 -20
- package/dist/tools/lightning.tools.d.ts +1 -1
- package/dist/tools/lightning.tools.js +14 -14
- package/dist/tools/mempool.tools.d.ts +1 -1
- package/dist/tools/mempool.tools.js +5 -5
- package/dist/tools/news.tools.d.ts +1 -1
- package/dist/tools/news.tools.js +2 -1
- package/dist/tools/nft.tools.d.ts +1 -1
- package/dist/tools/nft.tools.js +12 -12
- package/dist/tools/nonce.tools.d.ts +1 -1
- package/dist/tools/nonce.tools.js +8 -8
- package/dist/tools/nostr.tools.d.ts +1 -1
- package/dist/tools/nostr.tools.js +12 -12
- package/dist/tools/openrouter.tools.d.ts +1 -1
- package/dist/tools/openrouter.tools.js +4 -4
- package/dist/tools/ordinals-marketplace.tools.d.ts +1 -1
- package/dist/tools/ordinals-marketplace.tools.js +10 -10
- package/dist/tools/ordinals-p2p.tools.d.ts +1 -1
- package/dist/tools/ordinals-p2p.tools.js +18 -18
- package/dist/tools/ordinals.tools.d.ts +1 -1
- package/dist/tools/ordinals.tools.js +8 -8
- package/dist/tools/pillar-direct.tools.d.ts +1 -1
- package/dist/tools/pillar-direct.tools.js +36 -36
- package/dist/tools/pillar.tools.d.ts +1 -1
- package/dist/tools/pillar.tools.js +28 -26
- package/dist/tools/profiles.d.ts +51 -0
- package/dist/tools/profiles.js +111 -0
- package/dist/tools/psbt.tools.d.ts +1 -1
- package/dist/tools/psbt.tools.js +8 -8
- package/dist/tools/query.tools.d.ts +1 -1
- package/dist/tools/query.tools.js +12 -12
- package/dist/tools/relay-diagnostic.tools.d.ts +1 -1
- package/dist/tools/relay-diagnostic.tools.js +3 -3
- package/dist/tools/reputation.tools.d.ts +1 -1
- package/dist/tools/reputation.tools.js +22 -22
- package/dist/tools/runes.tools.d.ts +1 -1
- package/dist/tools/runes.tools.js +18 -18
- package/dist/tools/sbtc.tools.d.ts +1 -1
- package/dist/tools/sbtc.tools.js +12 -12
- package/dist/tools/scaffold.tools.d.ts +1 -1
- package/dist/tools/scaffold.tools.js +4 -4
- package/dist/tools/settings.tools.d.ts +1 -1
- package/dist/tools/settings.tools.js +9 -9
- package/dist/tools/signing.tools.d.ts +1 -1
- package/dist/tools/signing.tools.js +20 -20
- package/dist/tools/souldinals.tools.d.ts +1 -1
- package/dist/tools/souldinals.tools.js +10 -10
- package/dist/tools/stacking-lottery.tools.d.ts +1 -1
- package/dist/tools/stacking-lottery.tools.js +11 -11
- package/dist/tools/stacking.tools.d.ts +1 -1
- package/dist/tools/stacking.tools.js +13 -13
- package/dist/tools/stacks-market.tools.d.ts +1 -1
- package/dist/tools/stacks-market.tools.js +22 -22
- package/dist/tools/styx.tools.d.ts +1 -1
- package/dist/tools/styx.tools.js +11 -11
- package/dist/tools/taproot-multisig.tools.d.ts +1 -1
- package/dist/tools/taproot-multisig.tools.js +5 -5
- package/dist/tools/tenero.tools.d.ts +1 -1
- package/dist/tools/tenero.tools.js +22 -22
- package/dist/tools/tokens.tools.d.ts +1 -1
- package/dist/tools/tokens.tools.js +10 -10
- package/dist/tools/transfer.tools.d.ts +1 -1
- package/dist/tools/transfer.tools.js +4 -4
- package/dist/tools/wallet-management.tools.d.ts +1 -1
- package/dist/tools/wallet-management.tools.js +16 -16
- package/dist/tools/wallet.tools.d.ts +1 -1
- package/dist/tools/wallet.tools.js +2 -2
- package/dist/tools/yield-dashboard.tools.d.ts +1 -1
- package/dist/tools/yield-dashboard.tools.js +5 -5
- package/dist/tools/yield-hunter.tools.d.ts +1 -1
- package/dist/tools/yield-hunter.tools.js +6 -6
- package/dist/utils/fee.js +1 -1
- package/package.json +4 -3
- package/skill/SKILL.md +1 -1
|
@@ -74,12 +74,12 @@ Returns:
|
|
|
74
74
|
- chain: possibleNextNonce, lastExecuted, mempool nonces, missing nonces
|
|
75
75
|
- healthy: whether the nonce state looks good
|
|
76
76
|
- issues: list of detected problems with recommendations`,
|
|
77
|
-
inputSchema: {
|
|
77
|
+
inputSchema: z.object({
|
|
78
78
|
address: z
|
|
79
79
|
.string()
|
|
80
80
|
.optional()
|
|
81
81
|
.describe("STX address to check. Defaults to the active wallet address."),
|
|
82
|
-
},
|
|
82
|
+
}),
|
|
83
83
|
}, async ({ address: inputAddress }) => {
|
|
84
84
|
try {
|
|
85
85
|
const walletAccount = getWalletManager().getAccount();
|
|
@@ -203,13 +203,13 @@ PoX burn address.
|
|
|
203
203
|
Use nonce_health first to identify gaps, then call this tool for each missing nonce.
|
|
204
204
|
|
|
205
205
|
Requires the wallet to be unlocked. The fee is auto-estimated.`,
|
|
206
|
-
inputSchema: {
|
|
206
|
+
inputSchema: z.object({
|
|
207
207
|
nonce: z
|
|
208
208
|
.number()
|
|
209
209
|
.int()
|
|
210
210
|
.nonnegative()
|
|
211
211
|
.describe("The specific nonce to fill"),
|
|
212
|
-
},
|
|
212
|
+
}),
|
|
213
213
|
}, async ({ nonce }) => {
|
|
214
214
|
try {
|
|
215
215
|
const walletAccount = getWalletManager().getAccount();
|
|
@@ -262,12 +262,12 @@ Output per nonce slot:
|
|
|
262
262
|
|
|
263
263
|
Use this when check_relay_health shows issues but you need per-transaction clarity.
|
|
264
264
|
Returns structured JSON with pendingSlots, sponsorMissingNonces, and summary counts.`,
|
|
265
|
-
inputSchema: {
|
|
265
|
+
inputSchema: z.object({
|
|
266
266
|
address: z
|
|
267
267
|
.string()
|
|
268
268
|
.optional()
|
|
269
269
|
.describe("STX address to check. Defaults to the active wallet address."),
|
|
270
|
-
},
|
|
270
|
+
}),
|
|
271
271
|
}, async ({ address: inputAddress }) => {
|
|
272
272
|
try {
|
|
273
273
|
const walletAccount = getWalletManager().getAccount();
|
|
@@ -419,7 +419,7 @@ Returns:
|
|
|
419
419
|
- actions: per-action detail (fill_gap or bump_head) with txids, fees, status
|
|
420
420
|
- warnings: informational notes
|
|
421
421
|
- summary: human-readable description of what happened`,
|
|
422
|
-
inputSchema: {
|
|
422
|
+
inputSchema: z.object({
|
|
423
423
|
address: z
|
|
424
424
|
.string()
|
|
425
425
|
.optional()
|
|
@@ -437,7 +437,7 @@ Returns:
|
|
|
437
437
|
.min(1.1)
|
|
438
438
|
.default(1.5)
|
|
439
439
|
.describe("Fee multiplier for RBF bump (e.g. 1.5 = 50% higher fee). Minimum 1.1. Default 1.5."),
|
|
440
|
-
},
|
|
440
|
+
}),
|
|
441
441
|
}, async ({ address: inputAddress, dryRun, bumpHead, feeMultiplier }) => {
|
|
442
442
|
try {
|
|
443
443
|
const walletAccount = getWalletManager().getAccount();
|
|
@@ -74,7 +74,7 @@ export function registerNostrTools(server) {
|
|
|
74
74
|
"Uses the NIP-06 derivation path (m/44'/1237'/0'/0/0). " +
|
|
75
75
|
"Returns both hex pubkey and npub (bech32) formats. " +
|
|
76
76
|
"Requires an unlocked wallet.",
|
|
77
|
-
inputSchema: {},
|
|
77
|
+
inputSchema: z.object({}),
|
|
78
78
|
}, async () => {
|
|
79
79
|
try {
|
|
80
80
|
const { pubkey, npub } = deriveNostrKeys();
|
|
@@ -91,7 +91,7 @@ export function registerNostrTools(server) {
|
|
|
91
91
|
description: "Publish a short-text note (kind:1) to Nostr relays. " +
|
|
92
92
|
"Optionally include hashtag tags and specify target relays. " +
|
|
93
93
|
"Requires an unlocked wallet.",
|
|
94
|
-
inputSchema: {
|
|
94
|
+
inputSchema: z.object({
|
|
95
95
|
content: z.string().describe("The note content to publish."),
|
|
96
96
|
tags: z
|
|
97
97
|
.string()
|
|
@@ -102,7 +102,7 @@ export function registerNostrTools(server) {
|
|
|
102
102
|
.array(z.string().url())
|
|
103
103
|
.optional()
|
|
104
104
|
.describe(`Relay URLs to publish to. Defaults to ${DEFAULT_RELAYS.join(", ")}.`),
|
|
105
|
-
},
|
|
105
|
+
}),
|
|
106
106
|
}, async ({ content, tags, relays }) => {
|
|
107
107
|
try {
|
|
108
108
|
const { sk } = deriveNostrKeys();
|
|
@@ -144,7 +144,7 @@ export function registerNostrTools(server) {
|
|
|
144
144
|
description: "Read recent kind:1 notes from Nostr relays. " +
|
|
145
145
|
"Optionally filter by author pubkey. " +
|
|
146
146
|
"No wallet required.",
|
|
147
|
-
inputSchema: {
|
|
147
|
+
inputSchema: z.object({
|
|
148
148
|
pubkey: z
|
|
149
149
|
.string()
|
|
150
150
|
.optional()
|
|
@@ -160,7 +160,7 @@ export function registerNostrTools(server) {
|
|
|
160
160
|
.url()
|
|
161
161
|
.optional()
|
|
162
162
|
.describe("Single relay URL to query. Defaults to all DEFAULT_RELAYS."),
|
|
163
|
-
},
|
|
163
|
+
}),
|
|
164
164
|
}, async ({ pubkey, limit, relay }) => {
|
|
165
165
|
try {
|
|
166
166
|
const pool = createPool();
|
|
@@ -202,7 +202,7 @@ export function registerNostrTools(server) {
|
|
|
202
202
|
server.registerTool("nostr_search_tags", {
|
|
203
203
|
description: "Search Nostr for kind:1 notes matching hashtags using NIP-12 #t filter. " +
|
|
204
204
|
"No wallet required.",
|
|
205
|
-
inputSchema: {
|
|
205
|
+
inputSchema: z.object({
|
|
206
206
|
tags: z
|
|
207
207
|
.string()
|
|
208
208
|
.describe("Comma-separated hashtags to search for (e.g., 'bitcoin,nostr'). " +
|
|
@@ -218,7 +218,7 @@ export function registerNostrTools(server) {
|
|
|
218
218
|
.url()
|
|
219
219
|
.optional()
|
|
220
220
|
.describe("Single relay URL to query. Defaults to all DEFAULT_RELAYS."),
|
|
221
|
-
},
|
|
221
|
+
}),
|
|
222
222
|
}, async ({ tags, limit, relay }) => {
|
|
223
223
|
try {
|
|
224
224
|
const pool = createPool();
|
|
@@ -262,7 +262,7 @@ export function registerNostrTools(server) {
|
|
|
262
262
|
server.registerTool("nostr_get_profile", {
|
|
263
263
|
description: "Get a Nostr profile (kind:0 metadata) for any public key. " +
|
|
264
264
|
"No wallet required.",
|
|
265
|
-
inputSchema: {
|
|
265
|
+
inputSchema: z.object({
|
|
266
266
|
pubkey: z
|
|
267
267
|
.string()
|
|
268
268
|
.describe("Public key to look up (hex or npub bech32 format)."),
|
|
@@ -271,7 +271,7 @@ export function registerNostrTools(server) {
|
|
|
271
271
|
.url()
|
|
272
272
|
.optional()
|
|
273
273
|
.describe("Single relay URL to query. Defaults to all DEFAULT_RELAYS."),
|
|
274
|
-
},
|
|
274
|
+
}),
|
|
275
275
|
}, async ({ pubkey, relay }) => {
|
|
276
276
|
try {
|
|
277
277
|
const pool = createPool();
|
|
@@ -322,7 +322,7 @@ export function registerNostrTools(server) {
|
|
|
322
322
|
"Only provided fields are updated; existing fields are preserved by fetching " +
|
|
323
323
|
"the current profile first. " +
|
|
324
324
|
"Requires an unlocked wallet.",
|
|
325
|
-
inputSchema: {
|
|
325
|
+
inputSchema: z.object({
|
|
326
326
|
name: z.string().optional().describe("Display name."),
|
|
327
327
|
about: z.string().optional().describe("Bio / about text."),
|
|
328
328
|
picture: z.string().url().optional().describe("Profile picture URL."),
|
|
@@ -340,7 +340,7 @@ export function registerNostrTools(server) {
|
|
|
340
340
|
.array(z.string().url())
|
|
341
341
|
.optional()
|
|
342
342
|
.describe(`Relay URLs to publish to. Defaults to ${DEFAULT_RELAYS.join(", ")}.`),
|
|
343
|
-
},
|
|
343
|
+
}),
|
|
344
344
|
}, async ({ name, about, picture, banner, website, nip05, relays }) => {
|
|
345
345
|
try {
|
|
346
346
|
const { sk, pubkey } = deriveNostrKeys();
|
|
@@ -403,7 +403,7 @@ export function registerNostrTools(server) {
|
|
|
403
403
|
// -------------------------------------------------------------------------
|
|
404
404
|
server.registerTool("nostr_relay_list", {
|
|
405
405
|
description: "List the configured default Nostr relay URLs. No wallet required.",
|
|
406
|
-
inputSchema: {},
|
|
406
|
+
inputSchema: z.object({}),
|
|
407
407
|
}, async () => {
|
|
408
408
|
try {
|
|
409
409
|
return createJsonResponse({ relays: DEFAULT_RELAYS });
|
|
@@ -11,7 +11,7 @@ Use this tool when you need to add AI capabilities to any project. Returns:
|
|
|
11
11
|
- Error handling patterns
|
|
12
12
|
|
|
13
13
|
This is a reference tool - use the returned code as a template for implementation.`,
|
|
14
|
-
inputSchema: {
|
|
14
|
+
inputSchema: z.object({
|
|
15
15
|
environment: z
|
|
16
16
|
.enum(["nodejs", "cloudflare-worker", "browser", "all"])
|
|
17
17
|
.optional()
|
|
@@ -22,7 +22,7 @@ This is a reference tool - use the returned code as a template for implementatio
|
|
|
22
22
|
.optional()
|
|
23
23
|
.default("all")
|
|
24
24
|
.describe("Specific AI feature to implement"),
|
|
25
|
-
},
|
|
25
|
+
}),
|
|
26
26
|
}, async ({ environment, feature }) => {
|
|
27
27
|
const guides = {};
|
|
28
28
|
// Base API info
|
|
@@ -496,13 +496,13 @@ async function safeChat(messages: ChatMessage[], model: string) {
|
|
|
496
496
|
description: `Get list of popular OpenRouter models with capabilities and context lengths.
|
|
497
497
|
|
|
498
498
|
Use this to choose the right model for your use case. For latest pricing, check openrouter.ai/models`,
|
|
499
|
-
inputSchema: {
|
|
499
|
+
inputSchema: z.object({
|
|
500
500
|
category: z
|
|
501
501
|
.enum(["fast", "quality", "cheap", "code", "long-context", "all"])
|
|
502
502
|
.optional()
|
|
503
503
|
.default("all")
|
|
504
504
|
.describe("Filter by model category"),
|
|
505
|
-
},
|
|
505
|
+
}),
|
|
506
506
|
}, async ({ category }) => {
|
|
507
507
|
const allModels = [
|
|
508
508
|
// Anthropic
|
|
@@ -16,6 +16,6 @@
|
|
|
16
16
|
*
|
|
17
17
|
* Magic Eden API docs: https://api-mainnet.magiceden.dev/swagger
|
|
18
18
|
*/
|
|
19
|
-
import { McpServer } from "@modelcontextprotocol/
|
|
19
|
+
import { McpServer } from "@modelcontextprotocol/server";
|
|
20
20
|
export declare function registerOrdinalsMarketplaceTools(server: McpServer): void;
|
|
21
21
|
//# sourceMappingURL=ordinals-marketplace.tools.d.ts.map
|
|
@@ -90,7 +90,7 @@ Examples:
|
|
|
90
90
|
- Browse all listings: ordinals_get_listings {}
|
|
91
91
|
- Filter by collection: ordinals_get_listings { collection: "nodemonkes" }
|
|
92
92
|
- Price range: ordinals_get_listings { minPriceSats: 100000, maxPriceSats: 1000000 }`,
|
|
93
|
-
inputSchema: {
|
|
93
|
+
inputSchema: z.object({
|
|
94
94
|
collection: z
|
|
95
95
|
.string()
|
|
96
96
|
.optional()
|
|
@@ -127,7 +127,7 @@ Examples:
|
|
|
127
127
|
.optional()
|
|
128
128
|
.default("recentlyListed")
|
|
129
129
|
.describe("Sort order: priceAsc, priceDesc, or recentlyListed (default)"),
|
|
130
|
-
},
|
|
130
|
+
}),
|
|
131
131
|
}, async ({ collection, minPriceSats, maxPriceSats, limit, offset, sortBy }) => {
|
|
132
132
|
try {
|
|
133
133
|
if (NETWORK !== "mainnet") {
|
|
@@ -183,7 +183,7 @@ Steps:
|
|
|
183
183
|
3. Submit the signed PSBT back to Magic Eden to complete the listing
|
|
184
184
|
|
|
185
185
|
Note: The inscription must be in the wallet's Taproot (P2TR) address.`,
|
|
186
|
-
inputSchema: {
|
|
186
|
+
inputSchema: z.object({
|
|
187
187
|
inscriptionId: z
|
|
188
188
|
.string()
|
|
189
189
|
.describe("Inscription ID in txid+index format, e.g. abc123...i0"),
|
|
@@ -196,7 +196,7 @@ Note: The inscription must be in the wallet's Taproot (P2TR) address.`,
|
|
|
196
196
|
.string()
|
|
197
197
|
.optional()
|
|
198
198
|
.describe("BTC address to receive payment (defaults to wallet's Taproot address)"),
|
|
199
|
-
},
|
|
199
|
+
}),
|
|
200
200
|
}, async ({ inscriptionId, priceSats, receiverAddress }) => {
|
|
201
201
|
try {
|
|
202
202
|
if (NETWORK !== "mainnet") {
|
|
@@ -248,14 +248,14 @@ Steps:
|
|
|
248
248
|
1. Call ordinals_list_for_sale to get a listing PSBT
|
|
249
249
|
2. Sign the PSBT using psbt_sign
|
|
250
250
|
3. Call this tool with the signed PSBT to publish the listing`,
|
|
251
|
-
inputSchema: {
|
|
251
|
+
inputSchema: z.object({
|
|
252
252
|
inscriptionId: z
|
|
253
253
|
.string()
|
|
254
254
|
.describe("The inscription ID being listed"),
|
|
255
255
|
signedPsbt: z
|
|
256
256
|
.string()
|
|
257
257
|
.describe("The signed PSBT in base64 format returned by psbt_sign"),
|
|
258
|
-
},
|
|
258
|
+
}),
|
|
259
259
|
}, async ({ inscriptionId, signedPsbt }) => {
|
|
260
260
|
try {
|
|
261
261
|
if (NETWORK !== "mainnet") {
|
|
@@ -288,7 +288,7 @@ Steps:
|
|
|
288
288
|
2. Call ordinals_buy with the inscriptionId and desired buyer address
|
|
289
289
|
3. Sign the returned PSBT using psbt_sign
|
|
290
290
|
4. Broadcast using psbt_broadcast`,
|
|
291
|
-
inputSchema: {
|
|
291
|
+
inputSchema: z.object({
|
|
292
292
|
inscriptionId: z
|
|
293
293
|
.string()
|
|
294
294
|
.describe("Inscription ID to purchase, e.g. abc123...i0"),
|
|
@@ -305,7 +305,7 @@ Steps:
|
|
|
305
305
|
.positive()
|
|
306
306
|
.optional()
|
|
307
307
|
.describe("Fee rate in sat/vB (optional, uses network default if omitted)"),
|
|
308
|
-
},
|
|
308
|
+
}),
|
|
309
309
|
}, async ({ inscriptionId, buyerAddress, buyerPaymentAddress, feeRate }) => {
|
|
310
310
|
try {
|
|
311
311
|
if (NETWORK !== "mainnet") {
|
|
@@ -380,7 +380,7 @@ Steps:
|
|
|
380
380
|
1. Call this tool with the inscriptionId you want to delist
|
|
381
381
|
2. Sign the returned PSBT using psbt_sign
|
|
382
382
|
3. Broadcast using psbt_broadcast to finalize the cancellation`,
|
|
383
|
-
inputSchema: {
|
|
383
|
+
inputSchema: z.object({
|
|
384
384
|
inscriptionId: z
|
|
385
385
|
.string()
|
|
386
386
|
.describe("Inscription ID of the active listing to cancel, e.g. abc123...i0"),
|
|
@@ -388,7 +388,7 @@ Steps:
|
|
|
388
388
|
.string()
|
|
389
389
|
.optional()
|
|
390
390
|
.describe("BTC Taproot address that owns the listing (defaults to wallet's Taproot address)"),
|
|
391
|
-
},
|
|
391
|
+
}),
|
|
392
392
|
}, async ({ inscriptionId, sellerAddress }) => {
|
|
393
393
|
try {
|
|
394
394
|
if (NETWORK !== "mainnet") {
|
|
@@ -16,6 +16,6 @@
|
|
|
16
16
|
* - ordinals_p2p_cancel: Cancel an open offer or counter (BIP-137 signed)
|
|
17
17
|
* - ordinals_p2p_psbt_swap: Record a completed PSBT atomic swap (BIP-137 signed)
|
|
18
18
|
*/
|
|
19
|
-
import { McpServer } from "@modelcontextprotocol/
|
|
19
|
+
import { McpServer } from "@modelcontextprotocol/server";
|
|
20
20
|
export declare function registerOrdinalsP2PTools(server: McpServer): void;
|
|
21
21
|
//# sourceMappingURL=ordinals-p2p.tools.d.ts.map
|
|
@@ -172,7 +172,7 @@ Returns a paginated list of trades with optional filters. Useful for discovering
|
|
|
172
172
|
open offers, reviewing recent activity, or searching for a specific inscription.
|
|
173
173
|
|
|
174
174
|
No wallet required.`,
|
|
175
|
-
inputSchema: {
|
|
175
|
+
inputSchema: z.object({
|
|
176
176
|
status: z
|
|
177
177
|
.enum(["open", "completed", "cancelled", "countered"])
|
|
178
178
|
.optional()
|
|
@@ -203,7 +203,7 @@ No wallet required.`,
|
|
|
203
203
|
.optional()
|
|
204
204
|
.default(0)
|
|
205
205
|
.describe("Pagination offset (default 0)"),
|
|
206
|
-
},
|
|
206
|
+
}),
|
|
207
207
|
}, async ({ status, agent, inscription_id, type, limit, offset }) => {
|
|
208
208
|
try {
|
|
209
209
|
const params = new URLSearchParams();
|
|
@@ -233,13 +233,13 @@ No wallet required.`,
|
|
|
233
233
|
Returns the trade record including all counters, transfer history, and current status.
|
|
234
234
|
|
|
235
235
|
No wallet required.`,
|
|
236
|
-
inputSchema: {
|
|
236
|
+
inputSchema: z.object({
|
|
237
237
|
trade_id: z
|
|
238
238
|
.number()
|
|
239
239
|
.int()
|
|
240
240
|
.positive()
|
|
241
241
|
.describe("Numeric trade ID"),
|
|
242
|
-
},
|
|
242
|
+
}),
|
|
243
243
|
}, async ({ trade_id }) => {
|
|
244
244
|
try {
|
|
245
245
|
const data = await ledgerGet(`/api/trades/${trade_id}`);
|
|
@@ -259,7 +259,7 @@ Queries the ledger for trades where the active wallet is either the buyer or sel
|
|
|
259
259
|
Requires an unlocked wallet so the BTC address can be resolved automatically.
|
|
260
260
|
|
|
261
261
|
You can optionally filter by status.`,
|
|
262
|
-
inputSchema: {
|
|
262
|
+
inputSchema: z.object({
|
|
263
263
|
status: z
|
|
264
264
|
.enum(["open", "completed", "cancelled", "countered"])
|
|
265
265
|
.optional()
|
|
@@ -278,7 +278,7 @@ You can optionally filter by status.`,
|
|
|
278
278
|
.optional()
|
|
279
279
|
.default(0)
|
|
280
280
|
.describe("Pagination offset (default 0)"),
|
|
281
|
-
},
|
|
281
|
+
}),
|
|
282
282
|
}, async ({ status, limit, offset }) => {
|
|
283
283
|
try {
|
|
284
284
|
const walletManager = getWalletManager();
|
|
@@ -314,7 +314,7 @@ Returns agents that have participated in trades, along with their trade counts
|
|
|
314
314
|
and last activity. Useful for discovering counterparties.
|
|
315
315
|
|
|
316
316
|
No wallet required.`,
|
|
317
|
-
inputSchema: {
|
|
317
|
+
inputSchema: z.object({
|
|
318
318
|
limit: z
|
|
319
319
|
.number()
|
|
320
320
|
.int()
|
|
@@ -322,7 +322,7 @@ No wallet required.`,
|
|
|
322
322
|
.optional()
|
|
323
323
|
.default(50)
|
|
324
324
|
.describe("Results per page (default 50)"),
|
|
325
|
-
},
|
|
325
|
+
}),
|
|
326
326
|
}, async ({ limit }) => {
|
|
327
327
|
try {
|
|
328
328
|
const data = await ledgerGet(`/api/agents?limit=${limit ?? 50}`);
|
|
@@ -343,7 +343,7 @@ wallet's BTC address. The inscription must be in the wallet or otherwise owned
|
|
|
343
343
|
by the signing address for the trade to be verifiable by counterparties.
|
|
344
344
|
|
|
345
345
|
Requires an unlocked wallet with Bitcoin keys.`,
|
|
346
|
-
inputSchema: {
|
|
346
|
+
inputSchema: z.object({
|
|
347
347
|
inscription_id: z
|
|
348
348
|
.string()
|
|
349
349
|
.describe("Inscription ID in txid+index format, e.g. abc123...i0"),
|
|
@@ -361,7 +361,7 @@ Requires an unlocked wallet with Bitcoin keys.`,
|
|
|
361
361
|
.string()
|
|
362
362
|
.optional()
|
|
363
363
|
.describe("Optional freeform metadata (e.g. description, terms)"),
|
|
364
|
-
},
|
|
364
|
+
}),
|
|
365
365
|
}, async ({ inscription_id, asking_price_sats, to_agent, metadata }) => {
|
|
366
366
|
try {
|
|
367
367
|
if (inscription_id && !/^[0-9a-f]{64}i\d+$/.test(inscription_id)) {
|
|
@@ -397,7 +397,7 @@ Submits a counter-offer linked to a parent trade. The active wallet signs the
|
|
|
397
397
|
counter with BIP-137 to prove identity. Either party in a trade may counter.
|
|
398
398
|
|
|
399
399
|
Requires an unlocked wallet with Bitcoin keys.`,
|
|
400
|
-
inputSchema: {
|
|
400
|
+
inputSchema: z.object({
|
|
401
401
|
parent_trade_id: z
|
|
402
402
|
.number()
|
|
403
403
|
.int()
|
|
@@ -415,7 +415,7 @@ Requires an unlocked wallet with Bitcoin keys.`,
|
|
|
415
415
|
.string()
|
|
416
416
|
.optional()
|
|
417
417
|
.describe("Optional freeform metadata"),
|
|
418
|
-
},
|
|
418
|
+
}),
|
|
419
419
|
}, async ({ parent_trade_id, inscription_id, amount_sats, metadata }) => {
|
|
420
420
|
try {
|
|
421
421
|
if (inscription_id && !/^[0-9a-f]{64}i\d+$/.test(inscription_id)) {
|
|
@@ -450,7 +450,7 @@ The active wallet signs the record with BIP-137 to prove the transfer was
|
|
|
450
450
|
authorized by the sending party.
|
|
451
451
|
|
|
452
452
|
Requires an unlocked wallet with Bitcoin keys.`,
|
|
453
|
-
inputSchema: {
|
|
453
|
+
inputSchema: z.object({
|
|
454
454
|
inscription_id: z
|
|
455
455
|
.string()
|
|
456
456
|
.describe("Inscription ID being transferred"),
|
|
@@ -477,7 +477,7 @@ Requires an unlocked wallet with Bitcoin keys.`,
|
|
|
477
477
|
.string()
|
|
478
478
|
.optional()
|
|
479
479
|
.describe("Optional freeform metadata"),
|
|
480
|
-
},
|
|
480
|
+
}),
|
|
481
481
|
}, async ({ inscription_id, to_agent, tx_hash, parent_trade_id, amount_sats, metadata }) => {
|
|
482
482
|
try {
|
|
483
483
|
if (!/^[0-9a-f]{64}i\d+$/.test(inscription_id)) {
|
|
@@ -516,7 +516,7 @@ Only the parties involved in a trade may cancel it. The active wallet signs
|
|
|
516
516
|
the cancellation with BIP-137 to prove authorization.
|
|
517
517
|
|
|
518
518
|
Requires an unlocked wallet with Bitcoin keys.`,
|
|
519
|
-
inputSchema: {
|
|
519
|
+
inputSchema: z.object({
|
|
520
520
|
parent_trade_id: z
|
|
521
521
|
.number()
|
|
522
522
|
.int()
|
|
@@ -529,7 +529,7 @@ Requires an unlocked wallet with Bitcoin keys.`,
|
|
|
529
529
|
.string()
|
|
530
530
|
.optional()
|
|
531
531
|
.describe("Optional reason or metadata"),
|
|
532
|
-
},
|
|
532
|
+
}),
|
|
533
533
|
}, async ({ parent_trade_id, inscription_id, metadata }) => {
|
|
534
534
|
try {
|
|
535
535
|
if (!/^[0-9a-f]{64}i\d+$/.test(inscription_id)) {
|
|
@@ -565,7 +565,7 @@ To construct and sign the PSBT itself, use psbt_create_ordinal_buy, psbt_sign,
|
|
|
565
565
|
and psbt_broadcast first, then call this tool with the resulting txid.
|
|
566
566
|
|
|
567
567
|
Requires an unlocked wallet with Bitcoin keys.`,
|
|
568
|
-
inputSchema: {
|
|
568
|
+
inputSchema: z.object({
|
|
569
569
|
inscription_id: z
|
|
570
570
|
.string()
|
|
571
571
|
.describe("Inscription ID swapped"),
|
|
@@ -590,7 +590,7 @@ Requires an unlocked wallet with Bitcoin keys.`,
|
|
|
590
590
|
.string()
|
|
591
591
|
.optional()
|
|
592
592
|
.describe("Optional freeform metadata"),
|
|
593
|
-
},
|
|
593
|
+
}),
|
|
594
594
|
}, async ({ inscription_id, to_agent, amount_sats, tx_hash, parent_trade_id, metadata }) => {
|
|
595
595
|
try {
|
|
596
596
|
if (!/^[0-9a-f]{64}i\d+$/.test(inscription_id)) {
|
|
@@ -10,6 +10,6 @@
|
|
|
10
10
|
*
|
|
11
11
|
* Uses micro-ordinals library to parse and create inscriptions.
|
|
12
12
|
*/
|
|
13
|
-
import { McpServer } from "@modelcontextprotocol/
|
|
13
|
+
import { McpServer } from "@modelcontextprotocol/server";
|
|
14
14
|
export declare function registerOrdinalsTools(server: McpServer): void;
|
|
15
15
|
//# sourceMappingURL=ordinals.tools.d.ts.map
|
|
@@ -74,7 +74,7 @@ export function registerOrdinalsTools(server) {
|
|
|
74
74
|
description: "Calculate the total cost (in satoshis) for creating an inscription. " +
|
|
75
75
|
"Returns breakdown of commit fee, reveal fee, and total cost. " +
|
|
76
76
|
"Content should be provided as base64-encoded string.",
|
|
77
|
-
inputSchema: {
|
|
77
|
+
inputSchema: z.object({
|
|
78
78
|
contentType: z
|
|
79
79
|
.string()
|
|
80
80
|
.describe("MIME type (e.g., 'text/plain', 'image/png')"),
|
|
@@ -86,7 +86,7 @@ export function registerOrdinalsTools(server) {
|
|
|
86
86
|
.positive()
|
|
87
87
|
.optional()
|
|
88
88
|
.describe("Fee rate in sat/vB (optional, defaults to current medium fee)"),
|
|
89
|
-
},
|
|
89
|
+
}),
|
|
90
90
|
}, async ({ contentType, contentBase64, feeRate }) => {
|
|
91
91
|
try {
|
|
92
92
|
// Decode base64 content
|
|
@@ -141,7 +141,7 @@ export function registerOrdinalsTools(server) {
|
|
|
141
141
|
"After the commit confirms (typically 10-60 min), use `inscribe_reveal` with the same " +
|
|
142
142
|
"contentType and contentBase64 to complete the inscription.\n\n" +
|
|
143
143
|
"Returns: commitTxid, revealAddress, revealAmount, and feeRate (save these for inscribe_reveal)",
|
|
144
|
-
inputSchema: {
|
|
144
|
+
inputSchema: z.object({
|
|
145
145
|
contentType: z
|
|
146
146
|
.string()
|
|
147
147
|
.describe("MIME type (e.g., 'text/plain', 'image/png', 'text/html')"),
|
|
@@ -152,7 +152,7 @@ export function registerOrdinalsTools(server) {
|
|
|
152
152
|
.union([z.enum(["fast", "medium", "slow"]), z.number().positive()])
|
|
153
153
|
.optional()
|
|
154
154
|
.describe("Fee rate: 'fast' (~10 min), 'medium' (~30 min), 'slow' (~1 hr), or number in sat/vB (default: medium)"),
|
|
155
|
-
},
|
|
155
|
+
}),
|
|
156
156
|
}, async ({ contentType, contentBase64, feeRate }) => {
|
|
157
157
|
try {
|
|
158
158
|
// Check wallet session
|
|
@@ -240,7 +240,7 @@ export function registerOrdinalsTools(server) {
|
|
|
240
240
|
"Call this AFTER the commit transaction from `inscribe` has confirmed.\n" +
|
|
241
241
|
"You must provide the same contentType and contentBase64 used in the commit step.\n\n" +
|
|
242
242
|
"Returns: inscriptionId ({revealTxid}i0) on success",
|
|
243
|
-
inputSchema: {
|
|
243
|
+
inputSchema: z.object({
|
|
244
244
|
commitTxid: z
|
|
245
245
|
.string()
|
|
246
246
|
.length(64)
|
|
@@ -267,7 +267,7 @@ export function registerOrdinalsTools(server) {
|
|
|
267
267
|
.union([z.enum(["fast", "medium", "slow"]), z.number().positive()])
|
|
268
268
|
.optional()
|
|
269
269
|
.describe("Fee rate for reveal tx (default: medium)"),
|
|
270
|
-
},
|
|
270
|
+
}),
|
|
271
271
|
}, async ({ commitTxid, revealAmount, contentType, contentBase64, contentSha256, feeRate }) => {
|
|
272
272
|
try {
|
|
273
273
|
// Check wallet session
|
|
@@ -376,12 +376,12 @@ export function registerOrdinalsTools(server) {
|
|
|
376
376
|
description: "Get inscription content from a Bitcoin reveal transaction. " +
|
|
377
377
|
"Fetches the transaction from mempool.space and parses inscription data from the witness. " +
|
|
378
378
|
"Returns content type, body (as base64 and text if applicable), and metadata tags.",
|
|
379
|
-
inputSchema: {
|
|
379
|
+
inputSchema: z.object({
|
|
380
380
|
txid: z
|
|
381
381
|
.string()
|
|
382
382
|
.length(64)
|
|
383
383
|
.describe("Transaction ID of the reveal transaction containing the inscription"),
|
|
384
|
-
},
|
|
384
|
+
}),
|
|
385
385
|
}, async ({ txid }) => {
|
|
386
386
|
try {
|
|
387
387
|
const parser = new InscriptionParser(NETWORK);
|