Forge Agent Hub
RemoteAbout Forge Agent Hub
Forge Agent Hub is an open-source MCP server for accessing pay-per-call APIs that use x402 payments in USDC on Base. The package provides the full API catalog locally, while the hosted gateway exposes its original tool set.
Key features
- 01Lists API endpoints and prices
- 02Tools for catalog API paths
- 03Optional automatic x402 payment
- 04stdio and local Streamable HTTP modes
- 05Hosted remote gateway
Use cases
- 01Finding available API tools and their prices
- 02Calling an API path through an MCP client
- 03Automating eligible calls with x402 payment
- 04Connecting to the hosted gateway without running a process
MCP support
The server exposes a free endpoint-listing tool and paid tools corresponding to API paths. It supports local stdio and Streamable HTTP; a hosted Streamable HTTP gateway is also available.
Configuration
Remote servers need no local install. Pick your client, then copy the config or install in one click.
https://x402-gateway.forge-x402.workers.dev/mcpclaude mcp add --transport http forge-agent-hub-forge-agent https://x402-gateway.forge-x402.workers.dev/mcp{"mcpServers":{"forge-agent-hub-forge-agent":{"type":"http","url":"https://x402-gateway.forge-x402.workers.dev/mcp"}}}Open in Cursor{"servers":{"forge-agent-hub-forge-agent":{"type":"http","url":"https://x402-gateway.forge-x402.workers.dev/mcp"}}}Open in VS Code{"mcpServers":{"forge-agent-hub-forge-agent":{"type":"http","url":"https://x402-gateway.forge-x402.workers.dev/mcp"}}}{"mcpServers":{"forge-agent-hub-forge-agent":{"serverUrl":"https://x402-gateway.forge-x402.workers.dev/mcp"}}}Run commands in a terminal; paste JSON into the client’s MCP config and restart. Servers that need sign-in will prompt on first connect.
Tools
Details
From the project READMEforge-agent-mcp
Open-source MCP server that wraps the Forge Agent Hub x402 APIs.
- Live remote (already hosted):
https://x402-gateway.forge-x402.workers.dev/mcp(Streamable HTTP) - This package (v1.3.0): stdio (and optional local Streamable HTTP) covering the full catalog (both API hosts). The hosted remote remains the original gateway MCP.
Contact: [email protected]
Licence: MIT
This package is not published to npm (no extra account). Clone and run with Node 20+.
Tools
list_endpoints— free. Lists paid tools, prices (USDC on Base) and HTTP paths.- One paid tool per catalog path (
iban,eu_vat,sanctions_check, …; currently 58). An unpaid call returns the HTTP 402 challenge. IfEVM_PRIVATE_KEYis set and@x402/fetchis installed, the server retries with a signed x402 v2 payment. The hosted remote at the gateway still exposes the original gateway tools only. Wave-1 tools (including two $3 playbooks) accept?demo=1for a labelled sample; the first 3 successful real HTTP calls per IP per UTC day are also free.
stdio
{
"mcpServers": {
"forge-agent-hub": {
"command": "node",
"args": ["/path/to/forge-agent-mcp/src/server.mjs"]
}
}
}
git clone https://github.com/forge-agent-hub/forge-agent-mcp
cd forge-agent-mcp
npm install
node src/server.mjs
Streamable HTTP (local)
npm run start:http
# listens on 127.0.0.1:8787/mcp
Hosted remote
Prefer the live gateway when you do not want to run a process:
{
"mcpServers": {
"forge-agent-api": {
"url": "https://x402-gateway.forge-x402.workers.dev/mcp",
"transport": "streamable-http"
}
}
}
Payment for hosted tools is passed in MCP _meta via @x402/mcp on the gateway.
Environment
| Variable | Purpose |
|---|---|
API_BASE | Default https://x402-gateway.forge-x402.workers.dev |
EVM_PRIVATE_KEY | Optional. Enables automatic payment in this process. Never commit it. |
PORT | HTTP port when run with --http (default 8787) |
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.