agentic-payments 0.1.0 → 0.1.1
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 +11 -11
- package/bin/cli.js +38 -12
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -53,10 +53,10 @@ npm install agentic-payments
|
|
|
53
53
|
|
|
54
54
|
```bash
|
|
55
55
|
# Run stdio transport (local - for Claude Desktop, Cline)
|
|
56
|
-
npx agentic-payments
|
|
56
|
+
npx -y agentic-payments mcp
|
|
57
57
|
|
|
58
58
|
# Run HTTP transport (remote - for web integrations)
|
|
59
|
-
npx agentic-payments
|
|
59
|
+
npx -y agentic-payments mcp --transport http --port 3000
|
|
60
60
|
```
|
|
61
61
|
|
|
62
62
|
## 🚀 Quick Start
|
|
@@ -108,7 +108,7 @@ The `agentic-payments` MCP server supports two transport modes:
|
|
|
108
108
|
**Stdio Transport** (recommended for local development):
|
|
109
109
|
```bash
|
|
110
110
|
# Start the server in stdio mode (default)
|
|
111
|
-
npx agentic-payments
|
|
111
|
+
npx -y agentic-payments mcp
|
|
112
112
|
|
|
113
113
|
# The server is now listening on stdin/stdout
|
|
114
114
|
# Perfect for Claude Desktop, Cline, and other local integrations
|
|
@@ -117,7 +117,7 @@ npx agentic-payments-mcp
|
|
|
117
117
|
**HTTP/SSE Transport** (for remote or web-based integrations):
|
|
118
118
|
```bash
|
|
119
119
|
# Start the HTTP server on port 3000
|
|
120
|
-
npx agentic-payments
|
|
120
|
+
npx -y agentic-payments mcp --transport http --port 3000
|
|
121
121
|
|
|
122
122
|
# Server endpoints:
|
|
123
123
|
# - http://localhost:3000/health (health check)
|
|
@@ -135,7 +135,7 @@ curl http://localhost:3000/health
|
|
|
135
135
|
# {
|
|
136
136
|
# "status": "healthy",
|
|
137
137
|
# "version": "0.1.0",
|
|
138
|
-
# "server": "agentic-payments
|
|
138
|
+
# "server": "agentic-payments", "mcp",
|
|
139
139
|
# "transport": "http/sse",
|
|
140
140
|
# "activeSessions": 0
|
|
141
141
|
# }
|
|
@@ -155,7 +155,7 @@ curl http://localhost:3000/health
|
|
|
155
155
|
"mcpServers": {
|
|
156
156
|
"agentic-payments": {
|
|
157
157
|
"command": "npx",
|
|
158
|
-
"args": ["agentic-payments
|
|
158
|
+
"args": ["-y", "agentic-payments", "mcp"]
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
161
|
}
|
|
@@ -166,7 +166,7 @@ curl http://localhost:3000/health
|
|
|
166
166
|
**Claude Code** (local integration via stdio):
|
|
167
167
|
```bash
|
|
168
168
|
# Add the MCP server to Claude Code
|
|
169
|
-
claude mcp add agentic-payments npx agentic-payments
|
|
169
|
+
claude mcp add agentic-payments npx -y agentic-payments mcp
|
|
170
170
|
|
|
171
171
|
# Verify it's connected
|
|
172
172
|
claude mcp list
|
|
@@ -182,7 +182,7 @@ claude mcp list
|
|
|
182
182
|
{
|
|
183
183
|
"agentic-payments": {
|
|
184
184
|
"command": "npx",
|
|
185
|
-
"args": ["agentic-payments
|
|
185
|
+
"args": ["-y", "agentic-payments", "mcp"]
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
188
|
```
|
|
@@ -360,7 +360,7 @@ Result:
|
|
|
360
360
|
**Test stdio integration**:
|
|
361
361
|
```bash
|
|
362
362
|
# Test that AI can access the tools
|
|
363
|
-
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | npx agentic-payments
|
|
363
|
+
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | npx -y agentic-payments mcp
|
|
364
364
|
```
|
|
365
365
|
|
|
366
366
|
**Test HTTP integration**:
|
|
@@ -399,10 +399,10 @@ curl http://localhost:3000/sessions
|
|
|
399
399
|
lsof -i :3000
|
|
400
400
|
|
|
401
401
|
# Kill existing process
|
|
402
|
-
pkill -f "agentic-payments
|
|
402
|
+
pkill -f "agentic-payments", "mcp"
|
|
403
403
|
|
|
404
404
|
# Try again
|
|
405
|
-
npx agentic-payments
|
|
405
|
+
npx -y agentic-payments mcp --transport http --port 3000
|
|
406
406
|
```
|
|
407
407
|
|
|
408
408
|
**AI can't see the tools**:
|
package/bin/cli.js
CHANGED
|
@@ -2,17 +2,43 @@
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Agentic Payments CLI
|
|
5
|
-
* Command-line interface for AP2 and
|
|
5
|
+
* Command-line interface for AP2, ACP, and MCP operations
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
console.
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
8
|
+
const args = process.argv.slice(2);
|
|
9
|
+
const command = args[0];
|
|
10
|
+
|
|
11
|
+
if (command === 'mcp') {
|
|
12
|
+
// Remove 'mcp' from args and delegate to MCP server
|
|
13
|
+
process.argv.splice(2, 1);
|
|
14
|
+
import('../dist/mcp/index.js').catch(err => {
|
|
15
|
+
console.error('Failed to start MCP server:', err);
|
|
16
|
+
process.exit(1);
|
|
17
|
+
});
|
|
18
|
+
} else {
|
|
19
|
+
// Show help
|
|
20
|
+
console.log('Agentic Payments CLI v0.1.0');
|
|
21
|
+
console.log('Multi-agent payment authorization for autonomous AI commerce');
|
|
22
|
+
console.log('');
|
|
23
|
+
console.log('Usage: agentic-payments <command> [options]');
|
|
24
|
+
console.log('');
|
|
25
|
+
console.log('Commands:');
|
|
26
|
+
console.log(' mcp Start MCP server (stdio or HTTP transport)');
|
|
27
|
+
console.log(' active-mandate Manage Active Mandates (create, sign, verify, revoke)');
|
|
28
|
+
console.log(' generate Generate Ed25519 agent identity');
|
|
29
|
+
console.log(' verify Verify payment with multi-agent consensus');
|
|
30
|
+
console.log(' system System status and diagnostics');
|
|
31
|
+
console.log('');
|
|
32
|
+
console.log('MCP Server:');
|
|
33
|
+
console.log(' agentic-payments mcp # Start stdio transport');
|
|
34
|
+
console.log(' agentic-payments mcp --transport http # Start HTTP/SSE server');
|
|
35
|
+
console.log('');
|
|
36
|
+
console.log('Examples:');
|
|
37
|
+
console.log(' agentic-payments mcp --transport http --port 3000');
|
|
38
|
+
console.log(' agentic-payments active-mandate create --agent bot@ai --holder user@example.com');
|
|
39
|
+
console.log(' agentic-payments generate --format json');
|
|
40
|
+
console.log('');
|
|
41
|
+
console.log('Documentation: https://github.com/agentic-catalog/agentic-payments');
|
|
42
|
+
console.log('');
|
|
43
|
+
console.log('Run: agentic-payments <command> --help for more information');
|
|
44
|
+
}
|