Repository navigation
fix(ghostwriter-readonly): require gql 4 and fastmcp 3.2 (ENG-8934) - #192
Merged
Merged
Conversation
The gql<4 cap forced dependency resolution to fastmcp 2.12.5 and mcp 1.16.0, which carry known CVEs and fail at startup with `ImportError: eval_type_backport`. - Require gql>=4.0 and fastmcp>=3.2.0 in the server, test, and skill script PEP 723 headers. - Send query variables on a gql 4 GraphQLRequest instead of the deprecated variable_values argument to session.execute. - Replace the removed FastMCP.get_tools() with list_tools() in the tests. - Add a test against a local HTTP stub that checks variables reach the wire and no deprecation warning is raised. - Bump capability version to 1.0.1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Automated agent review (not a human approval) Verdict: APPROVE, at head Checked on Python 3.13, linux x86_64:
Non-blocking: the stub test has two overlapping warning assertions. |
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.
Problem
ghostwriter-readonlypinnedgql[aiohttp,websockets]>=3.0,<4.0. gql 3 requireswebsockets<12, and fastmcp 3.2+ requireswebsockets>=15.0.1, souv runresolved the MCP server to fastmcp 2.12.5 and mcp 1.16.0. Both versions have published security advisories. mcp 1.16.0 also fails at import on current pydantic:This applies the same pin change as #175 (mythic-c2-readonly).
Changes
mcp/server.py,mcp/test_server.py: requirefastmcp>=3.2.0andgql[aiohttp,websockets]>=4.0.skills/ghostwriter-readonly/scripts/ghostwriter_read.py: requiregql[aiohttp,websockets]>=4.0._run_query(server) andrun_query(skill script): setvariable_valueson the gql 4 request object instead of passing the deprecatedvariable_values=keyword tosession.execute.mcp/test_server.py: replace the removedFastMCP.get_tools()withlist_tools(). Both tests still expect 22 tools.mcp/test_server.py: add a test that runs_run_queryagainst a local aiohttp stub. It checks that{"id": 7}reaches the request body asvariables, that the stub'sdatais returned, and that novariable_valuesdeprecation warning is raised.capability.yaml: 1.0.0 → 1.0.1.Evidence
Base
9814433e93cb4850b3b570077f3ca04b1fb8e258, head7c26724a697aca4121ac35496d30548712d6060e. Python 3.13, linux x86_64.uv tree --scriptonmcp/server.pyandmcp/test_server.py: fastmcp v4.1.2, mcp v2.3.0, gql v4.4.0. Onghostwriter_read.py: gql v4.4.0.uv run --python 3.13 --script capabilities/ghostwriter-readonly/mcp/test_server.py: 27 passed. The new stub test fails when_run_queryis reverted to thevariable_values=keyword.uv run --python 3.13 --script .../scripts/ghostwriter_read.py --help: exit 0.git grep -n 'variable_values=' -- <server.py> <ghostwriter_read.py>: no matches.just validate strict=true: 26 validated, 0 failed (6 warnings for missing local binaries, unrelated).pre-commit run --files <changed>: all hooks pass exceptruff-format, which already fails onserver.pyandtest_server.pyat base. Reformatting would touch about 140 unrelated lines, so it is left out of this PR. CI does not runruff-format.Not tested against a live GhostWriter instance.
ghostwriter_read.pyhas no automated test; it uses the same request pattern as the server.🤖 Generated with Claude Code