Documentation

Glossary

Every Nexus402 term in one place, in plain words, each linked to the page that owns the detail.

Sections

Nexus402 is a metering gateway for MCP tools. A developer's AI agent calls tools through one API key and pays a fixed price per call from a wallet funded in advance, with an optional spend cap on each key. Each tool runs on its creator's own server, and the creator is paid for every completed call. The terms below are the ones that matter for using it correctly.

402 Payment Required #

The HTTP status the gateway returns when the wallet behind a key, or that key's 24-hour cap, cannot cover a tool's price. Nothing is charged. Error codes

API key (nx_dev_) #

The developer credential an MCP client sends in the X-Nexus-Api-Key header. It is shown once when created and stored only as a hash. An account can hold up to ten, each with its own optional cap. Keys and caps

Cap (spend cap) #

An optional rolling 24-hour spend ceiling on one API key, checked in the same atomic step as the wallet balance. It is not a calendar day and not a monthly budget. Keys and caps

Creator #

A person or company that runs an MCP server and publishes its tools on Nexus402 at a fixed price per call. Nexus402 never hosts, deploys or holds the creator's code. Creator docs

Creator handle #

The namespace every one of a creator's tools lives under, such as acme in acme/weather/forecast. A handle is never released or transferred to another account. Creator quickstart

Credits #

What a developer buys to fund a wallet, denominated in US dollars. No fee is added: the wallet is credited exactly what the card is charged, and there is no automatic top-up. Wallet

Developer #

Someone whose AI agent calls tools through Nexus402 from an ordinary MCP client, with one API key and a wallet funded in advance. Developer docs

Double-entry ledger #

Nexus402's book of record, in PostgreSQL. Every charge posts a debit with matching credits, entries are never edited or deleted, and a correction is a new entry. How Nexus402 works

Ed25519 signature #

Every call Nexus402 forwards to a creator's endpoint is signed with Ed25519 over the method, host, path, timestamp, correlation id and body hash, so the creator's server can check it came from Nexus402. Verifying requests

Fail closed (503) #

If the metering store cannot be reached, paid calls are refused with HTTP 503. A call is never let through unmetered. How Nexus402 works

Free calls #

A number of calls a creator gives every account on a tool per UTC day, week or month, from 0 to 1,000. A free call charges nothing, earns nothing and does not count against the key's cap. When you are charged

Idempotency key #

An Idempotency-Key header that makes a retry safe. A key that already paid for a tool call is single-use: replaying it is refused with HTTP 422 and is never charged twice. Idempotency

Margin #

The share of a call's price Nexus402 keeps when it resells the call: 10% today. The creator is owed the rest as the wholesale price. Settlement

MCP (Model Context Protocol) #

The open protocol AI applications use to discover and call tools. Nexus402 is one remote MCP server, so Cursor, Claude Code, Codex and other MCP clients reach every published tool with one URL and one header. Connect with MCP

Merchant of record #

Nexus402 sells each tool call in its own name, under Stripe. The creator is its supplier, owed a wholesale price for every completed call. Settlement

Micro-USD #

The unit every amount is counted in: one millionth of a US dollar. Amounts travel as JSON strings of integers, never as floating-point numbers. Money format

Proof (X-Nexus-Proof) #

A header a creator's server returns with every successful answer, showing it came from the server that received the call. A 2xx without a valid proof reaches the developer as a 502 and is not charged. Verifying requests

Rollup #

Charges are netted into five-minute rollups and posted to the ledger, rather than written one row per call. A wallet's balance and itemised entries catch up at the next rollup. Settlement

Tool #

One function a creator publishes, named handle/server/tool, such as acme/weather/forecast. Each has a fixed price per call and runs on the creator's own server. Build a server

Trial credit #

Credit a new account may get from an offer running when it signs up. It pays only for creators' free calls, is not balance, and ends at the first top-up. When you are charged

Version #

Tools are published in immutable versions: a version's price and endpoint never change. A new price ships as a new version, and a retired version stops taking calls. Versions

Wallet #

A developer's prepaid balance, funded with Credits. Each call is charged the tool's fixed price from it, and a call it cannot pay is refused with 402. Wallet

Wholesale price #

What Nexus402 owes the creator for a completed call: the call's price less the margin, rounded down to the micro-USD. Settlement

Withdrawal #

A creator's request to be paid what is withdrawable now, from a $5 minimum, through Stripe Connect. Earnings become withdrawable in stages because a card payment can be disputed for months; payouts reach the United States only today. Payouts

Install agent tools

Help your coding agent stay on track when building with Nexus402. Learn more

Paste this into Claude Code, Codex or Cursor. Your agent connects itself to Nexus402 and adds the skills, for whichever tool it is.

Prompt for your agent text
Set up Nexus402 for me in this coding agent.
1. Read https://www.nexus402.dev/docs/agents.md and work out which tool you are (Claude Code, Codex or Cursor).
2. Add the Nexus402 MCP server https://api.nexus402.dev/v1/mcp the way that page shows for your tool, sending the X-Nexus-Api-Key header from the NEXUS402_API_KEY environment variable.
3. Install the skills listed at https://www.nexus402.dev/.well-known/skills/index.json where your tool keeps skills or rules.
Never write my key into a file, a commit or a reply. If NEXUS402_API_KEY is not set, stop and tell me to set it.
Then check the connection lists tools, and tell me what you changed.

Connect the gateway, then add the two skills.

Terminal bash
claude mcp add --transport http --scope user nexus402 https://api.nexus402.dev/v1/mcp \
  --header "X-Nexus-Api-Key: $NEXUS402_API_KEY"

mkdir -p ~/.claude/skills/nexus402-tools && curl -fsSL https://www.nexus402.dev/.well-known/skills/nexus402-tools/SKILL.md -o ~/.claude/skills/nexus402-tools/SKILL.md
mkdir -p ~/.claude/skills/nexus402-endpoint && curl -fsSL https://www.nexus402.dev/.well-known/skills/nexus402-endpoint/SKILL.md -o ~/.claude/skills/nexus402-endpoint/SKILL.md

Add the gateway to ~/.codex/config.toml, then add the skills with npx skills add https://www.nexus402.dev.

~/.codex/config.toml toml
[mcp_servers.nexus402]
url = "https://api.nexus402.dev/v1/mcp"
env_http_headers = { "X-Nexus-Api-Key" = "NEXUS402_API_KEY" }
tool_timeout_sec = 130
Add to Cursor

Opens Cursor and asks to add the gateway. Your key is read from NEXUS402_API_KEY.

Or add it by hand to ~/.cursor/mcp.json. Then add the skills with npx skills add https://www.nexus402.dev.

~/.cursor/mcp.json json
{
  "mcpServers": {
    "nexus402": {
      "url": "https://api.nexus402.dev/v1/mcp",
      "headers": {
        "X-Nexus-Api-Key": "${env:NEXUS402_API_KEY}"
      }
    }
  }
}

Skills-only installs don't update automatically.

Terminal bash
npx skills add https://www.nexus402.dev

Every option reads your key from NEXUS402_API_KEY; none writes it into a file. Learn more