-
Notifications
You must be signed in to change notification settings - Fork 93
Open
Description
Issue: Environment variable warnings shown for all servers, not just the one being queried
Description
When running mcp-cli info <server>, warnings about missing environment variables are displayed for ALL servers in the config, not just the server being queried. This creates unnecessary noise, especially when using mcp-cli with AI agents.
Steps to Reproduce
- Create config with multiple servers, some using
${VAR}placeholders - Run
mcp-cli info chrome-devtools(a server without env vars) - See warnings for all OTHER servers' missing env vars
Expected Behavior
Warnings should only appear for environment variables referenced by the server being queried (or all servers when running mcp-cli info without arguments).
Actual Behavior
[mcp-cli] Warning: Missing environment variable: ${MCP_EMAIL_SERVER_ACCOUNT_NAME}
[mcp-cli] Warning: Missing environment variable: ${CONTEXT7_API_KEY}
...
# Even though I'm only querying chrome-devtools which doesn't use these
Related
- Issue only show STDERR with
-vor-debug#17 discusses showing STDERR only with-v/--debug - This issue is more specific: warnings should be scoped to the queried server
Proposed Solution
- Lazy evaluation: Only substitute env vars for the server(s) being accessed
- OR: Filter warnings to only show for relevant servers
- Combine with only show STDERR with
-vor-debug#17: Only show warnings in debug mode
Workaround
MCP_STRICT_ENV=false mcp-cli info chrome-devtools 2>/dev/nullReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels