Laravel MCP Companion
A locally-hosted MCP server that puts all of Laravel's documentation on your machine so an AI assistant can search and read it offline.
Search everything at once — one ranked search over framework docs, first-party services (Forge, Vapor, Envoyer, Nova, Cloud, Nightwatch, Herd), package docs (Livewire, Filament, Inertia, Spatie, etc.) and learning resources; narrow with
sources, pick aversion, or sweepall_versions.Read cheaply by section — fetch just the section that answers the question (by anchor or heading) instead of a whole tens-of-thousands-token page.
Discover and run the rest of the tools —
search_toolsfinds tools by plain-language query;call_toolruns one by name. That reaches the remaining capabilities: whole-page/heading reading, listing what's held, doc freshness reporting, version page comparison, doc updates, package catalog lookup and recommendations, service descriptions, and learning paths / topic browsing (experimental).Program-friendly results — every tool returns JSON matching a declared schema alongside text, and failures carry an error
codeto branch on.Answers every Laravel version, side by side — 6.x through 13.x, with no project or code required.
Works offline — documentation ships with the package/image; the only network touches are an optional docs update and a daily version-list check.
Automatically fetches and updates Laravel documentation from GitHub repository, supporting different Laravel versions and providing version control integration for documentation updates.
Provides access to Laravel documentation, enabling search and retrieval of Laravel docs across different versions. Includes tools for listing documentation files, searching documentation for specific terms, and automatically fetching and updating documentation from Laravel's GitHub repository.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Laravel MCP Companion how do I set up database migrations in Laravel 12?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Laravel MCP Companion
Every Laravel version, the whole ecosystem, fully local.
Laravel MCP Companion is an MCP server that keeps Laravel's documentation on your machine and lets an AI assistant search and read it. It holds the framework docs for every version from 6.x to the newest, the first-party services, and widely used packages. No documentation is fetched while you work, so it answers without a network connection.
Status: pre-1.0. The tools listed below, with their arguments and results, are the ones 1.0 will promise not to break. Upgrading from 0.14 or earlier? See MIGRATING.md.
What it is for
Every version, side by side. Laravel 6.x through 13.x are all held. Ask about the version an older application runs on, or compare two versions to see what an upgrade brings.
Fully local. The documentation ships inside the Docker image and the Python package. Your questions go nowhere but your assistant, and no documentation service is called, so it works offline and behind an air gap. Documentation is fetched only when you ask for an update. The one other request is at startup: if its list of Laravel versions is more than a day old, the server asks GitHub for it, and carries on with the list it has when there is no answer.
It needs no project. It works in a chat client with no code open.
Laravel Boost is the first-party tool for writing code inside a Laravel project: it is installed into the application and knows what the application uses. Use Boost while building. Use Companion to look something up in any Laravel version, in a client with no project open, or where the documentation has to stay on the machine.
Related MCP server: Apple Doc MCP
Documentation held
The framework documentation for Laravel 6.x through 13.x.
First-party services: Forge, Vapor, Envoyer, Nova, Cloud, Nightwatch and Herd.
Package documentation: Livewire, Filament, Inertia, and Spatie's Permission, Media Library and Backup, each for the package's current major version, and the smaller docs of Debugbar and IDE Helper.
Learning material: the courses at laravel.com/learn and an index of Laracasts topics.
A package catalog. Separate from the documentation above: a hand-written list of 42 curated packages, saying what each is for, how to install it, what goes with it, and which ones have been superseded.
The project refetches the documentation every night and publishes it;
Keeping the documentation current says how it reaches you.
The catalog is revised by hand. Ask your assistant how current its documentation is, or call
laravel_docs_info, to see the date and page count of every source.
Installation
Run it with uvx or with
Docker, whichever you already have. Both carry the
documentation with them. The server is on PyPI
and in the
official MCP Registry
as io.github.brianirish/laravel-mcp-companion.
Cursor and VS Code add it from a link, using uvx. Each shows the configuration before
it installs anything.
Claude Code:
# with uv
claude mcp add laravel-mcp-companion -- uvx laravel-mcp-companion
# with Docker
claude mcp add laravel-mcp-companion -- docker run --rm -i ghcr.io/brianirish/laravel-mcp-companion:latestClaude Desktop, and most other MCP clients: add one of these to the client's MCP configuration (Settings → Developer → Edit Config in Claude Desktop), then restart it.
With uv:
{
"mcpServers": {
"laravel-mcp-companion": {
"command": "uvx",
"args": ["laravel-mcp-companion"]
}
}
}With Docker:
{
"mcpServers": {
"laravel-mcp-companion": {
"command": "docker",
"args": ["run", "--rm", "-i", "ghcr.io/brianirish/laravel-mcp-companion:latest"]
}
}
}pip install laravel-mcp-companion works too, on Python 3.12 or newer, and installs a
laravel-mcp-companion command.
Then ask your assistant "how current are your Laravel docs?". It should answer with a date and a list of sources.
Features (v1.0.0-rc1)
Twelve tools. API.md documents every argument and result field.
Tool | What it does |
| Ranked search over everything held; returns sections, each with a snippet |
| Reads one section of a page |
| Reads a whole page, or lists its headings |
| Lists what is held, or the files of one collection |
| Reports how current every source is |
| Lists the pages one Laravel version has and another lacks |
| Fetches newer documentation |
| Looks up a package, or a category, in the catalog |
| Suggests packages for a described need |
| Describes a first-party service and what is held for it |
| Returns a reading order for a goal (experimental) |
| Lists pages by topic and difficulty (experimental) |
Ranked sections, not files. Ask in plain language ("how do I retry a failed queue job") and get the sections that answer it. A section is usually a few hundred tokens where the whole page is tens of thousands.
Unified search - One search covers the core framework docs, the services, the package docs and the learning resources, and labels each result with its source.
sourcesnarrows it.Results a program can use. Every tool returns a JSON object matching a declared schema, as well as text for the model. A failure is an error with a
codeto branch on.A stable surface. The tools are recorded in a contract file that a test enforces. VERSIONING.md says what 1.0 will promise; the two tools marked experimental are outside it.
By default a client is shown four tools, not twelve: the first two above, and two helpers that
find and run the rest. That keeps tool descriptions out of the model's context.
--transform-mode none lists all twelve; see
Tool listing modes.
Keeping the documentation current
The project refetches every source each night.
Docker: each night's documentation is published as a new image. Pull it:
docker pull ghcr.io/brianirish/laravel-mcp-companion:latestuvxorpip: the package carries the documentation as it was on its release date, and the nightly documentation is not published to PyPI. Ask your assistant to update its Laravel docs and the server fetches them from their sources. The update is kept in a directory of your own, so it outlasts an upgrade.
Asking the assistant works with Docker too, but a container started with --rm loses the update
when it stops. OPERATIONS.md covers image
tags, keeping fetched documentation in a Docker volume, and where a pip or uvx install
stores it.
More
Every option, tool listing modes, running over HTTP with authentication and rate limiting, health and metrics, the output format | |
Every tool, argument, result field and error code | |
Upgrading from 0.14 or earlier | |
What a version number promises | |
What is left before 1.0 | |
Development setup and tests | |
Reporting a vulnerability |
License
MIT. See LICENSE.
Acknowledgements
Laravel for their excellent documentation
Laravel package authors for their contributions to the ecosystem
Available Tools
4 toolscall_toolA
Call a tool by name with the given arguments.
Use this to execute tools discovered via search_tools.
Inputs: name (required), arguments.
read_laravel_doc_sectionARead-onlyIdempotent
Read one section of a documentation page.
Give it a search result's file (as filename) and section, and it returns that section's markdown and nothing else. This is the cheap way to read: a whole page such as queues.md runs to tens of thousands of tokens, and an answer usually needs one section of it.
section may be an anchor ("dealing-with-failed-jobs"), a heading ("Dealing With Failed Jobs") or a heading written as a slug. If the section is not found, the error lists the sections the page does have.
Inputs: section (required), filename (required), version. Returns: file, corpus, content, heading, +2 more
search_laravel_docsARead-onlyIdempotent
Search Laravel's documentation and get back the sections that answer the question.
Covers every corpus on this server at once: the framework docs for the selected Laravel version, the first-party services (Forge, Vapor, Envoyer, Nova, Cloud, Nightwatch, Herd), fetched package docs (Livewire, Filament, Inertia, Spatie and others) and learning resources. Each result names a file and a section; pass them to read_laravel_doc_section as filename and section to read just that section.
Use it first for any Laravel question. Narrow with sources when you know the corpus, and set version for an older Laravel release. Results are ranked across corpora, and no single source takes the whole page when others match. Nothing found is a normal result with count 0.
Inputs: query (required), limit, sources, version, +1 more. Returns: count, query, scope, results, +2 more
search_toolsA
Search for tools using natural language.
Returns matching tool definitions ranked by relevance, in the same format as list_tools.
Inputs: query (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
The core docs tools are clearly distinct: search_laravel_docs finds sections and read_laravel_doc_section reads them. The main ambiguity comes from the meta pair search_tools/call_tool, which creates an alternate path for invoking tools and could be confused with the docs search tool due to the shared 'search' prefix.
All names are snake_case and follow a verb_noun pattern (call_tool, search_laravel_docs, read_laravel_doc_section, search_tools). Minor inconsistencies exist: 'docs' vs 'doc' and 'laravel' is included in the docs tools but not in the generic meta tools.
Four tools is a reasonable size for a documentation retrieval server. The two core domain tools cover the main workflow, while search_tools and call_tool add a dynamic tool-discovery layer that is useful but slightly redundant given the tools are already exposed directly.
The essential docs lifecycle is covered: search across corpora and read a specific section cheaply. Minor gaps include no explicit tool to list available sources, corpora, or Laravel versions, though those can be supplied as search parameters.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
The Mercado Pago MCP Server implements the Model Context Protocol to provide AI agents and LLMs with access to Mercado Pago's APIs and tools within compatible development environments. It acts as an intermediary that translates Mercado Pago resources into executable functions (tools) that AI applications can invoke to perform actions and automate flows. The server simplifies integration, enables using documentation to implement or improve code, and optimizes operations through natural language interactions without manual implementations.
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA server that provides organized documentation content for various applications using the Model Context Protocol, enabling AI assistants to access quickstart guides and code examples.MIT
- AlicenseAqualityDmaintenanceA Model Context Protocol server that provides AI coding assistants with direct access to Apple's Developer Documentation, enabling seamless lookup of frameworks, symbols, and detailed API references.6474 npm628MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server providing file search and question tools for AI models. Enables keyword search in files with line numbers and integration with external chat services.MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to introspect a Laravel application's routes, models, controllers, migrations, and more through the Model Context Protocol, running locally via php artisan commands and filesystem scanning.8 npmMIT