feat: upgrade fastmcp to v3#1749
Open
Copilot wants to merge 1 commit into
Open
Conversation
Copilot created this pull request from a session on behalf of
bhirsz
May 22, 2026 13:14
View session
bhirsz
approved these changes
May 22, 2026
… changes Agent-Logs-Url: https://github.com/MarketSquare/robotframework-robocop/sessions/37ce95ac-f4a6-4499-9c58-39e79d1cd4b7 Co-authored-by: bhirsz <8532066+bhirsz@users.noreply.github.com>
c6cb805 to
d9157aa
Compare
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
Updates the
fastmcpdependency from v2 (>=2.13.0,<3) to v3 (>=3.0.0) and fixes the breaking API changes introduced in the major version bump.Changes
Dependency update
pyproject.toml: Updated version constraint in both[project.optional-dependencies]and[dependency-groups]sections tofastmcp>=3.0.0.Source code fixes (
src/robocop/mcp/)tools/documentation.py:_list_prompts_implwas using the private internal APImcp._prompt_manager._promptswhich was removed in fastmcp v3. Replaced with the publicawait mcp.list_prompts()and made the functionasync.tools/registration.py: Updated thelist_promptstool toawait _list_prompts_impl(mcp)since it is now async.Test fixes (
tests/mcp/)fastmcp v3 changed several method names and return types:
mcp.get_tools()mcp.list_tools()list[Tool]instead ofdict; usemcp.get_tool(name)forFunctionToolwith.fnmcp.get_resources()mcp.list_resources()list[Resource]with.uriattributemcp.get_prompts()mcp.list_prompts()list[Prompt]; usemcp.get_prompt(name)forFunctionPromptwith.fntest_server.py: Updated to uselist_tools(),list_resources(),list_prompts().test_prompts.py: Updated fixture to uselist_prompts()+get_prompt()to retrieveFunctionPromptobjects with.fncallable.test_resources.py: Updated to uselist_resources()and adjusted assertions for list-of-objects format.test_integration.py: Updated fixture to uselist_tools()+get_tool()to retrieveFunctionToolobjects with.fncallable.test_tools.py: Addedasyncioimport and updated calls toasyncio.run(_list_prompts_impl(mcp))since the function is now async.