Describe the bug
The AWS MCP Server setup docs and README examples show --metadata AWS_REGION=... as the way to set the default AWS Region for AWS MCP Server operations.
That is correct for AWS operations performed by the remote AWS MCP Server, but it does not configure the local Region used by botocore inside mcp-proxy-for-aws.
When using AWS CLI v2 aws login / SSO-style temporary credentials, mcp-proxy-for-aws may need a local Region from the normal AWS region provider chain, such as AWS_REGION, AWS_DEFAULT_REGION, or a Region configured in the active AWS profile. If no local Region is available, MCP initialization can fail before tools are exposed to the MCP client.
This is easy to miss because the current examples make --metadata AWS_REGION=... look like the only Region-related configuration needed.
Docs reviewed:
Expected Behavior
The setup docs should make it clear that there are two different Region concepts:
--metadata AWS_REGION=...: default Region for AWS operations performed by the remote AWS MCP Server
AWS_REGION / AWS_DEFAULT_REGION / AWS profile Region: local Region used by botocore inside mcp-proxy-for-aws, including during credential refresh
Users of AWS CLI v2 aws login / SSO-style credentials should be able to configure the AWS MCP Server from the docs without hitting a local botocore NoRegionError.
It would be helpful if the setup examples included an optional env section showing AWS_REGION and/or AWS_DEFAULT_REGION.
Current Behavior
Using the documented configuration pattern with mcp-proxy-for-aws@latest, the MCP server failed to initialize and AWS MCP tools were not exposed to the MCP client.
Examples of unavailable tools:
aws___call_aws
aws___run_script
aws___search_documentation
Debug logs from mcp-proxy-for-aws showed:
botocore.exceptions.NoRegionError: You must specify a region.
The failure occurred while botocore was refreshing temporary credentials locally, before AWS MCP tools became available.
Adding local Region environment variables to the MCP server process fixed the issue. For example, in Codex TOML config:
[mcp_servers.aws_mcp]
command = "uvx"
args = [
"mcp-proxy-for-aws@latest",
"https://aws-mcp.us-east-1.api.aws/mcp",
"--metadata", "AWS_REGION=ap-northeast-1"
]
startup_timeout_sec = 60
[mcp_servers.aws_mcp.env]
AWS_REGION = "ap-northeast-1"
AWS_DEFAULT_REGION = "ap-northeast-1"
For JSON-based MCP clients, the equivalent is to pass environment variables to the MCP server process:
{
"mcpServers": {
"aws-mcp": {
"command": "uvx",
"args": [
"mcp-proxy-for-aws@latest",
"https://aws-mcp.us-east-1.api.aws/mcp",
"--metadata",
"AWS_REGION=ap-northeast-1"
],
"env": {
"AWS_REGION": "ap-northeast-1",
"AWS_DEFAULT_REGION": "ap-northeast-1"
}
}
}
}
After restarting the MCP client with those environment variables, AWS MCP tools became available, including aws___call_aws and aws___run_script.
Reproduction Steps
- Use AWS CLI v2
aws login / SSO-style temporary credentials.
- Ensure the local environment used by the MCP client does not provide a Region through
AWS_REGION, AWS_DEFAULT_REGION, or the active AWS profile.
- Configure AWS MCP Server using the documented pattern, for example:
{
"mcpServers": {
"aws-mcp": {
"command": "uvx",
"args": [
"mcp-proxy-for-aws@latest",
"https://aws-mcp.us-east-1.api.aws/mcp",
"--metadata",
"AWS_REGION=ap-northeast-1"
]
}
}
}
- Restart the MCP client.
- Observe that AWS MCP tools are not exposed.
- Run with
mcp-proxy-for-aws DEBUG logging.
- Observe
botocore.exceptions.NoRegionError during local credential refresh.
Plugin Version
aws-core@agent-toolkit-for-aws 1.0.0 Also observed with: - mcp-proxy-for-aws@latest - mcp-proxy-for-aws 1.5.0
AI Assistant
Codex Desktop / Codex
AI Assistant Version
Codex Desktop 0.133.0
OS
macOS
Other information
This does not appear to be specific to Codex. The same issue may affect any MCP client that launches mcp-proxy-for-aws locally with the same AWS CLI v2 aws login / SSO credential setup.
Related but distinct issue:
That issue also involves AWS MCP tools not being available, but the reported cause appears to be tools/list returning an empty array under concurrent proxy initialization / throttling.
The issue described here is different: botocore raises NoRegionError during local credential refresh before AWS MCP tools become available.
Suggested documentation change:
Please clarify that --metadata AWS_REGION=... and the local AWS Region used by mcp-proxy-for-aws serve different purposes, and consider adding optional env examples for AWS_REGION / AWS_DEFAULT_REGION to the MCP client configuration examples.
Describe the bug
The AWS MCP Server setup docs and README examples show
--metadata AWS_REGION=...as the way to set the default AWS Region for AWS MCP Server operations.That is correct for AWS operations performed by the remote AWS MCP Server, but it does not configure the local Region used by botocore inside
mcp-proxy-for-aws.When using AWS CLI v2
aws login/ SSO-style temporary credentials,mcp-proxy-for-awsmay need a local Region from the normal AWS region provider chain, such asAWS_REGION,AWS_DEFAULT_REGION, or a Region configured in the active AWS profile. If no local Region is available, MCP initialization can fail before tools are exposed to the MCP client.This is easy to miss because the current examples make
--metadata AWS_REGION=...look like the only Region-related configuration needed.Docs reviewed:
Expected Behavior
The setup docs should make it clear that there are two different Region concepts:
--metadata AWS_REGION=...: default Region for AWS operations performed by the remote AWS MCP ServerAWS_REGION/AWS_DEFAULT_REGION/ AWS profile Region: local Region used by botocore insidemcp-proxy-for-aws, including during credential refreshUsers of AWS CLI v2
aws login/ SSO-style credentials should be able to configure the AWS MCP Server from the docs without hitting a local botocoreNoRegionError.It would be helpful if the setup examples included an optional
envsection showingAWS_REGIONand/orAWS_DEFAULT_REGION.Current Behavior
Using the documented configuration pattern with
mcp-proxy-for-aws@latest, the MCP server failed to initialize and AWS MCP tools were not exposed to the MCP client.Examples of unavailable tools:
aws___call_awsaws___run_scriptaws___search_documentationDebug logs from
mcp-proxy-for-awsshowed:The failure occurred while botocore was refreshing temporary credentials locally, before AWS MCP tools became available.
Adding local Region environment variables to the MCP server process fixed the issue. For example, in Codex TOML config:
For JSON-based MCP clients, the equivalent is to pass environment variables to the MCP server process:
{ "mcpServers": { "aws-mcp": { "command": "uvx", "args": [ "mcp-proxy-for-aws@latest", "https://aws-mcp.us-east-1.api.aws/mcp", "--metadata", "AWS_REGION=ap-northeast-1" ], "env": { "AWS_REGION": "ap-northeast-1", "AWS_DEFAULT_REGION": "ap-northeast-1" } } } }After restarting the MCP client with those environment variables, AWS MCP tools became available, including
aws___call_awsandaws___run_script.Reproduction Steps
aws login/ SSO-style temporary credentials.AWS_REGION,AWS_DEFAULT_REGION, or the active AWS profile.{ "mcpServers": { "aws-mcp": { "command": "uvx", "args": [ "mcp-proxy-for-aws@latest", "https://aws-mcp.us-east-1.api.aws/mcp", "--metadata", "AWS_REGION=ap-northeast-1" ] } } }mcp-proxy-for-awsDEBUG logging.botocore.exceptions.NoRegionErrorduring local credential refresh.Plugin Version
aws-core@agent-toolkit-for-aws1.0.0 Also observed with: -mcp-proxy-for-aws@latest-mcp-proxy-for-aws1.5.0AI Assistant
Codex Desktop / Codex
AI Assistant Version
Codex Desktop 0.133.0
OS
macOS
Other information
This does not appear to be specific to Codex. The same issue may affect any MCP client that launches
mcp-proxy-for-awslocally with the same AWS CLI v2aws login/ SSO credential setup.Related but distinct issue:
That issue also involves AWS MCP tools not being available, but the reported cause appears to be
tools/listreturning an empty array under concurrent proxy initialization / throttling.The issue described here is different: botocore raises
NoRegionErrorduring local credential refresh before AWS MCP tools become available.Suggested documentation change:
Please clarify that
--metadata AWS_REGION=...and the local AWS Region used bymcp-proxy-for-awsserve different purposes, and consider adding optionalenvexamples forAWS_REGION/AWS_DEFAULT_REGIONto the MCP client configuration examples.