binance-data MCP Server
This repository contains a d402-enabled MCP server for binance-data.
Local Testing
1. Review the environment file
The generated .env file contains the server wallet and operator values required to start the MCP server.
2. Start with Docker
./run_local_docker.sh
The MCP endpoint will be available at:
http://localhost:8000/mcp
3. Run directly
uv run python server.py
Runtime Notes
D402_TESTING_MODE=trueis the fastest way to test the payment flow locally- set
D402_TESTING_MODE=falseto use the facilitator-backed flow - the server exposes
/mcpand/health
Health Check
python mcp_health_check.py --url http://localhost:8000
Next Step
Call the server with d402HttpxClient after it starts. The first paid tools/call request should return HTTP 402, then retry automatically with payment.
Deploy and Register
After local testing passes:
Deploy the server to a public URL.
Test every endpoint against the deployed URL:
traia-iatp test-mcp \ --base-url "https://your-deployed-server.com" \ --tool-name "your_tool" \ --arguments '{}'Register the deployed server on d402.net once all endpoints are confirmed working.You need a d402.net account — sign up at https://d402.net first.
traia-iatp register-mcp \ --email "[email protected]" \ --name "binance-data MCP Server" \ --description "Binance public market data (klines, depth, 24hr ticker)." \ --url "https://your-deployed-server.com/mcp" \ --server-address "$SERVER_ADDRESS" \ --operator-address "$MCP_OPERATOR_ADDRESS" \ --no-requires-auth \ --token-symbol USDC \ --endpoints-file ./endpoints.json--server-addressand--operator-addressare the MCP server's IATP wallet addresses— the values from thecreate-mcpoutput, not your personal wallet.See the IATP docs at
deployment-reference/mongodb-registration.mdfor the full guide.