nodered-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@nodered-mcp list my flows"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
nodered-mcp
A Python MCP server for Node-RED flow management, built on FastMCP and Pydantic.
Gives language models full read/write access to a Node-RED instance through the Admin HTTP API, with structured Pydantic responses, incremental flow patching, layout linting, and flexible authentication (token, basic, OAuth2).
Compared to node-red-mcp-server
This project was inspired by karavaev-evgeniy/node-red-mcp-server (TypeScript/npm). Key differences:
node-red-mcp-server (TS) | nodered-mcp (Python) | |
Runtime | Node.js / npm | Python 3.11+ / uv |
Framework | Custom MCP SDK | FastMCP |
Responses | Raw JSON strings | Typed Pydantic models |
Auth | Token only | Token, Basic, OAuth2 |
Deployment types |
|
|
Flow mutations | Replace entire flow |
|
Layout checks | None |
|
Auto-lint | N/A |
|
Tool count | 19 | 22 |
Related MCP server: node-red-mcp
Installation
Requires Python 3.11+ and uv:
git clone <repo-url> && cd nodered-mcp
uv syncQuick Start
# Minimal — token auth (default)
export NODE_RED_URL=http://localhost:1880
export NODE_RED_TOKEN=your-api-token
uv run nodered-mcpConfiguration
All configuration is via environment variables with the NODE_RED_ prefix.
Variable | Default | Description |
|
| Node-RED instance URL |
|
| Bearer token (for |
|
| API version header |
|
| Auth method: |
|
| Username for |
|
| Password/app password for |
|
| OAuth2 token endpoint URL |
|
| OAuth2 client ID |
Authentication
Token (default)
Static bearer token sent with every request. This is the simplest method and matches how node-red-mcp-server works:
NODE_RED_URL=http://localhost:1880
NODE_RED_TOKEN=your-api-tokenBasic Auth
HTTP Basic authentication, useful when Node-RED sits behind a forward auth proxy.
NODE_RED_AUTH_METHOD=basic
NODE_RED_AUTH_USERNAME=admin
NODE_RED_AUTH_PASSWORD=your-passwordBasic Auth with Authentik
If your Node-RED instance sits behind Authentik as a forward auth proxy, the basic auth method works well. Authentik intercepts requests, validates credentials, and sets session cookies before forwarding to Node-RED.
Create an Authentik application for your Node-RED instance using the Forward Auth (single application) provider.
Configure your reverse proxy (Traefik, nginx, Caddy) to use Authentik's forward auth endpoint. For example, with Traefik:
# docker-compose.yml (Traefik labels on the Node-RED service) labels: - "traefik.http.routers.nodered.middlewares=authentik@docker"Create an Authentik service account (or use an existing user) and generate an app password under the user's token settings. This avoids MFA prompts that would block API access.
Configure nodered-mcp:
NODE_RED_URL=https://nodered.yourdomain.com NODE_RED_AUTH_METHOD=basic NODE_RED_AUTH_USERNAME=service-account NODE_RED_AUTH_PASSWORD=the-app-password-from-authentik
The basic auth credentials are sent to Authentik's proxy, which validates them and sets cookies. Subsequent requests use the session cookie, so Node-RED itself doesn't need auth enabled.
OAuth2 Client Credentials
Fetches a short-lived JWT via OAuth2 client credentials grant. The token is cached and auto-refreshed with a 30-second expiry buffer. On a 401 response, the server retries once with a fresh token.
Works with Authentik out of the box — every application has a token endpoint and client_id:
NODE_RED_AUTH_METHOD=oauth
NODE_RED_AUTH_USERNAME=service-account
NODE_RED_AUTH_PASSWORD=service-password
NODE_RED_OAUTH_TOKEN_URL=https://auth.yourdomain.com/application/o/token/
NODE_RED_OAUTH_CLIENT_ID=your-client-idMCP Client Configuration
Claude Desktop
{
"mcpServers": {
"nodered": {
"command": "uv",
"args": ["--directory", "/path/to/nodered-mcp", "run", "nodered-mcp"],
"env": {
"NODE_RED_URL": "http://localhost:1880",
"NODE_RED_TOKEN": "your-token"
}
}
}
}Claude Code
{
"mcpServers": {
"nodered": {
"command": "uv",
"args": ["--directory", "/path/to/nodered-mcp", "run", "nodered-mcp"],
"env": {
"NODE_RED_URL": "http://localhost:1880",
"NODE_RED_TOKEN": "your-token"
}
}
}
}Tools
Flow Tools (12)
Tool | Description |
| Get all flows with summary statistics |
| Replace all flows with deployment type control ( |
| Get a single flow by ID |
| Update a single flow (auto-lints after save) |
| List all flow tabs (workspaces) |
| Create a new flow tab |
| Delete a flow tab |
| Get runtime state (started/stopped) |
| Start or stop the flow runtime |
| Get flows grouped by tabs/nodes/subflows with statistics |
| Markdown-formatted per-tab structural overview |
| Incremental operations: |
Node Tools (6)
Tool | Description |
| Trigger an inject node |
| List installed node modules |
| Detailed info about a node module |
| Enable or disable a node module |
| Find all nodes of a given type |
| Search nodes by name or any property |
Layout Tools (1)
Tool | Description |
| Check a flow for node overlaps, insufficient spacing, and wire-through-node crossings. Optionally scoped to specific node IDs. |
Settings Tools (2)
Tool | Description |
| Get Node-RED runtime settings |
| Get runtime diagnostics (Node.js version, OS, modules) |
Utility Tools (1)
Tool | Description |
| Node-RED Admin API endpoint reference |
Architecture
src/nodered_mcp/
├── server.py # FastMCP server, config, client init
├── config.py # Pydantic Settings (env vars)
├── client.py # Async httpx wrapper with auth
├── models/
│ ├── base.py # BaseApiModel with from_api()
│ ├── flow.py # Node, FlowTab, Flow, FlowState
│ ├── node.py # NodeModule, NodeSet
│ ├── responses.py # FlowList, FlowSummary, Settings, etc.
│ └── layout.py # LayoutIssue, LayoutReport
└── tools/
├── flows.py # Flow CRUD + patch + auto-lint
├── nodes.py # Node management + search
├── layout.py # Layout lint checks
├── settings.py # Settings + diagnostics
└── utility.py # API help referenceThe layer diagram is simple:
MCP Tools (thin async functions, return Pydantic models)
↓
NodeRedClient (async httpx, returns raw dicts)
↓
Node-RED Admin HTTP APIDevelopment
make all # format + lint + test
make check # lint + test (no format)
make test # uv run pytest tests/ -v
make lint # uv run ruff check src/ tests/
make format # uv run ruff format src/ tests/Run a single test file:
uv run pytest tests/tools/test_layout.py -vRun with coverage:
uv run pytest tests/ -v --cov=src/nodered_mcp --cov-report=term-missingAlways use uv run — never bare python or pytest.
See conventions.md for detailed code patterns (model layering, tool conventions, client architecture).
License
MIT
Available Tools
22 toolsapi_helpA
Get Node-RED API endpoint reference with implementation status.
Returns: Markdown table of API endpoints and their MCP implementation status.
Inputs: no named parameters. Returns: result
create_flowB
Create a new flow.
Args: flow_json: Flow configuration as JSON string
Returns: FlowCreateResult with the new flow ID.
Inputs: flow_json (required). Returns: Result of flow creation.
delete_flowC
Delete a flow.
Args: flow_id: Flow ID to delete
Returns: Confirmation message.
Inputs: flow_id (required). Returns: result
find_nodes_by_typeB
Find all nodes of a specific type.
Args: node_type: Node type to search for
Returns: List of matching Node objects.
Inputs: node_type (required). Returns: result
get_diagnosticsA
Get Node-RED diagnostics information.
Returns: DiagnosticsResult with system diagnostics data.
Inputs: no named parameters. Returns: Diagnostics result. Thin wrapper - diagnostics response structure is too variab…
get_flowA
Get a single flow by ID.
Args: flow_id: Flow ID
Returns: Flow with nodes, configs, and subflows.
Inputs: flow_id (required). Returns: Complete flow representation.
get_flowsA
Get all flows with summary statistics.
Returns: FlowList with flows grouped into tabs/nodes/subflows and summary stats.
Inputs: no named parameters. Returns: List of flows with summary statistics.
get_flows_formattedA
Get flows with formatted summary and grouped data.
Returns: FlowSummary with tabs/nodes/subflows grouped and counted.
Inputs: no named parameters. Returns: Formatted flow summary with grouped data.
get_flows_stateA
Get the current flows runtime state.
Returns: FlowState with current state (start/stop).
Inputs: no named parameters. Returns: Flow state (start/stop).
get_node_infoA
Get information about a specific node module.
Args: module: Node module name
Returns: NodeModule with version and node sets.
Inputs: module (required). Returns: Node-RED module containing node sets.
get_nodesA
Get list of installed node modules.
Returns: List of NodeSet objects with node types and versions.
Inputs: no named parameters. Returns: result
get_settingsB
Get Node-RED runtime settings.
Returns: Settings with runtime configuration.
Inputs: no named parameters. Returns: Node-RED settings.
injectB
Trigger an inject node.
Args: node_id: Inject node ID to trigger
Returns: Confirmation message.
Inputs: node_id (required). Returns: result
lint_flowA
Lint a flow's node layout for overlaps, spacing, and wire crossings.
Args: flow_id: Flow ID to lint. node_ids: Optional JSON array of node IDs to scope the check.
Returns: LayoutReport with issues, nodes checked count, and summary.
Inputs: flow_id (required), node_ids. Returns: Layout lint report for a flow.
list_tabsB
List all flow tabs.
Returns: List of FlowTab objects (workspaces).
Inputs: no named parameters. Returns: result
patch_flowA
Apply incremental patch operations to a flow.
Fetches the current flow, applies operations, and updates it. Much more efficient than update_flow for small changes.
Args: flow_id: Flow ID to patch operations: JSON array of patch operations. Supported ops: - {"op": "remove_nodes", "ids": ["nodeId1", ...]} - {"op": "add_nodes", "nodes": [{node}, ...]} - {"op": "update_node", "id": "nodeId", "set": {"name": "New", ...}} - {"op": "rewire", "id": "nodeId", "output": 0, "targets": ["id1", ...], "mode": "replace|append"} - {"op": "set_label", "label": "New Name"} - {"op": "set_info", "info": "Description text"} - {"op": "set_disabled", "disabled": true}
Returns: Summary of changes applied.
Inputs: flow_id (required), operations (required). Returns: result
search_nodesA
Search for nodes by name or properties.
Args: query: String to search for in node properties property: Specific property to search (optional, searches all properties if not specified)
Returns: List of matching Node objects.
Inputs: query (required), property. Returns: result
set_flows_stateA
Set the flows runtime state.
Args: state: Target state - valid values: start, stop
Returns: FlowState with new state.
Inputs: state (required). Returns: Flow state (start/stop).
toggle_node_moduleA
Enable or disable a node module.
Args: module: Node module name enabled: True to enable, False to disable
Returns: Updated NodeModule object.
Inputs: module (required), enabled (required). Returns: Node-RED module containing node sets.
update_flowC
Update a single flow.
Args: flow_id: Flow ID flow_json: Flow configuration as JSON string
Returns: Confirmation message.
Inputs: flow_id (required), flow_json (required). Returns: result
update_flowsA
Update all flows with deployment type.
Args: flows_json: Flow configuration as JSON string deployment_type: Deployment type - valid values: full, nodes, flows, reload (default: full)
Returns: Confirmation message.
Inputs: flows_json (required), deployment_type. Returns: result
visualize_flowsA
Visualize flow structure as markdown with per-tab breakdown.
Returns: Markdown-formatted flow structure showing node counts and types per tab.
Inputs: no named parameters. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 22 tools
Most tools have clearly distinct purposes, but there is some overlap among get_flows, get_flows_formatted, and visualize_flows, which all retrieve flow data in different formats. Similarly, find_nodes_by_type and search_nodes both search for nodes but with different scopes. These are not major conflicts but enough to introduce slight ambiguity.
The majority of tools follow a consistent verb_noun pattern (e.g., get_flow, create_flow, update_flow, delete_flow). However, 'inject' is a bare verb and 'api_help' is noun_noun, deviating from the established pattern. Overall, the convention is strong and predictable.
With 22 tools, the server is on the heavier side, falling into the 16-25 range that feels somewhat dense. While the tools cover a comprehensive set of Node-RED operations, the count is slightly beyond what might be considered lean, though it is defensible given the breadth of the domain.
The tool surface provides solid coverage for managing flows (create, read, update, patch, delete), runtime state, node modules, and node search. Missing operations include flow import/export and credential management, but these are not critical gaps for typical workflows. Overall, the surface is well-rounded with only minor omissions.
Maintenance
Related MCP Connectors
An MCP server that provides an API to LLMs to manage their JumpCloud resources.
MCP server for secureFlows: token-free URL builders and integration-linting tools for AI agents.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Remote MCP server exposing your Node Command fleet (files, shell, processes, browser) to AI hosts.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that provides AI assistants with access to documentation, schemas, and operations for over 535 n8n workflow automation nodes. It enables models to understand, create, and manage n8n workflows through natural language by connecting to the n8n API.MIT
- AlicenseNot gradedqualityBmaintenanceA Model Context Protocol server for Node-RED integration, enabling AI agents to manage flows, install modules, and monitor Node-RED instances via natural language.6MIT
- AlicenseDqualityFmaintenanceModel Context Protocol (MCP) server for Node-RED — allows language models (like Claude, GPT) to interact with Node-RED through a standardized API.201,066 npm39MIT
- AlicenseBqualityDmaintenanceModel Context Protocol (MCP) server for Node-RED that allows language models to interact with Node-RED through a standardized API.2720 npm4MIT