Skip to content

Misleading debug message when using environment variable expansion in Claude Code #1013

@PaulRBerg

Description

@PaulRBerg

I am using the GitHub MCP server like this:

    "github": {
      "type": "http",
      "url": "https://api.githubcopilot.com/mcp",
      "headers": {
        "Authorization": "Bearer ${GITHUB_TOKEN}"
      }
    }

The environment variable is loaded correctly by Claude Code and I am able to interact with my GitHub account.

However, I noticed that when I run claude --debug, I am seeing these logs:

[DEBUG] MCP server "github": No token data found

These debug messages are misleading the token is loaded, but it's loaded via an environment variable.

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