Skip to content

All tools are filtered when using --read-only with AWS MCP Server #159

@SatoshiMoriyama

Description

@SatoshiMoriyama

Describe the bug (Security related? please follow https://github.com/aws/mcp-proxy-for-aws/security/policy to report them to AWS Security directly.)

When using the --read-only flag with AWS MCP Server (https://aws-mcp.us-east-1.api.aws/mcp), all tools are filtered out and no tools are available.

I believe this is happening because the AWS MCP Server does not set readOnlyHint=true annotation on any of its tools.

Expected Behavior

When using the --read-only flag, read-only tools should be available. According to the official documentation, the following tools perform read-only operations:

  • aws___search_documentation - Search AWS documentation
  • aws___read_documentation - Read AWS documentation pages
  • aws___recommend - Get content recommendations
  • aws___list_regions - List AWS regions
  • aws___get_regional_availability - Check regional availability
  • aws___suggest_aws_commands - Get AWS API descriptions

Current Behavior

All tools are filtered out with the following log messages:

2026-01-31 06:48:08 | INFO | mcp_proxy_for_aws.middleware.tool_filter | Filtering tools for read only: True
2026-01-31 06:48:08 | INFO | mcp_proxy_for_aws.middleware.tool_filter | Skipping tool aws___call_aws needing write permissions
2026-01-31 06:48:08 | INFO | mcp_proxy_for_aws.middleware.tool_filter | Skipping tool aws___get_regional_availability needing write permissions
2026-01-31 06:48:08 | INFO | mcp_proxy_for_aws.middleware.tool_filter | Skipping tool aws___list_regions needing write permissions
2026-01-31 06:48:08 | INFO | mcp_proxy_for_aws.middleware.tool_filter | Skipping tool aws___read_documentation needing write permissions
2026-01-31 06:48:08 | INFO | mcp_proxy_for_aws.middleware.tool_filter | Skipping tool aws___recommend needing write permissions
2026-01-31 06:48:08 | INFO | mcp_proxy_for_aws.middleware.tool_filter | Skipping tool aws___retrieve_agent_sop needing write permissions
2026-01-31 06:48:08 | INFO | mcp_proxy_for_aws.middleware.tool_filter | Skipping tool aws___search_documentation needing write permissions
2026-01-31 06:48:08 | INFO | mcp_proxy_for_aws.middleware.tool_filter | Skipping tool aws___suggest_aws_commands needing write permissions

Reproduction Steps

  1. Configure mcp-proxy-for-aws with --read-only flag:
{
  "mcpServers": {
    "aws-mcp": {
      "command": "uvx",
      "args": [
        "mcp-proxy-for-aws@latest",
        "https://aws-mcp.us-east-1.api.aws/mcp",
        "--service", "aws-mcp",
        "--region", "us-east-1",
        "--profile", "default",
        "--read-only",
        "--log-level", "DEBUG"
      ]
    }
  }
}
  1. Connect to the MCP server
  2. Check available tools - no tools are available

Possible Solution

Adding readOnlyHint=true annotation to read-only tools would allow the --read-only flag to function correctly.

Additional Information/Context

No response

Operating System

macOS, Kiro IDE

Release Version

v1.1.6

Other information

No response

Search verification

  • I have searched existing issues and verified this is not a duplicate

Related issues

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions