-
Notifications
You must be signed in to change notification settings - Fork 1.4k
feat: Integrate FastMCP #106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
This commit integrates FastMCP, a high-level MCP server implementation originally written by Jeremiah Lowin, into the official MCP SDK. It also updates dependencies and adds new dev dependencies. It moves the existing SDK into a .lowlevel .
…erences with defaults Pydantic now uses allOf to combine model references with default values in JSON schema output.
Update all FastMCP examples to use mcp.server.fastmcp instead of fastmcp. Add tests to verify example servers work correctly. Changes: - Update import paths in all example files - Create test_examples.py to verify functionality - Fix test assertions to match actual response format
Update the README.md to include FastMCP as the recommended way to build MCP servers. FastMCP is a high-level, Pythonic interface that makes it easy to build MCP servers with minimal boilerplate. The low-level implementation is still available for more control. 🤖 Generated with Claude CLI. Co-Authored-By: Claude <noreply@anthropic.com>
Add back sections on low-level server implementation, client usage, MCP primitives and server capabilities that were previously removed.
5b7928e
to
d2c3e21
Compare
d10be7e
to
9d58fed
Compare
3122086
to
44e1abb
Compare
This personally caused a ton of confusion with fastmcp in https://github.com/jlowin/fastmcp which is not compatible. You may want to add docs to indicate that these are in no way the same package. |
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
mcp.server.fastmcp
and expose theFastMCP
class directly asmcp.server.FastMCP
.mcp.server.lowlevel
but expose classes still viamcp.server
to allow for backwards compatibilty. There is a low risk of BC breakage if people rely on re-exports particular imports from the current mcp.server.mcp[cli]
. The exeutable is now is calledmcp
Compatibility
The change should be BC compatible. If not than it's a bug. We will release this as a minor version update,
1.2.0
. In version2.0.0
of the SDK, FastMCP will likely be renamed toServer
and exposed as such directly frommcp.server
, while the current SDK implementation will no longer be exposed viamcp.server
, but only viamcp.server.lowlevel
.Modules Naming
I am not set on the names of the mdoules. Feel free to modify or suggest changes as you see fit.
Test plan