Quickstart with MCP

Add the Hannu MCP server to your agent and go from a fresh key to a signed Verified report in three tool calls.

Hannu ships a Model Context Protocol server, so an MCP-capable agent (Claude, Cursor, or your own) discovers the tools and calls them directly — no glue code. The MCP surface and the REST API share one governance layer, so everything here has a REST equivalent.

1. Add the server

Point your agent at the Hannu MCP endpoint and pass your API key as a bearer token.

JSON
// ~/.your-agent/mcp.json
{
  "mcpServers": {
    "hannu": {
      "url": "https://mcp.hannu.africa",
      "auth": "Bearer ${HANNU_KEY}"
    }
  }
}
Getting a key

API keys are issued when you register an organization. See Authentication. Keys look like hnu_live_… and are shown once.

2. Estimate, then create

Ask your agent to price the work first — estimate_task changes no state — then create it. Creating a task locks escrow atomically and matches a verified Operator.

A natural-language instruction your agent can act on:

text
Use the hannu tools. Estimate a field_verification task at
23 Commercial Avenue, Yaba, Lagos, requiring a geotagged photo.
If it's under ₦3,000, create it with an idempotency key.

Under the hood your agent calls estimate_task, reads the price, then create_task. Escrow is locked the moment the task is created — nothing is at risk before that.

3. Read the outcome

When proof passes verification, the task carries its verification outcome. Your agent calls get_task (or get_proof) and reads it:

JSON
{
  "id": "task_8f21",
  "state": "approved",
  "proof": {
    "has_proof": true,
    "outcome": "pass",
    "confidence_score": 0.97,
    "submitted_at": "2026-07-18T09:14:00Z"
  }
}

That's the loop. Subscribe to webhooks so you're notified on every state change instead of polling.

Next steps