Safe4 — the payment firewall for AI agents. MCP server manifest and client examples. Hosted at api.safe4.ai.
- ✓Open-source license (MIT)
- ✓Actively maintained (<30d)
- ✓Clear description
- ✓Documented (README)
git clone https://github.com/Safe4AI/safe4-mcp{
"mcpServers": {
"safe4-mcp": {
"command": "node",
"args": ["/path/to/safe4-mcp/dist/index.js"]
}
}
}Resumen de MCP Servers
# Safe4 — the payment firewall for AI agents, as an MCP server
Safe4 decides whether an AI agent's proposed payment should be allowed, by
testing the purchase against the task the agent was actually given.
The case it exists for is the one budget limits miss: a payment that is inside
every budget, in an allowed category, and to an approved counterparty — and is
still the wrong purchase, because it does not serve the task.
This repository is the public manifest and client example for the hosted MCP
server. The service itself runs at `api.safe4.ai`; there is no server to
install.
## Connect
Streamable HTTP, no installation:
```json
{
"mcpServers": {
"safe4": {
"type": "http",
"url": "https://api.safe4.ai/mcp/"
}
}
}
```
Connecting and listing tools are free. Only `safe4_authorize` is paid.
## Tools
### `safe4_price` — free
Returns the current price and the payment networks the endpoint accepts, so an
agent can see the cost before committing to a paid call.
### `safe4_authorize` — paid, settled per call in USDC over x402
Returns an `ALLOW` or `DENY` decision for a proposed payment, with a reason
code, the concepts it matched, and a hash-chained audit entry.
Called without a payment it returns the x402 challenge instead of a decision.
An x402-aware client pays and calls again with the resulting payload in the
`payment` argument.
Arguments:
| Argument | Meaning |
|---|---|
| `task` | The task the agent was given, as stated by its principal |
| `purchase` | What is being bought |
| `purchase_purpose` | Why this purchase serves the task |
| `amount`, `currency` | The proposed payment |
| `counterparty` | Who would receive it |
| `service_category` | Category of the thing being bought |
| `allowed_service_categories` | Categories the principal permits |
| `allowed_counterparties` | Optional. Payees the principal permits |
| `task_id` | Optional. Echoed into the audit entry |
| `payment` | An x402 payment payload. Omit to receive the price list |
The task and the two allow-lists are the principal's constraints, not the
agent's — they are what the purchase is tested against, so an agent that writes
its own `task` is grading its own homework. Safe4 records every field it was
given and marks the task context as request-supplied, so a substituted
constraint is visible in the audit entry afterwards.
## Try it without paying
The example runs the entire free surface — connect, list tools, read the price,
fetch the challenge — and stops before signing anything. It needs only `httpx`:
no key, no funded wallet.
```bash
python examples/mcp_buyer_demo.py https://api.safe4.ai --dry-run
```
Drop `--dry-run` and set `SAFE4_BUYER_PRIVATE_KEY` to buy a real decision. That
signs an EIP-3009 authorisation for exactly the amount and payee the server
advertised, and nothing else; the script holds no custody and Safe4 never sees
the key.
## What a decision rests on
Four checks, in order, and a purchase must clear all of them:
1. **Budget and caps** — per-transaction, daily, and agent-scoped limits.
2. **Service category** — the purchase's category must be one the principal
permitted.
3. **Counterparty** — when the task declares `allowed_counterparties`, payment
to anyone else is refused. This is the only check that sees a swapped payee;
task text and category are identical in that attack.
4. **Task-to-purchase match** — the task must account for what the purchase
says it is buying, not merely share a word or two with it.
Every decision is appended to a hash-chained audit log. Each entry carries the
previous entry's hash, so the record is tamper-evident and continuous across
restarts and redeploys.
## Payment
Priced per call in USDC over [x402](https://x402.org). The endpoint advertises
its terms in the `402` challenge; buyers pay on whichever advertised network
suits them. Safe4 holds no wallet key and takes no custody of buyer funds.
## Links
- API documentation — <https://api.safe4.ai/docs>
- OpenAPI schema — <https://api.safe4.ai/openapi.json>
- x402 discovery — <https://api.safe4.ai/.well-known/x402>
- Site — <https://safe4.ai>
## Security
Reporting instructions are in [SECURITY.md](SECURITY.md). Please do not open a
public issue containing exploit details.
## License
The manifest and client examples in this repository are [MIT](LICENSE) licensed.
The hosted service they describe is a separate commercial product.
Lo que la gente pregunta sobre safe4-mcp
¿Qué es Safe4AI/safe4-mcp?
+
Safe4AI/safe4-mcp es mcp servers para el ecosistema de Claude AI. Safe4 — the payment firewall for AI agents. MCP server manifest and client examples. Hosted at api.safe4.ai. Tiene 0 estrellas en GitHub y su última actualización registrada es del 2026-08-27.
¿Cómo se instala safe4-mcp?
+
Puedes instalar safe4-mcp clonando el repositorio (https://github.com/Safe4AI/safe4-mcp) o siguiendo las instrucciones del README en GitHub. ClaudeWave también te ofrece bloques de instalación rápida en esta misma página.
¿Es seguro usar Safe4AI/safe4-mcp?
+
Nuestro agente de seguridad ha analizado Safe4AI/safe4-mcp y le ha asignado un Trust Score de 87/100 (tier: Trusted). Revisa el desglose completo de comprobaciones superadas y flags en esta página.
¿Quién mantiene Safe4AI/safe4-mcp?
+
Safe4AI/safe4-mcp es mantenido por Safe4AI. La última actividad registrada en GitHub es del 2026-08-27, con 0 issues abiertos.
¿Hay alternativas a safe4-mcp?
+
Sí. En ClaudeWave puedes explorar mcp servers similares en /categories/mcp, ordenados por popularidad o actividad reciente.
Despliega safe4-mcp en tu cloud
Lleva este repo a producción en minutos. Cada plataforma genera su propio entorno con variables de entorno editables.
¿Mantienes este repo? Añade un badge a tu README
Pega el badge en tu README de GitHub para mostrar que está auditado por ClaudeWave. Cada badge enlaza de vuelta a esta página y muestra el Trust Score actual.
[](https://claudewave.com/repo/safe4ai-safe4-mcp)<a href="https://claudewave.com/repo/safe4ai-safe4-mcp"><img src="https://claudewave.com/api/badge/safe4ai-safe4-mcp" alt="Featured on ClaudeWave: Safe4AI/safe4-mcp" width="320" height="64" /></a>Más MCP Servers
Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.
User-friendly AI Interface (Supports Ollama, OpenAI API, ...)
An open-source AI agent that brings the power of Gemini directly into your terminal.
Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface
The fastest path to AI-powered full stack observability, even for lean teams.
🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl!