Skip to content

Commit c07a474

Browse files
fix: use correct FastMCP API method http_app()
- Changed mcp_server.streamable_http_app() -> mcp_server.http_app() - Reformatted test_tools.py to fix line ending issues - All tests passing (49/49 including api/test_main.py) This fixes CI failures in lint and test workflows. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent d05edb1 commit c07a474

2 files changed

Lines changed: 3 additions & 11 deletions

File tree

api/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ async def add_cache_headers(request: Request, call_next):
126126

127127

128128
# Mount MCP server for AI assistant integration
129-
app.mount("/mcp", mcp_server.streamable_http_app())
129+
app.mount("/mcp", mcp_server.http_app())
130130

131131
# Register routers
132132
app.include_router(health_router)

tests/unit/pyplots_mcp/test_tools.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,7 @@ def mock_spec():
7373
spec.applications = ["Data analysis", "Correlation studies"]
7474
spec.data = ["x (numeric)", "y (numeric)"]
7575
spec.notes = ["Use for continuous data"]
76-
spec.tags = {
77-
"plot_type": ["scatter"],
78-
"data_type": ["numeric"],
79-
"domain": ["statistics"],
80-
"features": ["basic"],
81-
}
76+
spec.tags = {"plot_type": ["scatter"], "data_type": ["numeric"], "domain": ["statistics"], "features": ["basic"]}
8277
spec.issue = 42
8378
spec.suggested = "contributor"
8479
spec.created = None
@@ -106,10 +101,7 @@ async def test_list_specs(mock_db_context, mock_spec):
106101
@pytest.mark.asyncio
107102
async def test_list_specs_pagination(mock_db_context):
108103
"""Test list_specs pagination."""
109-
specs = [
110-
MagicMock(id=f"spec-{i}", title=f"Spec {i}", description="", tags={}, impls=[])
111-
for i in range(5)
112-
]
104+
specs = [MagicMock(id=f"spec-{i}", title=f"Spec {i}", description="", tags={}, impls=[]) for i in range(5)]
113105

114106
mock_repo = MagicMock()
115107
mock_repo.get_all = AsyncMock(return_value=specs)

0 commit comments

Comments
 (0)