image-search-mcp 0.1.0__tar.gz → 0.1.1__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.0 → image_search_mcp-0.1.1}/PKG-INFO +1 -1
- {image_search_mcp-0.1.0 → image_search_mcp-0.1.1}/pyproject.toml +1 -1
- {image_search_mcp-0.1.0 → image_search_mcp-0.1.1}/src/image_search_mcp/main.py +11 -9
- {image_search_mcp-0.1.0 → image_search_mcp-0.1.1}/src/image_search_mcp.egg-info/PKG-INFO +1 -1
- {image_search_mcp-0.1.0 → image_search_mcp-0.1.1}/README.md +0 -0
- {image_search_mcp-0.1.0 → image_search_mcp-0.1.1}/setup.cfg +0 -0
- {image_search_mcp-0.1.0 → image_search_mcp-0.1.1}/src/image_search_mcp/__init__.py +0 -0
- {image_search_mcp-0.1.0 → image_search_mcp-0.1.1}/src/image_search_mcp/server.py +0 -0
- {image_search_mcp-0.1.0 → image_search_mcp-0.1.1}/src/image_search_mcp.egg-info/SOURCES.txt +0 -0
- {image_search_mcp-0.1.0 → image_search_mcp-0.1.1}/src/image_search_mcp.egg-info/dependency_links.txt +0 -0
- {image_search_mcp-0.1.0 → image_search_mcp-0.1.1}/src/image_search_mcp.egg-info/entry_points.txt +0 -0
- {image_search_mcp-0.1.0 → image_search_mcp-0.1.1}/src/image_search_mcp.egg-info/requires.txt +0 -0
- {image_search_mcp-0.1.0 → image_search_mcp-0.1.1}/src/image_search_mcp.egg-info/top_level.txt +0 -0
|
@@ -43,12 +43,15 @@ def main():
|
|
|
43
43
|
if args.sse:
|
|
44
44
|
try:
|
|
45
45
|
import uvicorn
|
|
46
|
-
#
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
46
|
+
# FastMCP's Starlette app is usually available via the ._app attribute
|
|
47
|
+
# after some initialization, or we can use its built-in server logic.
|
|
48
|
+
# To apply middleware, we need the actual ASGI app.
|
|
49
|
+
|
|
50
|
+
# This is a more robust way to get the ASGI app from FastMCP
|
|
51
|
+
from mcp.server.fastmcp import FastMCP
|
|
52
|
+
|
|
53
|
+
# Force initialization of the SSE app if possible
|
|
54
|
+
app = mcp.as_asgi_app()
|
|
52
55
|
|
|
53
56
|
# Check for Auth Token
|
|
54
57
|
auth_token = os.environ.get("MCP_AUTH_TOKEN")
|
|
@@ -58,11 +61,10 @@ def main():
|
|
|
58
61
|
|
|
59
62
|
print(f"Starting SSE server on {args.host}:{args.port}...")
|
|
60
63
|
uvicorn.run(app, host=args.host, port=args.port)
|
|
61
|
-
except ImportError:
|
|
62
|
-
print("Error: 'uvicorn' is required for SSE mode. Please install it: pip install uvicorn")
|
|
63
|
-
sys.exit(1)
|
|
64
64
|
except Exception as e:
|
|
65
65
|
print(f"Error starting SSE server: {e}")
|
|
66
|
+
import traceback
|
|
67
|
+
traceback.print_exc()
|
|
66
68
|
sys.exit(1)
|
|
67
69
|
else:
|
|
68
70
|
# Stdio mode (Default)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{image_search_mcp-0.1.0 → image_search_mcp-0.1.1}/src/image_search_mcp.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{image_search_mcp-0.1.0 → image_search_mcp-0.1.1}/src/image_search_mcp.egg-info/entry_points.txt
RENAMED
|
File without changes
|
{image_search_mcp-0.1.0 → image_search_mcp-0.1.1}/src/image_search_mcp.egg-info/requires.txt
RENAMED
|
File without changes
|
{image_search_mcp-0.1.0 → image_search_mcp-0.1.1}/src/image_search_mcp.egg-info/top_level.txt
RENAMED
|
File without changes
|