WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@alfonsodg
Copy link

@alfonsodg alfonsodg commented Dec 9, 2025

Problem

GitHub Copilot CLI v1.2.0 has a known bug where environment variables in MCP server configurations are not properly passed to the server process. This affects MiniMax-MCP and other MCP servers that rely on environment variables for configuration.

Issue: When configured with env block, the server starts but cannot access API keys or other configuration values, causing authentication failures.

Solution

This PR adds CLI argument support as an alternative configuration method that works reliably across all MCP clients, including GitHub Copilot CLI.

Changes

  • Added CLI argument parser for --api-key, --base-path, --api-host, --resource-mode
  • CLI arguments take precedence over environment variables
  • Updated README with both configuration options
  • Maintains backward compatibility with existing configurations

Benefits

  • ✅ Solves environment variable issues in GitHub Copilot CLI (known bug in v1.2.0)
  • ✅ Better compatibility across all MCP clients
  • ✅ More flexible configuration options
  • ✅ No breaking changes - existing configs continue to work

Configuration Examples

Traditional (environment variables) - works in most clients:

{
  "command": "uvx",
  "args": ["minimax-mcp", "-y"],
  "env": {
    "MINIMAX_API_KEY": "your-key"
  }
}

New (CLI arguments) - works in ALL clients including Copilot CLI:

{
  "command": "uvx",
  "args": [
    "minimax-mcp",
    "-y",
    "--api-key=your-key"
  ]
}

Testing

  • ✅ Tested with GitHub Copilot CLI (previously broken, now works)
  • ✅ Tested with Claude Desktop (continues to work)
  • ✅ Backward compatibility verified with env vars

Related Work

Similar improvements implemented in other MCP servers:

These PRs solve the same GitHub Copilot CLI compatibility issue.

- Add --api-key, --base-path, --api-host, --resource-mode arguments
- CLI arguments take precedence over environment variables
- Improves compatibility with GitHub Copilot CLI
- Update README with both configuration options
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