Environment Roots
Use only these exact HTTPS origins. Do not add a port, path, query, fragment, or user information to
an origin.
Set reusable shell variables:
Choose A Test Path
All paths must inspect the current Staging catalog and Runtime OpenAPI. Accountless x402 testers
can skip the sign-in and API-key sections.
Sign In And Create A Key
The key manager requires billing-account administration access. If the dashboard has no billing account, or if the key manager is not available, ask your billing-account owner or administrator for access before you start.- Open
https://stg.pubfi.ai/login. - Enter the email address that owns your staging dashboard access.
- Request a sign-in code.
- Enter the six-digit code from the email in the same browser tab.
- Open the dashboard after sign-in.
- In Manage application keys, create a key with a clear name such as
staging-agent. The Staging runtime assigns the key environment; there is no environment selector. - Copy the full key when PubFi shows it. PubFi shows the secret only once.
- Store the key in a secret manager. Do not put it in source code, shell history, logs, screenshots, or a tracked MCP configuration file.
Inspect The Current Contract
Fetch the public Registry catalog before each test:ready operations. Refresh both surfaces when the generation changes.
Make An API-Key Call
Select a currentready operation whose matching operations[].billing.mode is
quantro_priced. Set its exact path and method, then send the staging key:
X-PubFi-Api-Key is not accepted. Remove it before an accountless x402 request because its
presence still selects the credential lane. For a different route, copy the exact matcher and
method from the current catalog. Follow its query, body, response, and method-specific billing
metadata. OpenAPI query and body fields guide request construction, but the gateway preserves a
valid bounded RFC 3986 query and any bounded non-empty POST body bytes instead of applying the
source schema online. The route selects the body media type. Empty bodies are omitted, and GET
bodies are rejected. Exact free_health operations are public and use their
advertised path without a :free suffix.
Connect An MCP Client
The staging Streamable HTTP endpoint and discovery manifest are:examples/agents/pubfi-route-tools-mcp/. Start it from the repository root:
PUBFI_MCP_ENDPOINT and
STG_PUBFI_API_KEY, or use the client’s secret-store integration. Environment-variable syntax in
MCP configuration files is client-specific.
Run the safe smoke:
PUBFI_MCP_EXECUTE_LIVE=1 and supply an exact current
path and method.
Base Sepolia Test Boundary
Staging is the PubFi Base Sepolia test boundary for accountless x402. The CAIP-2 network id iseip155:84532.
To inspect a challenge, select a current ready method whose catalog billing mode is
quantro_priced. Then call its exact route without a PubFi API key:
402 response as x402 availability evidence for the exact route and
method. Require the live challenge to specify Base Sepolia before you sign anything. Use only
testnet funds and a dedicated test wallet. Do not send a PubFi API key and PAYMENT-SIGNATURE in
the same request.
For MCP, use the official x402 metadata flow. Put the payment object in
params._meta["x402/payment"] and connect to https://mcp-stg.pubfi.ai/x402. Do not convert it
into an HTTP header. The authenticated root rejects payment metadata, and the /x402 endpoint
rejects Bearer credentials.
This staging boundary does not prove that x402 is available in Production. A checked-in route,
OpenAPI path, or old challenge is not current availability evidence.
Troubleshooting
Move To Production
Treat Production as a separate environment:- Change the roots to
https://pubfi.ai,https://api.pubfi.ai, andhttps://mcp.pubfi.ai. - Create and store a separate Production API key. Use
PROD_PUBFI_API_KEYfor the public examples. - Fetch the Production catalog and OpenAPI again.
- Confirm each exact route, method, schema, and readiness state.
- Run a non-executing MCP smoke before you enable deliberate live execution.
- Production permits Base mainnet only when x402 is enabled for the exact route. A Production payment can have real financial value. Inspect the current catalog and unsigned challenge before you infer availability or sign.