SelfHeal MCP

Registre officiel Cloud et DevOps

Self-healing proxy for MCP servers with retry, circuit breaker, and observability

Que pouvez-vous faire avec SelfHeal MCP ?

  • 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

Installation

Ajoutez ceci à la configuration MCP de votre client (Claude Desktop : claude_desktop_config.json ; Cursor : .cursor/mcp.json ; VS Code et les autres utilisent la même forme « mcpServers »).

NPM package selfheal-mcp
Claude Code
claude mcp add selfheal-mcp -e 'SELFHEAL_CONFIG=<SELFHEAL_CONFIG>' -e 'SELFHEAL_MAX_RETRIES=<SELFHEAL_MAX_RETRIES>' -e 'SELFHEAL_CIRCUIT_THRESHOLD=<SELFHEAL_CIRCUIT_THRESHOLD>' -- npx -y selfheal-mcp@0.1.1
Configuration JSON (Claude Desktop, Cursor, VS Code)
{
    "mcpServers": {
        "selfheal-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "selfheal-mcp@0.1.1"
            ],
            "env": {
                "SELFHEAL_CONFIG": "<SELFHEAL_CONFIG>",
                "SELFHEAL_MAX_RETRIES": "<SELFHEAL_MAX_RETRIES>",
                "SELFHEAL_CIRCUIT_THRESHOLD": "<SELFHEAL_CIRCUIT_THRESHOLD>"
            }
        }
    }
}

Variables d'environnement

  • SELFHEAL_CONFIG Path to selfheal.config.json (optional, defaults to cwd)
  • SELFHEAL_MAX_RETRIES Max retry attempts per call (default: 3)
  • SELFHEAL_CIRCUIT_THRESHOLD Failures before circuit opens (default: 5)

Documentation

Tirée du README du projet sur GitHub, actualisée chaque semaine. Les liens ouvrent GitHub.

Sommaire
  1. SelfHeal MCP
  2. Features
  3. Quick Start
  4. Tools
  5. Configuration
  6. How It Works
  7. Install
  8. License
  9. Related

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

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

ToolDescription
wrap_callExecute HTTP call with retry + circuit breaker
circuit_statusCheck health of any target
circuit_resetReset circuit breaker after fixing issues
metricsSuccess rates, latency, top errors
recent_errorsRecent failures with full details
Proxy Mode Adds
ToolDescription
selfheal_metricsMetrics for all proxied calls
selfheal_circuitsCircuit status for all targets
selfheal_recent_errorsRecent errors across all targets

Configuration

Environment Variables
VariableDefaultDescription
SELFHEAL_CONFIG./selfheal.config.jsonConfig file path
SELFHEAL_MAX_RETRIES3Max retry attempts
SELFHEAL_BASE_DELAY_MS1000Base delay for backoff
SELFHEAL_MAX_DELAY_MS30000Max delay cap
SELFHEAL_CIRCUIT_THRESHOLD5Failures before circuit opens
SELFHEAL_CIRCUIT_COOLDOWN_MS120000Cooldown before half-open test

How It Works

Agent → SelfHeal MCP → [Retry + Circuit Breaker] → Target API/MCP Server
                ↓
          Metrics Collector
  1. Request arrives — Agent calls a tool
  2. Circuit check — If target has failed too many times, reject immediately
  3. Execute with retry — Try the call, retry on transient errors with exponential backoff
  4. Record metrics — Log success/failure, duration, attempts
  5. Update circuit — Track consecutive failures per target

Install

One-click install with managed hosting: Install on MCPize

npm
npx selfheal-mcp
PyPI

Not applicable — this is a TypeScript server. For Python alternatives, see LeadEnrich MCP.

License

MIT — Built by Freedom Engineers

Questions fréquentes

Qu'est-ce que SelfHeal MCP ?

Self-healing proxy for MCP servers with retry, circuit breaker, and observability

Comment installer SelfHeal MCP ?

Il s'exécute sur votre machine. Dans Claude Code : claude mcp add selfheal-mcp -e 'SELFHEAL_CONFIG=<SELFHEAL_CONFIG>' -e 'SELFHEAL_MAX_RETRIES=<SELFHEAL_MAX_RETRIES>' -e 'SELFHEAL_CIRCUIT_THRESHOLD=<SELFHEAL_CIRCUIT_THRESHOLD>' -- npx -y selfheal-mcp@0.1.1. Pour les autres clients, collez la configuration JSON de cette page dans leurs réglages MCP.

Faut-il une clé API pour SelfHeal MCP ?

Son entrée au registre n'indique aucune clé ni secret obligatoire. Certaines fonctions peuvent tout de même demander un compte auprès du service auquel il se connecte.

SelfHeal MCP est-il open source ?

Son code est public sur GitHub, mais le dépôt ne déclare pas de licence standard.

Qui maintient SelfHeal MCP ?

Il est publié par carsonroell-debug. AI.tn le référence sans le maintenir ni le recommander.

Issu du registre MCP officiel. Être listé n'est pas une recommandation : vérifiez le code et les permissions d'un serveur avant de lui donner accès à vos données.