MCP Environment Proxy
Allows dynamic switching between multiple Kubernetes clusters (EKS) by managing environment variables for different AWS accounts and regions.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Environment ProxySwitch to the production EKS cluster"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Environment Proxy
A dynamic MCP (Model Context Protocol) proxy that allows switching environment variables on-the-fly. Instead of configuring multiple MCP servers for different AWS accounts/regions, use a single proxy that can switch contexts dynamically.
Problem
When working with multiple AWS accounts or Kubernetes clusters, you typically need one MCP server per environment:
{
"mcpServers": {
"eks-production": { "env": { "AWS_PROFILE": "prod" } },
"eks-staging": { "env": { "AWS_PROFILE": "staging" } },
"eks-dev": { "env": { "AWS_PROFILE": "dev" } }
}
}This consumes context and requires restarting Claude to switch environments.
Related MCP server: mcpfold
Solution
MCP Environment Proxy provides a single MCP server that can switch between contexts on-demand:
{
"mcpServers": {
"mcp-env-proxy": {
"command": "uvx",
"args": ["mcp-env-proxy@latest", "-c", "~/.config/mcp-env-proxy/contexts.yaml"]
}
}
}Then dynamically switch contexts:
> switch_context("eks-production")
> list_k8s_resources(...)
> switch_context("eks-staging")
> list_k8s_resources(...)Installation
# With uvx (recommended)
uvx mcp-env-proxy@latest
# With pip
pip install mcp-env-proxy
# From source
git clone https://github.com/KamorionLabs/mcp-env-proxy.git
cd mcp-env-proxy
pip install -e .Configuration
Create a contexts.yaml file:
# Default environment variables for all contexts
defaults:
FASTMCP_LOG_LEVEL: ERROR
# Define MCP server types
servers:
eks:
command: uvx
args: ["awslabs.eks-mcp-server@latest"]
ecs:
command: uvx
args: ["awslabs.ecs-mcp-server@latest"]
# Named contexts
contexts:
production:
server: eks
env:
AWS_PROFILE: WordPress-Production/AWSAdministratorAccess
AWS_REGION: eu-west-3
staging:
server: eks
env:
AWS_PROFILE: WordPress-Staging/AWSAdministratorAccess
AWS_REGION: eu-west-3
homebox-prod:
server: ecs
env:
AWS_PROFILE: homebox-production/AdministratorAccess
AWS_REGION: eu-west-3
# Default context on startup
current_context: productionConfig file locations (in order of precedence):
MCP_ENV_PROXY_CONFIGenvironment variable./contexts.yaml(current directory)~/.config/mcp-env-proxy/contexts.yaml
Available Tools
list_contexts
List all available contexts with their configuration.
switch_context(context_name)
Switch to a different context. This loads the MCP server with the specified environment variables.
get_current_context
Get information about the currently active context.
list_proxied_tools
List all tools available from the current context's MCP server.
proxy_tool(tool_name, arguments)
Call a tool on the proxied MCP server.
Process Pool
The proxy maintains a pool of MCP server processes (default: 5). When you switch contexts:
If the context was previously loaded, it reuses the existing process (fast)
If it's a new context, it spawns a new process
If the pool is full, it evicts the oldest unused process
This provides fast context switching while limiting memory usage.
Usage with Claude Code
Add to your Claude Code MCP configuration:
claude mcp add mcp-env-proxy -- uvx mcp-env-proxy@latest -c ~/.config/mcp-env-proxy/contexts.yamlThen in conversation:
User: Switch to the production EKS cluster
Claude: [calls switch_context("production")]
User: List the pods in the wordpress namespace
Claude: [calls proxy_tool("list_k8s_resources", {"resource_type": "pods", "namespace": "wordpress"})]Development
# Clone the repository
git clone https://github.com/KamorionLabs/mcp-env-proxy.git
cd mcp-env-proxy
# Create virtual environment
python -m venv .venv
source .venv/bin/activate
# Install in development mode
pip install -e ".[dev]"
# Run tests
pytest
# Run locally
python -m mcp_env_proxy -c config/contexts.example.yaml -vLicense
MIT License - see LICENSE for details.
Contributing
Contributions welcome! Please open an issue or PR on GitHub.
Available Tools
5 toolsget_current_contextA
Get information about the current context.
Returns: Current context info including available tools
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must convey behavioral traits. It indicates a read operation via 'Get', but does not explicitly state it is read-only, mention authentication needs, or potential side effects. For a tool with no params, this is minimally adequate but lacks explicit behavioral disclosure.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise (two sentences) and front-loaded, with no extraneous text. Every sentence provides value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no parameters and an existing output schema, the description is complete. It explains the tool's purpose and return value, and there is no missing information for this simple tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
There are zero parameters, so baseline is 4. The description adds value by explaining the return value (current context info including available tools), even though output schema exists. It compensates for the lack of param details.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Get' and the resource 'current context', and specifies what is returned ('Current context info including available tools'). It distinguishes from siblings like 'list_contexts' which likely lists all contexts.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for obtaining current context info, but does not explicitly state when to use this tool vs alternatives like 'list_contexts' or 'switch_context'. No when-not-to-use or alternative guidance is given.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_contextsA
List all available contexts.
Returns a list of contexts with their configuration, showing which is currently active and which have cached tools.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, so the description must cover behavioral aspects. It explains the return includes configuration, active status, and cached tools, which is sufficient for a read-only listing tool. It does not claim write operations or side effects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences with no wasted words. The purpose is stated first, followed by the return content. Every sentence adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given zero parameters and the presence of an output schema, the description covers the key information needed: what the tool does and what it returns. It is complete for selection and invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
There are no parameters, so schema coverage is 100%. The description adds value by explaining what is returned (configuration, active status, cached tools) beyond the empty input schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'List all available contexts,' which is a specific verb-resource combination. It distinguishes from sibling tools like get_current_context, which only returns the active context.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use the tool (to list all contexts) but does not explicitly contrast with siblings or provide exclusion criteria. The context of siblings makes the usage clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_proxied_toolsA
List tools available from the current context's MCP server.
Returns: List of tools with their names and descriptions
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, and the description does not disclose any behavioral traits beyond listing. It does not confirm read-only, idempotent, or safe behavior, leaving the agent to assume minimal risk.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise with two sentences, front-loaded with purpose, and includes a returns section. No wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple list tool with no parameters and an output schema, the description is mostly complete. It explains the return type, but could mention if the list is complete or filtered.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has zero parameters, so the baseline is 4. The description adds no parameter info, but none is needed. Schema coverage is 100%.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool lists tools available from the current context's MCP server, with a specific verb and resource. It distinguishes itself from siblings like list_contexts (lists contexts) and proxy_tool (proxies a tool).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit when-to-use or when-not-to-use guidance is provided. The usage is implied by the name and description, but alternatives or exclusions are not mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
proxy_toolA
Call a tool on the current context's MCP server.
This forwards the tool call to the underlying MCP server (EKS, ECS, CloudWatch, etc.) with the current context's environment variables.
Args: tool_name: Name of the tool to call on the proxied server arguments: Arguments to pass to the tool
Returns: Result from the proxied tool
| Name | Required | Description | Default |
|---|---|---|---|
| arguments | No | ||
| tool_name | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. It discloses that the tool forwards calls, attaches environment variables, and returns the proxied result. However, it omits details on error handling, authentication requirements, or potential side effects, which are important for a proxy tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with an Args and Returns section, making it easy to scan. It is mostly concise, though the first sentence could be integrated to reduce redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's role as a proxy forwarding to other servers, the description adequately covers the core behavior: forwarding, environment variable usage, and return value. It could mention error scenarios or argument validation, but is sufficient for typical use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so the description must compensate. It names both parameters (tool_name, arguments) and briefly describes them as 'name of the tool to call' and 'arguments to pass.' This adds meaning beyond the schema's bare titles, but does not specify formats, constraints, or behavior when arguments are null.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it calls a tool on the current context's MCP server, acting as a proxy. This verb+resource combination is distinct from sibling tools (get_current_context, list_contexts, list_proxied_tools, switch_context) which manage context rather than invoke tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explains that the tool forwards calls to the underlying MCP server with environment variables, implying its use for interacting with proxied tools. However, it does not explicitly state when to use this tool versus alternatives or when not to use it, leaving the agent to infer from context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
switch_contextA
Switch to a different context.
This changes the active MCP server connection to use different environment variables (AWS_PROFILE, AWS_REGION, etc.).
Args: context_name: Name of the context to switch to
Returns: Information about the new active context including available tools
| Name | Required | Description | Default |
|---|---|---|---|
| context_name | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided. Description mentions changing environment variables and returning info, but lacks details on side effects, permissions, or reversibility.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Description is concise with a clear initial sentence and structured Args/Returns sections. Each sentence adds value, though the format is slightly verbose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with one parameter, the description covers the purpose, parameter, and return value. No output schema provided, but description explains returns.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, but the description explains the single parameter 'context_name' as 'Name of the context to switch to', adding value beyond the schema's 'Context Name'.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool switches to a different context and changes environment variables. It distinguishes from siblings like get_current_context and list_contexts.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage (switching context) but does not explicitly state when to use versus alternatives or when not to use. No comparison to siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
5 tool updates
v0.1.0- First observed
get_current_context - First observed
list_contexts - First observed
list_proxied_tools - First observed
proxy_tool - First observed
switch_context
TDQS
Each tool has a distinct and clear purpose: getting current context, listing contexts, listing proxied tools, calling a proxied tool, and switching contexts. There is no overlap.
All tool names use a consistent verb_noun pattern in snake_case (e.g., get_current_context, list_contexts), with clear and predictable naming.
Five tools is appropriate for a proxy server that manages contexts and proxies tool calls; each tool serves a necessary role without redundancy.
The tool set covers the full lifecycle: switching contexts, viewing context info, listing available tools, and executing proxied calls. There are no obvious gaps for the stated domain.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Governed MCP gateway: one endpoint for your tools, with credential custody and audit log.
Remote MCP for Copilot CLI switch gate MCP, structured receipts, audit logs, and reviewer-ready evid
- ArcjetOAuthcom.arcjet
An MCP server for Arcjet - the runtime security platform that ships with your AI code.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceSelf-hosted MCP proxy and aggregation platform. Register multiple upstream MCP servers and expose them through a single unified endpoint with namespace routing, multi-transport support (HTTP/SSE, stdio, OpenAPI→MCP), per-tool overrides, and a web admin UI.17MIT
- FlicenseNot gradedqualityBmaintenanceLocal-first CLI + proxy that curates your MCP servers per client from one canonical config, cutting tool-schema tokens ~80% and resolving secret references instead of hardcoding keys.-
- AlicenseNot gradedqualityAmaintenanceA local MCP auth wrapper and credential broker for multi-account workflows, enabling profile switching, secret injection, and policy enforcement for upstream MCP servers.1964MIT
- AlicenseNot gradedqualityAmaintenanceA self-hosted MCP control plane and protocol gateway that aggregates and manages multiple MCP servers, exposing them via stable, authenticated MCP endpoints for any client.2201MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/KamorionLabs/mcp-env-proxy'
If you have feedback or need assistance with the MCP directory API, please join our Discord server