Back to Browse

Selfheal MCP Server

Developer ToolsLow Risk10.0MCP RegistryLocal
Free

Server data from the Official MCP Registry

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

About

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

Security Report

10.0
Low Risk10.0Low Risk

Valid MCP server (3 strong, 3 medium validity signals). No known CVEs in dependencies. Package registry verified. Imported from the Official MCP Registry. Trust signals: trusted author (4/4 approved).

7 files analyzed · 1 issue found

Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.

Permissions Required

This plugin requests these system permissions. Most are normal for its category.

file_system

Check that this permission is expected for this type of plugin.

HTTP Network Access

Connects to external APIs or services over the internet.

env_vars

Check that this permission is expected for this type of plugin.

What You'll Need

Set these up before or after installing:

Path to selfheal.config.json (optional, defaults to cwd)Optional

Environment variable: SELFHEAL_CONFIG

Max retry attempts per call (default: 3)Optional

Environment variable: SELFHEAL_MAX_RETRIES

Failures before circuit opens (default: 5)Optional

Environment variable: SELFHEAL_CIRCUIT_THRESHOLD

How to Install

Add this to your MCP configuration file:

{
  "mcpServers": {
    "io-github-carsonroell-debug-selfheal-mcp": {
      "env": {
        "SELFHEAL_CONFIG": "your-selfheal-config-here",
        "SELFHEAL_MAX_RETRIES": "your-selfheal-max-retries-here",
        "SELFHEAL_CIRCUIT_THRESHOLD": "your-selfheal-circuit-threshold-here"
      },
      "args": [
        "-y",
        "selfheal-mcp"
      ],
      "command": "npx"
    }
  }
}

Documentation

View on GitHub

From the project's GitHub README.

SelfHeal MCP

npm License: MIT MCPize

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

MCPize (Recommended)

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

Related

Reviews

No reviews yet

Be the first to review this server!