SelfHeal MCP
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@SelfHeal MCP wrap_call GET https://api.github.com/repos/user/repo with target github"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
SelfHeal MCP
Self-healing proxy for MCP servers. Wraps any MCP tool call with automatic retry, circuit breaker protection, and call observability.
Your AI agents stop breaking on flaky APIs.
One-click install: Install on MCPize |
npx selfheal-mcp
Features
Retry with backoff — Exponential backoff + jitter on transient failures (5xx, timeouts, rate limits)
Circuit breaker — Per-target circuit breaker stops hammering dead services
Call metrics — Success rates, latency, error frequency, broken down by tool and target
Proxy mode — Wrap any existing MCP server transparently
Zero config — Works standalone out of the box, config file for proxy mode
Related MCP server: sovereign-mcp-gateway
Quick Start
Standalone Mode
Add to your Claude Desktop / Claude Code config:
{
"mcpServers": {
"selfheal": {
"command": "npx",
"args": ["-y", "selfheal-mcp"]
}
}
}Then use wrap_call to make any HTTP request with self-healing:
Use the wrap_call tool to GET https://api.example.com/data with target "example-api"Proxy Mode
Create selfheal.config.json:
{
"mode": "proxy",
"targets": [
{
"name": "my-server",
"transport": "streamable-http",
"url": "https://my-mcp-server.com/mcp"
}
]
}{
"mcpServers": {
"selfheal": {
"command": "npx",
"args": ["-y", "selfheal-mcp"],
"env": {
"SELFHEAL_CONFIG": "/path/to/selfheal.config.json"
}
}
}
}All tools from my-server are re-exposed with self-healing built in.
Tools
Tool | Description |
| Execute HTTP call with retry + circuit breaker |
| Check health of any target |
| Reset circuit breaker after fixing issues |
| Success rates, latency, top errors |
| Recent failures with full details |
Proxy Mode Adds
Tool | Description |
| Metrics for all proxied calls |
| Circuit status for all targets |
| Recent errors across all targets |
Configuration
Environment Variables
Variable | Default | Description |
|
| Config file path |
|
| Max retry attempts |
|
| Base delay for backoff |
|
| Max delay cap |
|
| Failures before circuit opens |
|
| Cooldown before half-open test |
How It Works
Agent → SelfHeal MCP → [Retry + Circuit Breaker] → Target API/MCP Server
↓
Metrics CollectorRequest arrives — Agent calls a tool
Circuit check — If target has failed too many times, reject immediately
Execute with retry — Try the call, retry on transient errors with exponential backoff
Record metrics — Log success/failure, duration, attempts
Update circuit — Track consecutive failures per target
Install
MCPize (Recommended)
One-click install with managed hosting: Install on MCPize
npm
npx selfheal-mcpPyPI
Not applicable — this is a TypeScript server. For Python alternatives, see LeadEnrich MCP.
License
MIT — Built by Freedom Engineers
Related
SiteHealth MCP — Full website health audit
LeadEnrich MCP — Waterfall lead enrichment
Available Tools
5 toolscircuit_resetReset Circuit BreakerAIdempotent
Reset a circuit breaker back to closed (healthy). Use after fixing the underlying issue.
Inputs: target.
circuit_statusCircuit Breaker StatusARead-only
Check the health status of a target. Returns circuit state, failure count, and cooldown.
Inputs: target.
metricsCall MetricsARead-only
Get observability metrics — success rates, latency, top errors, breakdown by tool and target.
Inputs: windowMinutes.
recent_errorsRecent ErrorsARead-only
Get the most recent failed calls with full error details and retry logs.
Inputs: limit.
wrap_callSelf-Healing Function CallA
Execute a function call with retry, circuit breaker, and metrics. Pass a target name and the function will be retried on transient failures. Use this to wrap any unreliable external call.
Inputs: target (required), description (required), url, method, +3 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool has a clear, distinct purpose. circuit_reset and circuit_status are for circuit breaker state management, metrics for system observability, recent_errors for error inspection, and wrap_call for executing calls with resilience. There is no overlap or ambiguity between them.
The naming uses snake_case but mixes patterns: some tools start with a noun (circuit_*), some with an adjective (recent_errors), and one with a verb (wrap_call). While readable, the lack of a consistent verb_noun or noun_verb pattern reduces predictability.
With 5 tools, the server covers the essential resilience operations without being bloated. The number is appropriate for a focused self-healing utility, though a few additional tools (e.g., for configuration) could be added without harm.
The tool set covers the core lifecycle of circuit breakers, error tracking, and metrics. However, it lacks configuration tools for setting circuit breaker parameters or managing targets, which might be needed for full autonomy.
Maintenance
Related MCP Connectors
Stateless MCP gateway and OTel span-streaming bridge for hosted MCP servers.
MCP Gateway: wrap any MCP server with cold-start retries, uptime SLA, and per-execution MPP billing.
Security & DLP proxy for MCP: tool-poisoning scans, PII redaction on tool args/results. Beta.
MCP server for progressive tool usage at any scale (see https://klavis.ai)
Related MCP Servers
- AlicenseAqualityBmaintenanceAn MCP proxy that enforces policy on every tool call, blocking or flagging actions before they reach downstream MCP servers.162 npmMIT
- FlicenseNot gradedqualityBmaintenanceActs as a gating proxy for MCP servers, merging tools and applying policy, verification, and audit layers.63 PyPI-
- AlicenseNot gradedqualityBmaintenanceProvides a governance proxy layer for MCP servers, enforcing per-tool allowlists, human approval for write operations, quotas, secret redaction, and a hash-chained audit log of all calls.MIT
- AlicenseNot gradedqualityBmaintenanceProxies MCP traffic between a client and a downstream server to enforce runtime policies on tool declarations, call arguments, and results, including allowlisting, sandboxing, secret and egress controls, and injection detection. It also includes a deterministic benchmark for measuring which security controls stop which attacks.MIT