@agent-pay/mcp 2.0.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 +91 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +689 -0
- package/dist/cli.js.map +1 -0
- package/dist/gateway-client.d.ts +26 -0
- package/dist/gateway-client.js +91 -0
- package/dist/gateway-client.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +54 -0
- package/dist/index.js.map +1 -0
- package/dist/tools/check-deployment.d.ts +3 -0
- package/dist/tools/check-deployment.js +73 -0
- package/dist/tools/check-deployment.js.map +1 -0
- package/dist/tools/get-compute-quote.d.ts +4 -0
- package/dist/tools/get-compute-quote.js +90 -0
- package/dist/tools/get-compute-quote.js.map +1 -0
- package/dist/tools/list-deployments.d.ts +3 -0
- package/dist/tools/list-deployments.js +65 -0
- package/dist/tools/list-deployments.js.map +1 -0
- package/dist/tools/provision-compute.d.ts +4 -0
- package/dist/tools/provision-compute.js +251 -0
- package/dist/tools/provision-compute.js.map +1 -0
- package/dist/tools/stop-deployment.d.ts +3 -0
- package/dist/tools/stop-deployment.js +42 -0
- package/dist/tools/stop-deployment.js.map +1 -0
- package/dist/types.d.ts +227 -0
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -0
- package/dist/wallet.d.ts +27 -0
- package/dist/wallet.js +119 -0
- package/dist/wallet.js.map +1 -0
- package/package.json +51 -0
package/README.md
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# agent-pay
|
|
2
|
+
|
|
3
|
+
MCP server that lets AI agents provision and pay for cloud compute on [Akash Network](https://akash.network) using USDC.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g agent-pay
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Or from source:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
git clone https://github.com/maimond123/verifiable-agents.git
|
|
15
|
+
cd verifiable-agents/agent-pay
|
|
16
|
+
npm install && npm run build
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Configure
|
|
20
|
+
|
|
21
|
+
Add to your Claude Code project settings (`.claude/settings.local.json`):
|
|
22
|
+
|
|
23
|
+
```json
|
|
24
|
+
{
|
|
25
|
+
"mcpServers": {
|
|
26
|
+
"agent-pay": {
|
|
27
|
+
"command": "npx",
|
|
28
|
+
"args": ["agent-pay"],
|
|
29
|
+
"env": {
|
|
30
|
+
"AGENT_PAY_GATEWAY_URL": "https://your-gateway-url.com",
|
|
31
|
+
"AGENT_PAY_GATEWAY_API_KEY": "your-api-key",
|
|
32
|
+
"AGENT_PAY_WALLET_KEY": "your-hex-private-key",
|
|
33
|
+
"AGENT_PAY_NETWORK": "base-sepolia"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Or for Claude Desktop (`claude_desktop_config.json`):
|
|
41
|
+
|
|
42
|
+
```json
|
|
43
|
+
{
|
|
44
|
+
"mcpServers": {
|
|
45
|
+
"agent-pay": {
|
|
46
|
+
"command": "npx",
|
|
47
|
+
"args": ["agent-pay"],
|
|
48
|
+
"env": {
|
|
49
|
+
"AGENT_PAY_GATEWAY_URL": "https://your-gateway-url.com",
|
|
50
|
+
"AGENT_PAY_GATEWAY_API_KEY": "your-api-key",
|
|
51
|
+
"AGENT_PAY_WALLET_KEY": "your-hex-private-key",
|
|
52
|
+
"AGENT_PAY_NETWORK": "base-sepolia"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Environment Variables
|
|
60
|
+
|
|
61
|
+
| Variable | Required | Default | Description |
|
|
62
|
+
|---|---|---|---|
|
|
63
|
+
| `AGENT_PAY_GATEWAY_URL` | Yes | `http://localhost:3000` | URL of the x402-akash-gateway |
|
|
64
|
+
| `AGENT_PAY_GATEWAY_API_KEY` | Yes | — | API key for gateway authentication |
|
|
65
|
+
| `AGENT_PAY_WALLET_KEY` | No | — | Hex private key for USDC payments. Omit for simulated mode. |
|
|
66
|
+
| `AGENT_PAY_NETWORK` | No | `base` | `base-sepolia` (testnet) or `base` (mainnet) |
|
|
67
|
+
|
|
68
|
+
## Wallet Setup
|
|
69
|
+
|
|
70
|
+
The wallet specified by `AGENT_PAY_WALLET_KEY` needs:
|
|
71
|
+
|
|
72
|
+
- **USDC** on the chosen network (to pay for compute)
|
|
73
|
+
- **ETH** on the chosen network (to pay gas for the ERC-20 transfer)
|
|
74
|
+
|
|
75
|
+
USDC contract addresses:
|
|
76
|
+
- Base Sepolia: `0x036CbD53842c5426634e7929541eC2318f3dCF7e`
|
|
77
|
+
- Base Mainnet: `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`
|
|
78
|
+
|
|
79
|
+
## Tools
|
|
80
|
+
|
|
81
|
+
| Tool | Description |
|
|
82
|
+
|---|---|
|
|
83
|
+
| `provision_compute` | Analyze task, get quotes, pay with USDC, deploy on Akash |
|
|
84
|
+
| `get_compute_quote` | Get pricing from multiple providers (shows wallet balance) |
|
|
85
|
+
| `check_deployment` | Check status of a deployment |
|
|
86
|
+
| `list_deployments` | List all deployments |
|
|
87
|
+
| `stop_deployment` | Stop a running deployment |
|
|
88
|
+
|
|
89
|
+
## License
|
|
90
|
+
|
|
91
|
+
MIT
|
package/dist/cli.d.ts
ADDED