Skip to content

[Bug]: vLLM 0.27.1 declares an unbounded mcp dependency but is incompatible with MCP SDK 2.x#53855

Description

@moonearthloop

Your current environment

Environment

  • OS: Linux
  • Python: 3.12.13
  • vLLM: 0.27.1
  • MCP SDK: 2.0.0 (problematic) / 1.27.2 (working)
  • Model: Qwen3
  • GPU: NVIDIA H20 96 GB
  • NVIDIA Driver: 580.76.05
  • CUDA: 13.0
  • Installation: pip

馃悰 Describe the bug

Reproduction

1. Install the affected versions

pip install vllm==0.27.1
pip install mcp==2.0.0

2. Start any MCP SSE server

A minimal MCP SSE server exposing one or more standard MCP tools is sufficient.

The MCP server itself is not required to reproduce the API compatibility issue.

The MCP server can be independently verified with the MCP Python client:

result = await session.list_tools()

and successfully returns valid MCP Tool objects.

3. Start vLLM with MCP tool-server support

vllm serve <model> \
    --enable-auto-tool-choice \
    --tool-call-parser hermes \
    --tool-server <mcp-server-host>:<port> \
    --port 6008

4. Observe the MCP Tool schema

With mcp==2.0.0:

import mcp.types

tool = mcp.types.Tool(
    name="test",
    description="test",
    input_schema={
        "type": "object",
        "properties": {}
    }
)

print(hasattr(tool, "input_schema"))
print(hasattr(tool, "inputSchema"))

Output:

True
False

However, vLLM 0.27.1 accesses:

tool.inputSchema

in:

vllm/entrypoints/mcp/tool_server.py

while MCP 2.0.0 exposes:

tool.input_schema

5. Verify the workaround

Downgrade the MCP SDK:

pip install mcp==1.27.2

Restart vLLM with the same configuration. The MCP tools are then successfully discovered and the complete MCP tool-calling flow works.

Root Cause

The issue is caused by an API incompatibility between vLLM 0.27.1 and MCP SDK 2.0.0.

vLLM 0.27.1 accesses the MCP Tool schema using the legacy inputSchema attribute:

tool.inputSchema

However, MCP SDK 2.0.0 exposes the corresponding attribute as:

tool.input_schema

As a result, vLLM 0.27.1 cannot correctly process MCP Tool objects returned by MCP SDK 2.0.0.

More importantly, vLLM 0.27.1 does not enforce a compatible MCP SDK version constraint in its package dependencies. Therefore, a normal installation can resolve to an MCP SDK version that is incompatible with vLLM's MCP implementation.

This makes the issue a dependency/API compatibility problem rather than an issue with the MCP server itself.

Expected Behavior

vLLM should either:

Support the MCP SDK versions that can be installed through its declared dependencies; or
Explicitly constrain the MCP SDK dependency to a compatible version range.

For example, if vLLM 0.27.1 is only compatible with MCP SDK versions prior to 2.0.0, its dependency metadata should prevent installation of incompatible versions.

Actual Behavior

With:

vllm==0.27.1
mcp==2.0.0

the packages can be installed successfully, but the MCP integration fails at runtime because vLLM expects tool.inputSchema, while MCP 2.0.0 provides tool.input_schema.

Workaround

Downgrading the MCP SDK to a compatible version resolves the issue:

pip install mcp==1.27.2

After restarting vLLM with the same configuration, MCP tools are successfully discovered and the complete MCP tool-calling flow works.

Before submitting a new issue...

  • Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions