Proxy sends two initialize requests
- 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
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