OpenAPI-MCP icon indicating copy to clipboard operation
OpenAPI-MCP copied to clipboard

AttributeError: 'FastMCP' object has no attribute 'streamable_http_app'

Open LiuJiaoShouYa opened this issue 11 months ago β€’ 1 comments

I'm trying to implement a dynamic REST API interface to convert to an MCP service, but I've encountered this problem. I think this shouldn't be happening, because I've installed all the dependencies exactly as specified in the documentation. Are there any dependencies that need updating? I've only encountered this problem when there were version incompatibilities or outdated versions. How can I solve this?

The SSE mode also has the same exceptions.

πŸš€ 启动 REST API 转 MCP 服劑... INFO - Loaded local OpenAPI spec from: D:\Projects\test_projects\OpenAPI-MCP\my_test\api_spec.yaml INFO - Parsed 2 operations from OpenAPI spec INFO - Initialized OpenAPI proxy for My API Service INFO - Registered 2 API operations as tools βœ… MCP 服劑 'myapi' ε·²εˆε§‹εŒ– πŸ“ ζœεŠ‘εœ°ε€: http://0.0.0.0:8005 πŸ”§ 可用ε·₯具数量: 2 启动 HTTP δΌ θΎ“... Traceback (most recent call last): File "D:\Projects\test_projects\OpenAPI-MCP\my_test\test_fastmcp_live.py", line 51, in main() File "D:\Projects\test_projects\OpenAPI-MCP\my_test\test_fastmcp_live.py", line 48, in main asyncio.run(start_service(service_config)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\liupen7x.conda\envs\api_to_mcp\Lib\asyncio\runners.py", line 195, in run return runner.run(main) ^^^^^^^^^^^^^^^^ File "C:\Users\liupen7x.conda\envs\api_to_mcp\Lib\asyncio\runners.py", line 118, in run return self._loop.run_until_complete(task) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\liupen7x.conda\envs\api_to_mcp\Lib\asyncio\base_events.py", line 691, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "D:\Projects\test_projects\OpenAPI-MCP\my_test\test_fastmcp_live.py", line 30, in start_service server.run_http(host=config.mcp_http_host, port=config.mcp_http_port) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\liupen7x.conda\envs\api_to_mcp\Lib\site-packages\openapi_mcp\fastmcp_server.py", line 580, in run_http app = self.mcp.streamable_http_app() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'FastMCP' object has no attribute 'streamable_http_app'

LiuJiaoShouYa avatar Dec 23 '25 08:12 LiuJiaoShouYa