> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wovepay.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Servidor remoto

> mcp.wovepay.com — endpoint HTTP, health check e deploy

## Endpoints

| Rota      | Método | Descrição                             |
| --------- | ------ | ------------------------------------- |
| `/mcp`    | POST   | Streamable HTTP — transporte MCP      |
| `/health` | GET    | Status, versão, contagem de operações |

### Health check

```bash theme={null}
curl https://mcp.wovepay.com/health
```

Resposta esperada:

```json theme={null}
{
  "ok": true,
  "version": "1.0.0",
  "brand": "wovepay",
  "apiBase": "https://api.wovepay.com/v1",
  "specs": ["v1"],
  "operations": 101,
  "docs": 94
}
```

## Autenticação HTTP

Passe a API key em cada request MCP:

```http theme={null}
POST /mcp HTTP/1.1
Host: mcp.wovepay.com
Authorization: Bearer wp_live_...
Content-Type: application/json
```

Alternativa: header `X-API-Key: wp_live_...`

O servidor detecta a marca pelo header `Host` (`mcp.wovepay.com` → WovePay, `mcp.wovepay.com` → WovePay). Um único deploy atende os dois domínios.

## Transporte

O servidor usa **Streamable HTTP** (spec MCP 2025-03-26+), compatível com Cursor remote MCP e clientes modernos.

Sessões MCP são mantidas via header `mcp-session-id` após o `initialize`.

## Deploy

Hospedado no **Railway** com build Docker a partir do monorepo:

```bash theme={null}
docker build -f mcp-server/Dockerfile -t platform-mcp .
```

DNS: CNAME `mcp` → Railway (Cloudflare) em **wovepay.com** e **wovepay.com**.

Variáveis de ambiente em produção:

| Variável           | Descrição                         |
| ------------------ | --------------------------------- |
| `PORT`             | Porta HTTP (default `3005`)       |
| `WOVEPAY_API_KEY`  | Fallback stdio / health para Wove |
| `WovePay_API_KEY`  | Fallback stdio / health para Goat |
| `WOVEPAY_API_BASE` | Override API Wove (opcional)      |
| `WovePay_API_BASE` | Override API Goat (opcional)      |
| `MCP_MAX_PAGES`    | Paginação máxima (default `10`)   |
| `MCP_MAX_RETRIES`  | Retries HTTP (default `3`)        |

Para stdio local Wove: `MCP_BRAND=wovepay` + `WOVEPAY_API_KEY=wp_live_...`.
