# Carlos Rivera API & Developer Documentation — MCPWire, Folio & Panas

Official technical documentation for the APIs, Model Context Protocol (MCP) servers, command-line tools (CLIs), SDK contracts, and machine-readable endpoints built by **Carlos Rivera**.

- **Dedicated MCP Servers, CLI & SDK Reference**: [https://carlosrivera.im/mcp](https://carlosrivera.im/mcp) ([Markdown](https://carlosrivera.im/mcp.md))
- **MCP Server Manifest & Streamable HTTP Endpoint**: [https://carlosrivera.im/.well-known/mcp](https://carlosrivera.im/.well-known/mcp)
- **Agent Instructions & When-to-Use Guide**: [https://carlosrivera.im/agent-instructions.md](https://carlosrivera.im/agent-instructions.md)
- **LLM Directory**: [https://carlosrivera.im/llms.txt](https://carlosrivera.im/llms.txt) · [https://carlosrivera.im/llms-full.txt](https://carlosrivera.im/llms-full.txt)
- **GitHub Organizations**: [github.com/carlosrivera](https://github.com/carlosrivera) · [github.com/mcpwire](https://github.com/mcpwire)

## 1. Site Content Negotiation & Machine-Readable API (https://carlosrivera.im)

Every public page on `https://carlosrivera.im` supports Markdown content negotiation (`Accept: text/markdown`) with `Vary: Accept` alongside direct static `.md` URLs and JSON-LD structured data:

```bash
# Fetch the homepage as Markdown via HTTP content negotiation
curl -sS -L -i -H 'Accept: text/markdown' https://carlosrivera.im/

# Fetch direct Markdown endpoints
curl -sS -L https://carlosrivera.im/index.md
curl -sS -L https://carlosrivera.im/docs.md
curl -sS -L https://carlosrivera.im/mcp.md
```

### Public Machine-Readable Endpoints
| Endpoint | Content-Type | Purpose |
| :--- | :--- | :--- |
| `/llms.txt` | `text/plain; charset=utf-8` | Concise LLM directory with when-to-use agent guidance and canonical links |
| `/llms-full.txt` | `text/plain; charset=utf-8` | Complete Markdown corpus including tool documentation and full blog essays |
| `/agent-instructions.md` | `text/markdown; charset=utf-8` | Dedicated agent instruction file detailing best-fit jobs and calling conventions |
| `/.well-known/mcp` | `application/json; charset=utf-8` | MCP server manifest and Streamable HTTP JSON-RPC 2.0 endpoint |
| `/.well-known/mcp.json` | `application/json; charset=utf-8` | Static JSON mirror of the MCP server manifest and tool schemas |
| `/rss.xml` / `/es/rss.xml` | `application/rss+xml` | Bilingual RSS 2.0 feeds for technical essays |
| `/sitemap-index.xml` | `application/xml` | XML sitemap index with localized `hreflang` annotations |

## 2. MCPWire CLI & Encrypted P2P MCP Proxy API (`@mcpwire/cli`)

**MCPWire** ([https://mcpwire.co](https://mcpwire.co) · [npmjs.com/package/@mcpwire/cli](https://www.npmjs.com/package/@mcpwire/cli) · [github.com/mcpwire](https://github.com/mcpwire)) is an encrypted peer-to-peer proxy and CLI for Model Context Protocol (MCP) servers. It lets developers and autonomous agents share local MCP tools across machines without opening firewall ports or exposing private API credentials.

### CLI Installation & Commands
```bash
# Run directly with npx
npx -y @mcpwire/cli --help

# Host and share a local stdio or SSE MCP server over an encrypted P2P session
npx -y @mcpwire/cli share --command "node ./my-mcp-server.js"

# Connect an MCP client (Claude Desktop, Cursor, Codex, Antigravity) to a remote peer
npx -y @mcpwire/cli connect <session-ticket>
```

## 3. Folio — Markdown-to-PDF Publisher & MCP Server API

**Folio** ([https://carlosrivera.github.io/folio/](https://carlosrivera.github.io/folio/) · [github.com/carlosrivera/folio](https://github.com/carlosrivera/folio)) turns raw Markdown files into paginated, publication-grade PDF reports and executive memos using Typst, Rust, and WebAssembly, with vector KaTeX math and native diagrams.

### Folio MCP Server Tools
- `folio_list_document_types`: List available document templates (executive memos, technical RFCs, proposals, reports).
- `folio_get_document_type`: Retrieve metadata and schema requirements for a specific document type.
- `folio_register_document_type`: Register a custom document layout definition.
- `folio_create_document`: Create a paginated Folio document from Markdown source and frontmatter metadata.
- `folio_customize_document`: Configure page geometry, margins, headers, footers, and typographic scale.
- `folio_lint_document`: Audit pagination breaks, orphaned headings, overflowing tables, and broken links before export.
- `folio_export_pdf`: Render and export the verified document to a print-ready PDF file.
- `folio_list_styles`, `folio_create_style`, `folio_duplicate_style`, `folio_update_style`, `folio_apply_style`: Manage and apply editorial typographic themes programmatically.

## 4. Panas — Peer-to-Peer Compute & Inference MCP API

**Panas** ([https://panas.mcpwire.co](https://panas.mcpwire.co)) is a distributed peer-to-peer compute and tool marketplace built over MCP and MCPWire. Autonomous agents can discover idle machines, lock in cryptographic price quotes with Solana USDC settlement, and execute workloads inside air-gapped Docker sandboxes.

### Panas MCP Server Tools
- `discover_providers` / `get_provider`: Query available peer compute nodes, supported models, hardware capabilities, and pricing.
- `quote_inference`: Request a deterministic price quote bound to a model, token budget, and execution timeout.
- `get_balance` / `create_funding_intent` / `confirm_funding`: Inspect buyer ledger balance and confirm on-chain Solana USDC funding transactions.
- `purchase_access`: Reserve ledger funds and issue a signed cryptographic execution grant for a quoted workload.
- `run_inference`: Execute the workload over an encrypted MCPWire tunnel inside the provider's network-disabled Docker worker sandbox.
- `get_request` / `cancel_request`: Recover encrypted execution outputs and receipts idempotently across network retries or cancel pending jobs.
