Nifty Protocol/Docs/Documentation

Documentation.

Everything you need to connect, call tools and set limits. Start with the quickstart; the reference is below it.

Quickstart

Add the endpoint to your AI client, sign in once, and ask a question about the chain. Step-by-step guides for each client live on Connect your AI.

terminal
claude mcp add --transport http nifty https://mcp.niftyprotocol.xyz

Endpoint

Nifty Protocol speaks MCP over streamable HTTP. The network is the last path segment.

https://mcp.niftyprotocol.xyz

Authentication

Interactive clients use OAuth: the first call opens a sign-in page. Headless agents send an access key as Authorization: Bearer nifty_….

http
POST / HTTP/1.1
Host: mcp.niftyprotocol.xyz
Authorization: Bearer nifty_live_xxxxxxxx
Content-Type: application/json

Tools

Sixty tools in five groups: read, explain & simulate, act, build and admin. Each returns structured JSON plus a one-line summary your AI can quote.

get_balanceaddress, token?, block? → balances
read_contractaddress, function, args → decoded result
simulate_txtx → state diff, events, risk flags
deploytemplate | source, args → address, tx hash
verifyaddress → verified source link

Full list: Tools.

Limits & keys

Agent keys enforce caps on chain via a session-key module. Set per-transaction and daily caps, allowed contracts and selectors, and an expiry.

policy.json
{
  "spendCap": { "perTx": "50 AUR", "perDay": "200 AUR" },
  "allow": ["0xDEX…:swap", "0xVault…:deposit"],
  "expires": "<ISO 8601 timestamp>"
}

Errors

401 unauthorizedSign in again or check your access key.
403 policy_deniedThe call is outside the key's caps or allow-list.
409 sim_revertedSimulation reverted — the reason is in the response.
429 rate_limitedSlow down; retry after the given seconds.