fastmcp 0.4.1__py3-none-any.whl → 1.0__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.py CHANGED
@@ -428,9 +428,9 @@ class FastMCP:
428
428
  async def run_sse_async(self) -> None:
429
429
  """Run the server using SSE transport."""
430
430
  from starlette.applications import Starlette
431
- from starlette.routing import Route
431
+ from starlette.routing import Route, Mount
432
432
 
433
- sse = SseServerTransport("/messages")
433
+ sse = SseServerTransport("/messages/")
434
434
 
435
435
  async def handle_sse(request):
436
436
  async with sse.connect_sse(
@@ -442,14 +442,11 @@ class FastMCP:
442
442
  self._mcp_server.create_initialization_options(),
443
443
  )
444
444
 
445
- async def handle_messages(request):
446
- await sse.handle_post_message(request.scope, request.receive, request._send)
447
-
448
445
  starlette_app = Starlette(
449
446
  debug=self.settings.debug,
450
447
  routes=[
451
448
  Route("/sse", endpoint=handle_sse),
452
- Route("/messages", endpoint=handle_messages, methods=["POST"]),
449
+ Mount("/messages/", app=sse.handle_post_message),
453
450
  ],
454
451
  )
455
452
 
@@ -1,9 +1,10 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.4
2
2
  Name: fastmcp
3
- Version: 0.4.1
3
+ Version: 1.0
4
4
  Summary: A more ergonomic interface for MCP servers
5
5
  Author: Jeremiah Lowin
6
6
  License: MIT
7
+ License-File: LICENSE
7
8
  Requires-Python: >=3.10
8
9
  Requires-Dist: httpx>=0.26.0
9
10
  Requires-Dist: mcp<2.0.0,>=1.0.0
@@ -32,11 +33,27 @@ Requires-Dist: pytest>=8.3.3; extra == 'tests'
32
33
  Requires-Dist: ruff; extra == 'tests'
33
34
  Description-Content-Type: text/markdown
34
35
 
35
- <!-- omit in toc -->
36
- # FastMCP 🚀
36
+ <div align="center">
37
+
38
+ ### 🎉 FastMCP has been added to the official MCP SDK! 🎉
39
+
40
+ You can now find FastMCP as part of the official Model Context Protocol Python SDK:
41
+
42
+ 👉 [github.com/modelcontextprotocol/python-sdk](https://github.com/modelcontextprotocol/python-sdk)
43
+
44
+ *Please note: this repository is no longer maintained.*
45
+
46
+ ---
47
+
48
+
49
+ </br></br></br>
50
+
51
+ </div>
37
52
 
38
53
  <div align="center">
39
54
 
55
+ <!-- omit in toc -->
56
+ # FastMCP 🚀
40
57
  <strong>The fast, Pythonic way to build MCP servers.</strong>
41
58
 
42
59
  [![PyPI - Version](https://img.shields.io/pypi/v/fastmcp.svg)](https://pypi.org/project/fastmcp)
@@ -1,7 +1,7 @@
1
1
  fastmcp/__init__.py,sha256=Y5dHGBwyQPgNP5gzOyNIItefvMZ3vJLdom1oV8A1u_k,248
2
2
  fastmcp/exceptions.py,sha256=q9djUDmpwmGEWcHI8q4UzJBtf7s7UtgL--OB7OaGzyQ,435
3
3
  fastmcp/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
- fastmcp/server.py,sha256=ZyAXh9rBwpYXifJBwmf7xtanBjC3B-t0Uo-rXFTDAIY,22678
4
+ fastmcp/server.py,sha256=iM8tIqA258sK_-8xfsPlC2QJRnoMo5s1a5qPLaRDnZg,22538
5
5
  fastmcp/cli/__init__.py,sha256=7hrwtCHX9nMd9qcz7R_JFSoqbL71fC35cBLXBS430mg,88
6
6
  fastmcp/cli/claude.py,sha256=5SoVEsA_PnOyOe2bcItvfcCwuhfX6W99TP1nXahLIJE,4442
7
7
  fastmcp/cli/cli.py,sha256=sWNhq0ryeWcT_ANCW-Ss4ldHfptVDm8d6GjNtJe-8x8,13510
@@ -21,8 +21,8 @@ fastmcp/utilities/__init__.py,sha256=-imJ8S-rXmbXMWeDamldP-dHDqAPg_wwmPVz-LNX14E
21
21
  fastmcp/utilities/func_metadata.py,sha256=khB5bPMB9I8T7LfFDRwNzQSFqYVSME41KNZpIESmKY4,7266
22
22
  fastmcp/utilities/logging.py,sha256=1ipiOXzgWUp3Vih_JtEiLX7aAFmrUDZNr4KrZbofZTM,818
23
23
  fastmcp/utilities/types.py,sha256=kCjz2h3UlMAfHBB-HR5w6s9kauX0KLyQzRuHyhpaP4A,1810
24
- fastmcp-0.4.1.dist-info/METADATA,sha256=2fHmIZuO5ZRyealHazfFjz1i3-GCkS5LLhbNQlyU4C4,16367
25
- fastmcp-0.4.1.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
26
- fastmcp-0.4.1.dist-info/entry_points.txt,sha256=ff8bMtKX1JvXyurMibAacMSKbJEPmac9ffAKU9mLnM8,44
27
- fastmcp-0.4.1.dist-info/licenses/LICENSE,sha256=l3hc_411P__OCHoZlE2ZYWekMW-fmIZe9cYnGVyhu9I,1071
28
- fastmcp-0.4.1.dist-info/RECORD,,
24
+ fastmcp-1.0.dist-info/METADATA,sha256=iis0AaqqDhY6bdlI4WcUSCO54aMXUFWTLEqpHvfhw44,16747
25
+ fastmcp-1.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
26
+ fastmcp-1.0.dist-info/entry_points.txt,sha256=ff8bMtKX1JvXyurMibAacMSKbJEPmac9ffAKU9mLnM8,44
27
+ fastmcp-1.0.dist-info/licenses/LICENSE,sha256=l3hc_411P__OCHoZlE2ZYWekMW-fmIZe9cYnGVyhu9I,1071
28
+ fastmcp-1.0.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.26.3
2
+ Generator: hatchling 1.27.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any