PHPackages                             sourcecodeguy1/laravel-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. sourcecodeguy1/laravel-mcp-server

ActiveLibrary[API Development](/categories/api)

sourcecodeguy1/laravel-mcp-server
=================================

MCP server for Laravel — expose routes, schema, models, and migrations to AI agents like Claude

v1.3.1(1mo ago)020MITPHPPHP ^8.1CI passing

Since May 26Pushed 1mo agoCompare

[ Source](https://github.com/sourcecodeguy1/laravel-mcp-server)[ Packagist](https://packagist.org/packages/sourcecodeguy1/laravel-mcp-server)[ RSS](/packages/sourcecodeguy1-laravel-mcp-server/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (5)Versions (6)Used By (0)

laravel-mcp-server
==================

[](#laravel-mcp-server)

An MCP (Model Context Protocol) server for Laravel applications. Install it in any Laravel app, run one Artisan command, and AI agents like Claude get live read-only access to your application's internals — routes, database schema, Eloquent models, migrations, and environment keys.

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

[](#requirements)

- PHP 8.1+
- Laravel 10, 11, 12, or 13

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

[](#installation)

```
composer require sourcecodeguy1/laravel-mcp-server
```

The service provider is auto-discovered. Optionally publish the config:

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

Usage
-----

[](#usage)

Start the MCP server:

```
php artisan mcp:serve
```

The server runs over stdio and speaks the [Model Context Protocol](https://modelcontextprotocol.io). Connect any MCP-compatible client to it.

Claude Desktop Setup
--------------------

[](#claude-desktop-setup)

Add this to your Claude Desktop config (`claude_desktop_config.json`):

```
{
  "mcpServers": {
    "laravel": {
      "command": "php",
      "args": ["/absolute/path/to/your/laravel/app/artisan", "mcp:serve"]
    }
  }
}
```

Then restart Claude Desktop. You'll see a hammer icon in the chat — that means the tools are connected.

Available Tools
---------------

[](#available-tools)

ToolDescription`list_routes`All registered routes with method, URI, controller, middleware. Filterable by HTTP method or URI pattern.`get_schema`List all database tables, or pass a table name to get columns and indexes.`list_models`All Eloquent models with table name, fillable/hidden fields, and detected relationships.`get_migrations`Migration status — which have been run (with batch number) and which are pending.`get_env_keys`All `.env` key names. **Never returns values** — keys only, for security.`list_middleware`All registered middleware — global stack, named aliases, and groups (web, api, etc.).Example Questions You Can Ask Claude
------------------------------------

[](#example-questions-you-can-ask-claude)

- *"What routes in this app are missing auth middleware?"*
- *"Show me the columns in the users table"*
- *"Which models have a BelongsToMany relationship?"*
- *"Are there any pending migrations?"*
- *"What third-party services does this app integrate with?"* (from env keys)

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

[](#configuration)

After publishing the config, you can enable/disable individual tools:

```
// config/laravel-mcp.php
return [
    'tools' => [
        \Sourcecodeguy1\LaravelMcp\Tools\ListRoutesTool::class,
        \Sourcecodeguy1\LaravelMcp\Tools\GetSchemaTool::class,
        \Sourcecodeguy1\LaravelMcp\Tools\ListModelsTool::class,
        \Sourcecodeguy1\LaravelMcp\Tools\GetMigrationsTool::class,
        \Sourcecodeguy1\LaravelMcp\Tools\GetEnvKeysTool::class,
        \Sourcecodeguy1\LaravelMcp\Tools\ListMiddlewareTool::class,
    ],
];
```

Security
--------

[](#security)

- **Read-only** — no tool writes to the database or filesystem
- **Env values never exposed** — `get_env_keys` returns key names only
- Intended for local development use with Claude Desktop, not production exposure

License
-------

[](#license)

MIT — [Julio Sandoval](https://juliowebmaster.com)

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance89

Actively maintained with recent releases

Popularity8

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

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

Every ~1 days

Total

5

Last Release

56d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/13338880?v=4)[sourcecodeguy1](/maintainers/sourcecodeguy1)[@sourcecodeguy1](https://github.com/sourcecodeguy1)

---

Tags

laravelmcpaiDevtoolsclaudeModel Context Protocol

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M246](/packages/laravel-ai)[psalm/plugin-laravel

Psalm plugin for Laravel

3345.3M347](/packages/psalm-plugin-laravel)[neuron-core/neuron-laravel

Official Neuron AI Laravel SDK.

11637.8k1](/packages/neuron-core-neuron-laravel)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5022.6k](/packages/simplestats-io-laravel-client)

PHPackages © 2026

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