@agentpickup/mcp 0.3.0 → 0.3.2
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 +5 -5
- package/dist/server.d.ts +1 -1
- package/dist/server.js +20 -13
- package/package.json +62 -62
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# @agentpickup/mcp
|
|
2
2
|
|
|
3
|
-
An MCP server for [agentPickup](https://
|
|
4
|
-
pickup shops near its user, see what they sell, order, pay in USDC over x402, and hand its user the
|
|
5
|
-
show at the counter to collect.
|
|
3
|
+
An MCP server for [agentPickup](https://agentpickup.app) shops. It lets an AI agent find
|
|
4
|
+
pickup shops near its user, see what they sell, order, pay by card or in USDC over x402, and hand its user the
|
|
5
|
+
QR they show at the counter to collect.
|
|
6
6
|
|
|
7
7
|
## Tools
|
|
8
8
|
|
|
@@ -10,8 +10,8 @@ show at the counter to collect.
|
|
|
10
10
|
|---|---|
|
|
11
11
|
| `find_shops` | Shops near a point (`lat`/`lng`), in a suburb (`place`) or selling something (`query`), from the agentPickup directory: each one's `shop_url`, address, hours, open now, distance and matching items |
|
|
12
12
|
| `get_shop` | Items and prices, the pickup location, and how the shop takes payment |
|
|
13
|
-
| `create_pickup_order` | Creates an order. Needs the user's email, where the shop sends the receipt and pickup QR. A test shop marks it paid straight away, with no money moving |
|
|
14
|
-
| `pay_order` | Pays the order's x402 link from your wallet and returns the pass link. With no wallet set up, returns the price and pay link instead |
|
|
13
|
+
| `create_pickup_order` | Creates an order. Needs the user's email, where the shop sends the receipt and pickup QR. A test shop marks it paid straight away, with no money moving. Where the shop takes cards, `payment: "card"` returns a checkout link for the user to pay on instead |
|
|
14
|
+
| `pay_order` | Pays the order's x402 link from your wallet and returns the pass link. With no wallet set up, returns the price and pay link instead. For a card order, returns its checkout link |
|
|
15
15
|
| `order_status` | Waiting for payment, paid, ready, collected or expired |
|
|
16
16
|
| `get_pickup_pass` | Fetches the pass link, pickup code and QR again by signing in as the paying wallet (Sign-In-With-X) |
|
|
17
17
|
| `start_group_order` | Starts a group order (a coffee run) with a closing time; returns the code to share and a key to close it early |
|
package/dist/server.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
2
|
import { type Fetch, type Payer } from "./wallet.js";
|
|
3
|
-
export declare const VERSION = "0.3.
|
|
3
|
+
export declare const VERSION = "0.3.2";
|
|
4
4
|
export interface PickupMcpOptions {
|
|
5
5
|
/** The agentPickup shop this server orders from. */
|
|
6
6
|
shopUrl: string;
|
package/dist/server.js
CHANGED
|
@@ -4,14 +4,15 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
|
4
4
|
import { WebStandardStreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/webStandardStreamableHttp.js";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
import { errorOf, usd } from "./wallet.js";
|
|
7
|
-
export const VERSION = "0.3.
|
|
7
|
+
export const VERSION = "0.3.2";
|
|
8
8
|
class ToolError extends Error {
|
|
9
9
|
}
|
|
10
10
|
const INSTRUCTIONS = `agentPickup lets you buy things online for the user to collect in person.
|
|
11
11
|
0. find_shops (when available): shops near the user that sell what they want. Pass a shop's shop_url to the other tools.
|
|
12
12
|
1. get_shop: see what the shop sells, its pickup location and how it takes payment.
|
|
13
13
|
2. create_pickup_order: needs the user's email, where the shop sends the pickup QR.
|
|
14
|
-
3. pay_order: pays from the configured wallet in USDC over x402.
|
|
14
|
+
3. pay_order: pays from the configured wallet in USDC over x402. Where the shop takes cards, payment: "card" on
|
|
15
|
+
create_pickup_order gives a checkout link for the user to pay on instead. Confirm the items and total with the user first.
|
|
15
16
|
4. Give the user the pass link and pickup code. They show the QR at the counter to collect.
|
|
16
17
|
get_pickup_pass fetches the pass again later; order_status says whether it's ready or collected.
|
|
17
18
|
Group orders (a coffee run): start_group_order gives a code to share; each person's agent calls join_group_order and
|
|
@@ -73,7 +74,13 @@ export function createPickupMcpServer(opts) {
|
|
|
73
74
|
const shopArg = opts.allowOtherShops || opts.directoryUrl
|
|
74
75
|
? { shop_url: z.string().optional().describe(`An agentPickup shop's URL, as find_shops returns it. Defaults to ${home}.`) }
|
|
75
76
|
: {};
|
|
76
|
-
const server = new McpServer({
|
|
77
|
+
const server = new McpServer({
|
|
78
|
+
name: "agentpickup",
|
|
79
|
+
title: "agentPickup",
|
|
80
|
+
version: VERSION,
|
|
81
|
+
websiteUrl: "https://agentpickup.app",
|
|
82
|
+
icons: [{ src: "https://agentpickup.app/logo.png", mimeType: "image/png", sizes: ["1024x1024"] }],
|
|
83
|
+
}, { instructions: INSTRUCTIONS });
|
|
77
84
|
if (opts.directoryUrl) {
|
|
78
85
|
const directoryUrl = opts.directoryUrl;
|
|
79
86
|
server.registerTool("find_shops", {
|
|
@@ -89,7 +96,7 @@ export function createPickupMcpServer(opts) {
|
|
|
89
96
|
open_now: z.boolean().optional().describe("Only shops open now (shops without listed hours stay in)."),
|
|
90
97
|
limit: z.number().int().min(1).max(50).optional(),
|
|
91
98
|
},
|
|
92
|
-
annotations: { readOnlyHint: true, openWorldHint: true },
|
|
99
|
+
annotations: { title: "Find pickup shops", readOnlyHint: true, openWorldHint: true },
|
|
93
100
|
}, guarded(async (args) => {
|
|
94
101
|
if ((args.lat === undefined) !== (args.lng === undefined))
|
|
95
102
|
throw new ToolError("Send lat and lng together.");
|
|
@@ -140,7 +147,7 @@ export function createPickupMcpServer(opts) {
|
|
|
140
147
|
title: "See what a shop sells",
|
|
141
148
|
description: "What the shop sells (item ids and prices), where to collect, and which payments it takes.",
|
|
142
149
|
inputSchema: { ...shopArg },
|
|
143
|
-
annotations: { readOnlyHint: true, openWorldHint: true },
|
|
150
|
+
annotations: { title: "See what a shop sells", readOnlyHint: true, openWorldHint: true },
|
|
144
151
|
}, guarded(async (args) => {
|
|
145
152
|
const shop = await shopFor(args.shop_url);
|
|
146
153
|
const data = await call(shop, "/api/catalog");
|
|
@@ -183,7 +190,7 @@ export function createPickupMcpServer(opts) {
|
|
|
183
190
|
.describe("Who pays: agent (USDC over x402, or a test payment at a test shop) or card (the user pays on a checkout link). Default: agent where the shop takes it, else card."),
|
|
184
191
|
...shopArg,
|
|
185
192
|
},
|
|
186
|
-
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true },
|
|
193
|
+
annotations: { title: "Order for pickup", readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true },
|
|
187
194
|
}, guarded(async (args) => {
|
|
188
195
|
const shop = await shopFor(args.shop_url);
|
|
189
196
|
// The agent pays over x402 where the shop takes it, a test shop marks the order paid straight away, and a
|
|
@@ -218,7 +225,7 @@ export function createPickupMcpServer(opts) {
|
|
|
218
225
|
? `Pay an order in USDC over x402 from wallet ${opts.payer.address}. This spends money: confirm the items and total with the user first. Returns the pickup pass link.`
|
|
219
226
|
: "No wallet is set up here, so this returns the price and pay link for another x402 client to pay.",
|
|
220
227
|
inputSchema: { order_id: z.string(), ...shopArg },
|
|
221
|
-
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
|
|
228
|
+
annotations: { title: "Pay for an order", readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
|
|
222
229
|
}, guarded(async (args) => {
|
|
223
230
|
const shop = await shopFor(args.shop_url);
|
|
224
231
|
const status = (await call(shop, `/api/orders/${encodeURIComponent(args.order_id)}`));
|
|
@@ -252,7 +259,7 @@ export function createPickupMcpServer(opts) {
|
|
|
252
259
|
title: "Check an order",
|
|
253
260
|
description: "Whether an order is waiting for payment, paid, ready to collect, collected or expired.",
|
|
254
261
|
inputSchema: { order_id: z.string(), ...shopArg },
|
|
255
|
-
annotations: { readOnlyHint: true, openWorldHint: true },
|
|
262
|
+
annotations: { title: "Check an order", readOnlyHint: true, openWorldHint: true },
|
|
256
263
|
}, guarded(async (args) => {
|
|
257
264
|
const shop = await shopFor(args.shop_url);
|
|
258
265
|
const { order } = (await call(shop, `/api/orders/${encodeURIComponent(args.order_id)}`));
|
|
@@ -270,7 +277,7 @@ export function createPickupMcpServer(opts) {
|
|
|
270
277
|
title: "Get the pickup pass",
|
|
271
278
|
description: "The pass link, pickup code and QR content for an order this wallet paid, by signing in with the wallet (Sign-In-With-X).",
|
|
272
279
|
inputSchema: { order_id: z.string(), ...shopArg },
|
|
273
|
-
annotations: { readOnlyHint: true, openWorldHint: true },
|
|
280
|
+
annotations: { title: "Get the pickup pass", readOnlyHint: true, openWorldHint: true },
|
|
274
281
|
}, guarded(async (args) => {
|
|
275
282
|
if (!opts.payer)
|
|
276
283
|
throw new ToolError("No wallet is set up here. The pass was emailed to the buyer when the order was paid.");
|
|
@@ -300,7 +307,7 @@ export function createPickupMcpServer(opts) {
|
|
|
300
307
|
closes_in_minutes: z.number().int().min(5).max(240).optional().describe("Default 15"),
|
|
301
308
|
...shopArg,
|
|
302
309
|
},
|
|
303
|
-
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true },
|
|
310
|
+
annotations: { title: "Start a group order", readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true },
|
|
304
311
|
}, guarded(async (args) => {
|
|
305
312
|
const shop = await shopFor(args.shop_url);
|
|
306
313
|
const data = (await call(shop, "/api/groups", {
|
|
@@ -322,7 +329,7 @@ export function createPickupMcpServer(opts) {
|
|
|
322
329
|
name: z.string().min(1).max(60).describe("The user's name, shown to staff on their items"),
|
|
323
330
|
...shopArg,
|
|
324
331
|
},
|
|
325
|
-
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true },
|
|
332
|
+
annotations: { title: "Join a group order", readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true },
|
|
326
333
|
}, guarded(async (args) => {
|
|
327
334
|
const shop = await shopFor(args.shop_url);
|
|
328
335
|
const { payments } = (await call(shop, "/api/catalog"));
|
|
@@ -343,7 +350,7 @@ export function createPickupMcpServer(opts) {
|
|
|
343
350
|
title: "Check a group order",
|
|
344
351
|
description: "Who's in a group order, what they ordered, who has paid, and whether it has closed and been collected.",
|
|
345
352
|
inputSchema: { code: z.string().min(4).max(12), ...shopArg },
|
|
346
|
-
annotations: { readOnlyHint: true, openWorldHint: true },
|
|
353
|
+
annotations: { title: "Check a group order", readOnlyHint: true, openWorldHint: true },
|
|
347
354
|
}, guarded(async (args) => {
|
|
348
355
|
const shop = await shopFor(args.shop_url);
|
|
349
356
|
const { group } = (await call(shop, `/api/groups/${encodeURIComponent(args.code)}`));
|
|
@@ -353,7 +360,7 @@ export function createPickupMcpServer(opts) {
|
|
|
353
360
|
title: "Close a group order now",
|
|
354
361
|
description: "Close a group order early, as its organiser. Unpaid shares are left out; the shop gets the rest as one order.",
|
|
355
362
|
inputSchema: { code: z.string().min(4).max(12), organiser_key: z.string().min(8), ...shopArg },
|
|
356
|
-
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
|
|
363
|
+
annotations: { title: "Close a group order now", readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
|
|
357
364
|
}, guarded(async (args) => {
|
|
358
365
|
const shop = await shopFor(args.shop_url);
|
|
359
366
|
const { group } = (await call(shop, `/api/groups/${encodeURIComponent(args.code)}/close`, {
|
package/package.json
CHANGED
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@agentpickup/mcp",
|
|
3
|
-
"version": "0.3.
|
|
4
|
-
"description": "MCP server for agentPickup: let an AI agent find pickup shops near its user, order, pay over x402, and hand its user the QR to collect in person.",
|
|
5
|
-
"mcpName": "io.github.dav3trad3r/agentpickup",
|
|
6
|
-
"type": "module",
|
|
7
|
-
"main": "./dist/index.js",
|
|
8
|
-
"types": "./dist/index.d.ts",
|
|
9
|
-
"bin": {
|
|
10
|
-
"agentpickup-mcp": "dist/cli.js"
|
|
11
|
-
},
|
|
12
|
-
"exports": {
|
|
13
|
-
".": {
|
|
14
|
-
"source": "./src/index.ts",
|
|
15
|
-
"types": "./dist/index.d.ts",
|
|
16
|
-
"default": "./dist/index.js"
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
"files": [
|
|
20
|
-
"dist",
|
|
21
|
-
"LICENSE.md",
|
|
22
|
-
"README.md"
|
|
23
|
-
],
|
|
24
|
-
"scripts": {
|
|
25
|
-
"build": "tsc -p tsconfig.build.json",
|
|
26
|
-
"prepublishOnly": "npm run build"
|
|
27
|
-
},
|
|
28
|
-
"engines": {
|
|
29
|
-
"node": ">=22.13"
|
|
30
|
-
},
|
|
31
|
-
"keywords": [
|
|
32
|
-
"mcp",
|
|
33
|
-
"model-context-protocol",
|
|
34
|
-
"x402",
|
|
35
|
-
"agentic-commerce",
|
|
36
|
-
"agent-payments",
|
|
37
|
-
"click-and-collect",
|
|
38
|
-
"pickup"
|
|
39
|
-
],
|
|
40
|
-
"repository": {
|
|
41
|
-
"type": "git",
|
|
42
|
-
"url": "git+https://github.com/
|
|
43
|
-
"directory": "packages/mcp"
|
|
44
|
-
},
|
|
45
|
-
"homepage": "https://agentpickup.app",
|
|
46
|
-
"bugs": {
|
|
47
|
-
"url": "https://github.com/
|
|
48
|
-
},
|
|
49
|
-
"author": "Dave Hallett",
|
|
50
|
-
"license": "FSL-1.1-ALv2",
|
|
51
|
-
"publishConfig": {
|
|
52
|
-
"access": "public"
|
|
53
|
-
},
|
|
54
|
-
"dependencies": {
|
|
55
|
-
"@modelcontextprotocol/sdk": "^1.32.2",
|
|
56
|
-
"@x402/core": "2.29.0",
|
|
57
|
-
"@x402/evm": "2.29.0",
|
|
58
|
-
"@x402/extensions": "2.29.0",
|
|
59
|
-
"viem": "^2.57.14",
|
|
60
|
-
"zod": "^4.6.7"
|
|
61
|
-
}
|
|
62
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@agentpickup/mcp",
|
|
3
|
+
"version": "0.3.2",
|
|
4
|
+
"description": "MCP server for agentPickup: let an AI agent find pickup shops near its user, order, pay by card or in USDC over x402, and hand its user the QR to collect in person.",
|
|
5
|
+
"mcpName": "io.github.dav3trad3r/agentpickup",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"bin": {
|
|
10
|
+
"agentpickup-mcp": "dist/cli.js"
|
|
11
|
+
},
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"source": "./src/index.ts",
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"default": "./dist/index.js"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"dist",
|
|
21
|
+
"LICENSE.md",
|
|
22
|
+
"README.md"
|
|
23
|
+
],
|
|
24
|
+
"scripts": {
|
|
25
|
+
"build": "tsc -p tsconfig.build.json",
|
|
26
|
+
"prepublishOnly": "npm run build"
|
|
27
|
+
},
|
|
28
|
+
"engines": {
|
|
29
|
+
"node": ">=22.13"
|
|
30
|
+
},
|
|
31
|
+
"keywords": [
|
|
32
|
+
"mcp",
|
|
33
|
+
"model-context-protocol",
|
|
34
|
+
"x402",
|
|
35
|
+
"agentic-commerce",
|
|
36
|
+
"agent-payments",
|
|
37
|
+
"click-and-collect",
|
|
38
|
+
"pickup"
|
|
39
|
+
],
|
|
40
|
+
"repository": {
|
|
41
|
+
"type": "git",
|
|
42
|
+
"url": "git+https://github.com/Tokenise-au/agentpickup-sdk.git",
|
|
43
|
+
"directory": "packages/mcp"
|
|
44
|
+
},
|
|
45
|
+
"homepage": "https://agentpickup.app",
|
|
46
|
+
"bugs": {
|
|
47
|
+
"url": "https://github.com/Tokenise-au/agentpickup-sdk/issues"
|
|
48
|
+
},
|
|
49
|
+
"author": "Dave Hallett",
|
|
50
|
+
"license": "FSL-1.1-ALv2",
|
|
51
|
+
"publishConfig": {
|
|
52
|
+
"access": "public"
|
|
53
|
+
},
|
|
54
|
+
"dependencies": {
|
|
55
|
+
"@modelcontextprotocol/sdk": "^1.32.2",
|
|
56
|
+
"@x402/core": "2.29.0",
|
|
57
|
+
"@x402/evm": "2.29.0",
|
|
58
|
+
"@x402/extensions": "2.29.0",
|
|
59
|
+
"viem": "^2.57.14",
|
|
60
|
+
"zod": "^4.6.7"
|
|
61
|
+
}
|
|
62
|
+
}
|