Skip to content

Commit ee5f465

Browse files
authored
2.14 deprecation removals (#2329)
* Initialize 2.14 deprecation removal branch * Remove deprecated FASTMCP_SERVER_ environment variable prefix (#2330) * Remove deprecated Context.get_http_request method (#2332) * Remove fastmcp.Image top-level import (deprecated 2.8.1) (#2334) * Remove test warnings (#2331) * Create new branch and fix issue * Remove deprecated client parameter from FastMCPProxy (#2333) * Remove deprecated run_streamable_http_async method (#2338) * Remove deprecated sse_app method (#2337) * Remove deprecated run_sse_async method (#2335) * Remove deprecated run_sse_async method * Update CLI and tests to use run_http_async(transport="sse") - Change CLI to call run_http_async with transport="sse" instead of run_sse_async - Update test to mock run_http_async with create=True for v1 servers * Revert CLI changes - v1 servers do have run_sse_async - Keep CLI calling run_sse_async() for v1 compatibility - Update test to mock run_sse_async (which exists on v1) * Remove unnecessary type ignore for run_sse_async Method exists on v1 FastMCP class, no type error * Remove unused imports after test deletion * Remove deprecated streamable_http_app method (#2336) * Remove deprecated dependencies parameter from FastMCP constructor (#2340) * Remove output_schema=False support (deprecated 2.11.4) (#2339) * Remove deprecated client parameter from FastMCPProxy (#2333) * Delete deprecated test_output_schema_false.py Tests functionality that has been removed * Remove deprecated BearerAuthProvider module (#2341) * Remove resource_prefix_format="protocol" support (deprecated 2.4.0) (#2342) * Remove resource_prefix_format="protocol" support (fixes #2195) Removes deprecated protocol format (prefix+resource://path) and keeps only path format (resource://prefix/path). Since only one format remains: - Removed resource_prefix_format from settings, FastMCP.__init__, and helpers - Simplified add_resource_prefix, remove_resource_prefix, has_resource_prefix - Removed MountedServer.resource_prefix_format field - Deleted tests for protocol format All resource prefixes now use path format exclusively. * Clean up resource_prefix_format references - Remove from test files - Update documentation to remove protocol format section - Move custom HTTP routes note to mounting section - Remove resource_prefix_format from settings docs * Use inline version note instead of badge for prefix format * Remove obsolete test functions and update docs - Delete test functions that no longer assert anything - Remove proxy.mdx reference to deleted prefix format section * Format error messages per ruff * Remove from_client classmethod (deprecated 2.8.0) (#2343) * Remove deprecated from_client classmethod (fixes #2192) * Remove unused Client import * Remove add_resource_fn method (deprecated 2.7.0) (#2345) * Update SDK * Add missing imports for exclude_args deprecation warning
1 parent 4d22d9c commit ee5f465

41 files changed

Lines changed: 245 additions & 1609 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/changelog.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1234,7 +1234,7 @@ This release introduces completely new tools for generating and customizing MCP
12341234

12351235
## [v2.4.0: Config and Conquer](https://github.com/jlowin/fastmcp/releases/tag/v2.4.0)
12361236

1237-
**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 [Resource Prefix Formats](https://gofastmcp.com/servers/composition#resource-prefix-formats) for more.
1237+
**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.
12381238

12391239
### New Features 🎉
12401240

docs/docs.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,6 @@
356356
"python-sdk/fastmcp-server-auth-providers-auth0",
357357
"python-sdk/fastmcp-server-auth-providers-aws",
358358
"python-sdk/fastmcp-server-auth-providers-azure",
359-
"python-sdk/fastmcp-server-auth-providers-bearer",
360359
"python-sdk/fastmcp-server-auth-providers-debug",
361360
"python-sdk/fastmcp-server-auth-providers-descope",
362361
"python-sdk/fastmcp-server-auth-providers-discord",

docs/python-sdk/fastmcp-cli-cli.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ FastMCP CLI tools using Cyclopts.
1010

1111
## Functions
1212

13-
### `with_argv` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/cli.py#L67" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
13+
### `with_argv` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/cli.py#L65" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
1414

1515
```python
1616
with_argv(args: list[str] | None)
@@ -27,7 +27,7 @@ Args are provided without the script name, so we preserve sys.argv[0]
2727
and replace the rest.
2828

2929

30-
### `version` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/cli.py#L90" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
30+
### `version` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/cli.py#L88" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
3131

3232
```python
3333
version()
@@ -37,7 +37,7 @@ version()
3737
Display version information and platform details.
3838

3939

40-
### `dev` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/cli.py#L128" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
40+
### `dev` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/cli.py#L126" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
4141

4242
```python
4343
dev(server_spec: str | None = None) -> None
@@ -50,7 +50,7 @@ Run an MCP server with the MCP Inspector for development.
5050
- `server_spec`: Python file to run, optionally with \:object suffix, or None to auto-detect fastmcp.json
5151

5252

53-
### `run` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/cli.py#L306" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
53+
### `run` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/cli.py#L286" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
5454

5555
```python
5656
run(server_spec: str | None = None, *server_args: str) -> None
@@ -74,7 +74,7 @@ fastmcp run server.py -- --config config.json --debug
7474
- `server_spec`: Python file, object specification (file\:obj), config file, URL, or None to auto-detect
7575

7676

77-
### `inspect` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/cli.py#L540" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
77+
### `inspect` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/cli.py#L520" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
7878

7979
```python
8080
inspect(server_spec: str | None = None) -> None
@@ -105,7 +105,7 @@ fastmcp inspect # auto-detect fastmcp.json
105105
- `server_spec`: Python file to inspect, optionally with \:object suffix, or fastmcp.json
106106

107107

108-
### `prepare` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/cli.py#L785" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
108+
### `prepare` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/cli.py#L765" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
109109

110110
```python
111111
prepare(config_path: Annotated[str | None, cyclopts.Parameter(help='Path to fastmcp.json configuration file')] = None, output_dir: Annotated[str | None, cyclopts.Parameter(help='Directory to create the persistent environment in')] = None, skip_source: Annotated[bool, cyclopts.Parameter(help='Skip source preparation (e.g., git clone)')] = False) -> None

docs/python-sdk/fastmcp-server-auth-providers-bearer.mdx

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)