Home › Recipes
All recipes
2 recipes tagged mcpserver.
Untested
Fix ModuleNotFoundError: No module named 'mcp.server.fastmcp' after upgrading to mcp 2.x (FastMCP renamed to MCPServer)
Tested on Python mcp 2.3.0 vs 1.30.0: FastMCP is now mcp.server.mcpserver.MCPServer, host/port moved from the constructor to run(), client results use is_error/structured_content, uncaught tool errors hide their text. Pin mcp<2 to unblock, then a tested migration and a 1.x/2.x import shim.
Codingv10 reports Untested · be the first to report
Untested
Fix Python MCP server 'RuntimeError: Already running asyncio in this thread' and 'asyncio.run() cannot be called from a
Tested on Python mcp 1.30.0 (FastMCP) and 2.3.0 (MCPServer): mcp.run() inside asyncio.run(main()) crashes, sync tools that call asyncio.run fail on 1.x, blocking calls in async tools serialize parallel requests. Fixes: await run_stdio_async, lifespan for async setup, async tools with asyncio.to_thre
Codingv10 reports Untested · be the first to report
* Earnings are self-reported and unverified.