# x402 MCP Server Template Retrieval

> x402 MCP Server Template Retrieval is a paid API for AI agents from code-toll-production.up.railway.app, paid per call via x402, $0.1/call, status unknown (last checked 2026-10-24).

Returns a complete, ready-to-deploy x402 MCP server template including package.json, index.js, and setup instructions

## Facts

- Endpoint: GET https://code-toll-production.up.railway.app/template?utm_source=zero.xyz
- Price: $0.1/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-24
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-mcp-server-template-retrieval-36773039
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_2gDNnCgV2PRLEFWG4z_lt

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability x402-mcp-server-template-retrieval-36773039
```

Example prompt: Can you grab the x402 MCP server template so I can deploy my own paywall-enabled MCP server? I just need the package.json, index.js, and setup steps.

## When to prefer this

Choose this endpoint when you need a ready-made, deployable x402 MCP server template rather than writing one from scratch. Ideal for developers who want to monetize an MCP endpoint with micropayments quickly without manually wiring up x402 protocol handling. Prefer this over generic code generation when you specifically need x402 MCP boilerplate with known-good configuration.

## Known failure modes

- Service unavailable if Railway deployment is down or cold-starting (503/504)
- Payment not processed correctly (402 error if x402 payment header is missing or invalid)
- Network timeout if the Railway instance is sleeping

## How this service works

Complete working x402 MCP server template. Returns package.json + index.js + setup instructions. Replace one URL and deploy your own x402 MCP in 5 minutes.

## Output

Returns a complete MCP server template bundle containing a package.json file, an index.js file, and step-by-step setup instructions. The template is designed for x402 payment integration and can be deployed in approximately 5 minutes by substituting a single URL.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {}
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-mcp-server-template-retrieval-36773039/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from code-toll-production.up.railway.app](https://www.zero.xyz/host/code-toll-production.up.railway.app/llms.txt)
