Skip to main content
Glama
Local Dev Doctor MCP

Local Dev Doctor MCP

by efficjump

English | 한국어

Local Dev Doctor MCP

CI Python 3.11+ License: MIT

Local Dev Doctor turns an unfamiliar development checkout into an evidence-backed diagnosis. It discovers how the project is meant to run, checks safe prerequisites, and executes only the exact probe that a user approves.

It never installs packages, edits configuration, starts services automatically, or persists environment values.

How it works

flowchart LR
    A[Discover project profile] --> B[Run safe preflight]
    B --> C[Prepare exact probe]
    C --> D{Explicit approval}
    D -->|Approved| E[Run bounded probe]
    D -->|Declined| F[Stop without execution]
    E --> G[Evidence-bound analysis]
    G --> H[Build redacted runbook]

The profile is derived from the project itself: package-manager files, declared scripts, service definitions, environment-variable names, executable requirements, and loopback ports. No framework-specific command table is baked into the server.

Related MCP server: DevEnv Doctor MCP

Highlights

  • Dynamic discovery across project manifests and service definitions

  • Secret-free preflight checks for executables, variable names, and loopback ports

  • Exact argv plans with short-lived, one-time approval tokens

  • Separate approval gates for long-running probes and possible workspace writes

  • Timeouts, output caps, redaction, and process-group cleanup for executed probes

  • Deterministic findings plus optional host-model hypotheses constrained to evidence IDs

  • Markdown and JSON runbooks written outside the diagnosed project

  • stdio and stateless Streamable HTTP transports

Install

Install the command directly from the repository with uv:

uv tool install "git+https://github.com/efficjump/local-dev-doctor-mcp.git"

To work from source:

git clone https://github.com/efficjump/local-dev-doctor-mcp.git
cd local-dev-doctor-mcp
uv sync --all-extras

Configure an MCP client

After installation, register the command with any client that supports MCP over stdio:

{
  "mcpServers": {
    "local-dev-doctor": {
      "command": "local-dev-doctor-mcp",
      "args": ["--transport", "stdio"],
      "env": {
        "LOCAL_DEV_DOCTOR_ALLOWED_ROOTS": "/path/to/allowed/projects"
      }
    }
  }
}

LOCAL_DEV_DOCTOR_ALLOWED_ROOTS is required. Use the platform path separator to provide more than one allowed root.

Diagnostic workflow

Stage

Tools

Purpose

Session

start_diagnosis, list_diagnoses, get_diagnosis

Create and inspect bounded diagnosis state

Discovery

discover_profile

Derive commands, prerequisites, services, variable names, and ports

Preflight

run_preflight

Inspect safe local state without running project commands

Approval

prepare_probe

Return the exact argv, risk flags, timeout, and one-time token

Execution

execute_probe

Run only the approved candidate under strict bounds

Analysis

analyze_failures

Produce findings whose claims cite known evidence IDs

Reporting

build_runbook_report

Write a redacted, reproducible runbook

The server fingerprints relevant project inputs. If they change after discovery, stale plans are rejected and the profile must be refreshed.

Safety model

The allowed-root boundary is resolved before project access. Preflight does not read environment values, and stored state contains variable names only. A prepared probe cannot be altered or replayed: its token is hashed in state, expires, and is consumed by the first execution attempt. Probe output is bounded and redacted before persistence.

See the security policy for the threat model and disclosure process, and the architecture guide for the trust boundaries.

Streamable HTTP

Bind to loopback unless a trusted reverse proxy provides authentication and transport security:

local-dev-doctor-mcp --transport streamable-http --host 127.0.0.1 --port 8769

Development

uv sync --all-extras
uv run ruff format --check .
uv run ruff check .
uv run mypy
uv run pytest --cov --cov-report=term-missing
uv build

Contributions are welcome; read CONTRIBUTING.md before opening a change.

License

MIT

Available Tools

9 tools
analyze_failuresB

Build deterministic issues and optional host hypotheses bound to known evidence IDs.

Inputs: diagnosis_id (required), use_sampling (required). Returns: object

build_runbook_reportB

Write a redacted Markdown and JSON runbook in the external state directory.

Inputs: diagnosis_id (required). Returns: object

discover_profileA

Refresh the dynamic dependency profile and invalidate stale diagnostic results.

Inputs: diagnosis_id (required). Returns: object

execute_probeA

Execute one approved argv probe and persist bounded, redacted output evidence.

Inputs: plan_id (required), diagnosis_id (required), approval_token (required), approve_long_running (required), +1 more. Returns: object

get_diagnosisB
Read-only

Return the profile, preflight checks, probe evidence, and cited issues.

Inputs: diagnosis_id (required). Returns: object

list_diagnosesA
Read-only

List persisted diagnosis sessions without reading their projects.

Inputs: no named parameters. Returns: result

prepare_probeA

Create an exact discovered-command plan and a one-time approval token.

Inputs: env_names (required), candidate_id (required), diagnosis_id (required), timeout_seconds (required). Returns: object

run_preflightA

Check executable, environment-name, and loopback port state without command execution.

Inputs: diagnosis_id (required). Returns: object

start_diagnosisA

Create a bounded, secret-redacted local development diagnosis session.

Inputs: name (required), objective (required), project_root (required). Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 9 tools

    Disambiguation5/5

    Each tool targets a distinct stage of the diagnosis pipeline: session creation/listing/retrieval, profile refresh, preflighting, probe preparation/execution, failure analysis, and report generation. No two tools appear to perform the same action, and the phase-specific descriptions make misselection unlikely.

    Naming Consistency5/5

    All tool names follow a consistent imperative verb_noun snake_case pattern such as start_diagnosis, execute_probe, and build_runbook_report. The object nouns are descriptive and align with the workflow, with only expected singular/plural variation.

    Tool Count5/5

    Nine tools is well within the ideal scope for a specialized diagnosis server. Each tool corresponds to one necessary step in the diagnostic lifecycle, so the count feels intentional rather than padded or sparse.

    Completeness5/5

    The tool surface covers the full diagnosis lifecycle: session setup, session retrieval, profile refresh, preflight checks, approved probe execution, failure analysis, and runbook report generation. There are no obvious dead ends or missing operations for the stated purpose.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      Checks your local development environment for common issues like wrong Node version, missing Docker, missing git config, missing .env keys, and busy ports, and provides fixes.
      6
      12 npm
      1
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables LLM clients to inspect local development environment, including Docker container health, pnpm workspace integrity, and stuck process diagnosis.
      4
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables LLM clients to inspect local dev environments—Docker container health, pnpm workspace integrity, and stuck process detection—without manual terminal copy-pasting.
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      A secure, local-first MCP server for read-only inspection and troubleshooting of development environments, exposing narrow, typed, auditable capabilities for repository inspection, log summarization, Docker review, and security scanning without granting unrestricted machine access.
      8
      MIT