Skip to content

Getting env vars to work in MCP client #638

@philippgille

Description

@philippgille

The example config contains this:

mods/config_template.yml

Lines 12 to 22 in bee8b17

# github:
# command: docker
# env:
# - GITHUB_PERSONAL_ACCESS_TOKEN=xxxyyy
# args:
# - run
# - "-i"
# - "--rm"
# - "-e"
# - GITHUB_PERSONAL_ACCESS_TOKEN
# - "ghcr.io/github/github-mcp-server"

But (using a different MCP server) I can't get it to work. It seems to pass the literal string (in the example GITHUB_PERSONAL_ACCESS_TOKEN) as arg, instead of replacing it with the value from the env.

I checked the code and can't find it resolving the env var. Is that missing? Or am I doing something wrong?

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