Connect an AI Agent (MCP)
Let Claude Code, Cursor, VS Code and other MCP clients build, validate and deploy workflows, with your approval
Connect an AI Agent (MCP)
Nodes2Cloud runs a remote Model Context Protocol server. Once your coding agent is connected, it can read the node catalogue, write and validate workflow graphs, preview the compiled code, and ask to deploy. Deploys go to your own Cloudflare account and, by default, each one waits for you to approve it in the browser.
The server is at:
https://api.nodes2cloud.com/mcpIt uses the Streamable HTTP transport. Clients that support remote servers sign in with OAuth: the first time they connect, your browser opens a consent screen that lists what the agent will be allowed to do, and you approve or deny it.
Connect with OAuth (recommended)
The console shows the same setup under Integrations → MCP server, including one-click install links for Cursor and VS Code.
Claude Code
Run this in your project directory:
claude mcp add --transport http nodes2cloud https://api.nodes2cloud.com/mcpCursor
Add the server to .cursor/mcp.json:
{
"mcpServers": {
"nodes2cloud": {
"url": "https://api.nodes2cloud.com/mcp"
}
}
}VS Code
Add an HTTP server to .vscode/mcp.json (or your user-level mcp.json):
{
"servers": {
"nodes2cloud": {
"type": "http",
"url": "https://api.nodes2cloud.com/mcp"
}
}
}Claude Desktop
Add the same mcpServers entry as Cursor to claude_desktop_config.json.
Connect with a Personal Access Token
For CI, or for clients that only speak stdio and cannot open a browser for OAuth, use the n2c-mcp package with a Personal Access Token. It runs locally as a stdio server and forwards each request over HTTPS to the remote server.
- In the console, open Integrations → MCP server → Headless & CI Tokens, click Create new token, give it a name and an expiry (7, 30, 90 or 365 days), and click Generate Token.
- Copy the token. It starts with
n2c_pat_and is shown only once. - Run the installer and follow the prompts:
npx -y n2c-mcp@latest installThe installer asks for your token and which client to configure, then writes the nodes2cloud server entry into that client's config file. The token is stored in that file in plain text (the installer restricts the file to your user), so keep the file out of version control.
Supported clients: Claude Desktop, Claude Code, Antigravity, Cursor (current project), Windsurf, Zed, Codex, VS Code (global or current workspace) and Open Code. Choose Other (Print config only) to print the configuration instead of writing it.
To run it non-interactively:
npx -y n2c-mcp@latest install --key n2c_pat_... --client 2| Flag | Meaning |
|---|---|
--key, --token | Your Personal Access Token (n2c_pat_...). Falls back to the N2C_API_KEY environment variable. |
--client, -c | Client number: 1 Claude Desktop, 2 Claude Code, 3 Antigravity, 4 Cursor, 5 Windsurf, 6 Zed, 7 Codex, 8 VS Code (global), 9 VS Code (workspace), 10 Open Code, 11 print only. |
--env | production (default), staging or local. |
--endpoint | A custom MCP endpoint URL. |
--print, --dry-run | Print the configuration to stdout without writing any file. |
You can also configure a client by hand:
{
"mcpServers": {
"nodes2cloud": {
"command": "npx",
"args": ["-y", "n2c-mcp"],
"env": {
"N2C_API_KEY": "<YOUR_N2C_PERSONAL_ACCESS_TOKEN>"
}
}
}
}Revoke a token at any time from the same Headless & CI Tokens list.
Without N2C_API_KEY, n2c-mcp runs in preview mode: it lists the server's tools so you can see what is available, and every tool call answers with these setup steps instead of doing anything. A rejected or expired token is reported as an error when the client connects.
Deploy approval
AI is never a deploy bypass. Every deploy recompiles your saved graph on the Nodes2Cloud server, exactly like the editor's Deploy button. There is no way for an agent to upload code of its own.
By default, when an agent calls deploy_workflow, the deploy waits for you to approve it in an open Nodes2Cloud browser tab, whatever the workflow connects to. Keep a Nodes2Cloud tab open while your agent works: an unanswered request expires after about 90 seconds, and the agent is told to ask you again. If the workflow is edited while its approval is pending, nothing is deployed, so an approval only ever covers the graph you saw.
You choose how this works on the console's Connected agents page:
- Agent deploys sets the account-wide default. It applies to Personal Access Tokens and to any connected agent without its own setting.
- Each OAuth-connected agent can also have its own setting.
| Setting | What happens |
|---|---|
| Never | The agent cannot deploy or roll back. It can still build and validate workflows for you to deploy. |
| Ask me each time (default) | Every deploy the agent requests waits for your approval in the browser. |
| Deploy without asking | The agent deploys without an approval prompt. Requires a Pro plan or above; if the plan no longer includes it, the setting behaves as Ask me each time. |
Under Ask me each time, rollback_workflow does not currently show an approval prompt of its own. Choose Never if an agent should not be able to change what is live at all.
For each OAuth-connected agent, Connected agents also lets you narrow what it may do, restrict it to specific workflows, and set daily limits on deploys, node test runs and calls to your deployed workflows.
Enhanced protection
Enhanced protection is a separate, per-credential encryption setting: the credential can only be unlocked with your passkey or recovery passphrase in your browser. When an agent's deploy needs such a credential, you approve an extra unlock request for it in the browser, in addition to the deploy approval. The unlocked key is handed to that one deploy and deleted as soon as it is read. On Pro or above you can instead enroll a device for unattended use of a credential, which is a weaker guarantee that the console explains when you enroll.
What the agent can do
The server offers 28 tools, plus one tool for each workflow you have published to agents (see Your workflows as tools). What a connection may actually use depends on the permissions you granted it. The full definitions, with every argument, are public at api.nodes2cloud.com/.well-known/mcp/server-card.json.
Workflows
| Tool | What it does |
|---|---|
list_workflows | Lists the workflows this connection can access. |
get_workflow | Gets a workflow's graph and metadata. With versionNumber, gets that deployed version's graph and the one before it. |
create_workflow | Creates a workflow, optionally with an initial graph. |
update_workflow | Replaces a workflow's name, nodes and edges, with a conflict check against newer edits. |
validate_workflow | Compiles a saved or unsaved graph without deploying and returns every error. With includeCode, also returns the compiled Worker code. |
archive_workflow | Archives a workflow. Nothing is deleted, and an already deployed version keeps running. |
Node catalogue
| Tool | What it does |
|---|---|
list_node_types | Searches the node types that can be added to a workflow. |
get_node_schemas | Gets the exact property schema for specific node types. |
get_dynamic_options | Asks a connected service which values exist, such as sheet tabs, Airtable fields or Typeform questions. |
test_run_node | Runs one node on its own to check its configuration and connection. Expressions are not evaluated. |
Setup and connections
| Tool | What it does |
|---|---|
check_setup | Reports whether you can deploy right now and which services a workflow still needs connected. Given a sessionId from request_connections, also reports whether you have finished connecting. |
request_connections | Creates one short link for you to connect the services a workflow needs. |
list_connections | Lists your saved connections by name, provider and status. Never returns secrets. |
verify_connection | Re-verifies a saved connection against its provider. |
get_plan | Reads your plan and its limits. |
Deploys and versions
| Tool | What it does |
|---|---|
deploy_workflow | Recompiles a saved workflow on the server and deploys it to your Cloudflare account, after your approval by default. |
list_workflow_versions | Lists one workflow's deployed versions and which one is live. |
rollback_workflow | Redeploys an earlier version of a workflow. |
rotate_webhook_secret | Mints a new webhook secret, redeploys, and returns the new secret. |
Running and observing
| Tool | What it does |
|---|---|
run_workflow | Runs a deployed workflow once. A simple workflow returns its response; a durable one starts a run and returns its ID. |
list_runs | Lists recent runs from the workflow's run log, or (source: instances) durable runs including queued, waiting or paused ones. |
get_run | Gets one run's steps, durations, output and error, and the events a durable run is waiting for. |
control_run | Pauses, resumes or terminates a durable run, or delivers the event it is waiting for. |
get_deployment_status | Returns run and error statistics, Cloudflare's own invocation, error and CPU figures, and whether the deployment still exists, in one call. A section that cannot be read is reported without hiding the others. |
get_deployment_logs | Reads log lines and uncaught exceptions a deployment produced. |
list_workflow_files | Lists files a workflow's runs have stored in its R2 bucket. |
Run history and logs are read on demand from your own Cloudflare account using your Cloudflare credential.
Deployed workflows
| Tool | What it does |
|---|---|
list_deployed_tools | Lists your deployed workflows that can be called as tools right now. |
call_deployed_workflow | Calls one of those workflows by tool name or workflow ID. |
The server also offers starter prompts (such as "Webhook → Slack" and "Ask me before it acts") and resources for node schemas and compiled workflow code.
Your workflows as tools
A workflow that starts with the MCP Tool trigger, once deployed, is offered to your agent as a tool of its own, using the trigger's Tool name, What it does and Arguments (JSON Schema) fields. Your plan sets how many workflows can be published this way. A call runs in your Cloudflare account; Nodes2Cloud passes it through and stores nothing.
- A flat workflow returns its result to the agent.
- A durable workflow, one with a wait, a delay, a sub-workflow call or a human approval step, starts a run and returns the run's ID. A durable run can pause for days, so the call cannot wait for its result.
A workflow deployed after the agent connected appears in its tool list only after the client reconnects. Until then, the agent can reach it with call_deployed_workflow.
