Add d402 to an MCP Server

Learn how to add d402 payments to an MCP server using the traia-iatp SDK.

This guide shows how to turn an existing MCP server into a paid MCP server with d402.

Choose the path that fits your goal:

  • local testing: generate a one-endpoint MCP repo and test the 402 flow on your machine

  • production: conform an existing MCP server and deploy it with production settings

Production Defaults

  • Network: arbitrum_one

  • Tokens: USDC, USDT

  • Decimals: 6

  • USDC: 0xaf88d065e77c8cC2239327C5EDb3A432268e5831

  • USDT: 0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9

Start Here

Local Testing Path

  1. prerequisites/overview.md

  2. local-testing/quickstart.md

  3. local-testing/docker.md or local-testing/direct-run.md

  4. examples/call-mcp-with-d402-httpx.md

Production Path

  1. prerequisites/overview.md

  2. conform-existing-mcp/overview.md

  3. conform-existing-mcp/code-walkthrough.md

  4. deployment-reference/overview.md

  5. deployment-reference/mongodb-registration.md — register on d402.net after deployment

  6. conform-existing-mcp/production-checklist.md

Last updated