fix(mcp): resolve AttributeError: FastMCP has no attribute streamable_http_app (#16)

* fix(mcp): resolve AttributeError: FastMCP has no attribute streamable_http_app

* chore(release): bump version to 0.0.6

---------

Co-authored-by: b3nw <189466+b3nw@users.noreply.github.com>
This commit is contained in:
i/o agentandb3nw authored and GitHub committed 2026-08-12 14:54:23 -04:00
1 parent ca3ba01f36
commit 725d323b96
3 files changed
+9 -3

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
[project]
name = "npm-mcp"
version = "0.0.5"
version = "0.0.6"
description = "MCP server for Nginx Proxy Manager"
readme = "README.md"
requires-python = ">=3.11"
+2 -2
View File
@@ -50,9 +50,9 @@ def main() -> None:
else:
logger.info(f"Starting MCP server in HTTP mode on {args.host}:{args.port}")
# Always construct the HTTP app using the same FastMCP.streamable_http_app()
# Always construct the HTTP app using the same FastMCP.http_app()
# so that its lifespan (StreamableHTTPSessionManager background task) runs correctly.
app = mcp.streamable_http_app()
app = mcp.http_app()
# Mount /health directly on the inner router
from starlette.responses import PlainTextResponse
+6
View File
@@ -7,3 +7,9 @@ def test_server_imports():
from npm_mcp.server import mcp
assert mcp is not None
assert mcp.name == "npm-mcp"
def test_server_http_app():
"""Ensure that the http_app can be retrieved without AttributeError."""
from npm_mcp.server import mcp
app = mcp.http_app()
assert app is not None