image-search-mcp 0.1.7__tar.gz → 0.1.8__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.7
3
+ Version: 0.1.8
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.7"
7
+ version = "0.1.8"
8
8
  description = "MCP server for Reverse Image Search using PicImageSearch"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -43,19 +43,16 @@ def main():
43
43
  if args.sse:
44
44
  try:
45
45
  import uvicorn
46
-
47
- # The most robust way to get the ASGI app from FastMCP (v2.3.2+)
48
- # Explicitly setting path="/" ensures /sse and /messages are at the root
49
- if hasattr(mcp, "http_app"):
50
- try:
46
+ # Use the official SSE app creator from FastMCP
47
+ try:
48
+ from mcp.server.fastmcp import create_sse_app
49
+ app = create_sse_app(mcp, sse_path="/sse", message_path="/messages")
50
+ except ImportError:
51
+ # Fallback for different versions
52
+ if hasattr(mcp, "http_app"):
51
53
  app = mcp.http_app(path="/")
52
- except Exception:
53
- app = mcp.http_app()
54
- elif hasattr(mcp, "as_asgi_app"):
55
- app = mcp.as_asgi_app()
56
- else:
57
- # Fallback to internal app if methods are missing
58
- app = getattr(mcp, "_app", mcp)
54
+ else:
55
+ app = getattr(mcp, "_app", mcp)
59
56
 
60
57
  # Check for Auth Token
61
58
  auth_token = os.environ.get("MCP_AUTH_TOKEN")
@@ -64,8 +61,6 @@ def main():
64
61
  app = AuthMiddleware(app, auth_token)
65
62
 
66
63
  print(f"Starting SSE server on {args.host}:{args.port}...")
67
- # uvicorn.run(app, host=args.host, port=args.port)
68
- # Use a slightly more verbose uvicorn config for debugging
69
64
  uvicorn.run(app, host=args.host, port=args.port, log_level="info")
70
65
 
71
66
  # 3. Apply Auth Middleware if token is provided
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: image-search-mcp
3
- Version: 0.1.7
3
+ Version: 0.1.8
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