Onur45500

Managed MCP Doctor — Security skill for Claude Code

Security community

Audit Claude Code MCP governance drift, catch when allowedMcpServers no longer covers managedMcpServers (2.1.259+).

How to install Managed MCP Doctor

This entry records only its repository, not the path inside it, so there is no exact command to give. Open Onur45500/managed-mcp-doctor and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Managed MCP Doctor does

Audit Claude Code MCP governance drift, catch when allowedMcpServers no longer covers managedMcpServers (2.1.259+). CLI + JSON/SARIF for CI.

Alternatives in Security

  • Node9 Proxy — The Execution Security Layer for the Agentic Era 209 ★
  • AWS MCP Server — by alexei-led - Features multiple Python environment setup options with detailed code style guidelines, compre 182 ★
  • Sovereign Skills — 20 production-grade skills for AI coding agents — setup, scope, discipline, code review, security, session man 125 ★

README

managed-mcp-doctor

[![CI](https://github.com/Onur45500/managed-mcp-doctor/actions/workflows/ci.yml/badge.svg)](https://github.com/Onur45500/managed-mcp-doctor/actions/workflows/ci.yml) [![npm](https://img.shields.io/npm/v/managed-mcp-doctor.svg)](https://www.npmjs.com/package/managed-mcp-doctor) [![Node.js](https://img.shields.io/node/v/managed-mcp-doctor.svg)](https://nodejs.org) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)

managed-mcp-doctor logo

Your `allowedMcpServers` allowlist stopped covering org-pushed MCP servers in Claude Code **2.1.259**. This tells you which ones just became reachable — and can write a drop-in fix fragment.

Install & run (10 seconds)

npx managed-mcp-doctor

JSON / SARIF for CI:

npx managed-mcp-doctor --json --fail-on critical
npx managed-mcp-doctor --sarif --fail-on warn > mcp-doctor.sarif

Guided fix (dry-run, then write):

npx managed-mcp-doctor --fix
npx managed-mcp-doctor --fix --write --yes   # writes managed-settings.d/90-mcp-doctor.json

Under `managedSourcesBehavior: "first-wins"`, if MDM / HKLM / remote is the winning source, `--fix --write` **refuses** (exit 2) so you do not leave a dead drop-in. Dry-run still prints the fragment with a deploy-into-winner note. Use `--force-write` only when fleet tooling syncs that JSON elsewhere. After a successful write, the tool **re-audits** and reports which finding ids were resolved vs remaining.

![Guided --fix fragment](docs/images/fix-fragment.png)

Sample report

Before (policy drift)

![Drift report](docs/images/report-drift.png)

Allowlist present, no denylist, managed servers pushed — `CRITICAL` for ungoverned `managedMcpServers` entries plus related `WARN`s.

After (healthy locks)

![Clean report](docs/images/report-clean.png)

Denylist covers managed servers, allowlist locked with `allowManagedMcpServersOnly`, `d