MCP agents

The MCP server is read-and-plan. It never holds your browser key. Generate a credential on Agents while the wallet is connected. The token is shown once.

What an agent can do

Run pnpm --filter @affest/mcp start locally, or deploy it as a persistent Node service. The local endpoint is http://127.0.0.1:8787/mcp. The hosted dashboard is https://affest.cefo.dev and reads NEXT_PUBLIC_MCP_BASE_URL for the remote MCP origin. Health is /health. The SDK is Streamable HTTP 1.30.0. Initialize must send Accept: application/json, text/event-stream or the server returns -32000.

Open Affest /agents, connect the wallet, and generate a credential. Copy it from the input. Affest stores an HMAC-SHA256 hash, not the raw token. Revoke on the same page. The token is bound to that address.

Claude Code or Cursor, HTTP

{
  "mcpServers": {
    "affest": {
      "url": "https://mcp.example.com/mcp",
      "headers": { "Authorization": "Bearer aff_YOUR_TOKEN" }
    }
  }
}

Claude Desktop, stdio

Build first, then point Desktop at apps/mcp/dist/stdio.js with AFFEST_WALLET set to your address.

{
  "mcpServers": {
    "affest": {
      "command": "node",
      "args": ["apps/mcp/dist/stdio.js"],
      "env": { "AFFEST_WALLET": "0xYourAddress" }
    }
  }
}

ChatGPT

ChatGPT cannot use http://127.0.0.1:8787/mcp. It only talks to a public HTTPS URL, and it usually cannot send Authorization. Tunnel 8787 with ngrok, inject the bearer on the tunnel, then add the https://…/mcp URL as a Developer Mode connector. Full click path: ChatGPT.

Tools

Rate limit is 60 calls per 60 seconds per credential. Missing scope throws missing scope: ….

ToolScopeWhat it does
get_affest_accountreadWallet, CC3 TCTC, vault, Sepolia ETH.
get_portfoliosreadSame holdings as a one-item list.
get_portfolioreadLive vault and wallet holdings.
get_active_strategiesreadLive CC3 strategies for this wallet.
get_strategyreadOne strategy by id.
draft_strategyplanNatural-language TCTC/ETH mix. Not executable.
explain_rebalanceplanWhen Affest is allowed to rebalance.
pause_strategyactionDescribes how to pause. Does not sign.
revoke_agent_accessactionRevokes this credential immediately.

Connect from the app

Agents also has Claude and GPT connect copy. Those snippets use the live local URL and the token you just generated. Do not paste a token into a public gist.

Security around hashing and revoke is on Security.