The MCP server¶
Edith ships a Model Context Protocol server that exposes all three APIs as typed tools, so AI agents (Claude, or any MCP client) can quote, inspect, and — with an explicit confirmation flag — execute on-chain actions through your account.
Connecting¶
The server speaks MCP over stdio. Point it at the platform with environment variables and register it with your client:
{
"mcpServers": {
"edith": {
"command": "edith-mcp",
"env": {
"EDITH_PHOTON_URL": "https://photon.example.com",
"EDITH_VECTOR_URL": "https://vector.example.com",
"EDITH_MEADOW_URL": "https://meadow.example.com",
"EDITH_API_KEY": "your-api-key"
}
}
}
}
EDITH_API_KEY is forwarded as the api-key header on every call — the agent
acts as your account, with your balance and limits.
Tools¶
Read tools — safe, no side effects:
| Tool | Does |
|---|---|
photon_get_supported_chains |
List relayable chains. |
photon_get_account_information |
Balance and config for an address. |
photon_quote_transaction |
USD cost estimate for a relay. |
photon_get_transaction_status |
Status of a relayed transaction by id. |
vector_get_supported_chains |
Swap-capable chains. |
vector_list_tokens |
Token catalog (optionally per chain). |
vector_get_quote |
Ranked swap routes for a pair. |
vector_get_gasless_quote |
Gasless quote incl. the EIP-712 payload to sign. |
vector_get_gasless_status |
Gasless swap status by swap id. |
meadow_get_venues |
Yield venue registry. |
meadow_get_rates |
Best indicative APY per asset. |
meadow_quote |
Run the yield auction; returns the 7702 payload to sign. |
meadow_get_positions |
Positions and earnings for a user. |
Submission tools — these move funds and are gated:
| Tool | Does |
|---|---|
photon_submit_transaction |
Relay a transaction on-chain. |
vector_submit_gasless_swap |
Execute a signed gasless swap. |
The confirm gate¶
Every submission tool has a required confirm boolean. A call without
confirm: true is rejected with an error instead of executing:
// rejected — nothing happens
{ "name": "photon_submit_transaction",
"arguments": { "chainId": 84532, "to": "0x…", "callData": "0x" } }
// executes
{ "name": "photon_submit_transaction",
"arguments": { "chainId": 84532, "to": "0x…", "callData": "0x", "confirm": true } }
This forces an agent to make spending an explicit, visible decision — a
misfired tool call can't silently relay. Instruct your agents to set confirm
only after presenting the action (and its quoted cost) to a human, or after
whatever policy check your harness enforces.
Warning
The MCP server holds your API key, and Photon charges your prepaid balance for what agents relay. Scope the key you give it (per-transaction and daily limits are enforced account-side — see Core concepts) and monitor usage like any other credential.