Releases: jlowin/fastmcp
v2.7.1: The Bearer Necessities
This release primarily contains a fix for parsing string tokens that are provided to FastMCP clients.
What's Changed
New Features 🎉
Fixes 🐞
- Ensure event store is properly typed by @jlowin in #753
- Fix passing token string to client auth & add auth to MCPConfig clients by @jlowin in #754
Docs 📚
- Docs : fix client to mcp_client in Gemini example by @yrangana in #734
- update add tool docstring by @strawgate in #739
- Fix contrib link by @richardkmichael in #749
Other Changes 🦾
- Switch Pydantic defaults to kwargs by @strawgate in #731
- Fix Typo in CLI module by @wfclark5 in #737
- chore: fix prompt docstring by @danb27 in #752
- Add accept to excluded headers by @jlowin in #751
New Contributors
- @wfclark5 made their first contribution in #737
- @richardkmichael made their first contribution in #749
- @danb27 made their first contribution in #752
Full Changelog: v2.7.0...v2.7.1
v2.7.0: Pare Programming
This is primarily a housekeeping release to remove or deprecate cruft that's accumulated since v1. Primarily, this release refactors FastMCP's internals in preparation for features planned in the next few major releases. However please note that as a result, this release has some minor breaking changes (which is why it's 2.7, not 2.6.2, in accordance with repo guidelines) though not to the core user-facing APIs. Examples include:
- decorators return the objects they create, not the decorated function
- websockets is an optional dependency
- methods on the server for automatically converting functions into tools/resources/prompts have been deprecated in favor of using the decorators directly
Happily, this release DOES permit the use of "naked" decorators to align with Pythonic practice:
@mcp.tool
def my_tool():
...What's Changed
New Features 🎉
- allow passing flags to servers by @zzstoatzz in #690
- replace $ref pointing to
#/components/schemas/with#/$defs/by @phateffect in #697 - Split Tool into Tool and FunctionTool by @jlowin in #700
- Use strict basemodel for Prompt; relax from_function deprecation by @jlowin in #701
- Formalize resource/functionresource replationship by @jlowin in #702
- Formalize template/functiontemplate split by @jlowin in #703
- Support flexible @tool decorator call patterns by @jlowin in #706
- Ensure deprecation warnings have stacklevel=2 by @jlowin in #710
- Allow naked prompt decorator by @jlowin in #711
Fixes 🐞
- Updates / Fixes for Tool Content Conversion by @strawgate in #642
- Fix pr labeler permissions by @jlowin in #708
- remove -n auto by @jlowin in #709
- Fix links in README.md by @alainivars in #723
Breaking Changes 🛫
- Deprecate passing functions to the server in favor of core objects by @jlowin in #705
- Remove websockets dependency by @jlowin in #726
- Return objects from FastMCP decorators by @jlowin in #727
Docs 📚
- Add banner by @jlowin in #712
- Allow clicking on banner by @jlowin in #713
- Add empty parens to docs by @jlowin in #714
- Update banner link by @jlowin in #716
- Add updates by @jlowin in #718
- Add tags by @jlowin in #719
- Update docs.json by @jlowin in #720
- Remove empty parens from decorators in docs by @jlowin in #729
New Contributors
- @phateffect made their first contribution in #697
Full Changelog: v2.6.1...v2.7.0
v2.6.1: Blast Auth (second ignition)
This is a patch release to restore py.typed in #686.
What's Changed
Docs 📚
- Update readme by @jlowin in #679
- Add gemini tutorial by @jlowin in #680
- Fix : fix path error to CLI Documentation by @yrangana in #684
- Update auth docs by @jlowin in #687
Other Changes 🦾
- Remove deprecation notice by @jlowin in #677
- Delete server.py by @jlowin in #681
- Restore py.typed by @jlowin in #686
New Contributors
Full Changelog: v2.6.0...v2.6.1
v2.6.0: Blast Auth
What's Changed
New Features 🎉
- Introduce MCP client oauth flow by @jlowin in #478
- Support providing tools at init by @jlowin in #647
- Simplify code for running servers in processes during tests by @jlowin in #649
- Add basic bearer auth for server and client by @jlowin in #650
- Support configuring bearer auth from env vars by @jlowin in #652
- feat(tool): add support for excluding arguments from tool definition by @deepak-stratforge in #626
- Add docs for server + client auth by @jlowin in #655
Fixes 🐞
- fix: Support concurrency in FastMcpProxy (and Client) by @Sillocan in #635
- Ensure Client.close() cleans up client context appropriately by @jlowin in #643
- Update client.mdx: ClientError namespace by @mjkaye in #657
Docs 📚
- Make FastMCPTransport support simulated Streamable HTTP Transport (didn't work) by @jlowin in #645
- Document exclude_args by @jlowin in #653
- Update welcome by @jlowin in #673
- Add Anthropic + Claude desktop integration guides by @jlowin in #674
- Minor docs design updates by @jlowin in #676
Other Changes 🦾
New Contributors
- @Sillocan made their first contribution in #635
- @deepak-stratforge made their first contribution in #626
- @mjkaye made their first contribution in #657
Full Changelog: v2.5.2...v2.6.0
v2.5.2: Stayin' Alive
What's Changed
New Features 🎉
- Add graceful error handling for unreachable mounted servers by @davenpi in #605
- Improve type inference from client transport by @jlowin in #623
- Add keep_alive param to reuse subprocess by @jlowin in #624
Fixes 🐞
- Fix handling tools without descriptions by @jlowin in #610
- Don't print env vars to console when format is wrong by @jlowin in #615
- Ensure behavior-affecting headers are excluded when forwarding proxies/openapi by @jlowin in #620
Docs 📚
Other Changes 🦾
- add init_timeout for mcp client by @jfouret in #607
- Add init_timeout for mcp client (incl settings) by @jlowin in #609
- Support for uppercase letters at the log level by @ksawaray in #625
New Contributors
Full Changelog: v2.5.1...v2.5.2
v2.5.1: Route Awakening (Part 2)
2.5.0: Route Awakening
This release introduces completely new tools for generating and customizing MCP servers from OpenAPI specs and FastAPI apps, including popular requests like mechanisms for determining what routes map to what MCP components; renaming routes; and customizing the generated MCP components.
What's Changed
New Features 🎉
- Add FastMCP 1.0 server support for in-memory Client / Testing by @jlowin in #539
- Minor addition: add transport to stdio server in mcpconfig, with default by @jlowin in #555
- Raise an error if a Client is created with no servers in config by @jlowin in #554
- Expose model preferences in
Context.samplefor flexible model selection. by @davenpi in #542 - Ensure custom routes are respected by @jlowin in #558
- Add client method to send cancellation notifications by @davenpi in #563
- Enhance route map logic for include/exclude OpenAPI routes by @jlowin in #564
- Add tag-based route maps by @jlowin in #565
- Add advanced control of openAPI route creation by @jlowin in #566
- Make error masking configurable by @jlowin in #550
- Ensure client headers are passed through to remote servers by @jlowin in #575
- Use lowercase name for headers when comparing by @jlowin in #576
- Permit more flexible name generation for OpenAPI servers by @jlowin in #578
- Ensure that tools/templates/prompts are compatible with callable objects by @jlowin in #579
Docs 📚
- Add version badge for prefix formats by @jlowin in #537
- Add versioning note to docs by @jlowin in #551
- Bump 2.3.6 references to 2.4.0 by @jlowin in #567
Full Changelog: v2.4.0...v2.5.0
v2.4.0: Config and Conquer
Note: this release includes a backwards-incompatible change to how resources are prefixed when mounted in composed servers. However, it is only backwards-incompatible if users were running tests or manually loading resources by prefixed key; LLMs should not have any issue discovering the new route. See https://gofastmcp.com/servers/composition#resource-prefix-formats for more.
What's Changed
New Features 🎉
- Allow * Methods and all routes as tools shortcuts by @jlowin in #520
- Improved support for config dicts by @jlowin in #522
- Support creating clients from MCP config dicts, including multi-server clients by @jlowin in #527
- Make resource prefix format configurable by @jlowin in #534
Fixes 🐞
Breaking Changes 🛫
Docs 📚
Other Changes 🦾
- Ensure openapi path params are handled properly by @jlowin in #519
- better error when missing lifespan by @zzstoatzz in #521
Full Changelog: v2.3.5...v2.4.0
v2.3.5: Making Progress
What's Changed
New Features 🎉
- support messages in progress notifications by @rickygenhealth in #471
- feat: Add middleware option in server.run by @Maxi91f in #475
- Add lifespan property to app by @jlowin in #483
- Update
fastmcp runto work with remote servers by @jlowin in #491 - Add FastMCP.as_proxy() by @jlowin in #490
- Infer sse transport from urls containing /sse by @jlowin in #512
- Add progress handler to client by @jlowin in #513
- Store the initialize result on the client by @jlowin in #509
Fixes 🐞
Docs 📚
- Update transport docs by @jlowin in #458
- update proxy docs + example by @zzstoatzz in #460
- doc(asgi): Change custom route example to PlainTextResponse by @mcw0933 in #477
- Store FastMCP instance on app.state.fastmcp_server by @jlowin in #489
- Improve AGENTS.md overview by @jlowin in #492
- Update release numbers for anticipated version by @jlowin in #516
Other Changes 🦾
- run tests on all PRs by @jlowin in #468
- add null check by @zzstoatzz in #473
- strict typing for
server.pyby @zzstoatzz in #476 - Doc(quickstart): Fix import statements by @mai-nakagawa in #479
- Add labeler by @jlowin in #484
- Fix flaky timeout test by increasing timeout (#474) by @davenpi in #486
- Skipping
test_permission_errorif runner is root. by @ZiadAmerr in #502 - allow passing full uvicorn config by @zzstoatzz in #504
- Skip timeout tests on windows by @jlowin in #514
New Contributors
- @rickygenhealth made their first contribution in #471
- @Maxi91f made their first contribution in #475
- @mcw0933 made their first contribution in #477
- @mai-nakagawa made their first contribution in #479
- @ZiadAmerr made their first contribution in #502
Full Changelog: v2.3.4...v2.3.5
v2.3.4: Error Today, Gone Tomorrow
What's Changed
New Features 🎉
- logging stack trace for easier debugging by @jbkoh in #413
- add missing StreamableHttpTransport in client exports by @yihuang in #408
- Improve error handling for tools and resources by @jlowin in #434
- feat: add support for removing tools from server by @davenpi in #437
- Prune titles from JSONSchemas by @jlowin in #449
- Declare toolsChanged capability for stdio server. by @davenpi in #450
- Improve handling of exceptiongroups when raised in clients by @jlowin in #452
- Add timeout support to client by @jlowin in #455
Fixes 🐞
- Pin to mcp 1.8.1 to resolve callback deadlocks with SHTTP by @jlowin in #427
- Add reprs for OpenAPI objects by @jlowin in #447
- Ensure openapi defs for structured objects are loaded properly by @jlowin in #448
- Ensure tests run against correct python version by @jlowin in #454
- Ensure result is only returned if a new key was found by @jlowin in #456
Docs 📚
Other Changes 🦾
- Deprecate passing settings to the FastMCP instance by @jlowin in #424
- Add path prefix to test by @jlowin in #432
New Contributors
Full Changelog: v2.3.3...v2.3.4