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.
- {image_search_mcp-0.1.7 → image_search_mcp-0.1.8}/PKG-INFO +1 -1
- {image_search_mcp-0.1.7 → image_search_mcp-0.1.8}/pyproject.toml +1 -1
- {image_search_mcp-0.1.7 → image_search_mcp-0.1.8}/src/image_search_mcp/main.py +9 -14
- {image_search_mcp-0.1.7 → image_search_mcp-0.1.8}/src/image_search_mcp.egg-info/PKG-INFO +1 -1
- {image_search_mcp-0.1.7 → image_search_mcp-0.1.8}/README.md +0 -0
- {image_search_mcp-0.1.7 → image_search_mcp-0.1.8}/setup.cfg +0 -0
- {image_search_mcp-0.1.7 → image_search_mcp-0.1.8}/src/image_search_mcp/__init__.py +0 -0
- {image_search_mcp-0.1.7 → image_search_mcp-0.1.8}/src/image_search_mcp/server.py +0 -0
- {image_search_mcp-0.1.7 → image_search_mcp-0.1.8}/src/image_search_mcp.egg-info/SOURCES.txt +0 -0
- {image_search_mcp-0.1.7 → image_search_mcp-0.1.8}/src/image_search_mcp.egg-info/dependency_links.txt +0 -0
- {image_search_mcp-0.1.7 → image_search_mcp-0.1.8}/src/image_search_mcp.egg-info/entry_points.txt +0 -0
- {image_search_mcp-0.1.7 → image_search_mcp-0.1.8}/src/image_search_mcp.egg-info/requires.txt +0 -0
- {image_search_mcp-0.1.7 → image_search_mcp-0.1.8}/src/image_search_mcp.egg-info/top_level.txt +0 -0
|
@@ -43,19 +43,16 @@ def main():
|
|
|
43
43
|
if args.sse:
|
|
44
44
|
try:
|
|
45
45
|
import uvicorn
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
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
|
-
|
|
53
|
-
app = mcp
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{image_search_mcp-0.1.7 → image_search_mcp-0.1.8}/src/image_search_mcp.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{image_search_mcp-0.1.7 → image_search_mcp-0.1.8}/src/image_search_mcp.egg-info/entry_points.txt
RENAMED
|
File without changes
|
{image_search_mcp-0.1.7 → image_search_mcp-0.1.8}/src/image_search_mcp.egg-info/requires.txt
RENAMED
|
File without changes
|
{image_search_mcp-0.1.7 → image_search_mcp-0.1.8}/src/image_search_mcp.egg-info/top_level.txt
RENAMED
|
File without changes
|