# MCP tool-server OpenAI responses API

**URL:** https://discuss.vllm.ai/t/mcp-tool-server-openai-responses-api/1665
**Category:** Features
**Created:** [September 25, 2025, 2:09pm UTC](https://discuss.vllm.ai/t/mcp-tool-server-openai-responses-api/1665 "2025-09-25T14:09:43Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![panterlo](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.vllm.ai/panterlo/32/749_2.png) [@panterlo](https://discuss.vllm.ai/u/panterlo)
#### Post date: [September 25, 2025, 2:09pm UTC](https://discuss.vllm.ai/t/mcp-tool-server-openai-responses-api/1665/1 "2025-09-25T14:09:43Z")

</div>

We are trying out responses API in the nightly vllm builds and have followed the similar test as available here in Python:

> <https://github.com/vllm-project/vllm/blob/eb32335e355f194c1b9d27a570176d4cf7fb9abf/tests/entrypoints/openai/test_response_api_mcp_tools.py#L88>

What we don’t follow is:

1. Should --tool-server be left out when we want to allow specifying the mcp tools in the json object with posting to responses api (example below) ?

```auto
{“type”: “mcp”,“allowed_tools”: [“get_data”],“headers”: null,“require_approval”: “never”,“server_description”: null,“server_label”: “TEST”,“server_url”: “https://localhost:8888”}

```

1. Anyone aware of specific environmental variables required for mcp tools that has to be set when launching OpenAI server ?

---

<div class="post-metadata">

### Author: ![RunLLM](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.vllm.ai/runllm/32/233_2.png) [@RunLLM](https://discuss.vllm.ai/u/RunLLM)
#### Post date: [September 25, 2025, 2:10pm UTC](https://discuss.vllm.ai/t/mcp-tool-server-openai-responses-api/1665/2 "2025-09-25T14:10:23Z")

</div>

You should **not** leave out `--tool-server` when you want to use MCP tools with the Responses API. The `--tool-server` flag is required to register the MCP tool server(s) with vLLM at startup, so that the backend knows how to route tool calls specified in your JSON payload. The MCP tool definitions in your request (such as `{"type": "mcp", ...}`) are matched to the tool servers registered via `--tool-server` at launch. If you omit `--tool-server`, vLLM will not be able to connect to or invoke the MCP tools you specify in your request, and tool calls will fail or be ignored. This is confirmed in the [vllm/entrypoints/tool\_server.py](https://github.com/vllm-project/vllm/blob/main/vllm/entrypoints/tool_server.py) implementation and [official documentation](https://docs.vllm.ai/projects/recipes/en/latest/OpenAI/GPT-OSS.html#__span-6-1).

Regarding environment variables: there are no special environment variables required for MCP tools in general, unless your specific tool server requires authentication (e.g., API keys) or other configuration. For built-in tools like the Python interpreter, you may need to set `PYTHON_EXECUTION_BACKEND=dangerously_use_uv` if you want to avoid Docker-based execution, as described in the [gpt-oss tool use guide](https://docs.vllm.ai/projects/recipes/en/latest/OpenAI/GPT-OSS.html#__span-6-1). For MCP tools, ensure your tool server is running and accessible at the address you provide to `--tool-server`.

Would you like more detail or a code example?

Sources:

- [vllm/entrypoints/tool\_server.py](https://github.com/vllm-project/vllm/blob/main/vllm/entrypoints/tool_server.py)
- [official documentation](https://docs.vllm.ai/projects/recipes/en/latest/OpenAI/GPT-OSS.html#__span-6-1)

Hint: Mention @RunLLM in the post for followups.

---

<div class="post-metadata">

### Author: ![panterlo](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.vllm.ai/panterlo/32/749_2.png) [@panterlo](https://discuss.vllm.ai/u/panterlo)
#### Post date: [September 25, 2025, 2:16pm UTC](https://discuss.vllm.ai/t/mcp-tool-server-openai-responses-api/1665/3 "2025-09-25T14:16:53Z")

</div>

@RunLLM for mcp to work are we required to install pip install mcp ?

---

<div class="post-metadata">

### Author: ![RunLLM](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.vllm.ai/runllm/32/233_2.png) [@RunLLM](https://discuss.vllm.ai/u/RunLLM)
#### Post date: [September 25, 2025, 2:17pm UTC](https://discuss.vllm.ai/t/mcp-tool-server-openai-responses-api/1665/4 "2025-09-25T14:17:13Z")

</div>

Yes, you are required to install the `mcp` Python package (e.g., via `pip install mcp`) for MCP tool support in vLLM. If `mcp` is not installed, vLLM will raise an ImportError and instruct you to install it, as shown in the MCPToolServer class implementation in [vllm/entrypoints/tool\_server.py](https://github.com/vllm-project/vllm/blob/main/vllm/entrypoints/tool_server.py) and [official API docs](https://docs.vllm.ai/en/latest/api/vllm/entrypoints/tool_server.html).

Would you like more detail?

Sources:

- [vllm/entrypoints/tool\_server.py](https://github.com/vllm-project/vllm/blob/main/vllm/entrypoints/tool_server.py)
- [official API docs](https://docs.vllm.ai/en/latest/api/vllm/entrypoints/tool_server.html)

Hint: Mention @RunLLM in the post for followups.
