@rail402.dev/mcp-discovery
v0.1.0
Published
MCP server exposing Stellar Bazaar search and a budget-capped paid-call proxy to agents.
Readme
@rail402.dev/mcp-discovery
An MCP server that lets an agent search the Stellar Bazaar and make a paid call from inside an agent runtime. It wraps the discover, pay and retry loop behind two MCP tools:
search_stellar_resources: natural-language search over the Bazaar catalog, with structured output.pay_and_call: pay for and call a discovered resource (an HTTP endpoint or an MCP tool) under a mandatory spend cap. The price is surfaced, and an unbounded payment is never made silently.
Every tool has strict JSON input and output schemas, and every rejection carries a machine-readable code and a non-null reason.
Install
npx @rail402.dev/mcp-discovery # stdio, the transport an agent runtime spawns
# or install the bin:
npm install -g @rail402.dev/mcp-discovery # provides `rail402-mcp`Usage
The rail402-mcp bin defaults to stdio (the transport an MCP client spawns as a subprocess) and to
the live Bazaar. Add --http for the hosted Streamable HTTP transport:
rail402-mcp # stdio, Bazaar = https://facilitator.rail402.dev
rail402-mcp --secret S... # enable pay_and_call (omit for search-only)
rail402-mcp --http --port 8080 # Streamable HTTP: serves /mcp and /health
rail402-mcp --bazaar http://localhost:4022 --allow-private-hosts # point at a local facilitatorEvery endpoint is overridable by flag or env (BAZAAR_URL, STELLAR_NETWORK,
CLIENT_STELLAR_PRIVATE_KEY, MAX_AMOUNT_CEILING, PORT). Run rail402-mcp --help for the full
list. A hosted testnet instance runs at https://mcp-discovery-testnet.up.railway.app/mcp.
Part of Rail402. Apache-2.0.
