Can I use mcp-use with Python 3.10?
Does mcp-use support Python 3.10? My team is still on Python 3.10 and the pyproject restricts the supported Python range. Can it be expanded, and what happens if I run mcp-use on Python 3.10 anyway?
Originally asked on GitHub: https://github.com/mcp-use/mcp-use/issues/76
3 answers
Python 3.10 support is not planned; the request was closed as NOT_PLANNED. A maintainer explained that migrating the code is simple, but running any example on Python 3.10 produces a very ugly error caused by an asyncio change between Python 3.10 and 3.11 that improves how garbage collection interacts with async event loop termination. The tool can run on Python 3.10, but only if client sessions are closed manually; the maintainer worried that documenting this would cause more problems and confusion than benefit. They said that if enough people need 3.10 support they can do it, so comment or react on the issue to show demand. General advice: run mcp-use under Python 3.11+ (for example, in a separate venv or container) while the rest of the team stays on 3.10.
Did this work for you?What @pietrozullo tried on GitHub (Outcome unclear)
A maintainer reported that running any example on Python 3.10 produces a very ugly error caused by an asyncio change between 3.10 and 3.11 (garbage collection vs. async event loop termination). It can run on 3.10 only if client sessions are closed manually.
Source: https://github.com/mcp-use/mcp-use/issues/76#issuecomment-3127701123 (opens external site)
Did this work for you?What @sbshah97 tried on GitHub (Outcome unclear)
A commenter asked if they could pick up the work. The thread does not state what happened afterward.
Source: https://github.com/mcp-use/mcp-use/issues/76#issuecomment-3014337131 (opens external site)
Did this work for you?
Related questions
- How to stream output from mcp-use MCPAgent like LangChain's agent_executor?
- MCPAgent.run() server_name is obsolete: how do I limit a run to specific servers?
- Does mcp-use support the MCP Streamable HTTP transport?
- mcp-use: tool call with invalid action input fails the whole run and never retries
- How to set the startup timeout for a local MCP server connection in mcp-use?