@agentbodega/mcp 0.1.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 ADDED
@@ -0,0 +1,55 @@
1
+ # AgentBodega MCP
2
+
3
+ Free MCP discovery surface for [AgentBodega](https://agentbodega.store).
4
+
5
+ This server does not proxy paid calls. It helps agents search the live catalog,
6
+ inspect input/output contracts, and generate x402 HTTP call snippets. Paid
7
+ execution stays on AgentBodega's HTTP endpoints so x402 settlement and receipts
8
+ remain auditable.
9
+
10
+ ## Install
11
+
12
+ ```bash
13
+ npx @agentbodega/mcp
14
+ ```
15
+
16
+ Optional environment:
17
+
18
+ ```bash
19
+ AGENTBODEGA_BASE_URL=https://agentbodega.store
20
+ ```
21
+
22
+ ## Claude Desktop
23
+
24
+ ```json
25
+ {
26
+ "mcpServers": {
27
+ "agentbodega": {
28
+ "command": "npx",
29
+ "args": ["-y", "@agentbodega/mcp"]
30
+ }
31
+ }
32
+ }
33
+ ```
34
+
35
+ ## Tools
36
+
37
+ - `agentbodega_search_catalog` - search, filter, and summarize live offerings.
38
+ - `agentbodega_get_endpoint` - return full metadata for one endpoint.
39
+ - `agentbodega_call_snippet` - generate curl/JavaScript snippets and payment notes.
40
+ - `agentbodega_payment_guide` - explain x402 payment and blockchain-only balance policy.
41
+
42
+ ## Resources
43
+
44
+ - `agentbodega://catalog` - compact live catalog.
45
+ - `agentbodega://x402` - live x402 discovery document.
46
+ - `agentbodega://openapi` - live OpenAPI document.
47
+
48
+ ## Development
49
+
50
+ ```bash
51
+ npm install
52
+ npm test
53
+ ```
54
+
55
+ From the AgentBodega monorepo root, use `npm run mcp:test`.
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
package/dist/index.js ADDED
@@ -0,0 +1,288 @@
1
+ #!/usr/bin/env node
2
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
3
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
4
+ import { z } from "zod/v4";
5
+ const VERSION = "0.1.0";
6
+ const DEFAULT_BASE_URL = "https://agentbodega.store";
7
+ function baseUrl() {
8
+ const raw = process.env.AGENTBODEGA_BASE_URL || DEFAULT_BASE_URL;
9
+ try {
10
+ const parsed = new URL(raw);
11
+ parsed.pathname = parsed.pathname.replace(/\/+$/, "");
12
+ parsed.search = "";
13
+ parsed.hash = "";
14
+ return parsed.toString().replace(/\/$/, "");
15
+ }
16
+ catch {
17
+ return DEFAULT_BASE_URL;
18
+ }
19
+ }
20
+ async function fetchJson(path) {
21
+ const url = path.startsWith("http") ? path : `${baseUrl()}${path}`;
22
+ const response = await fetch(url, {
23
+ headers: {
24
+ accept: "application/json",
25
+ "user-agent": `agentbodega-mcp/${VERSION}`
26
+ }
27
+ });
28
+ if (!response.ok) {
29
+ throw new Error(`AgentBodega request failed: ${response.status} ${response.statusText} for ${url}`);
30
+ }
31
+ return (await response.json());
32
+ }
33
+ async function directory() {
34
+ const json = await fetchJson("/api/directory");
35
+ return { ...json, endpoints: Array.isArray(json.endpoints) ? json.endpoints : [] };
36
+ }
37
+ function endpointText(endpoint) {
38
+ return [
39
+ endpoint.key,
40
+ endpoint.title,
41
+ endpoint.description,
42
+ endpoint.longDescription,
43
+ endpoint.category,
44
+ endpoint.department,
45
+ endpoint.kind,
46
+ endpoint.url,
47
+ ...(endpoint.tags || [])
48
+ ]
49
+ .filter(Boolean)
50
+ .join(" ")
51
+ .toLowerCase();
52
+ }
53
+ function matches(endpoint, query, department, maxPriceUsd) {
54
+ if (query && !endpointText(endpoint).includes(query.toLowerCase()))
55
+ return false;
56
+ if (department) {
57
+ const category = String(endpoint.category || endpoint.department || "").toLowerCase();
58
+ const tags = (endpoint.tags || []).map((tag) => tag.toLowerCase());
59
+ if (category !== department.toLowerCase() && !tags.includes(department.toLowerCase()))
60
+ return false;
61
+ }
62
+ if (typeof maxPriceUsd === "number") {
63
+ const amount = Number(endpoint.price?.amount ?? "0");
64
+ if (Number.isFinite(amount) && amount > maxPriceUsd)
65
+ return false;
66
+ }
67
+ return true;
68
+ }
69
+ function compactEndpoint(endpoint) {
70
+ return {
71
+ key: endpoint.key,
72
+ title: endpoint.title,
73
+ method: endpoint.method,
74
+ url: endpoint.url,
75
+ price: endpoint.price,
76
+ balanceModel: endpoint.balanceModel,
77
+ category: endpoint.category || endpoint.department,
78
+ tags: endpoint.tags || [],
79
+ description: endpoint.description,
80
+ requiredInputs: Array.isArray(endpoint.inputContract?.required) ? endpoint.inputContract.required : undefined,
81
+ exampleRequest: endpoint.exampleRequest
82
+ };
83
+ }
84
+ function findEndpoint(endpoints, identifier) {
85
+ const needle = identifier.trim().toLowerCase();
86
+ return endpoints.find((endpoint) => {
87
+ const candidates = [
88
+ endpoint.key,
89
+ endpoint.title,
90
+ endpoint.url,
91
+ endpoint.url ? new URL(endpoint.url).pathname : undefined
92
+ ]
93
+ .filter(Boolean)
94
+ .map((value) => String(value).toLowerCase());
95
+ return candidates.includes(needle) || candidates.some((value) => value.endsWith(needle));
96
+ });
97
+ }
98
+ function jsonText(value) {
99
+ return JSON.stringify(value, null, 2);
100
+ }
101
+ function toolJson(value) {
102
+ return {
103
+ content: [
104
+ {
105
+ type: "text",
106
+ text: jsonText(value)
107
+ }
108
+ ]
109
+ };
110
+ }
111
+ function shellSingleQuote(value) {
112
+ return `'${value.replace(/'/g, "'\\''")}'`;
113
+ }
114
+ function snippets(endpoint) {
115
+ const method = endpoint.method || "POST";
116
+ const body = endpoint.exampleRequest ?? {};
117
+ const bodyJson = jsonText(body);
118
+ const curl = `curl -sS -X ${method} ${shellSingleQuote(String(endpoint.url || ""))} \\\n` +
119
+ " -H 'content-type: application/json' \\\n" +
120
+ " -H 'X-PAYMENT: <base64url x402 payment payload>' \\\n" +
121
+ ` -d ${shellSingleQuote(bodyJson)}`;
122
+ const javascript = `const response = await fetch(${JSON.stringify(endpoint.url)}, {
123
+ method: ${JSON.stringify(method)},
124
+ headers: {
125
+ "content-type": "application/json",
126
+ "x-payment": "<base64url x402 payment payload>"
127
+ },
128
+ body: JSON.stringify(${bodyJson})
129
+ });
130
+ const data = await response.json();`;
131
+ return {
132
+ endpoint: compactEndpoint(endpoint),
133
+ payment: {
134
+ mode: "x402",
135
+ balanceModel: endpoint.balanceModel || { mode: "per_call_x402", sourceOfTruth: "blockchain_settlement" },
136
+ note: "Fetch the live 402 challenge from this endpoint before paying. Verify price, network, asset, and payTo in the challenge."
137
+ },
138
+ curl,
139
+ javascript
140
+ };
141
+ }
142
+ const server = new McpServer({ name: "agentbodega-mcp", version: VERSION }, {
143
+ instructions: "Use this server to discover AgentBodega offerings, inspect accepted inputs and examples, and generate HTTP/x402 call snippets. Do not use it to execute paid calls directly."
144
+ });
145
+ server.registerResource("agentbodega_catalog", "agentbodega://catalog", {
146
+ title: "AgentBodega Catalog",
147
+ description: "Compact live AgentBodega endpoint catalog.",
148
+ mimeType: "application/json"
149
+ }, async (uri) => {
150
+ const current = await directory();
151
+ return {
152
+ contents: [
153
+ {
154
+ uri: uri.href,
155
+ mimeType: "application/json",
156
+ text: jsonText({
157
+ name: current.name,
158
+ description: current.description,
159
+ endpoints: (current.endpoints || []).map(compactEndpoint)
160
+ })
161
+ }
162
+ ]
163
+ };
164
+ });
165
+ server.registerResource("agentbodega_x402", "agentbodega://x402", {
166
+ title: "AgentBodega x402 Discovery",
167
+ description: "Live /.well-known/x402 document.",
168
+ mimeType: "application/json"
169
+ }, async (uri) => {
170
+ const current = await fetchJson("/.well-known/x402");
171
+ return { contents: [{ uri: uri.href, mimeType: "application/json", text: jsonText(current) }] };
172
+ });
173
+ server.registerResource("agentbodega_openapi", "agentbodega://openapi", {
174
+ title: "AgentBodega OpenAPI",
175
+ description: "Live OpenAPI document for AgentBodega HTTP endpoints.",
176
+ mimeType: "application/json"
177
+ }, async (uri) => {
178
+ const current = await fetchJson("/openapi.json");
179
+ return { contents: [{ uri: uri.href, mimeType: "application/json", text: jsonText(current) }] };
180
+ });
181
+ server.registerTool("agentbodega_search_catalog", {
182
+ title: "Search AgentBodega Catalog",
183
+ description: "Search and filter AgentBodega offerings without spending money.",
184
+ inputSchema: {
185
+ query: z.string().default("").describe("Text to search across names, descriptions, tags, and URLs."),
186
+ department: z.string().default("").describe("Optional category/tag filter such as public-data, cloud-status, x402-tools, or billing."),
187
+ maxPriceUsd: z.number().min(0).optional().describe("Optional maximum USD price."),
188
+ limit: z.number().int().min(1).max(50).default(10)
189
+ }
190
+ }, async ({ query, department, maxPriceUsd, limit }) => {
191
+ const current = await directory();
192
+ const endpoints = (current.endpoints || [])
193
+ .filter((endpoint) => matches(endpoint, query, department, maxPriceUsd))
194
+ .slice(0, limit)
195
+ .map(compactEndpoint);
196
+ return toolJson({
197
+ service: current.name || "AgentBodega",
198
+ baseUrl: baseUrl(),
199
+ count: endpoints.length,
200
+ endpoints
201
+ });
202
+ });
203
+ server.registerTool("agentbodega_get_endpoint", {
204
+ title: "Get AgentBodega Endpoint",
205
+ description: "Return complete metadata, accepted inputs, examples, and output shape for one endpoint.",
206
+ inputSchema: {
207
+ endpoint: z.string().min(1).describe("Endpoint key, title, path, or full URL."),
208
+ includeSchemas: z.boolean().default(true)
209
+ }
210
+ }, async ({ endpoint, includeSchemas }) => {
211
+ const current = await directory();
212
+ const found = findEndpoint(current.endpoints || [], endpoint);
213
+ if (!found) {
214
+ return toolJson({
215
+ error: "endpoint_not_found",
216
+ endpoint,
217
+ hint: "Use agentbodega_search_catalog first, then pass the endpoint key or path here."
218
+ });
219
+ }
220
+ const response = includeSchemas ? found : compactEndpoint(found);
221
+ return toolJson(response);
222
+ });
223
+ server.registerTool("agentbodega_call_snippet", {
224
+ title: "Generate AgentBodega Call Snippet",
225
+ description: "Generate curl and JavaScript snippets for an AgentBodega endpoint without executing the paid call.",
226
+ inputSchema: {
227
+ endpoint: z.string().min(1).describe("Endpoint key, title, path, or full URL.")
228
+ }
229
+ }, async ({ endpoint }) => {
230
+ const current = await directory();
231
+ const found = findEndpoint(current.endpoints || [], endpoint);
232
+ if (!found) {
233
+ return toolJson({ error: "endpoint_not_found", endpoint });
234
+ }
235
+ return toolJson(snippets(found));
236
+ });
237
+ server.registerTool("agentbodega_payment_guide", {
238
+ title: "AgentBodega Payment Guide",
239
+ description: "Explain x402 payment and the blockchain-only balance policy.",
240
+ inputSchema: {
241
+ includeCurl: z.boolean().default(true)
242
+ }
243
+ }, async ({ includeCurl }) => {
244
+ const origin = baseUrl();
245
+ return toolJson({
246
+ mode: "per_call_x402",
247
+ sourceOfTruth: "blockchain_settlement",
248
+ policy: "AgentBodega does not advertise off-chain stored-value balances. Reusable balances require an on-chain USDC escrow or allowance contract where deposits and debits are verifiable on-chain.",
249
+ endpoints: {
250
+ discovery: `${origin}/.well-known/x402`,
251
+ openapi: `${origin}/openapi.json`,
252
+ directory: `${origin}/api/directory`
253
+ },
254
+ settlementRule: "Each paid call should use the live 402 challenge and settle the required USDC amount through x402 before fulfillment is accepted.",
255
+ curl: includeCurl
256
+ ? {
257
+ challenge: `curl -i -X POST ${origin}/api/status/github -H 'content-type: application/json' -d '{}'`
258
+ }
259
+ : undefined
260
+ });
261
+ });
262
+ server.registerPrompt("agentbodega_start", {
263
+ title: "Start With AgentBodega",
264
+ description: "A prompt for agents that need to find an AgentBodega resource and prepare a paid HTTP call.",
265
+ argsSchema: {
266
+ task: z.string().default("Find the right AgentBodega endpoint for my task.")
267
+ }
268
+ }, ({ task }) => ({
269
+ messages: [
270
+ {
271
+ role: "user",
272
+ content: {
273
+ type: "text",
274
+ text: `Task: ${task}\n\n` +
275
+ "Use agentbodega_search_catalog to find candidate endpoints. Use agentbodega_get_endpoint to inspect required inputs and examples. " +
276
+ "Use agentbodega_call_snippet to produce the HTTP request. Do not execute paid calls through MCP; ask the user to confirm the live x402 challenge first."
277
+ }
278
+ }
279
+ ]
280
+ }));
281
+ async function main() {
282
+ await server.connect(new StdioServerTransport());
283
+ }
284
+ main().catch((error) => {
285
+ console.error(error instanceof Error ? error.stack || error.message : String(error));
286
+ process.exit(1);
287
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,CACH,CAAC;AAEF,KAAK,UAAU,IAAI;IACjB,MAAM,MAAM,CAAC,OAAO,CAAC,IAAI,oBAAoB,EAAE,CAAC,CAAC;AACnD,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,OAAO,CAAC,KAAK,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IACrF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
package/package.json ADDED
@@ -0,0 +1,48 @@
1
+ {
2
+ "name": "@agentbodega/mcp",
3
+ "version": "0.1.0",
4
+ "description": "Free MCP discovery surface for AgentBodega paid HTTP/x402 resources.",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "homepage": "https://agentbodega.store",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/agentbodegastore/agentbodega.git",
11
+ "directory": "packages/agentbodega-mcp"
12
+ },
13
+ "bugs": {
14
+ "url": "https://github.com/agentbodegastore/agentbodega/issues"
15
+ },
16
+ "keywords": [
17
+ "mcp",
18
+ "model-context-protocol",
19
+ "x402",
20
+ "agentbodega",
21
+ "agent-tools",
22
+ "public-data",
23
+ "status"
24
+ ],
25
+ "bin": {
26
+ "agentbodega-mcp": "dist/index.js"
27
+ },
28
+ "files": [
29
+ "dist",
30
+ "README.md",
31
+ "server.json"
32
+ ],
33
+ "scripts": {
34
+ "build": "tsc -p tsconfig.json",
35
+ "test": "npm run build && node --test test/*.test.mjs"
36
+ },
37
+ "dependencies": {
38
+ "@modelcontextprotocol/sdk": "^1.29.0",
39
+ "zod": "^4.1.0"
40
+ },
41
+ "devDependencies": {
42
+ "@types/node": "^24.0.10",
43
+ "typescript": "^5.8.3"
44
+ },
45
+ "engines": {
46
+ "node": ">=20"
47
+ }
48
+ }
package/server.json ADDED
@@ -0,0 +1,34 @@
1
+ {
2
+ "$schema": "https://static.modelcontextprotocol.io/schemas/2025-09-29/server.schema.json",
3
+ "name": "io.github.agentbodegastore.agentbodega-mcp",
4
+ "description": "Free MCP discovery surface for AgentBodega paid HTTP/x402 resources.",
5
+ "status": "active",
6
+ "repository": {
7
+ "url": "https://github.com/agentbodegastore/agentbodega",
8
+ "source": "github",
9
+ "id": "agentbodegastore/agentbodega",
10
+ "subfolder": "packages/agentbodega-mcp"
11
+ },
12
+ "version": "0.1.0",
13
+ "packages": [
14
+ {
15
+ "registry_type": "npm",
16
+ "registry_base_url": "https://registry.npmjs.org",
17
+ "identifier": "@agentbodega/mcp",
18
+ "version": "0.1.0",
19
+ "transport": {
20
+ "type": "stdio"
21
+ },
22
+ "runtime_hint": "npx",
23
+ "package_arguments": [],
24
+ "environment_variables": [
25
+ {
26
+ "name": "AGENTBODEGA_BASE_URL",
27
+ "description": "Optional AgentBodega service URL. Defaults to https://agentbodega.store.",
28
+ "is_required": false,
29
+ "is_secret": false
30
+ }
31
+ ]
32
+ }
33
+ ]
34
+ }