fastmcp 2.2.0__py3-none-any.whl → 2.2.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
fastmcp/server/server.py CHANGED
@@ -7,6 +7,7 @@ from contextlib import (
7
7
  AsyncExitStack,
8
8
  asynccontextmanager,
9
9
  )
10
+ from functools import partial
10
11
  from typing import TYPE_CHECKING, Any, Generic, Literal
11
12
 
12
13
  import anyio
@@ -259,7 +260,8 @@ class FastMCP(Generic[LifespanResultT]):
259
260
  transport: Transport protocol to use ("stdio" or "sse")
260
261
  """
261
262
  logger.info(f'Starting server "{self.name}"...')
262
- anyio.run(self.run_async, transport, **transport_kwargs)
263
+
264
+ anyio.run(partial(self.run_async, transport, **transport_kwargs))
263
265
 
264
266
  def _setup_handlers(self) -> None:
265
267
  """Set up core MCP protocol handlers."""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fastmcp
3
- Version: 2.2.0
3
+ Version: 2.2.1
4
4
  Summary: The fast, Pythonic way to build MCP servers.
5
5
  Project-URL: Homepage, https://gofastmcp.com
6
6
  Project-URL: Repository, https://github.com/jlowin/fastmcp
@@ -17,11 +17,11 @@ Classifier: Programming Language :: Python :: 3.12
17
17
  Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
18
18
  Classifier: Typing :: Typed
19
19
  Requires-Python: >=3.10
20
- Requires-Dist: dotenv>=0.9.9
21
20
  Requires-Dist: exceptiongroup>=1.2.2
22
21
  Requires-Dist: httpx>=0.28.1
23
22
  Requires-Dist: mcp<2.0.0,>=1.6.0
24
23
  Requires-Dist: openapi-pydantic>=0.5.1
24
+ Requires-Dist: python-dotenv>=1.1.0
25
25
  Requires-Dist: rich>=13.9.4
26
26
  Requires-Dist: typer>=0.15.2
27
27
  Requires-Dist: websockets>=15.0.1
@@ -95,6 +95,7 @@ FastMCP handles the complex protocol details and server management, letting you
95
95
  - [Proxy Servers](#proxy-servers)
96
96
  - [Composing MCP Servers](#composing-mcp-servers)
97
97
  - [OpenAPI \& FastAPI Generation](#openapi--fastapi-generation)
98
+ - [Handling `stderr`](#handling-stderr)
98
99
  - [Running Your Server](#running-your-server)
99
100
  - [Development Mode (Recommended for Building \& Testing)](#development-mode-recommended-for-building--testing)
100
101
  - [Claude Desktop Integration (For Regular Use)](#claude-desktop-integration-for-regular-use)
@@ -695,6 +696,12 @@ mcp_server = FastMCP.from_openapi(openapi_spec, client=http_client)
695
696
  if __name__ == "__main__":
696
697
  mcp_server.run()
697
698
  ```
699
+
700
+ ### Handling `stderr`
701
+ The MCP spec allows for the server to write anything it wants to `stderr`, and it
702
+ doesn't specify the format in any way. FastMCP will forward the server's `stderr`
703
+ to the client's `stderr`.
704
+
698
705
  ## Running Your Server
699
706
 
700
707
  Choose the method that best suits your needs:
@@ -23,7 +23,7 @@ fastmcp/server/__init__.py,sha256=pdkghG11VLMZiluQ-4_rl2JK1LMWmV003m9dDRUN8W4,92
23
23
  fastmcp/server/context.py,sha256=s1885AZRipKB3VltfaO3VEtMxGefKs8fdZByj-4tbNI,7120
24
24
  fastmcp/server/openapi.py,sha256=DVdUfs-rbBF_CIlxrI6HJ5aYbzuyDqGLAhT1TeyxwFc,22424
25
25
  fastmcp/server/proxy.py,sha256=in-ZGwd7I8h7fITKMyHXaJRqODudn7MXsG0hVv9M0rA,8580
26
- fastmcp/server/server.py,sha256=izKw5m1nuabaFg4DeC26DYqytEq1GkqUMiuMoNVTUYI,31681
26
+ fastmcp/server/server.py,sha256=PFhnwa24diSKCz8KO39q43yuSHSbqYrzgnSspc-SPfg,31721
27
27
  fastmcp/tools/__init__.py,sha256=ocw-SFTtN6vQ8fgnlF8iNAOflRmh79xS1xdO0Bc3QPE,96
28
28
  fastmcp/tools/tool.py,sha256=FGihp_hzKLj4hK7EdHNUwe8o3NMzCngw4ftMmL_X4XI,5797
29
29
  fastmcp/tools/tool_manager.py,sha256=hClv7fwj0cQSSwW0i-Swt7xiVqR4T9LVmr1Tp704nW4,3283
@@ -33,8 +33,8 @@ fastmcp/utilities/func_metadata.py,sha256=uh-u3gAjLD4kCcGf0ZkZZwBTTl-84JuANZTnDq
33
33
  fastmcp/utilities/logging.py,sha256=zav8pnFxG_fvGJHUV2XpobmT9WVrmv1mlQBSCz-CPx4,1159
34
34
  fastmcp/utilities/openapi.py,sha256=PrH3usbTblaVC6jIH1UGiPEfgB2sSCLj33zA5dH7o_s,45193
35
35
  fastmcp/utilities/types.py,sha256=m2rPYMzO-ZFvvZ46N-1-Xqyw693K7yq9Z2xR4pVELyk,2091
36
- fastmcp-2.2.0.dist-info/METADATA,sha256=MheLzFNF_LxSDXigYZ4MS5kswED3sFguTOACOe0RjUs,27497
37
- fastmcp-2.2.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
38
- fastmcp-2.2.0.dist-info/entry_points.txt,sha256=ff8bMtKX1JvXyurMibAacMSKbJEPmac9ffAKU9mLnM8,44
39
- fastmcp-2.2.0.dist-info/licenses/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
40
- fastmcp-2.2.0.dist-info/RECORD,,
36
+ fastmcp-2.2.1.dist-info/METADATA,sha256=DSlO410ImcFq2nxjE-BfQaqzXLkkThKE9yLe-pTKA1k,27760
37
+ fastmcp-2.2.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
38
+ fastmcp-2.2.1.dist-info/entry_points.txt,sha256=ff8bMtKX1JvXyurMibAacMSKbJEPmac9ffAKU9mLnM8,44
39
+ fastmcp-2.2.1.dist-info/licenses/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
40
+ fastmcp-2.2.1.dist-info/RECORD,,