@aspect-warden/mcp-server 0.3.1 → 0.3.2
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 +140 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
# @aspect-warden/mcp-server
|
|
2
|
+
|
|
3
|
+
MCP (Model Context Protocol) server that gives AI agents policy-enforced wallet capabilities on Sepolia. Works with Claude Desktop, OpenClaw, and any MCP-compatible client.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @aspect-warden/mcp-server
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Or run directly:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npx @aspect-warden/mcp-server
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Setup with Claude Desktop
|
|
18
|
+
|
|
19
|
+
Add to your `claude_desktop_config.json`:
|
|
20
|
+
|
|
21
|
+
```json
|
|
22
|
+
{
|
|
23
|
+
"mcpServers": {
|
|
24
|
+
"warden": {
|
|
25
|
+
"command": "npx",
|
|
26
|
+
"args": ["@aspect-warden/mcp-server"],
|
|
27
|
+
"env": {
|
|
28
|
+
"RPC_URL": "https://eth-sepolia.g.alchemy.com/v2/YOUR_KEY",
|
|
29
|
+
"SEPOLIA_USDT_ADDRESS": "0x7169D38820dfd117C3FA1f22a697dBA58d90BA06"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Restart Claude Desktop. The agent now has access to all Warden wallet tools.
|
|
37
|
+
|
|
38
|
+
## Setup with OpenClaw
|
|
39
|
+
|
|
40
|
+
Add the same config to your OpenClaw MCP settings, or install the warden-wallet skill:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
npx skills add tetherto/wdk-agent-skills
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Environment Variables
|
|
47
|
+
|
|
48
|
+
| Variable | Required | Default | Description |
|
|
49
|
+
|----------|----------|---------|-------------|
|
|
50
|
+
| `RPC_URL` | No | `https://rpc.sepolia.org` | Sepolia RPC endpoint |
|
|
51
|
+
| `POLICY_DELEGATE_ADDRESS` | No | — | Deployed PolicyDelegate contract for EIP-7702 |
|
|
52
|
+
| `SEPOLIA_USDT_ADDRESS` | No | `0x7169...BA06` | USDT token address on Sepolia |
|
|
53
|
+
| `ERC8004_IDENTITY_REGISTRY` | No | — | ERC-8004 identity registry address |
|
|
54
|
+
|
|
55
|
+
## MCP Tools
|
|
56
|
+
|
|
57
|
+
Once connected, the agent can call these tools:
|
|
58
|
+
|
|
59
|
+
### Wallet Management
|
|
60
|
+
|
|
61
|
+
| Tool | Description |
|
|
62
|
+
|------|-------------|
|
|
63
|
+
| `warden_create_wallet` | Create a new agent wallet with policy enforcement |
|
|
64
|
+
| `warden_get_balance` | Check ETH and token balances |
|
|
65
|
+
| `warden_transfer` | Send ERC-20 tokens (validated against policy) |
|
|
66
|
+
| `warden_get_audit_log` | Fetch transaction decision history |
|
|
67
|
+
|
|
68
|
+
### Policy Management
|
|
69
|
+
|
|
70
|
+
| Tool | Description |
|
|
71
|
+
|------|-------------|
|
|
72
|
+
| `warden_setup_policy` | Configure spending policy from natural language |
|
|
73
|
+
| `warden_get_policy_status` | View current spending status and limits |
|
|
74
|
+
| `warden_update_policy` | Modify policy at runtime |
|
|
75
|
+
|
|
76
|
+
### On-Chain Enforcement (EIP-7702)
|
|
77
|
+
|
|
78
|
+
| Tool | Description |
|
|
79
|
+
|------|-------------|
|
|
80
|
+
| `warden_delegate_to_policy` | Delegate EOA to PolicyDelegate contract |
|
|
81
|
+
| `warden_create_session_key` | Create scoped sub-agent permissions |
|
|
82
|
+
| `warden_revoke_session_key` | Revoke sub-agent access |
|
|
83
|
+
|
|
84
|
+
### Safety Controls
|
|
85
|
+
|
|
86
|
+
| Tool | Description |
|
|
87
|
+
|------|-------------|
|
|
88
|
+
| `warden_freeze` | Emergency halt all operations |
|
|
89
|
+
| `warden_unfreeze` | Resume after freeze |
|
|
90
|
+
| `warden_register_identity` | Register agent on ERC-8004 identity registry |
|
|
91
|
+
|
|
92
|
+
### Permissions (ERC-7715)
|
|
93
|
+
|
|
94
|
+
| Tool | Description |
|
|
95
|
+
|------|-------------|
|
|
96
|
+
| `warden_grant_permissions` | Grant permissions to an agent |
|
|
97
|
+
| `warden_revoke_permissions` | Revoke agent permissions |
|
|
98
|
+
| `warden_get_permissions` | View agent permission grants |
|
|
99
|
+
|
|
100
|
+
## Example Conversation
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
User: Create a conservative wallet. Max $50/day, USDT only.
|
|
104
|
+
|
|
105
|
+
Agent: [calls warden_create_wallet with maxPerTx=10, dailyLimit=50]
|
|
106
|
+
Created wallet 0xABC...123 with conservative policy.
|
|
107
|
+
- Max per transaction: 10 USDT
|
|
108
|
+
- Daily limit: 50 USDT
|
|
109
|
+
- Anomaly detection: enabled
|
|
110
|
+
|
|
111
|
+
User: Send 5 USDT to 0xDEF...456
|
|
112
|
+
|
|
113
|
+
Agent: [calls warden_transfer with amount=5, recipient=0xDEF...456]
|
|
114
|
+
Transfer approved and sent.
|
|
115
|
+
- Risk score: 12/100
|
|
116
|
+
- Daily remaining: 45 USDT
|
|
117
|
+
- Tx hash: 0x789...
|
|
118
|
+
|
|
119
|
+
User: Send 200 USDT to 0xDEF...456
|
|
120
|
+
|
|
121
|
+
Agent: [calls warden_transfer — PolicyEngine blocks it]
|
|
122
|
+
Transfer blocked: exceeds daily limit of 50 USDT.
|
|
123
|
+
Current daily spend: 5 USDT.
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Architecture
|
|
127
|
+
|
|
128
|
+
```
|
|
129
|
+
AI Agent (Claude / OpenClaw)
|
|
130
|
+
↓ MCP Protocol (stdio)
|
|
131
|
+
@aspect-warden/mcp-server
|
|
132
|
+
↓ evaluates every tx
|
|
133
|
+
@aspect-warden/policy-engine (19 rules + anomaly detection)
|
|
134
|
+
↓ on-chain enforcement
|
|
135
|
+
PolicyDelegate.sol (EIP-7702 / Sepolia)
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## License
|
|
139
|
+
|
|
140
|
+
MIT
|