Troubleshooting¶
Common issues and their solutions.
Claude Desktop fails to connect: Cargo lock file version mismatch¶
If Claude Desktop logs show an error like:
lock file version `4` was found, but this version of Cargo does not
understand this lock file, perhaps Cargo needs to be updated?
Cause¶
The mcp[cli] dependency pulls in cryptography, which builds from source and requires a recent version of Cargo (Rust's build tool). Your system's Cargo is too old to understand the lock file format generated by newer Rust toolchains.
Solution¶
Update Rust and Cargo via rustup:
After updating, restart Claude Desktop and the MCP server should connect normally.
Server not found / command not found¶
If the MCP client reports that mcp-api-test is not found:
Step 1: Verify the CLI is on your PATH¶
Step 2: Reinstall the package¶
Step 3: Check your Python bin directory¶
Ensure your Python bin directory is in your $PATH. Common locations:
- System Python:
~/.local/bin - Virtualenv:
<venv>/bin - uv:
~/.local/bin
You can add it to your shell profile:
MCP Inspector shows "Failed to connect"¶
Double-check that:
which mcp-api-testresolves to a valid pathpip install -e .completed without errors- The Transport Type is set to
STDIOin the Inspector UI - The Command field is exactly
mcp-api-test(no extra arguments)
Assertions always fail¶
If assertions don't behave as expected:
- Status code range: Make sure you're using the correct format:
"2xx"for wildcard or"200-299"for explicit range. - Response fields: Nested fields use dot notation (e.g.
"data.user.name"). The field must exist in the JSON response. - Response contains: This checks for a substring match in the serialized response body, not a JSON path.