An issue connecting to Claude when importing the python requests library
Conditions
python uv project. fastmcp server with the requests library added. The dev MCP Inspector can run the server. However, when I install the server to use with Claude it shuts down the serve immediately after startup saying no requests library found.
Requests is in the pyproject.toml and uv.lock file. I have replaced the requests library with httpx and it works fine now.
Hi, I faced a similar issue, what worked for me was, i installed uv via brew and removed the entire cache folders present in the claude directory and try again. Let me know if that works for you
Same problem
requests package is exists in my conda environment, but "no module named requests" occured.
are you putting the dependency in FastMCP(..., dependencies=[...]) or how are you expecting your deps to get there?
it doesn't work with requests, the fastmcp only recognizes uv @kdh-awraw1019
Claude does not run your local environment. It is an entirely isolated environment. You need to either use dependencies as @zzstoatzz indicated (which works with FastMCP only), or use uv or fastmcp install with --with <dependency> or --with-editable <your local repo> to get Claude to run with specific dependencies.
httpx works because it is included with FastMCP, and FastMCP automatically adds --with fastmcp to all Claude installations.