# Is the n8n MCP server safe? What it can reach

> n8n’s instance-level MCP server lets AI agents search, run and edit workflows. See its OAuth and API key options, tool names and how to limit what it exposes.

The n8n MCP server is built into n8n. An owner or admin turns it on under Settings, then Instance-level MCP, and clients connect to a URL ending in `/mcp-server/http`. It signs in with OAuth or a personal API token. Its tools can search and run workflows, and in n8n 2.13 and later they can also build and edit workflows and manage data tables. A running workflow can use credentials you stored in n8n, so what you expose matters.

## Two things with the same name

The instance-level server is one connection per n8n instance, with central authentication. The separate MCP Server Trigger node sits inside a single workflow and exposes only that workflow’s tools. This page covers the instance-level server. Self-hosted users can set `N8N_DISABLED_MODULES=mcp` to remove the feature.

## How it signs in

- **OAuth (recommended).** The Connect a client dialog sends the client to n8n to approve access. Owners and admins can restrict OAuth redirects to trusted callback URLs. By default any callback URL is allowed.
- **API key.** n8n generates a personal access token for your user. A new token revokes the old one.

Visibility is scoped per user. A client sees only enabled workflows its user can already access. n8n’s docs say access isn’t scoped per client, so all connected clients can see all enabled workflows. Owners and admins can review and revoke OAuth clients under Connected clients. API key clients don’t appear there.

## What the tools can do

n8n’s tools reference lists these, among others.

| Group | Tools | Effect |
| --- | --- | --- |
| Read | `search_workflows`, `get_workflow_details`, `get_workflow_history`, `search_workflow_executions`, `get_workflow_execution` | Find workflows and read runs, optionally with execution data |
| Run | `execute_workflow`, `test_workflow` | Start a workflow by ID, or run it with pinned test data |
| State | `publish_workflow`, `unpublish_workflow` | Activate or deactivate a workflow |
| Build | `create_workflow_from_code`, `update_workflow`, `restore_workflow_version` | Create and change workflows |
| Credentials | `list_credentials`, `update_credential_description` | List credentials without secret data, rewrite a description |
| Activity | `get_instance_activity` | See recent creates, changes, publishes and deletes |

`execute_workflow` runs the published version by default, with a `manual` mode for the unpublished one. The docs also list tools for data tables and, in preview, agents.

## Limit it at n8n

- Enabling MCP does not expose every workflow. Each one must be marked Available in MCP, individually, by project or folder, or through the auto-expose setting, which is off by default and applies only to new workflows. Keep it off.
- `search_workflows` is the exception. It returns previews of every workflow the user can view, without full workflow data.
- Connect as a user whose projects hold only the workflows the agent should run.
- Disabling MCP access disconnects every client.

## Risks that remain

- A workflow runs with its own connected credentials, such as email, a database or a payment service. An agent that triggers it uses that reach, and the data you pass in goes wherever the workflow sends it.
- `publish_workflow` and the build tools can put a changed workflow into production.
- Execution data can contain customer records. It comes back to the agent and your model provider.
- Webhook payloads and fields the workflow reads can carry injected instructions.

## Limit it in Claude Code

The n8n docs give this command for Claude Code:

```bash
claude mcp add --transport http n8n https://<your-n8n-domain>/mcp-server/http
```

Then add rules. Claude Code checks deny rules first, then ask, then allow.

```json
{
  "permissions": {
    "deny": ["mcp__n8n__publish_workflow", "mcp__n8n__update_workflow", "mcp__n8n__create_workflow_from_code"],
    "ask": ["mcp__n8n__execute_workflow", "mcp__n8n__test_workflow"]
  }
}
```

Use `.claude/settings.json` for a project or `~/.claude/settings.json` for all projects.

## Limit it in Codex

```toml
[mcp_servers.n8n]
url = "https://your-n8n-domain/mcp-server/http"
enabled_tools = ["search_workflows", "get_workflow_details", "search_workflow_executions"]
```

This list allows only search and read tools. Add `execute_workflow` only for workflows you reviewed.

## Checklist

1. Mark only the workflows the agent needs as Available in MCP.
2. Leave auto-expose off, and restrict OAuth callback URLs.
3. Deny build and publish tools; ask before any run.
4. Review Connected clients, and rotate API tokens you no longer use.
5. Read `get_instance_activity` or the executions list afterward.

Checked against the vendor documentation on November 25, 2026. [Accessing the n8n MCP server](https://docs.n8n.io/advanced-ai/mcp/accessing-n8n-mcp-server/) · [MCP server tools reference](https://docs.n8n.io/connect/connect-to-n8n-mcp-server/mcp-server-tools-reference.md) · [Claude Code MCP](https://code.claude.com/docs/en/mcp) · [Claude Code permissions](https://code.claude.com/docs/en/permissions) · [Codex MCP](https://learn.chatgpt.com/docs/extend/mcp?surface=cli)

## Where Excellent fits

Excellent’s free scan reads supported logs on the Mac and reports findings for review. It reads the session logs of Claude Code, Codex, Grok Build, GitHub Copilot CLI, Gemini CLI and Qwen Code. It does not inspect MCP servers themselves. For a local report without installing an app, [run the free scan](https://www.excellent.so/scan). [See a sample report](https://www.excellent.so/r/sample). For the wider picture, see [AI agent security](https://www.excellent.so/guides/ai-agent-security).

Excellent Pro adds checks before supported actions. Claude Code can display an ask prompt. With Codex, an Excellent “ask” refuses the action and tells the agent to ask you. [Agent coverage](https://www.excellent.so/agents) · [pricing](https://www.excellent.so/pricing). Pro is US-only for now.

Source: https://www.excellent.so/guides/n8n-mcp-server
