Upgrade to FastMCP 3.0, update get/set state to async#34
Merged
pamelafox merged 3 commits intoAzure-Samples:mainfrom Jan 27, 2026
Merged
Upgrade to FastMCP 3.0, update get/set state to async#34pamelafox merged 3 commits intoAzure-Samples:mainfrom
pamelafox merged 3 commits intoAzure-Samples:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request upgrades FastMCP from version 2.14.2 to 3.0.0b1 (beta), which introduces a breaking change requiring asynchronous state management methods. The PR updates all affected code to use await with get_state() and set_state() calls.
Changes:
- Upgraded FastMCP dependency from 2.14.2 to 3.0.0b1 with exact version pinning
- Updated all
get_state()andset_state()calls to be async in authentication middleware and tool implementations - Lock file reflects new FastMCP dependencies including jsonref, opentelemetry-api, packaging, and watchfiles, while removing pydocket and its transitive dependencies
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| pyproject.toml | Updated FastMCP dependency from >=2.14.2 to ==3.0.0b1 with exact version pinning |
| uv.lock | Reflected FastMCP 3.0.0b1 upgrade and associated dependency changes (added jsonref, opentelemetry-api, packaging, watchfiles; removed pydocket and its dependencies) |
| servers/auth_entra_mcp.py | Updated all get_state and set_state calls in middleware and tools to use async/await pattern |
| servers/auth_keycloak_mcp.py | Updated all get_state and set_state calls in middleware and tools to use async/await pattern |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
The only breaking change was the async get/set state, all other changes seem compatible.
Manual verification: