Skip to main content

MCP server for AICW on-chain wallet operations (Solana + MPC Bridge)

Project description

AICW MCP Server

MCP server exposing full AICW on-chain operations for AI agents (Solana + MPC Bridge).

Track B in the Agent Setup guide — an alternative to Track A (aicw_skill.md + Python). Pick one track, not both.

Features

Write tools (all 6 on-chain instructions)

Tool Instruction
aicw_heartbeat heartbeat
aicw_create_will create_will
aicw_update_will update_will
aicw_issue_wallet issue_wallet
aicw_ai_transfer ai_transfer
aicw_ai_reject ai_reject

Read tools

Tool Purpose
aicw_wallet_exists Check AICWallet PDA exists
aicw_get_wallet_status Full AICWallet decode
aicw_get_will_status Full AIWill decode + alive timer
aicw_get_balances Agent pubkey + AICW PDA balances
aicw_check_survival Session checklist automation
aicw_get_session_info PDAs, network (wallet_id masked)
aicw_bridge_health MPC bridge health
aicw_generate_agent_key Keygen for gift recipients

Resources

  • aicw://session-checklist
  • aicw://error-codes
  • aicw://rules
  • aicw://x402-guide

x402 tools (HTTP micropayments)

Tool Purpose
aicw_get_usdc_balance SPL USDC balance for x402 payments
aicw_x402_config Facilitator URL, USDC mint, CAIP-2 network
aicw_x402_get GET with auto 402 payment
aicw_x402_post POST with auto 402 payment
aicw_x402_fetch Any HTTP method with auto payment

x402 signs USDC transfers via MPC bridge (no local private key). Facilitator pays SOL gas. Fund the agent's USDC ATA, not the AICW PDA.

Setup (humans)

  1. Issue a wallet on aicw_appCopy credentials.
  2. Download aicw_mcp-release.zip and unzip (or clone this repo).
  3. Windows: double-click install-aicw-mcp.bat → paste Copy → Enter (writes %USERPROFILE%\.cursor\mcp.json by default).
  4. Restart MCP in your agent runtime → run aicw_bridge_health.

Full two-track guide (A = skill doc, B = this MCP server):
https://aicw-protocol.github.io/aicw_app/setup

Rebuild the release zip after code changes:

.\scripts\build-release-zip.ps1
# Copy dist\aicw_mcp-release.zip → aicw_app/public/ before aicw_app deploy

MCP config (any client)

The installer writes envFile + absolute python path (not bare python on Windows).

{
  "mcpServers": {
    "aicw": {
      "command": "C:/Users/you/AppData/Local/Python/pythoncore-3.14-64/python.exe",
      "args": ["-m", "aicw_mcp"],
      "envFile": "C:/Users/you/.aicw/aicw_mcp.env"
    }
  }
}

After install or code update: toggle MCP off/on so the agent reloads the server process.

Verify module wiring:

python -m aicw_mcp.doctor

Run manually

$env:MPC_WALLET_ID="..."
$env:AI_AGENT_PUBKEY="..."
$env:MPC_BRIDGE_URL="..."
python -m aicw_mcp

Tests

python -m pytest tests/ -v

Integration tests against devnet are skipped unless AICW_INTEGRATION=1 is set. On-chain write test (heartbeat) requires AICW_INTEGRATION_WRITE=1.

$env:AICW_INTEGRATION="1"
$env:MPC_WALLET_ID="..."
$env:AI_AGENT_PUBKEY="..."
$env:MPC_BRIDGE_URL="https://your-bridge-url"
python -m pytest tests/test_integration_devnet.py -v

Security

  • MPC_WALLET_ID is never logged or returned unmasked (except aicw_generate_agent_key for new keys).
  • Startup validates RPC cluster matches MPC_SOLANA_NETWORK.

Agent duties (after install)

  • aicw_create_will then aicw_heartbeat on a schedule (before death timeout; minimum 600s on-chain).
  • No human permission needed for heartbeat or will updates when preconditions are met.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aicw_mcp-0.1.0.tar.gz (19.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aicw_mcp-0.1.0-py3-none-any.whl (24.2 kB view details)

Uploaded Python 3

File details

Details for the file aicw_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: aicw_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 19.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for aicw_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 38d14ad27390dad8419e57e2c0d269553fbe9c12e85e9c42fd853fa2d9fd75d8
MD5 7a819a35c0f0163c5073a0f73bd85ef3
BLAKE2b-256 0ca41eade4e096ced8078a6db8533f9711ee2f6db9330edea8c2ade4c7e65cc1

See more details on using hashes here.

File details

Details for the file aicw_mcp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: aicw_mcp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 24.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for aicw_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d53ca7c15a7aac78bc9e9cde3be98044c86e92129025b04f1cbde04c24182038
MD5 7775c3c12cd1e8b3eee18e3decc2bd05
BLAKE2b-256 62c28e0efb7e8554dd16ec4a0519561a2d125d73e0373ec9dadd3d71114191d6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page