# bluerails402 Skill

bluerails402 is a publisher registry for agentic payments. Publishers list once; AI agents discover and pay for content access.

## MCP Endpoint

`https://bluerails402.com/mcp` (Streamable HTTP, MCP protocol 2025-06-18)

## Tools

### list_publishers (public — no auth)
Lists active EU publishers in the registry.
- `query` (string, optional): natural language search e.g. "german news", "french business"
- `content_type` (string, optional): filter by content type
- `protocol` (string, optional): "x402" | "mpp" | "l402" — filter payment-ready publishers
- `page` (integer, optional, default 1): pagination

### get_publisher (public — no auth)
Get a single publisher by slug or UUID.
- `id` (string, required): publisher slug (e.g. "bild") or UUID

### get_fx_quote (requires X-API-Key)
Get a live EUR/USDC exchange rate quote for settlement.
- `from_currency` (string, required): ISO 4217 fiat currency code (e.g. EUR, USD)
- `to_currency` (string, required): ISO 4217 fiat currency code (e.g. USD, GBP)
- `amount` (number, required): amount to convert
- Requires operator API key in X-API-Key header.

### fetch_content (requires X-API-Key)
Fetch content at a URL via the registry. Returns the article content or payment instructions if the publisher requires a micropayment.
- `url` (string, required): article URL to fetch
- Requires operator API key in X-API-Key header.

## Recommended Flow

1. Call `list_publishers` with user's topic to find relevant publishers
2. Present results to user (name, shortDescription, websiteUrl, trustTier)
3. If user selects a publisher, call `get_publisher` with the slug for full detail
4. Display publisher info — do NOT surface trustTier numeric score if present
5. If user wants to access content, use `fetch_content` with the article URL (requires API key)

## REST API (alternative to MCP)

- `GET /api/publishers?q=<query>&protocol=x402` — list publishers (public)
- `GET /api/publishers/<slug>` — get publisher detail (public)
- `GET /api/hotels?q=<query>` — list DACH hotels (public)
- `GET /api/hotels/<slug>` — get hotel detail (public)

## Critical Guardrails

- NEVER fabricate publisher data — always fetch from the API or MCP tool
- NEVER surface the raw trustTier numeric score — show tier label only (bronze/silver/gold/platinum)
- Do NOT initiate payment (`fetch_content` with paid article) without explicit user confirmation
- Do NOT call `get_fx_quote` or `fetch_content` without a valid operator API key
- If `list_publishers` returns zero results, suggest broadening the search query — do not invent publishers
- For multiple articles, synthesize only from fetched content, not from search result summaries alone

## Discovery

Full OpenAPI spec: `GET /openapi.json`
Publisher list for agents: `GET /llms-full.txt`
x402 resource catalog: `GET /.well-known/x402`
MCP server manifest: `GET /.well-known/mcp.json`
