An MCP server in a few lines of PHP.
Register a server, attach your tools, resources, and prompts, and let Laravel MCP handle the protocol plumbing.
Callable tools.
Let AI clients trigger actions, query data, and run domain logic inside your app with typed input schemas.
Secure by default.
Protect MCP endpoints with standard Laravel middleware, OAuth 2.1 via Passport, or Sanctum tokens.
Reusable prompts.
Define parameterized prompt templates so AI clients interact with your app consistently.
Structured resources.
Expose files, database records, and docs as readable resources with clean URIs and MIME types.
Dependency injection.
Type-hint services in your tools and resources and let Laravel's service container resolve them automatically.
Inspector and test helpers.
Debug servers interactively with the MCP Inspector and write fast unit tests for every tool and resource.
Real-time streaming.
Stream progress updates and partial responses to AI clients over Server-Sent Events.
Web and local servers.
Serve remote MCP endpoints over HTTP for web clients, or run local stdio servers for editors like Claude Code and Cursor.
Familiar Laravel, all the way down.
Define MCP servers in routes/ai.php, resolve dependencies from the container, and test everything in Pest or PHPUnit.
Laravel MCP by the numbers.
- 1 week ago
- v1.3.0
- Contributors
- 69
- GitHub Stars
- 885
- Open PRs
- 10
Laravel MCP FAQ.
The agent stack.
Open-source package
AI SDK
One fluent PHP API for agents, tools, memory, and every major model provider.
Explore AI SDK
Open-source package
Converse
Connect an agent to Slack, Telegram, GitHub, and your own React or Vue frontend.
Explore Converse
Starter kit
Agent Kit
A working starter app for team agents, with the AI SDK and Converse prewired.
Explore Agent Kit
Ship your first MCP server today.
Install the package with Composer and connect your Laravel app to Claude, ChatGPT, and local coding agents.