Skip to content

Run MCP diagnostics through typed Python - #279

Merged
Eli Pinkerton (wallstop) merged 2 commits into
fix/transferred-repository-linksfrom
refactor/python-mcp-doctor
Oct 18, 2026
Merged

Eli Pinkerton (wallstop) merged 2 commits into
fix/transferred-repository-linksfrom
refactor/python-mcp-doctor

Conversation

@wallstop

@wallstop Eli Pinkerton (wallstop) commented Oct 18, 2026 •

Copy link
Copy Markdown
Collaborator

DISCLOSURE: LLM-GENERATED TEXT

Why: MCP diagnostics still implement credential repair and connectivity checks in JavaScript.

What:

  • Run doctor and repair commands through typed Python and uv.
  • Preserve credential checks, safe repair, and bridge diagnostics.
  • Terminate probe process trees and retain existing launcher compatibility.

Refs #171.


Note

Medium Risk
Changes MCP credential repair, HTTP auth on redirects, and release repository identity validation—security- and publish-sensitive tooling, though Unity package runtime code is untouched.

Overview
Moves MCP doctor and repair from the large Node implementation to scripts/mcp_doctor.py, with npm run mcp:doctor / mcp:repair calling uv run directly. .llm/mcp/mcp-doctor.mjs is now a thin uv shim so older launchers keep working.

The Python doctor keeps credential alias checks, optional --repair, config-flavor validation, remote probes, stdio spawn probes, and Unity bridge checks, with secret redaction in output and process-tree termination for stdio probes. Shared request_json in unity_mcp_doctor.py stops forwarding Bearer tokens on HTTP redirects; contract tests cover that and the new doctor behavior.

Repository transfer (#151): package.json, README, MkDocs, docs, issue templates, agent context, and release docs now point at Ambiguous-Interactive/DxVisualizer and ambiguous-interactive.github.io/DxVisualizer; migration and changelog note GitHub redirect for old Git URLs and that Pages bookmarks must be updated. Release workflow tests expect the transferred manifest URL and accept Ambiguous-Interactive/DxVisualizer for prepare/publish identity checks.

Reviewed by Cursor Bugbot for commit 92543d4. Bugbot is set up for automated code reviews on this repo. Configure here.

The MCP connectivity doctor still used JavaScript for credential repair and probes. Move the implementation to typed stdlib Python and run the doctor and repair commands through uv. Keep a small compatibility launcher for existing lifecycle clients.

Preserve credential precedence, repair byte fidelity, secret redaction, endpoint statuses, and bridge URL normalization. Terminate owned probe trees so child servers cannot hold stdout open after a probe completes. A real-process regression first reproduced a ten-second cleanup delay and now passes. All 16 credential cases, the 15-test doctor suite, strict pyright, and the full 12-step gate pass. CI must verify the Windows taskkill branch. Unity source matches main dd234d1, already validated with 393 EditMode and 15 PlayMode tests in this session.

Scope checkpoint: about 800 changed lines, mostly removal of the old doctor; essential probe cleanup and its regression stay together. No live credential repair or unrelated MCP migration is included.

Refs #171.
The Python transport must not forward bearer credentials when an endpoint redirects. Mark the header as unredirected in both doctor transports and verify that the initial request retains it while a redirected request does not.

Capture normalization diagnostics in the imported-doctor test, as the existing test helpers do. This fixes the Windows cp1252 test failure; standalone CLI output already selects UTF-8. Strict pyright, 16 doctor tests, all credential cases, affected fast checks, and the 12-step local gate pass. The gate completes in 26.9 seconds. Refs #171.
@wallstop
Eli Pinkerton (wallstop) changed the base branch from main to fix/transferred-repository-links October 18, 2026 03:15
@wallstop
Eli Pinkerton (wallstop) added this pull request to stack #282 October 18, 2026 03:15
@wallstop
Eli Pinkerton (wallstop) merged commit dd9f385 into main Oct 18, 2026
5 checks passed
@wallstop
Eli Pinkerton (wallstop) deleted the refactor/python-mcp-doctor branch October 18, 2026 03:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant