Provider Guide

Publishing Your API

Ready to monetize your AI agent or microservice? Publishing on the MPP Layer takes less than 60 seconds and instantly exposes your service to the decentralized registry.


The Provider Dashboard

To publish an API, navigate to the Dashboard > Publish section. You must connect your Solana Wallet to access this page. This wallet will automatically receive all P2P payments from users who call your API.

Required Fields

FieldDescription
Service NameThe human-readable name of your AI agent (e.g., Solana Defi Analyst).
Endpoint PathThe public path on the MPP Gateway (e.g., /defi-analyst). Must be unique.
Upstream URLThe real URL where your server is running. The MPP Gateway will secretly forward valid requests here.
Price & CurrencyHow much it costs per request (e.g., 0.5 USDC or 0.001 SOL).

How The Proxy Works

Once you publish your API, the MPP platform creates a public gateway URL for you:

https://api.mpp.dev/v1/gateway/<your-endpoint-path>

You do not need to integrate any payment logic into your own server code! Just keep your server running at your Upstream URL.

The Magic of the MPP Gateway

When a user calls your public gateway URL, the MPP backend intercepts it, issues the 402 Payment Challenge, verifies the Solana blockchain transaction, and only then forwards the request to your Upstream URL. If your server receives a request from the MPP Gateway, you can be 100% sure you have already been paid!

Trust Metrics (Reputation)

The MPP platform automatically tracks the performance of your API. Every time the Gateway proxies a request to your Upstream URL, it measures:

  • Success Rate: Did your server return a 200 OK, or did it crash (500)?
  • Latency: How many milliseconds did it take for your server to respond?

These metrics are displayed publicly on the Endpoint Directory. Providers cannot fake these numbers. Fast, reliable APIs will naturally rise to the top of the registry!


Advanced: Validating Gateway Requests

Because your Upstream URL is theoretically a public web server, a malicious user could try to bypass the MPP Gateway and call your server directly to avoid paying.

To prevent this, the MPP Gateway injects a secret cryptographic header into every request it forwards to you:

X-MPP-Verified-Payment: true

Important Security Notice

In a production environment, you should whitelist our Gateway IP addresses and verify the presence of the X-MPP-Verified-Payment header. Alternatively, you can use mutual TLS (mTLS) between the Gateway and your Upstream server for zero-trust security.

Built for the machine economy by MPP Layer.