Refactor server startup functions
Rename `startServer` to `startStreamableHTTPServer` and add a new `startStdioServer` helper to make the transport type explicit. Remove the `ServerOptions` interface in favor of reading `PORT` directly from the environment inside the function (defaulting to `3001`). Also update Python examples to default to port `3001` for consistency. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
9557d41ce7
commit
6eb82b5562
1 changed files with 338 additions and 352 deletions
|
|
@ -25,7 +25,7 @@ from starlette.middleware.cors import CORSMiddleware
|
|||
|
||||
VIEW_URI = "ui://qr-server/view.html"
|
||||
HOST = os.environ.get("HOST", "0.0.0.0") # 0.0.0.0 for Docker compatibility
|
||||
PORT = int(os.environ.get("PORT", "3108"))
|
||||
PORT = int(os.environ.get("PORT", "3001"))
|
||||
|
||||
mcp = FastMCP("QR Code Server")
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue