aws / aws/mcp-proxy-for-aws

Proxy sends two initialize requests

Open
#349 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
352
Forks
63
Avg merge
12h 9m
Merged PRs (30d)
19

Description

### Describe the bug (Security related? please follow to report them to AWS Security directly.)

The proxy is sending two initialize requests on startup. I believe the root cause is the `ProxyInitializeMiddleware` from `fastmcp` that was recently added.

https://github.com/PrefectHQ/fastmcp/blob/3522a98766faa6c7e8afe4184ce8a9a3c67be703/fastmcp_slim/fastmcp/server/providers/proxy.py#L96

### Expected Behavior

A single initialize request

### Current Behavior

Two initialize requests

### Reproduction Steps

Connect to any MCP server with `--log-level DEBUG` and you will see two outgoing initialize requests

### Possible Solution

_No response_

### Additional Information/Context

_No response_

### Operating System

MacOS

### Release Version

latest

### Other information

_No response_

### Search verification

- [x] I have searched existing issues and verified this is not a duplicate

### Related issues

None

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue by connecting to any MCP server with --log-level DEBUG and confirm the two outgoing initialize requests. Then trace the proxy startup path around fastmcp's ProxyInitializeMiddleware at the linked proxy.py location; done means startup emits exactly one initialize request.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.