> ## Documentation Index
> Fetch the complete documentation index at: https://a-identity.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP Server

> The read-only A-Identity MCP server, tool by tool.

The server lives in the `mcp` package. It speaks MCP over stdio and over Streamable
HTTP, and it is read only: no keys, no funds, no chain writes. The `resolve_agent`
tool reads **live from Circle Arc's deployed ERC-8004 IdentityRegistry** by default
(`source: "rpc"`) — a real `ownerOf` + `tokenURI` read, no mocks. Extra EVM chains
switch on when their RPC env vars are set.

<Note>
  Identity resolution and the platform REST API both read the **live ERC-8004 + ERC-8183
  contracts on Arc testnet** (`GET /api/arc/contracts`) — no mocks. `list_agents` returns
  the real agents a running platform instance knows (the Arc registry isn't enumerable,
  so it can't list every token ever minted). See [Build on Arc](/chains/arc).
</Note>

## Run It

```bash theme={null}
cd mcp && npm install && npm run build
npm run start         # stdio
npm run start:http    # HTTP, POST /mcp and GET /health
npm run smoke         # exercise every tool over stdio
```

## Tools

### resolve\_agent

Resolve an ERC-8004 identity.

| Input   | Type   | Notes                                        |
| ------- | ------ | -------------------------------------------- |
| `query` | string | agent id, token id, owner address, or domain |

```json Returns theme={null}
{ "found": true, "source": "rpc", "agent": { "agentId": "eip155:5042002:8004/849980", "owner": "0x...", "valid": true, "chain": "arc" } }
```

### get\_reputation

Compute a deterministic reputation score.

| Input     | Type   | Notes                 |
| --------- | ------ | --------------------- |
| `agentId` | string | the agent id to score |

The score (0 to 1000) is settlement plus validation plus tenure. The same history
always produces the same score, so it can be anchored on-chain and recomputed by
anyone.

```json Returns theme={null}
{ "found": true, "reputation": { "score": 539, "breakdown": { "settlement": 296, "validation": 240, "tenure": 3 }, "settledOnchain": 3 } }
```

### list\_capabilities

Describe the protocol surface. No input.

```json Returns theme={null}
{ "name": "A-Identity", "capabilities": { "identity": { "standard": "ERC-8004" }, "payments": { "standard": "x402" } } }
```

## Connect

```bash Claude Code theme={null}
claude mcp add a-identity -- node ./mcp/dist/index.js
```

<Card title="Going On-Chain" icon="link" href="/protocols/erc-8004">
  Set `A_IDENTITY_RPC_URL` and `ERC8004_IDENTITY_REGISTRY` to read real
  identities. This step is human-reviewed before it ships.
</Card>
