MCP Remote Tool
Hook any Remote MCP server into your ComfyUI LLM
- mcp_tool
If the MCP nodes in this pack are a menu, MCPRemoteTool is the "make your own." The Tavily and DeepWiki nodes are preconfigured presets for two specific public servers; this one takes any Remote MCP server URL - HTTP, SSE, or streamable HTTP - and turns it into a tool your ComfyUI LLM can call. Search service, weather API, some SaaS MCP endpoint your company exposes, whatever. If it speaks Remote MCP, this node plugs it in.
The value prop is simple: your LLM node stops being a text-in/text-out box and starts being able to do things mid-workflow. The catch is that this pack's philosophy stays small and composable - you're wiring a tool in, not building an agent platform. That's a feature.
How it works
Like every remote tool in this pack, MCPRemoteTool doesn't call the MCP server itself. It builds a tool object - type: "mcp", plus the server URL, label, allowlist, and auth - and passes it inside the tools array of a Responses API request. The API server on the far end (OpenAI, LM Studio, Ollama, OpenRouter…) is the one that actually opens the MCP connection when the model decides to call it. Which is why this requires /v1/responses in your api_base_url; chat completions has no tools field for this, and the pack won't silently fake it.
The inputs that matter
server_url- the MCP endpoint. Supports{{ENV_NAME}}placeholders, so you can embed a key directly in the URL template if you must.server_label- a short name that shows up in tool-call traces so you can tell which server the model used.allowed_tools- leave empty to expose every tool the server offers, or list a few. Narrow is better.server_description- a sentence telling the model when to use this server. Cheap to write, big effect on whether the model bothers.
Then the auth trio, and this is where the pack earns its keep: headers_json and query_params_json both support {{ENV_NAME}} placeholders, and authorization_env pulls a token from an environment variable into the MCP authorization field. The whole design is so you never paste a secret into the workflow JSON. The README's recommendation is real: prefer header auth ({"X-API-Key":"{{MY_SEARCH_MCP_KEY}}"}), use query_params_json when the server insists on URL auth, and keep server_url clean. The one URL placeholder trick still works but is the legacy way.
Output is a single mcp_tool, wired through MCP Tools Stack → OpenAI Compatible LLM on /v1/responses.
Installing it
ComfyUI Manager → search "OpenAI Compatible LLM", or clone:
cd ComfyUI/custom_nodes
git clone https://github.com/godmt/comfyui-openai-llm.git
Restart, set your env vars, done. The pack's own dependencies are just requests and python-dotenv; whatever remote server you point at is its own install.
Where people get burned
Two classics. First, the endpoint: tools connected but never called usually means api_base_url isn't /v1/responses. Second, auth: if the server returns 401s, check your env var name matches what you typed, and remember the key is resolved at runtime from your environment - a .env file belongs in the ComfyUI working directory or the node's folder. And keep the security reflex: remote MCP tools ship with require_approval: "never" because ComfyUI has no approval dialog, and the server you connect can access external services. Only connect servers you trust, and keep allowed_tools tight. This ecosystem learned that lesson the hard way.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| server_label | STRING | mcp_server | Short label for this MCP server. It appears in tool-call traces. |
| server_url | STRING | https://example.com/mcp | Remote MCP server URL. Supports {{ENV_NAME}} placeholders for flexible URL templates. Prefer headers_json or authorization_env for secrets when the server supports headers. |
| allowed_tools | STRING | Optional allowlist of tool names exposed from this MCP server. Leave empty to expose all server tools. | |
| server_descriptionopt | STRING | Optional description to help the model understand when to use this MCP server. | |
| headers_jsonopt | STRING | Optional headers JSON. String values support {{ENV_NAME}} placeholders, e.g. {"Authorization":"Bearer {{MY_TOKEN}}"}. | |
| query_params_jsonopt | STRING | Optional URL query parameters appended to server_url. String values support {{ENV_NAME}} placeholders. Use only when the server requires query parameters. | |
| authorization_envopt | STRING | Optional environment variable containing an OAuth/access token. When set, its value is sent as the MCP tool authorization field. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| mcp_tool | MCP_TOOL | A single Remote MCP tool definition suitable for the Responses API tools array. |