image-search-mcp 0.1.3__tar.gz → 0.1.5__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: image-search-mcp
3
- Version: 0.1.3
3
+ Version: 0.1.5
4
4
  Summary: MCP server for Reverse Image Search using PicImageSearch
5
5
  Author-email: Your Name <your.email@example.com>
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "image-search-mcp"
7
- version = "0.1.3"
7
+ version = "0.1.5"
8
8
  description = "MCP server for Reverse Image Search using PicImageSearch"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -44,27 +44,27 @@ 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 routes manually to match FastMCP internal logic
55
- async def handle_sse(request):
56
- async with sse.connect_sse(request.scope, request.receive, request.send) as (read_stream, write_stream):
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
- await mcp._server.run(
57
+ await mcp.server.run(
59
58
  read_stream,
60
59
  write_stream,
61
- mcp._server.create_initialization_options()
60
+ mcp.server.create_initialization_options()
62
61
  )
63
62
 
64
63
  starlette_app = Starlette(
65
64
  debug=True,
66
65
  routes=[
67
- Route("/sse", endpoint=handle_sse),
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
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: image-search-mcp
3
- Version: 0.1.3
3
+ Version: 0.1.5
4
4
  Summary: MCP server for Reverse Image Search using PicImageSearch
5
5
  Author-email: Your Name <your.email@example.com>
6
6
  License: MIT