Skip to content

Tests: isolate HOME so user-global MCP config cannot leak into test runs #1682

Open

Description

@anandgupta42

MCP discovery reads ~/.claude.json and other home-level config from the real home directory, so tests fail on developer machines that have MCP servers configured.

Items

The linked issues hold the original reports and reproductions. Most are closed in favor of this tracker; any child with an open fix PR stays open until that PR lands.

Activity

  1. rahulsjha commented on Nov 21, 2026

    @rahulsjha

    Hi @anandgupta42, I'd like to take this. Plan: point HOME (and the other home-config lookups) at a temp dir in the shared test setup so MCP discovery never reads the real ~/.claude.json, keep #1024's status test as a regression case, and add a test that a populated real home doesn't leak in. Okay to go ahead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions