mcp-server-agentpay 1.0.2 → 1.0.3

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 CHANGED
@@ -14,6 +14,23 @@ claude mcp add agentpay -- npx mcp-server-agentpay
14
14
  export AGENTPAY_GATEWAY_KEY="apg_your_key_here"
15
15
  ```
16
16
 
17
+ Or add to `~/.claude/settings.json`:
18
+
19
+ ```json
20
+ {
21
+ "mcpServers": {
22
+ "agentpay": {
23
+ "command": "npx",
24
+ "args": ["-y", "mcp-server-agentpay"],
25
+ "env": {
26
+ "AGENTPAY_GATEWAY_KEY": "apg_your_key_here",
27
+ "AGENTPAY_URL": "https://agentpay.metaltorque.dev"
28
+ }
29
+ }
30
+ }
31
+ }
32
+ ```
33
+
17
34
  ## Get a Gateway Key
18
35
 
19
36
  ```bash
@@ -24,22 +41,42 @@ curl -X POST https://agentpay.metaltorque.dev/gateway/register \
24
41
 
25
42
  You get $1 in free credits to start.
26
43
 
27
- ## Tools
44
+ ## Tools (9 total)
28
45
 
29
46
  | Tool | Description |
30
47
  |------|-------------|
48
+ | `discover_tools` | Search tools by keyword |
31
49
  | `list_tools` | List all available tools with pricing |
32
- | `discover_tools` | Search tools by keyword/capability |
33
- | `call_tool` | Call any tool method (auto-provisions, metered) |
34
50
  | `check_balance` | Check wallet balance and provisioned tools |
51
+ | `call_tool` | Call any tool method (metered, auto-provisions) |
35
52
  | `provision_tool` | Pre-provision access to a tool |
36
53
  | `get_usage` | View recent call history and costs |
37
- | `fund_wallet` | Get Stripe checkout URL to add credits |
54
+ | `fund_wallet_stripe` | Get Stripe checkout URL for credits |
55
+ | `fund_wallet_x402` | Get x402 crypto funding info |
56
+ | `x402_info` | View x402 payment options and setup |
57
+
58
+ ## Funding Methods
59
+
60
+ ### Stripe (human-in-the-loop)
61
+ Use `fund_wallet_stripe` — returns a checkout URL for a human to complete.
62
+
63
+ ### x402 USDC (fully autonomous)
64
+ Use `fund_wallet_x402` — returns endpoint, network, and instructions for autonomous USDC payments via the x402 protocol. No human needed.
65
+
66
+ ## Credit Packages
67
+
68
+ | Package | Price | Credits |
69
+ |---------|-------|---------|
70
+ | micro | $10 | 10 |
71
+ | small | $45 | 50 |
72
+ | medium | $80 | 100 |
73
+ | large | $350 | 500 |
74
+ | whale | $600 | 1,000 |
38
75
 
39
76
  ## How It Works
40
77
 
41
78
  1. **Register** — create a wallet, get a gateway key
42
- 2. **Fund** — add credits via Stripe ($10–$600 packages)
79
+ 2. **Fund** — add credits via Stripe or x402 USDC
43
80
  3. **Discover** — agent searches for tools by capability
44
81
  4. **Call** — agent calls any tool, gateway handles auth + billing
45
82
 
@@ -58,3 +95,9 @@ The agent never needs to know about individual tool APIs, accounts, or payment.
58
95
  - **IndexForge SEO** — submit URLs to Google/Bing, scan sitemaps, check index status
59
96
 
60
97
  More tools added regularly. Tool providers can register at the gateway.
98
+
99
+ ## Links
100
+
101
+ - [GitHub](https://github.com/joepangallo/agent-pay)
102
+ - [API Docs](https://agentpay.metaltorque.dev/docs)
103
+ - [MCP Registry](https://registry.modelcontextprotocol.io) — `io.github.joepangallo/agent-pay`
package/index.js CHANGED
@@ -5,6 +5,7 @@ const { StdioServerTransport } = require("@modelcontextprotocol/sdk/server/stdio
5
5
  const { z } = require("zod");
6
6
  const https = require("https");
7
7
  const http = require("http");
8
+ const { version } = require("./package.json");
8
9
 
9
10
  // ── Config ──────────────────────────────────────────────────────────
10
11
 
@@ -21,7 +22,7 @@ function request(method, urlPath, body, timeout = 120_000) {
21
22
 
22
23
  const headers = {
23
24
  "Content-Type": "application/json",
24
- "User-Agent": "mcp-server-agentpay/1.0.0",
25
+ "User-Agent": `mcp-server-agentpay/${version}`,
25
26
  };
26
27
  if (GATEWAY_KEY) headers["X-Gateway-Key"] = GATEWAY_KEY;
27
28
 
@@ -66,7 +67,7 @@ function noKeyError() {
66
67
 
67
68
  const server = new McpServer({
68
69
  name: "agentpay",
69
- version: "1.0.0",
70
+ version,
70
71
  });
71
72
 
72
73
  // ── Tool: discover_tools ────────────────────────────────────────────
@@ -83,7 +84,7 @@ server.tool(
83
84
  if (result.count === 0) {
84
85
  return { content: [{ type: "text", text: `No tools found for "${query}". Try: security, seo, indexing, vulnerability, audit` }] };
85
86
  }
86
- return { content: [{ type: "text", text: JSON.stringify(result.tools, null, 2) }] };
87
+ return { content: [{ type: "text", text: JSON.stringify(result.tools ?? [], null, 2) }] };
87
88
  } catch (e) {
88
89
  return { content: [{ type: "text", text: `Error: ${e.message}` }] };
89
90
  }
@@ -99,7 +100,7 @@ server.tool(
99
100
  async () => {
100
101
  try {
101
102
  const result = await request("GET", "/gateway/tools");
102
- return { content: [{ type: "text", text: JSON.stringify(result.tools, null, 2) }] };
103
+ return { content: [{ type: "text", text: JSON.stringify(result.tools ?? [], null, 2) }] };
103
104
  } catch (e) {
104
105
  return { content: [{ type: "text", text: `Error: ${e.message}` }] };
105
106
  }
@@ -182,7 +183,7 @@ server.tool(
182
183
  if (!GATEWAY_KEY) return noKeyError();
183
184
  try {
184
185
  const result = await request("GET", `/gateway/usage?limit=${limit}`);
185
- return { content: [{ type: "text", text: JSON.stringify(result.usage, null, 2) }] };
186
+ return { content: [{ type: "text", text: JSON.stringify(result.usage ?? [], null, 2) }] };
186
187
  } catch (e) {
187
188
  return { content: [{ type: "text", text: `Error: ${e.message}` }] };
188
189
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-server-agentpay",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "mcpName": "io.github.joepangallo/agent-pay",
5
5
  "description": "MCP server for AgentPay — the payment gateway for autonomous AI agents. Lets agents discover, provision, and pay for MCP tool APIs with a single gateway key.",
6
6
  "bin": {
@@ -51,6 +51,8 @@
51
51
  },
52
52
  "files": [
53
53
  "index.js",
54
- "README.md"
54
+ "README.md",
55
+ "server.json",
56
+ "package.json"
55
57
  ]
56
58
  }
package/server.json ADDED
@@ -0,0 +1,36 @@
1
+ {
2
+ "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
+ "name": "io.github.joepangallo/agent-pay",
4
+ "description": "Payment gateway for AI agents. Tool discovery, provisioning, and pay-per-call metering.",
5
+ "repository": {
6
+ "url": "https://github.com/joepangallo/agent-pay",
7
+ "source": "github"
8
+ },
9
+ "version": "1.0.3",
10
+ "packages": [
11
+ {
12
+ "registryType": "npm",
13
+ "identifier": "mcp-server-agentpay",
14
+ "version": "1.0.3",
15
+ "transport": {
16
+ "type": "stdio"
17
+ },
18
+ "environmentVariables": [
19
+ {
20
+ "description": "Your AgentPay gateway key (starts with apg_)",
21
+ "isRequired": true,
22
+ "format": "string",
23
+ "isSecret": true,
24
+ "name": "AGENTPAY_GATEWAY_KEY"
25
+ },
26
+ {
27
+ "description": "AgentPay API URL",
28
+ "isRequired": false,
29
+ "format": "string",
30
+ "isSecret": false,
31
+ "name": "AGENTPAY_URL"
32
+ }
33
+ ]
34
+ }
35
+ ]
36
+ }