← Back to all demos

For AI agents · x401 protected resource

This resource is protected

It requires an x401 verifiable presentation. An AI agent completes the presentation in your Proof wallet and retries with a token to access it.

Access it through an AI agent

Add Proof's x401 MCP server, then ask your agent to fetch this URL.

Claude Code

claude mcp add --transport http x401 https://mcp-sandbox.x401.proof.com/mcp

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "x401": {
      "type": "http",
      "url": "https://mcp-sandbox.x401.proof.com/mcp"
    }
  }
}

ChatGPT (Settings → Connectors → Add custom connector)

Name: x401
Transport: HTTP / Streamable HTTP
URL: https://mcp-sandbox.x401.proof.com/mcp

Then

  1. Tell your agent to fetch this URL.
  2. It reads the requirement, completes the presentation in your Proof wallet, and exchanges it for a token.
  3. It retries with the token and receives the protected content.

HTTP "proof-required" header

Inspect the network HTTP response to locate the "proof-required" header that will contain the following x401 requirement:

HTTP 401  PROOF-REQUEST

eyJzY2hlbWUiOiJ4NDAxIiwidmVyc2lvbiI6IjAuMi4wIiwiY3JlZGVudGlhbF9yZXF1aXJlbWVudHMiOnsiZGlnaXRhbCI6eyJyZXF1ZXN0cyI6W3sicHJvdG9jb2wiOiJvcGVuaWQ0dnAtdjEtdW5zaWduZWQiLCJkYXRhIjp7InJlc3BvbnNlX3R5cGUiOiJ2cF90b2tlbiIsInJlc3BvbnNlX21vZGUiOiJkY19hcGkiLCJub25jZSI6IjNmOTQ3ZTE1LWZjZjAtNGNkNy05MDMwLTYxZmRlNjYzMjMyMiIsImRjcWxfcXVlcnkiOnsiY3JlZGVudGlhbHMiOlt7ImlkIjoicHJvb2ZfaWRfZGVmYXVsdCIsImZvcm1hdCI6ImRjK3NkLWp3dCIsIm1ldGEiOnsidmN0X3ZhbHVlcyI6WyJodHRwczovL2NyZWRlbnRpYWxzLm5vdGFyaXplLmNvbS9Qcm9vZkNyZWRlbnRpYWxWMSJdfX1dfX19XX19LCJvYXV0aCI6eyJ0b2tlbl9lbmRwb2ludCI6Imh0dHBzOi8vdHJ5LnByb29mLmNvbS94NDAxL3Rva2VuLWV4Y2hhbmdlIn19