@goodagent/mcp-server 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,93 @@
1
+ # @goodagent/mcp-server
2
+
3
+ A [Model Context Protocol](https://modelcontextprotocol.io) server that lets any
4
+ MCP-compatible agent runtime (Claude Desktop, Cursor, custom frameworks)
5
+ **verify a GoodDollar Agent ID** and read basic GoodDollar state on Celo.
6
+
7
+ All tools are **read-only** — the server never holds keys, signs, or broadcasts
8
+ transactions. Agent verification re-reads the GoodDollar whitelist **live** on
9
+ Celo, so a credential auto-invalidates if the human's verification lapses.
10
+
11
+ ## Use it (no install)
12
+
13
+ Point your MCP client at the published binary via `npx`:
14
+
15
+ ```json
16
+ {
17
+ "mcpServers": {
18
+ "gooddollar": {
19
+ "command": "npx",
20
+ "args": ["-y", "@goodagent/mcp-server"],
21
+ "env": {
22
+ "CELO_RPC_URL": "https://forno.celo.org",
23
+ "GOODDOLLAR_ENV": "production"
24
+ }
25
+ }
26
+ }
27
+ }
28
+ ```
29
+
30
+ Transport is **stdio** — the client spawns the server as a subprocess.
31
+
32
+ ## Tools
33
+
34
+ | Tool | Purpose | Input |
35
+ |------|---------|-------|
36
+ | `gooddollar_verify_agent` | Confirm an AI agent is vouched for by a real, currently-verified GoodDollar human | `{ credential }` (full signed wire-form credential) |
37
+ | `gooddollar_verify_status` | Is a wallet a verified (whitelisted) GoodDollar identity? Returns root + expiry | `{ wallet }` |
38
+ | `gooddollar_get_balance` | G$ token balance (raw + formatted) | `{ wallet }` |
39
+ | `gooddollar_claim_eligibility` | Can a wallet claim its daily UBI now, and how much? | `{ wallet }` |
40
+ | `gooddollar_get_daily_stats` | GoodDollar UBI cycle stats for the current day | `{}` |
41
+ | `gooddollar_ping` | MCP + Celo RPC connectivity check | `{}` |
42
+
43
+ ### `gooddollar_verify_agent`
44
+
45
+ The standalone server is stateless, so pass the full credential to verify:
46
+
47
+ ```json
48
+ {
49
+ "credential": {
50
+ "fields": { "agent": "0x...", "operator": "0x...", "humanRoot": "0x...", "nonce": "0", "issuedAt": "...", "expiresAt": "..." },
51
+ "signature": "0x...",
52
+ "chainId": 42220,
53
+ "verifyingContract": "0x..."
54
+ }
55
+ }
56
+ ```
57
+
58
+ Returns:
59
+
60
+ ```json
61
+ { "found": true, "valid": true, "agent": "0x...", "operator": "0x...", "humanRoot": "0x...", "expiresAt": "1735689600", "reason": null }
62
+ ```
63
+
64
+ `valid` is true only if the signature recovers to `operator`, the credential is
65
+ not expired, and the operator is **still** a whitelisted GoodDollar identity.
66
+
67
+ > Looking up a stored credential by agent address (without holding the
68
+ > credential) is served by the hosted REST API:
69
+ > `GET https://gcopilot-api.geinz.lol/agent/verify/:address`.
70
+
71
+ ## Verify in code instead
72
+
73
+ The same verification is available directly via the SDK
74
+ [`@goodagent/agent-id`](https://www.npmjs.com/package/@goodagent/agent-id):
75
+
76
+ ```ts
77
+ import { verifyAgentId, liveHumanRootLookup } from "@goodagent/agent-id";
78
+
79
+ const { valid, operator } = await verifyAgentId(credential, {
80
+ humanRootLookup: liveHumanRootLookup,
81
+ });
82
+ ```
83
+
84
+ ## Configuration
85
+
86
+ | Env var | Default | Purpose |
87
+ |---------|---------|---------|
88
+ | `CELO_RPC_URL` | `https://forno.celo.org` | Celo JSON-RPC endpoint |
89
+ | `GOODDOLLAR_ENV` | `production` | GoodDollar contracts environment |
90
+
91
+ ## License
92
+
93
+ MIT
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}