Skip to content

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:

rustup update

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

which mcp-api-test

Step 2: Reinstall the package

pip install -e .

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:

export PATH="$HOME/.local/bin:$PATH"

MCP Inspector shows "Failed to connect"

Double-check that:

  1. which mcp-api-test resolves to a valid path
  2. pip install -e . completed without errors
  3. The Transport Type is set to STDIO in the Inspector UI
  4. 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.