PHPackages                             rajurayhan/laravel-n8n-mcp-server - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. rajurayhan/laravel-n8n-mcp-server

ActiveLibrary[API Development](/categories/api)

rajurayhan/laravel-n8n-mcp-server
=================================

n8n MCP server for Laravel — expose n8n workflows, executions, credentials, users, projects, variables, tags, and webhooks as AI-callable MCP tools

1.0.0(3mo ago)50MITPHPPHP ^8.2

Since Apr 2Pushed 3mo agoCompare

[ Source](https://github.com/rajurayhan/laravel-n8n-mcp-server)[ Packagist](https://packagist.org/packages/rajurayhan/laravel-n8n-mcp-server)[ RSS](/packages/rajurayhan-laravel-n8n-mcp-server/feed)WikiDiscussions main Synced 4w ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

Laravel n8n MCP Server
======================

[](#laravel-n8n-mcp-server)

A Laravel package that exposes the full [n8n](https://n8n.io) REST API and webhook capabilities as [Model Context Protocol (MCP)](https://modelcontextprotocol.io) tools — making every n8n action available to AI agents and coding assistants.

Built on top of [`kayedspace/laravel-n8n`](https://github.com/kayedspace/laravel-n8n) for the HTTP client layer and [`laravel/mcp`](https://github.com/laravel/mcp) for the MCP server infrastructure.

---

Requirements
------------

[](#requirements)

- PHP 8.2+
- Laravel 11 or 12
- `laravel/mcp` &gt;= 0.1.0
- `kayedspace/laravel-n8n` ^1.1

---

Installation
------------

[](#installation)

### 1. Require the package

[](#1-require-the-package)

```
composer require rajurayhan/laravel-n8n-mcp-server
```

This also installs `kayedspace/laravel-n8n` automatically as a dependency. The service provider is auto-discovered by Laravel — no manual registration needed.

### 2. Publish the config

[](#2-publish-the-config)

```
php artisan vendor:publish --tag=n8n-mcp-config
```

### 4. Set environment variables

[](#4-set-environment-variables)

```
# n8n API connection (required)
N8N_API_BASE_URL=https://your-n8n-instance.com/api/v1
N8N_API_KEY=your_api_key

# n8n webhook base URL (required for TriggerWebhook tool)
N8N_WEBHOOK_BASE_URL=https://your-n8n-instance.com/webhook
N8N_WEBHOOK_USERNAME=your_webhook_username   # optional basic auth
N8N_WEBHOOK_PASSWORD=your_webhook_password   # optional basic auth

# MCP route (optional, defaults shown)
N8N_MCP_ROUTE_PREFIX=mcp/n8n
```

The MCP server will be available at `https://yourapp.com/mcp/n8n`.

---

Configuration
-------------

[](#configuration)

```
// config/n8n-mcp.php
return [
    'route_prefix'     => env('N8N_MCP_ROUTE_PREFIX', 'mcp/n8n'),
    'route_middleware' => ['web'],  // add 'auth:sanctum' to restrict access
];
```

---

Tools Reference
---------------

[](#tools-reference)

**54 tools** are registered across 11 resource groups. Every public method on every client class in `kayedspace/laravel-n8n` has a corresponding MCP tool.

### Workflow (14 tools)

[](#workflow-14-tools)

ToolMethodDescription`list-n8n-workflows`GETList workflows with optional filters (active, name, tags, projectId)`get-n8n-workflow`GETGet full workflow definition by ID`search-n8n-workflows-by-webhook`GETFind workflows containing a Webhook node matching a path`create-n8n-workflow`POSTCreate a new workflow`update-n8n-workflow`PUTReplace a workflow definition`delete-n8n-workflow`DELETEDelete a single workflow`delete-many-n8n-workflows`DELETEDelete multiple workflows by ID array`activate-n8n-workflow`POSTActivate a single workflow`activate-many-n8n-workflows`POSTActivate multiple workflows by ID array`deactivate-n8n-workflow`POSTDeactivate a single workflow`deactivate-many-n8n-workflows`POSTDeactivate multiple workflows by ID array`move-n8n-workflow`PUTTransfer a workflow to a different project`export-n8n-workflows`GETExport workflow definitions as JSON (backup/migration)`import-n8n-workflows`POSTImport workflow definitions (IDs stripped, creates new)### Workflow Tags (2 tools)

[](#workflow-tags-2-tools)

ToolMethodDescription`list-n8n-workflow-tags`GETList tags on a specific workflow`update-n8n-workflow-tags`PUTReplace the full tag set on a workflow### Execution (4 tools)

[](#execution-4-tools)

ToolMethodDescription`list-n8n-executions`GETList executions with filters (status, workflowId, projectId)`get-n8n-execution`GETGet execution details by ID, optionally including node data`wait-for-n8n-execution`GETPoll an execution until it completes or times out`delete-n8n-executions`DELETEDelete one or more execution records### Credential (6 tools)

[](#credential-6-tools)

ToolMethodDescription`list-n8n-credentials`GETList stored credentials`get-n8n-credential`GETGet a credential by ID`get-n8n-credential-schema`GETGet the JSON schema for a credential type (e.g. `slackApi`)`create-n8n-credential`POSTCreate a new credential`delete-n8n-credential`DELETEDelete a credential`move-n8n-credential`PUTTransfer a credential to a different project### User (5 tools)

[](#user-5-tools)

ToolMethodDescription`list-n8n-users`GETList all users`get-n8n-user`GETGet a user by ID or email`create-n8n-user`POSTInvite one or more users`change-n8n-user-role`PATCHChange a user's global role`delete-n8n-user`DELETEDelete a user### Project (7 tools)

[](#project-7-tools)

ToolMethodDescription`list-n8n-projects`GETList all projects`create-n8n-project`POSTCreate a new project`update-n8n-project`PUTRename a project`delete-n8n-project`DELETEDelete a project`add-n8n-project-users`POSTAdd users to a project with roles`change-n8n-project-user-role`PATCHChange a user's role within a project`remove-n8n-project-user`DELETERemove a user from a project### Variable (6 tools)

[](#variable-6-tools)

ToolMethodDescription`list-n8n-variables`GETList all environment variables`create-n8n-variable`POSTCreate a single variable`create-many-n8n-variables`POSTCreate multiple variables in one call`update-n8n-variable`PUTUpdate an existing variable`delete-n8n-variable`DELETEDelete a single variable`delete-many-n8n-variables`DELETEDelete multiple variables by ID array### Tag (7 tools)

[](#tag-7-tools)

ToolMethodDescription`list-n8n-tags`GETList all tags`get-n8n-tag`GETGet a single tag by ID`create-n8n-tag`POSTCreate a single tag`create-many-n8n-tags`POSTCreate multiple tags in one call`update-n8n-tag`PUTRename a tag`delete-n8n-tag`DELETEDelete a single tag`delete-many-n8n-tags`DELETEDelete multiple tags by ID array### Source Control (1 tool)

[](#source-control-1-tool)

ToolMethodDescription`pull-n8n-source-control`POSTPull from the connected Git source control repository### Security / Audit (1 tool)

[](#security--audit-1-tool)

ToolMethodDescription`generate-n8n-security-audit`POSTRun a security audit and return diagnostics by category### Webhook (1 tool)

[](#webhook-1-tool)

ToolMethodDescription`trigger-n8n-webhook`POSTTrigger an n8n workflow via its webhook path (sync or async)---

Package Structure
-----------------

[](#package-structure)

```
src/
├── N8nMcpServiceProvider.php       # Auto-discovered, registers the MCP route
├── Server/
│   └── N8nServer.php               # MCP server definition with all 54 tools
└── Tools/
    ├── Workflow/       (14 tools)
    ├── WorkflowTag/    (2 tools)
    ├── Execution/      (4 tools)
    ├── Credential/     (6 tools)
    ├── User/           (5 tools)
    ├── Project/        (7 tools)
    ├── Variable/       (6 tools)
    ├── Tag/            (7 tools)
    ├── SourceControl/  (1 tool)
    ├── Security/       (1 tool)
    └── Webhook/        (1 tool)

config/
└── n8n-mcp.php                     # Route prefix and middleware config

```

---

How It Works
------------

[](#how-it-works)

Each tool:

1. Validates its input parameters using Laravel's `Validator`
2. Calls the corresponding method on the `N8nClient` facade from `kayedspace/laravel-n8n`
3. Catches `N8nException` (and subclasses like `ExecutionFailedException`) and returns `Response::error()`
4. Returns `Response::structured()` on success

The `kayedspace/laravel-n8n` package handles retries, timeouts, caching, event dispatching, and HTTP client configuration via your `.env` settings.

---

Middleware / Authentication
---------------------------

[](#middleware--authentication)

By default the route uses the `web` middleware group. To restrict MCP access:

```
// config/n8n-mcp.php
'route_middleware' => ['web', 'auth:sanctum'],
```

---

License
-------

[](#license)

MIT — see [LICENSE](LICENSE).

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance82

Actively maintained with recent releases

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

90d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6824950?v=4)[Raju Rayhan](/maintainers/rajurayhan)[@rajurayhan](https://github.com/rajurayhan)

---

Top Contributors

[![rajurayhan](https://avatars.githubusercontent.com/u/6824950?v=4)](https://github.com/rajurayhan "rajurayhan (9 commits)")

### Embed Badge

![Health badge](/badges/rajurayhan-laravel-n8n-mcp-server/health.svg)

```
[![Health](https://phpackages.com/badges/rajurayhan-laravel-n8n-mcp-server/health.svg)](https://phpackages.com/packages/rajurayhan-laravel-n8n-mcp-server)
```

###  Alternatives

[statamic/cms

The Statamic CMS Core Package

4.8k3.6M966](/packages/statamic-cms)[darkaonline/l5-swagger

OpenApi or Swagger integration to Laravel

3.0k37.6M130](/packages/darkaonline-l5-swagger)[knuckleswtf/scribe

Generate API documentation for humans from your Laravel codebase.✍

2.3k14.2M62](/packages/knuckleswtf-scribe)[binaryk/laravel-restify

Laravel REST API helpers

677415.0k](/packages/binaryk-laravel-restify)[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135224.7k7](/packages/statamic-rad-pack-runway)[scriptdevelop/whatsapp-manager

Paquete para manejo de WhatsApp Business API en Laravel

783.8k](/packages/scriptdevelop-whatsapp-manager)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
