MCP Tavily Remote Tool
Let your ComfyUI LLM search the web before it writes a prompt
- mcp_tool
Here's the problem this node solves: your LLM's knowledge has a cutoff, and image prompting is one of the places that hurts most. "Write me a prompt in the style of the latest Ideogram release" is an answer your model will happily hallucinate if it hasn't seen the release. MCPTavilyRemoteTool is a preset that gives your ComfyUI LLM live web search via Tavily's official Remote MCP server - so it can check what actually exists before it writes a word.
The README's own example nails the use case: have the model search for current info on Ideogram 4's prompt format and summarize what matters for prompt generation. Current-event-aware prompting, checking product references, verifying a style actually shipped - that's the sweet spot. It's the pack's most immediately useful tool, and it needs a Tavily API key (free tier exists) to do anything.
How it works
The node reads your Tavily key from an environment variable at runtime, then builds a Remote MCP tool definition and hands it to the OpenAI Compatible LLM node. Depending on auth_mode, it either appends ?tavilyApiKey=<key> to https://mcp.tavily.com/mcp/ or sends Authorization: Bearer <key> as a header. The Responses API server then calls Tavily on demand. Because the key is read from the environment, your workflow JSON never stores it.
The one hard requirement, same as every MCP tool in this pack: the LLM node must be on /v1/responses. Remote MCP tools don't exist on the chat completions path.
The inputs that matter
tavily_api_key_env- the environment variable holding your key, defaultTAVILY_API_KEY. The node raises a clear error if it's empty, which beats debugging a silent 401.auth_mode-query_param(default) orauthorization_header. Tavily's own examples lean on the query parameter, and the header mode is the cleaner option if your setup tolerates it. Try the default first.allowed_tools- defaults totavily_search, which is usually all you want. The server also offerstavily_extract,tavily_map, andtavily_crawlif you need page extraction or site mapping.default_parameters_json- optional defaults like{"max_results":5,"search_depth":"basic"}, sent as Tavily'sDEFAULT_PARAMETERSheader.
Output is one mcp_tool, and the wiring is the familiar chain: MCP Tavily Remote Tool → MCP Tools Stack → OpenAI Compatible LLM.
Installing it
The pack: ComfyUI Manager → "OpenAI Compatible LLM", or
cd ComfyUI/custom_nodes
git clone https://github.com/godmt/comfyui-openai-llm.git
restart, then set TAVILY_API_KEY (or whichever var you name in tavily_api_key_env) in your environment or a .env file. The pack itself pulls in only requests and python-dotenv - the heavy lifting is Tavily's API.
Where people get burned
"Tavily didn't search" is the #1 report, and the README's checklist is worth memorizing: api_base_url must be /v1/responses, the key must actually be set, allowed_tools should say tavily_search, and the preset has to be connected through a stack. If you're debugging and unsure what tools exist, leave allowed_tools empty once and read the raw response - the tool names will be right there. And same security note as every node here: remote MCP tools run with require_approval: "never" and the key is sent to your API server as part of the tool definition. Fine for a trusted local server; worth knowing before you point this at some random hosted endpoint.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| tavily_api_key_env | STRING | TAVILY_API_KEY | Environment variable containing your Tavily API key. |
| auth_mode | COMBO | query_param | authorization_header sends Authorization: Bearer ... in tool headers. query_param appends ?tavilyApiKey=... and is a fallback for Tavily setups that require URL query auth. |
| allowed_tools | STRING | tavily_search | Tavily tool allowlist. Common names include tavily_search, tavily_extract, tavily_map, and tavily_crawl. Leave empty to expose all. |
| default_parameters_jsonopt | STRING | Optional Tavily default parameters header. This is sent as the DEFAULT_PARAMETERS MCP header when provided. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| mcp_tool | MCP_TOOL | A Tavily Remote MCP tool definition. Connect to MCP Tools Stack, then to OpenAI Compatible LLM. |