feat: Add GraphQL MCP tools for schema retrieval and query execution#640
feat: Add GraphQL MCP tools for schema retrieval and query execution#640
Conversation
|
@claude please review this PR |
|
Claude finished @jfrench9's task in 2m 16s —— View job PR Review: feat: Add GraphQL MCP tools for schema retrieval and query executionTasks:
Overall this is a well-structured addition that follows the existing MCP tool patterns correctly. The dual-flag kill-switch design ( Security: Fragment Spread Complexity Bypass
fragment A on Query { f1 f2 f3 ... f200 }
{ ...A ...A ...A ...A ...A }
# Counted as 5 fields. Actually executes 1000.Since Bug:
|
…dling and fragment spread limits
Summary
Introduces a new GraphQL toolset for the MCP (Model Context Protocol) middleware layer, enabling AI agents to introspect GraphQL schemas and execute queries/mutations against configured GraphQL endpoints.
Key Accomplishments
New
graphql_tool.pymodule: Implements comprehensive GraphQL capabilities including:Tool manager integration: Updated the MCP tools manager to register and expose the new GraphQL tools alongside existing tooling, ensuring seamless discovery by connected agents
Environment configuration: Added new environment variables to support GraphQL endpoint configuration, keeping credentials and endpoints externalized and secure
Documentation: Updated the MCP README with details on the new GraphQL tool capabilities and usage context
Comprehensive test coverage: Added 338+ lines of tests covering:
Breaking Changes
None. This is a purely additive feature. Existing MCP tools and configurations remain unaffected.
Testing Notes
tests/middleware/mcp/tools/test_graphql_tool.pyInfrastructure Considerations
🤖 Generated with Claude Code
Branch Info:
feature/graphql-mcp-toolmainCo-Authored-By: Claude noreply@anthropic.com