# N8n Workflow Manager Mcp (`bronze_quarterback/n8n-workflow-manager-mcp`) Actor

Manage n8n workflows from Claude. List, trigger, activate/deactivate, view logs, and create workflows from natural language descriptions.

- **URL**: https://apify.com/bronze\_quarterback/n8n-workflow-manager-mcp.md
- **Developed by:** [Segun Zubair](https://apify.com/bronze_quarterback) (community)
- **Categories:** AI, Automation
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$49.00/month + usage

To use this Actor, you pay a monthly rental fee to the developer. The rent is subtracted from your prepaid usage every month. You also pay for the Apify platform usage, which gets cheaper the higher Apify subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#rental-actors

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## n8n Workflow Manager MCP Server

Manage your n8n workflows through natural language — list, activate, deactivate, trigger, inspect execution logs, and generate new workflows from a description.

### Quick Start

1. **Deploy on Apify** — search "n8n Workflow Manager MCP" in the [Apify Store](https://apify.com/store), or run locally with Docker.
2. **Add the MCP server URL** to your Claude Desktop config (`claude_desktop_config.json`):
   ```json
   {
     "mcpServers": {
       "n8n-workflow-manager": {
         "url": "https://your-apify-actor-standby-url/sse"
       }
     }
   }
   ```
3. **Start managing workflows** with natural language in Claude.

#### Run locally

```bash
git clone <repo-url>
cd products/mcp-servers/n8n-workflow-manager

## Set environment variables
export N8N_BASE_URL="https://n8n.example.com/"
export N8N_API_KEY="your-n8n-api-key"
export OPENAI_API_KEY="your-openai-key"  # optional, for workflow generation

pip install -r requirements.txt
python src/server.py
```

The server starts on port 8080 by default (configure with `PORT` env var).

### Configuration

| Parameter | Required | Description | Default |
|-----------|----------|-------------|---------|
| `N8N_BASE_URL` | Yes | Base URL of your n8n instance | — |
| `N8N_API_KEY` | Yes | n8n REST API key | — |
| `OPENAI_API_KEY` | No | OpenAI key for `create_workflow_from_description` | — |
| `OPENAI_MODEL` | No | Model for workflow generation | `gpt-4o` |
| `HOST` | No | Server bind address | `0.0.0.0` |
| `PORT` | No | Server port | `8080` |

### Available Tools

#### list\_workflows

List all workflows with their active/inactive status.

**Parameters:** `status_filter` (optional) — `"active"`, `"inactive"`, or `"all"` (default).

**Example prompt:** *"List all active workflows"*

**Example response:**

```json
{
  "count": 3,
  "workflows": [
    { "id": "1", "name": "Daily Report", "active": true, "createdAt": "2025-01-15T10:00:00Z" },
    { "id": "5", "name": "Slack Alerts", "active": true, "createdAt": "2025-02-01T08:30:00Z" },
    { "id": "12", "name": "Data Sync", "active": true, "createdAt": "2025-03-10T14:00:00Z" }
  ]
}
```

#### get\_workflow

Fetch full workflow details including nodes, connections, and last execution status.

**Parameters:** `workflow_id` (required) — The workflow ID.

**Example prompt:** *"Show me the details of workflow 12"*

#### activate\_workflow

Activate a workflow so it responds to its triggers.

**Parameters:** `workflow_id` (required).

**Example prompt:** *"Activate the Daily Report workflow"*

#### deactivate\_workflow

Deactivate a workflow to stop it from firing.

**Parameters:** `workflow_id` (required).

**Example prompt:** *"Pause the Slack Alerts workflow"*

#### get\_execution\_logs

Retrieve recent execution logs for a workflow.

**Parameters:** `workflow_id` (required), `limit` (optional, default 20).

**Example prompt:** *"Show me the last 5 executions for the Data Sync workflow"*

#### trigger\_workflow

Manually trigger a workflow execution with optional input data.

**Parameters:** `workflow_id` (required), `data` (optional JSON payload).

**Example prompt:** *"Trigger the Daily Report workflow with today's date"*

#### create\_workflow\_from\_description

Generate an n8n workflow JSON from a natural-language description. Requires `OPENAI_API_KEY`.

The generated JSON is returned for review — it is **not** automatically deployed.

**Parameters:** `description` (required).

**Example prompt:** *"Create a workflow that watches a Gmail inbox, extracts attachments, and uploads them to Google Drive"*

### Example Prompts

- "List all active workflows"
- "Show me the details and recent executions for workflow 7"
- "Deactivate the CRM sync workflow"
- "Trigger the weekly-report workflow"
- "What workflows failed in the last 24 hours?"
- "Create a workflow that sends a Slack message every morning with weather data"

### Pricing

| Plan | Price | Includes |
|------|-------|----------|
| **Standard** | $49/mo | All 7 tools, unlimited workflows, Apify Standby hosting |

Purchase on [Apify Store](https://apify.com/store) or [MCPize](https://mcpize.com).

### Local Development

```bash
## Install dependencies
pip install -r requirements.txt

## Run with hot reload (development)
uvicorn src.server:app --reload --port 8080

## Run tests
pytest tests/ -v

## Build Docker image
docker build -t n8n-workflow-manager-mcp .
docker run -p 8080:8080 \
  -e N8N_BASE_URL="https://n8n.example.com/" \
  -e N8N_API_KEY="your-key" \
  n8n-workflow-manager-mcp
```

### Troubleshooting

| Issue | Solution |
|-------|----------|
| `N8N_BASE_URL is not configured` | Set the `N8N_BASE_URL` environment variable or Apify Actor input |
| `n8n API returned 401` | Check your `N8N_API_KEY` — it must have read/write permissions |
| `n8n API returned 404` | Verify your n8n base URL and that the workflow ID exists |
| `create_workflow_from_description` fails | Ensure `OPENAI_API_KEY` is set and has available credits |
| Connection timeout | Confirm your n8n instance is reachable from the server's network |

# Actor input Schema

## `n8nBaseUrl` (type: `string`):

Base URL of your n8n instance (e.g., https://n8n.example.com)

## `n8nApiKey` (type: `string`):

API key for authenticating with the n8n REST API

## `openaiApiKey` (type: `string`):

Required only for the create\_workflow\_from\_description tool. Your own OpenAI API key.

## `openaiModel` (type: `string`):

Model to use for workflow generation

## Actor input object example

```json
{
  "n8nBaseUrl": "https://n8n.example.com/",
  "openaiModel": "gpt-4o"
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "n8nBaseUrl": "https://n8n.example.com/"
};

// Run the Actor and wait for it to finish
const run = await client.actor("bronze_quarterback/n8n-workflow-manager-mcp").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "n8nBaseUrl": "https://n8n.example.com/" }

# Run the Actor and wait for it to finish
run = client.actor("bronze_quarterback/n8n-workflow-manager-mcp").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "n8nBaseUrl": "https://n8n.example.com/"
}' |
apify call bronze_quarterback/n8n-workflow-manager-mcp --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,bronze_quarterback/n8n-workflow-manager-mcp"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/i4Pq6jAujJyrpsAf1/builds/dSpjh7kfHxrZszxea/openapi.json
