Add opt-in MCP server infrastructure with diagnostic log tools - #105
Merged
Conversation
Opt-in "mcp" config section (disabled by default) built on symfony/mcp-bundle: streamable HTTP controller with DNS-rebinding protection and per-user rate limiting, strict tool-arguments handler, tool executor with configurable tool error exceptions and mongo call logging into a capped mcpLogs collection, and three diagnostic tools (search_app_logs, search_audit_logs, get_logs_by_context) reading the bundle-owned log collections. Log search queries live on the Journal/Audit log repositories via a new AbstractLogRepository. McpCompilerPass overrides the McpBundle controller and session cache after extension merge. The mcpLogs mongo connection defaults to the journal log connection.
…s available
The merge pass calls load() with a temporary container that only knows the
extension being loaded, so hasExtension('mcp') is always false there.
Guard the session cache pool parameter type and add psr/simple-cache to require-dev so psalm can resolve the Psr16Cache dependency.
…ntime TooManyRequestsHttpException overwrites the Retry-After header with its first argument, so pass the delta there instead of the epoch timestamp. The compile time allowed_hosts guard cannot see resolved env values, so the controller rejects an effectively empty list explicitly instead of silently returning 403 for every request.
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.
Opt-in "mcp" config section (disabled by default) built on symfony/mcp-bundle: streamable HTTP controller with DNS-rebinding protection and per-user rate limiting, strict tool-arguments handler, tool executor with configurable tool error exceptions and mongo call logging into a capped mcpLogs collection, and three diagnostic tools (search_app_logs, search_audit_logs, get_logs_by_context) reading the bundle-owned log collections. Log search queries live on the Journal/Audit log repositories via a new AbstractLogRepository. McpCompilerPass overrides the McpBundle controller and session cache after extension merge. The mcpLogs mongo connection defaults to the journal log connection.