Disable DNS rebinding protection for FastMCP in Docker - #137
Merged
Merged
Conversation
Updated both mcp_indexer_server.py and mcp_memory_server.py to disable DNS rebinding protection in FastMCP by setting transport_security=TransportSecuritySettings(enable_dns_rebinding_protection=False). This change is necessary to allow proper internal networking when running the servers inside Docker containers.
There was a problem hiding this comment.
Pull request overview
This PR disables DNS rebinding protection for FastMCP servers running in Docker containers to enable proper internal networking when services communicate using internal hostnames (e.g., mcp:8000).
Key changes:
- Added import of
TransportSecuritySettingsfrom the MCP library with fallback handling for older versions - Configured both memory and indexer MCP servers to disable DNS rebinding protection via the
transport_securityparameter
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| scripts/mcp_memory_server.py | Added TransportSecuritySettings import with exception handling and configured FastMCP instance to disable DNS rebinding protection |
| scripts/mcp_indexer_server.py | Added TransportSecuritySettings import with ImportError handling and configured FastMCP instance to disable DNS rebinding protection |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
|
Dumbo copilot review lol |
Updated both Dockerfile and Dockerfile.mcp to explicitly pin mcp to 1.17.0 and fastmcp to 2.12.4 for consistency across services and alignment with requirements.txt. This ensures reproducible builds and avoids issues from unintentional upgrades.
Contributor
|
Tested locally, working... |
Updated both Dockerfile and Dockerfile.mcp to install Python dependencies from a shared requirements.txt file for improved consistency and maintainability across services.
Contributor
|
LGTM |
m1rl0k
added a commit
that referenced
this pull request
Mar 1, 2026
Disable DNS rebinding protection for FastMCP in Docker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updated both mcp_indexer_server.py and mcp_memory_server.py to disable DNS rebinding protection in FastMCP by setting transport_security=TransportSecuritySettings(enable_dns_rebinding_protection=False). This change is necessary to allow proper internal networking when running the servers inside Docker containers.