image-search-mcp 0.1.3__py3-none-any.whl → 0.1.4__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.
- image_search_mcp/main.py +6 -6
- {image_search_mcp-0.1.3.dist-info → image_search_mcp-0.1.4.dist-info}/METADATA +1 -1
- image_search_mcp-0.1.4.dist-info/RECORD +8 -0
- image_search_mcp-0.1.3.dist-info/RECORD +0 -8
- {image_search_mcp-0.1.3.dist-info → image_search_mcp-0.1.4.dist-info}/WHEEL +0 -0
- {image_search_mcp-0.1.3.dist-info → image_search_mcp-0.1.4.dist-info}/entry_points.txt +0 -0
- {image_search_mcp-0.1.3.dist-info → image_search_mcp-0.1.4.dist-info}/top_level.txt +0 -0
image_search_mcp/main.py
CHANGED
|
@@ -44,16 +44,15 @@ def main():
|
|
|
44
44
|
try:
|
|
45
45
|
import uvicorn
|
|
46
46
|
from starlette.applications import Starlette
|
|
47
|
-
from starlette.routing import Route
|
|
47
|
+
from starlette.routing import Route, Mount
|
|
48
48
|
from mcp.server.sse import SseServerTransport
|
|
49
49
|
|
|
50
50
|
# 1. Initialize SSE transport
|
|
51
|
-
# The transport handles the /sse and /messages endpoints
|
|
52
51
|
sse = SseServerTransport("/messages")
|
|
53
52
|
|
|
54
|
-
# 2. Define the ASGI app
|
|
55
|
-
async def handle_sse(
|
|
56
|
-
async with sse.connect_sse(
|
|
53
|
+
# 2. Define the SSE handler as a raw ASGI app to get scope, receive, send
|
|
54
|
+
async def handle_sse(scope, receive, send):
|
|
55
|
+
async with sse.connect_sse(scope, receive, send) as (read_stream, write_stream):
|
|
57
56
|
# Use the underlying server from FastMCP instance
|
|
58
57
|
await mcp._server.run(
|
|
59
58
|
read_stream,
|
|
@@ -64,7 +63,8 @@ def main():
|
|
|
64
63
|
starlette_app = Starlette(
|
|
65
64
|
debug=True,
|
|
66
65
|
routes=[
|
|
67
|
-
|
|
66
|
+
# Mount handles the path prefix and passes raw ASGI arguments
|
|
67
|
+
Mount("/sse", app=handle_sse),
|
|
68
68
|
Route("/messages", endpoint=sse.handle_post_message, methods=["POST"]),
|
|
69
69
|
]
|
|
70
70
|
)
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
image_search_mcp/__init__.py,sha256=h6DgLFO4TMUk7_wCJ2jn2Y6IkFmfzb-Z7jX-G5UCYVc,43
|
|
2
|
+
image_search_mcp/main.py,sha256=Fdy3fAee56zARYEE437I7XXSbVIXclkSF5ovTuWXN60,3519
|
|
3
|
+
image_search_mcp/server.py,sha256=zDfg1BAB1yPFdvBBkGbBxsGpUEnOAMORnA7LN-4g5Xg,13445
|
|
4
|
+
image_search_mcp-0.1.4.dist-info/METADATA,sha256=QhMZm19BGpYwbN_2K5n9JMmuOM-rRGRBkBYo65P-uj8,5434
|
|
5
|
+
image_search_mcp-0.1.4.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
6
|
+
image_search_mcp-0.1.4.dist-info/entry_points.txt,sha256=BD8buPHSQ9yLqGM6w_UGTKjYkVRu_IjH_R736MsDQXM,64
|
|
7
|
+
image_search_mcp-0.1.4.dist-info/top_level.txt,sha256=toz9LX_-JYwJIcGbvfVSH0ap99Nsp2mdzvitLWHyYWo,17
|
|
8
|
+
image_search_mcp-0.1.4.dist-info/RECORD,,
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
image_search_mcp/__init__.py,sha256=h6DgLFO4TMUk7_wCJ2jn2Y6IkFmfzb-Z7jX-G5UCYVc,43
|
|
2
|
-
image_search_mcp/main.py,sha256=A6cWVtrVJWWF7Wtmi6JGO-KsPa6F42PUWN59gg-TVVk,3514
|
|
3
|
-
image_search_mcp/server.py,sha256=zDfg1BAB1yPFdvBBkGbBxsGpUEnOAMORnA7LN-4g5Xg,13445
|
|
4
|
-
image_search_mcp-0.1.3.dist-info/METADATA,sha256=zBm3X1ZwWYLKFe63VjnMySbSvDymx5ORAGUn44kqrRQ,5434
|
|
5
|
-
image_search_mcp-0.1.3.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
6
|
-
image_search_mcp-0.1.3.dist-info/entry_points.txt,sha256=BD8buPHSQ9yLqGM6w_UGTKjYkVRu_IjH_R736MsDQXM,64
|
|
7
|
-
image_search_mcp-0.1.3.dist-info/top_level.txt,sha256=toz9LX_-JYwJIcGbvfVSH0ap99Nsp2mdzvitLWHyYWo,17
|
|
8
|
-
image_search_mcp-0.1.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|