chore(deps): migrate gmail/oauth-draft to mcp 2.0 - #1085
Open
potiuk wants to merge 1 commit into
Open
Conversation
The breaking half of apache#1083, split out so the routine ruff/prek bumps could land on their own. `mcp` 2.0 makes two source-visible changes and neither is covered by a deprecation shim. - `mcp.server.fastmcp` is gone. The `FastMCP` class moved to `mcp.server.mcpserver` as `MCPServer`; `.tool()` and `.run()` keep their signatures, so the server body is unchanged beyond the rename. On 2.0 without this, importing the module raises `ModuleNotFoundError: No module named 'mcp.server.fastmcp'` and `pytest (oauth-draft)` fails at collection. - `Tool.inputSchema` is now `Tool.input_schema`. This one only shows up in `test_tools_are_registered_without_any_html_parameter`, which is the test that enforces the server's plain-text-by-construction guarantee — that no tool anywhere exposes an `html` parameter. Left unfixed it would have failed with an `AttributeError` rather than silently passing, but it is worth naming: that assertion is the reason this package exists, so it must keep running. Verified on mcp 2.0.0: all 81 oauth-draft tests pass, `ruff check`, `ruff format --check` and `mypy` are clean, and `prek run --all-files` exits 0. Generated-by: Claude Code (Opus 5)
12 tasks
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.
Summary
on their own (chore(deps-dev): bump ruff to 0.16.1 and prek to 0.4.12 #1084).
mcp2.0 makes two source-visible changes, neither behinda deprecation shim.
mcp.server.fastmcpis gone.FastMCPmoved tomcp.server.mcpserverasMCPServer;.tool()and.run()keep their signatures, so the server body isunchanged beyond the rename. Without this, importing the module raises
ModuleNotFoundError: No module named 'mcp.server.fastmcp'andpytest (oauth-draft)fails at collection — the failure seen on chore(deps-dev): bump the python-deps group across 9 directories with 3 updates #1083.Tool.inputSchemais nowTool.input_schema. This surfaces only intest_tools_are_registered_without_any_html_parameter— the test enforcing thisserver's plain-text-by-construction guarantee, that no tool anywhere exposes an
htmlparameter. It would have failed loudly rather than passed silently, butit is worth naming: that assertion is the reason this package exists.
Type of change
.claude/skills/<name>/) — eval fixtures updated belowtools/<system>/*.md)tools/*/withpyproject.toml)docs/,README.md,CONTRIBUTING.md)projects/_template/)prek, workflows, validators)Test plan
ruff check,ruff format --check,mypyclean on the packageprek run --all-filesexits 0RFC-AI-0004 compliance
preserved: the migration keeps the tool surface identical, so the server
still creates drafts only and still exposes no HTML/rich-text parameter.
The test that enforces that is the one updated here.
Linked issues
Refs #1083
Notes for reviewers
The rename is mechanical, but
test_tools_are_registered_without_any_html_parameterdeserves the attention — it is the mechanical gate on the plain-text-only
interface, so please check the updated assertion still reads as strictly as
before rather than being loosened to make 2.0 pass.
Both this PR and #1084 touch
uv.lock, so whichever merges second needs auv lockre-run. #1083 can be closed once both land.