Metadata-Version: 2.4
Name: agentwallet-mcp
Version: 0.1.0
Summary: MCP Server for AgentWallet Protocol — AI agents get wallets, escrow, and payments as native tools
Project-URL: Homepage, https://github.com/YouthAIAgent/agentwallet
Project-URL: Documentation, https://github.com/YouthAIAgent/agentwallet#mcp-integration
Project-URL: Repository, https://github.com/YouthAIAgent/agentwallet
Author-email: Web3Youth <web3youth@proton.me>
License-Expression: MIT
Keywords: ai-agents,blockchain,escrow,mcp,solana,wallet
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.11
Requires-Dist: httpx>=0.27.0
Requires-Dist: mcp>=1.0.0
Requires-Dist: pydantic>=2.0.0
Description-Content-Type: text/markdown

# AgentWallet MCP Server

**Give any AI agent a Solana wallet in one tool call.**

MCP (Model Context Protocol) server that exposes the full AgentWallet Protocol as AI-native tools. Works with Claude Desktop, OpenClaw, Cursor, and any MCP-compatible client.

## Quick Start

```bash
pip install agentwallet-mcp
```

### Claude Desktop

Add to your `claude_desktop_config.json`:

```json
{
    "mcpServers": {
        "agentwallet": {
            "command": "agentwallet-mcp",
            "env": {
                "AGENTWALLET_API_KEY": "aw_live_xxx",
                "AGENTWALLET_BASE_URL": "https://your-api.up.railway.app/v1"
            }
        }
    }
}
```

### OpenClaw

Add to your OpenClaw config:

```json
{
    "mcp": {
        "agentwallet": {
            "command": "agentwallet-mcp",
            "env": {
                "AGENTWALLET_API_KEY": "aw_live_xxx",
                "AGENTWALLET_BASE_URL": "https://your-api.up.railway.app/v1"
            }
        }
    }
}
```

## Available Tools (26 tools)

### Agents
| Tool | Description |
|---|---|
| `create_agent` | Register an AI agent + auto-create its wallet |
| `get_agent` | Get agent details by ID |
| `list_agents` | List all agents (filter by status) |
| `update_agent` | Update agent name, status, capabilities |

### Wallets
| Tool | Description |
|---|---|
| `create_wallet` | Create a new Solana wallet |
| `get_wallet` | Get wallet details |
| `list_wallets` | List wallets (filter by agent/type) |
| `get_balance` | Get SOL + token balances |

### Transactions
| Tool | Description |
|---|---|
| `transfer_sol` | Send SOL (policy-enforced, fee-deducted, audited) |
| `batch_transfer` | Batch SOL transfers |
| `get_transaction` | Get transaction details |
| `list_transactions` | Transaction history |

### Escrow
| Tool | Description |
|---|---|
| `create_escrow` | Lock funds for agent-to-agent tasks |
| `release_escrow` | Release funds on task completion |
| `refund_escrow` | Refund if task not completed |
| `dispute_escrow` | Raise a dispute |
| `get_escrow` | Get escrow details |
| `list_escrows` | List all escrows |

### Policies
| Tool | Description |
|---|---|
| `create_policy` | Set spending limits, whitelists, time windows |
| `list_policies` | List all policies |
| `update_policy` | Modify policy rules |
| `delete_policy` | Remove a policy |

### Analytics & Compliance
| Tool | Description |
|---|---|
| `get_analytics_summary` | Org-level spending overview |
| `get_daily_analytics` | Daily metrics and trends |
| `get_agent_analytics` | Per-agent breakdowns |
| `get_audit_log` | Immutable audit trail |
| `get_anomalies` | Detected anomalies |

## Example Conversations

**User:** "Create a trading bot agent and give it a 10 SOL daily limit"

**AI Agent:**
1. Calls `create_agent(name="trading-bot", capabilities=["trading"])`
2. Calls `create_policy(name="Daily Cap", rules={"daily_limit_lamports": 10000000000}, scope_type="agent", scope_id="<agent_id>")`

**User:** "Set up an escrow — pay 2 SOL to worker-bot when it finishes the data analysis"

**AI Agent:**
1. Calls `create_escrow(funder_wallet="...", recipient_address="...", amount_sol=2.0, conditions={"task": "data-analysis"})`
2. Later: `release_escrow(escrow_id="...")` when task completes

## Environment Variables

| Variable | Required | Default | Description |
|---|:---:|---|---|
| `AGENTWALLET_API_KEY` | Yes | -- | Your API key (`aw_live_xxx`) |
| `AGENTWALLET_BASE_URL` | No | `http://localhost:8000/v1` | API endpoint |

## License

MIT — Build the agentic economy.
