# MCP repair

> MCP repair is an open-source agent skill for developer tools. Diagnoses and repairs a broken mokata MCP server registration in Claude Code. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/JasGujral/mokata-oss/tree/main/src/mokata/skills/mcp-repair
- **Repository:** https://github.com/jasgujral/mokata-oss
- **GitHub stars:** 19
- **License:** Apache-2.0
- **Skill name:** mcp-repair
- **Collection:** https://github.com/JasGujral/mokata-oss
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-01

## About

This skill handles the case where an already-installed mokata MCP server or its tools stop connecting in Claude Code. The agent runs the bundled mokata CLI to check the server with a real initialize handshake, reports the specific failure code, and rewrites the Claude Code registration only when a repair is needed. The registration write is shown to the user for approval before it happens, and the merge-safe, idempotent write leaves other MCP servers and settings untouched.

The workflow ends with a re-check so the result is confirmed rather than assumed. Because a newly registered server only loads on the next launch, the agent tells the user to restart Claude Code and then look for mokata in the /mcp list. If the SDK is missing because Python is older than 3.12, the skill relays the one-line upgrade fix instead of trying to re-register.

It expects Python with the mokata package available, and it is meant for repairs of an existing install. First-time setup is handled by a separate mokata setup command.

## When your agent uses it

> mokata · Repair the mokata MCP server when its tools aren't connecting — check the registration, fix it, and tell you the one step left (restart Claude Code). Repair, not first-time setup.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/JasGujral/mokata-oss/tree/HEAD/src/mokata/skills/mcp-repair)
- [License: Apache-2.0](https://github.com/JasGujral/mokata-oss/tree/HEAD/src/mokata/skills/mcp-repair)

## Features

- **Live connection check:** Runs a real MCP initialize handshake against the currently registered mokata server to see whether it responds.
- **Specific failure diagnosis:** Names the cause reported by the CLI, such as a missing registration, a command not found, or a timeout.
- **Gated registration repair:** Rewrites the Claude Code MCP registration through a previewed, approval-gated write that preserves other servers.
- **Re-verification after repair:** Repeats the connection check after the write to confirm the fix took effect.
- **Restart guidance:** Tells the user the one step left to take, which is restarting Claude Code so it loads the server.
- **Python version check:** Identifies when the MCP SDK is absent because Python is below 3.12 and relays the upgrade fix.

## Good for

- My mokata MCP server won't connect in Claude Code, can you fix it?
- The mokata tools are missing from my session, check the registration
- /mcp doesn't list mokata anymore, repair the server
- Why does the mokata MCP server fail to start on my machine?

## Install

### Claude Code

This skill ships in the `mokata` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add JasGujral/mokata-oss
/plugin install mokata@mostack
```

Or copy only this skill to `~/.claude/skills/mcp-repair`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/JasGujral/mokata-oss.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/mcp-repair &&
cp -R "$tmp/src/mokata/skills/mcp-repair" ~/.claude/skills/mcp-repair &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/mcp-repair` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/mcp-repair` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/JasGujral/mokata-oss.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/mcp-repair &&
cp -R "$tmp/src/mokata/skills/mcp-repair" ~/.agents/skills/mcp-repair &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/mcp-repair` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/mcp-repair` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/JasGujral/mokata-oss.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/mcp-repair &&
cp -R "$tmp/src/mokata/skills/mcp-repair" ~/.cursor/skills/mcp-repair &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/mcp-repair` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/JasGujral/mokata-oss.git --path src/mokata/skills/mcp-repair
```

Or copy the folder to `~/.gemini/skills/mcp-repair` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/mcp-repair`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/JasGujral/mokata-oss.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/mcp-repair &&
cp -R "$tmp/src/mokata/skills/mcp-repair" ~/.copilot/skills/mcp-repair &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/mcp-repair` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/JasGujral/mokata-oss.git
```

Then copy `mokata-oss/src/mokata/skills/mcp-repair` into your agent's skills folder as `mcp-repair`. Agents that support SKILL.md read one folder per skill.

## FAQ

### When should MCP repair trigger instead of setup?

It triggers when the user reports that mokata's MCP server or tools are not working on an existing install. First-time setup is directed to the separate /mokata:setup command.

### What does MCP repair change on my machine?

It rewrites the Claude Code MCP registration, either in the project .mcp.json or in ~/.claude.json with user scope. The write is merge-safe, so other MCP servers and keys are not touched.

### Do I need to restart anything afterward?

Yes. A newly registered MCP server only loads on the next Claude Code launch, so the user needs to restart Claude Code and then check that mokata appears in /mcp.

### What if Python is too old?

If the MCP SDK is absent because Python is below 3.12, the skill does not re-register. It relays the one-line fix, which is upgrading mokata with pip on Python 3.12 or newer.

### How do I install MCP repair in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/mcp-repair to use it in all your projects, or to .claude/skills/mcp-repair in one project. Or install the mokata plugin, which includes it: /plugin marketplace add JasGujral/mokata-oss, then /plugin install mokata@mostack.

### Does MCP repair run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use MCP repair?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

### What are the best alternatives to MCP repair?

The closest alternatives to MCP repair are Setup debugger, Chrome MCP troubleshooting, Google ads API MCP setup, MCP CLI and MCP release QA.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Setup debugger](https://ai-powered.com/skills/setup-debugger): Setup debugger is an open-source agent skill for developer tools.
- [Chrome MCP troubleshooting](https://ai-powered.com/skills/chrome-mcp-troubleshooting): Chrome MCP troubleshooting is an open-source agent skill for developer tools.
- [Google ads API MCP setup](https://ai-powered.com/skills/google-ads-api-mcp-setup): Google ads API MCP setup is an open-source agent skill for marketing and seo.
- [MCP CLI](https://ai-powered.com/skills/mcp-cli): MCP CLI is an open-source agent skill for developer tools.
- [MCP release QA](https://ai-powered.com/skills/mcp-release-qa): MCP release QA is an open-source agent skill for developer tools.
- [MCP builder](https://ai-powered.com/skills/mcp-builder-microsoft): MCP builder is an open-source agent skill for ai models and llm tooling.
- [Python MCP server generator](https://ai-powered.com/skills/python-mcp-server-generator): Python MCP server generator is an open-source agent skill for developer tools.
- [Connect](https://ai-powered.com/skills/connect-merrymen-labs): Connect is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/mcp-repair
