fastmcp 2.3.2__py3-none-any.whl → 2.3.3__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
@@ -869,7 +869,7 @@ class FastMCP(Generic[LifespanResultT]):
869
869
  elif transport == "sse":
870
870
  return create_sse_app(
871
871
  server=self,
872
- message_path=path or self.settings.message_path,
872
+ message_path=self.settings.message_path,
873
873
  sse_path=path or self.settings.sse_path,
874
874
  auth_server_provider=self._auth_server_provider,
875
875
  auth_settings=self.settings.auth,
@@ -1094,11 +1094,13 @@ class FastMCP(Generic[LifespanResultT]):
1094
1094
 
1095
1095
  def _validate_resource_prefix(prefix: str) -> None:
1096
1096
  valid_resource = "resource://path/to/resource"
1097
+ test_case = f"{prefix}{valid_resource}"
1097
1098
  try:
1098
- AnyUrl(f"{prefix}{valid_resource}")
1099
+ AnyUrl(test_case)
1099
1100
  except pydantic.ValidationError as e:
1100
1101
  raise ValueError(
1101
- f"Resource prefix or separator would result in an invalid resource URI: {e}"
1102
+ "Resource prefix or separator would result in an "
1103
+ f"invalid resource URI (test case was {test_case!r}): {e}"
1102
1104
  )
1103
1105
 
1104
1106
 
@@ -71,7 +71,7 @@ def _run_server(mcp_server: FastMCP, transport: Literal["sse"], port: int) -> No
71
71
 
72
72
  @contextmanager
73
73
  def run_server_in_process(
74
- server_fn: Callable[[str, int], None],
74
+ server_fn: Callable[[str, int], None], *args
75
75
  ) -> Generator[str, None, None]:
76
76
  """
77
77
  Context manager that runs a Starlette app in a separate process and returns the
@@ -88,7 +88,9 @@ def run_server_in_process(
88
88
  s.bind((host, 0))
89
89
  port = s.getsockname()[1]
90
90
 
91
- proc = multiprocessing.Process(target=server_fn, args=(host, port), daemon=True)
91
+ proc = multiprocessing.Process(
92
+ target=server_fn, args=(host, port, *args), daemon=True
93
+ )
92
94
  proc.start()
93
95
 
94
96
  # Wait for server to be running
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fastmcp
3
- Version: 2.3.2
3
+ Version: 2.3.3
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
@@ -38,7 +38,7 @@ fastmcp/server/dependencies.py,sha256=1utkxFsV37HZcWBwI69JyngVN2ppGO_PEgxUlUHHy_
38
38
  fastmcp/server/http.py,sha256=utl7vJkMvKUnKIflCptVWk1oqOi7_sJJHqUl22g4JC8,10473
39
39
  fastmcp/server/openapi.py,sha256=0nANnwHJ5VZInNyo2f9ErmO0K3igMv6bwyxf3G-BSls,23473
40
40
  fastmcp/server/proxy.py,sha256=LDTjzc_iQj8AldsfMU37flGRAfJic1w6qsherfyHPAA,9622
41
- fastmcp/server/server.py,sha256=Srj_aytCxsO7NjSwajW5gj55ilbHpgJlewepnNG9ToA,44420
41
+ fastmcp/server/server.py,sha256=FLcZe-ccCUe5288sdEEPl7xlrKgaVunGhJnq7nv70vc,44483
42
42
  fastmcp/tools/__init__.py,sha256=ocw-SFTtN6vQ8fgnlF8iNAOflRmh79xS1xdO0Bc3QPE,96
43
43
  fastmcp/tools/tool.py,sha256=HGcHjMecqAeN6eI-IfE_2UBcd1KpTV-VOTFLx9tlbpU,7809
44
44
  fastmcp/tools/tool_manager.py,sha256=p2nHyLFgz28tbsLpWOurkbWRU2Z34_HcDohjrvwjI0E,3369
@@ -48,10 +48,10 @@ fastmcp/utilities/decorators.py,sha256=AjhjsetQZF4YOPV5MTZmIxO21iFp_4fDIS3O2_KNC
48
48
  fastmcp/utilities/json_schema.py,sha256=mSakhP8bENxhLFMwHJSxJAFllNeByIBDjVohwlpac6w,2026
49
49
  fastmcp/utilities/logging.py,sha256=zav8pnFxG_fvGJHUV2XpobmT9WVrmv1mlQBSCz-CPx4,1159
50
50
  fastmcp/utilities/openapi.py,sha256=Er3G1MyFwiWVxZXicXtD2j-BvttHEDTi1dgkq1KiBQc,51073
51
- fastmcp/utilities/tests.py,sha256=9GOxIENGU6vRTVooY5vxb5dM6vltpmgWKSKm8htQ4Yc,3197
51
+ fastmcp/utilities/tests.py,sha256=mAV2EjDeCbm9V9NsVIUjcmzf93MgDjfj8kMvHpf4vgo,3224
52
52
  fastmcp/utilities/types.py,sha256=6CcqAQ1QqCO2HGSFlPS6FO5JRWnacjCcO2-EhyEnZV0,4400
53
- fastmcp-2.3.2.dist-info/METADATA,sha256=XFBGtiKoYu43JZQAfXtaTDL_8qtWIk_7AIJen4XhqmA,15754
54
- fastmcp-2.3.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
55
- fastmcp-2.3.2.dist-info/entry_points.txt,sha256=ff8bMtKX1JvXyurMibAacMSKbJEPmac9ffAKU9mLnM8,44
56
- fastmcp-2.3.2.dist-info/licenses/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
57
- fastmcp-2.3.2.dist-info/RECORD,,
53
+ fastmcp-2.3.3.dist-info/METADATA,sha256=4z9X0B1oEDwqQBFJ7d2_YJtEoj2cKLn6TcJafKxATIE,15754
54
+ fastmcp-2.3.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
55
+ fastmcp-2.3.3.dist-info/entry_points.txt,sha256=ff8bMtKX1JvXyurMibAacMSKbJEPmac9ffAKU9mLnM8,44
56
+ fastmcp-2.3.3.dist-info/licenses/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
57
+ fastmcp-2.3.3.dist-info/RECORD,,