MCP Tools from JSON
The escape hatch when you already have tool JSON in your clipboard
- mcp_tools
Every now and then you don't want a preset node building your tool definition - you already have the tool JSON. Maybe it's copied straight from OpenAI's documentation, maybe a provider's dashboard hands you a ready-made tool object, maybe you need to tweak exactly what the stack generated. MCPToolsFromJSON is the pack's escape hatch: paste JSON in, get MCP_TOOLS out.
It's the node nobody reaches for on day one and the one that saves you later. The presets handle the common cases cleanly, but the moment you're dealing with a server or tool format that doesn't fit the presets, this is what unblocks you.
How it works
The node parses your input and normalizes it into the same MCP_TOOLS list format the rest of the pack uses. It accepts either a JSON array of tool objects or an object containing a tools array - so whatever shape your source gave you, it probably just works. The tool objects it understands include the Remote MCP tool format (type: "mcp", server_url, allowed_tools, …) and the local MCP command tool format the pack uses internally, so you can hand-author a local server definition too if you want finer control than the command node gives.
One input, tools_json, default [], with a multiline editor. One output, mcp_tools, which feeds straight into the OpenAI Compatible LLM node's mcp_tools input - or into an MCP Tools Stack if you want to mix pasted JSON with preset-built tools.
Installing it
It lives in godmt/comfyui-openai-llm with the rest. ComfyUI Manager → search "OpenAI Compatible LLM", or:
cd ComfyUI/custom_nodes
git clone https://github.com/godmt/comfyui-openai-llm.git
Restart and you're done. Dependencies are just requests and python-dotenv; the node itself is pure parsing.
Where people get burned
Two things. First, malformed JSON fails with an error you'll actually see in the console - there's no silent fallback, which is a feature. Second, and worth remembering: pasting tool definitions here doesn't skip the Responses API requirement. If the LLM node isn't on /v1/responses, these tools won't be used no matter how perfect your JSON is. And while you're hand-authoring tool JSON, keep the security rules from the README in mind - the tool object you paste determines what the model is allowed to do, so keep allowed_tools narrow and only paste definitions you understand.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| tools_json | STRING | [] | JSON array of Responses API tool objects, or an object containing a tools array. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| mcp_tools | MCP_TOOLS | Parsed MCP/LLM tools list. |