Laravel MCP Companion
Provides documentation for Filament, a full-stack component toolkit for TALL stack, including community package docs and integration guides.
Provides documentation for Inertia.js, a framework for building single-page applications with server-side routing, including community package docs and integration guides.
Provides aggregated documentation for Laravel framework, including multi-version support, learning paths, difficulty filtering, and unified search across core docs, services, and packages.
Provides documentation for Livewire, a full-stack framework for Laravel, including community package docs and integration guides.
Provides documentation for Laravel Vapor, a serverless deployment platform for Laravel, including auto-discovered sections and integration guides.
Laravel MCP Companion
formerly Laravel Docs MCP Server
⚠️ BETA SOFTWARE - This project is in active development. Features may change and breaking changes may occur.
Laravel MCP Companion is a documentation aggregator and navigator for the Laravel ecosystem. It centralizes and organizes high-quality documentation from across the Laravel ecosystem, making it easily discoverable through your AI assistant.
How It Compares
Feature | Context7 | Laravel MCP Companion | |
Focus | Code generation | General docs | Laravel documentation |
Best for | Active development | Any library | Learning & reference |
Project-aware context | ✅ | ❌ | ❌ |
Laravel multi-version support (6.x - latest) | ❌ | ❌ | ✅ |
Laravel service docs (Forge, Vapor, Nova, Envoyer) | ❌ | ❌ | ✅ |
Learning paths & difficulty levels | ❌ | ❌ | ✅ |
"I need X" documentation finder | ❌ | ❌ | ✅ |
Curated Laravel package recommendations | ❌ | ❌ | ✅ |
Offline documentation access | ❌ | ❌ | ✅ |
TOON format output (30-60% fewer tokens) | ❌ | ❌ | ✅ |
General documentation (non-Laravel) | ❌ | ✅ | ❌ |
Use Boost when writing code and you need project-aware context. Use Context7 for non-Laravel libraries. Use Companion when learning, researching, or need Laravel documentation reference.
What you get:
Multi-version Laravel documentation (6.x through latest) with enhanced search
Learning paths - Structured learning sequences by topic and skill level
"I need X" finder - Describe what you need, get relevant documentation
Difficulty filtering - Content organized by beginner/intermediate/advanced
15 semantic categories - Browse documentation by topic area
Auto-discovery Laravel services - Forge, Vapor, Envoyer, Nova (117+ sections)
Community package documentation - 42,000+ lines from Spatie, Livewire, Inertia, Filament
Package integration guides - Installation and setup for 50+ curated packages
Cross-package compatibility - Learn which packages work well together
Unified search across core Laravel docs, services, and packages
Daily updates - Automatically syncs with latest documentation
Related MCP server: MCP Developer Server
Installation
Listed in the official MCP Registry
as io.github.brianirish/laravel-mcp-companion — clients with registry
support can install it from there directly. Manual setup:
Claude Desktop
Open Claude Desktop Settings
Click Claude menu → Settings → Developer → Edit Config
Add to your configuration file:
{ "mcpServers": { "laravel-mcp-companion": { "command": "docker", "args": ["run", "--rm", "-i", "ghcr.io/brianirish/laravel-mcp-companion:latest"] } } }Restart Claude Desktop for changes to take effect
Config file locations:
Windows:
%APPDATA%\Claude\claude_desktop_config.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.json
Claude Code
Use the claude mcp add command:
# Add with Docker
claude mcp add laravel-mcp-companion -- docker run --rm -i ghcr.io/brianirish/laravel-mcp-companion:latest
# Or add to project-specific config (for team sharing)
claude mcp add laravel-mcp-companion --scope project -- docker run --rm -i ghcr.io/brianirish/laravel-mcp-companion:latestThe --scope project option creates a .mcp.json file in your project root that can be committed to version control.
Configuration Options
These options can be used with the Docker command. For example:
# Pin to a specific older Laravel version
docker run --rm -i ghcr.io/brianirish/laravel-mcp-companion:latest --version 11.x
# Force update all documentation
docker run --rm -i ghcr.io/brianirish/laravel-mcp-companion:latest --force-updateOption | Description | Default |
| Laravel version (e.g., "11.x", "12.x") | Latest |
| Documentation directory |
|
| DEBUG, INFO, WARNING, ERROR, CRITICAL | INFO |
| Update documentation on startup | false |
| Force documentation update | false |
| Tool exposure mode: | search |
| Interface to bind in HTTP mode (env: |
|
| Browser origin allowed to call the HTTP transport, repeatable (env: | none (CORS off) |
| Additional |
|
| JWKS endpoint enabling bearer-token auth in HTTP mode (env: | none (auth off) |
| Required token issuer, with | none |
| Required token audience, with | none |
| Scope every token must carry, repeatable (env: | none |
Keeping documentation current
Documentation ships inside the image, and a new image is published whenever the
documentation is refreshed, so :latest carries the most recently published
snapshot. The catch is that docker run reuses the copy you already have —
once you've pulled the image, you keep running it until you pull again. Refresh
whenever you like:
docker pull ghcr.io/brianirish/laravel-mcp-companion:latestOr add --pull=always to your MCP config so every start checks for a newer image.
It costs a moment of startup time and needs a working connection, so it's opt-in
rather than the default:
"args": ["run", "--rm", "-i", "--pull=always",
"ghcr.io/brianirish/laravel-mcp-companion:latest"]You don't have to track this yourself. The server tells your assistant how old the documentation is for the Laravel version it's serving, so if you ask about something newer than that snapshot it will say so and offer to refresh instead of answering from stale pages. You can also just ask — "how current are your Laravel docs?"
To update in place without pulling a new image, --update-docs fetches fresh
documentation for the selected Laravel version during startup. Documentation for
Forge, Vapor, Nova, Envoyer and community packages refreshes separately, through the
update_external_laravel_docs tool your assistant can call.
With --rm the download is discarded when the container exits, so it repeats on
every start. A named volume keeps it — but note the trade-off:
docker run --rm -i -v laravel-mcp-docs:/app/docs \
ghcr.io/brianirish/laravel-mcp-companion:latest --update-docsA volume overrides the image's documentation. Once populated it masks
/app/docs, so pulling a newer image no longer updates what the server reads — the volume becomes your source of truth and--update-docsbecomes the way you refresh it. Use a volume when you want to control updates explicitly; stick to plaindocker pullif you'd rather the image stay in charge.
Transform Modes
By default the server no longer lists all of its tools. Instead it exposes a compact, search-first interface that keeps your AI client's context window lean:
search(default) — Exposessearch_tools(BM25 relevance search over the tool catalog) andcall_tool(proxy to invoke any underlying tool).search_laravel_docsstays pinned and directly callable.code(experimental) — Exposes Code Mode meta-tools (tags,search,get_schema,execute) that let the client discover tools and orchestrate them with sandboxed Python. Requires thefastmcp[code-mode]extra (included inrequirements.txt). Avoid exposing this publicly over HTTP —executeis a code execution endpoint.none— Pre-0.9 behavior: every tool listed directly. Use this if your MCP client doesn't handle the synthetic search tools well.
# Restore the old flat tool listing
docker run --rm -i ghcr.io/brianirish/laravel-mcp-companion:latest --transform-mode noneHTTP transport security
Authentication is off by default. Anyone who can reach the HTTP port can call every tool, so treat network exposure as granting full access to the documentation tree — or turn on bearer-token auth:
# Validate tokens issued by a real OAuth 2.1 authorization server
python laravel_mcp_companion.py --transport http \
--auth-jwks-uri https://auth.example/.well-known/jwks.json \
--auth-issuer https://auth.example \
--auth-audience laravel-mcp-companion
# Development only: fixed tokens from the environment (never a CLI flag,
# so secrets stay out of process listings)
AUTH_STATIC_TOKENS="my-token:my-client" python laravel_mcp_companion.py --transport httpThe server is a resource server: it validates tokens, it never issues them.
Issuer and audience are mandatory with --auth-jwks-uri — accepting any
issuer's tokens, or tokens minted for another service, would be authentication
theater. Unauthenticated requests get 401 with a WWW-Authenticate header
(RFC 9728), and misconfiguration fails at startup rather than at request time.
Auth applies to the HTTP transport only; stdio's access control is the process
boundary.
Defaults are conservative:
Binds
127.0.0.1outside Docker. Inside the container it binds0.0.0.0, where the container boundary and explicit-ppublishing are the access control.Host and Origin validation is on, which blocks DNS-rebinding and drive-by-localhost attacks from a victim's browser.
CORS is disabled unless you pass
--cors-origin. Wildcard origins are rejected; credentials are never allowed cross-origin.
Only localhost, 127.0.0.1, and ::1 are accepted as Host values out of the box. If you bind a non-loopback interface you must add the hostname clients actually use, or every request is rejected with 421:
python laravel_mcp_companion.py --transport http \
--host 0.0.0.0 \
--allowed-host mcp.internal.example \
--cors-origin https://app.exampleRequests with an unrecognized Host get 421; requests from an unlisted Origin get 403. Passing --allowed-host or --cors-origin on the command line replaces the corresponding environment variable rather than adding to it. If you expose this beyond localhost, put an authenticating reverse proxy in front of it. Avoid --transform-mode code over HTTP entirely — execute is a code execution endpoint.
Features (v0.12.0)
Documentation Aggregation
Multi-version Laravel docs - All versions from 6.x to latest
Auto-discovery engine - Finds new docs across Forge, Vapor, Nova, Envoyer
Community package docs - 42,000+ lines from Spatie, Livewire, Inertia, Filament
Daily updates - Automatic sync with latest documentation
Learning & Discovery (New in v0.9.0)
Learning paths - Structured sequences for any Laravel topic
Difficulty levels - Filter by beginner, intermediate, or advanced
15 categories - Browse by authentication, database, testing, etc.
"I need X" finder - Natural language documentation discovery
Related resources - Find connected documentation automatically
Search & Navigation
Ranked section search - Ask in plain language ("how do I retry a failed queue job") and get the relevant sections ranked by relevance, each with a snippet and an anchor
Section-level reads - Fetch just the section you need. A whole documentation file can exceed 30,000 tokens; a section is typically a few hundred, so answers leave room for your actual code
Use case mapping - Describe what you need, get relevant packages
Package integration guides - Installation and setup for 50+ packages
Cross-package compatibility - Documentation for package combinations
Unified search - One search across all documentation sources
MCP 2025-11-25 capabilities (new in v0.12.0)
Task-capable updates - Documentation updates run as MCP tasks: submit, poll, fetch the result, instead of holding the connection for minutes
Interactive learning paths - Ask for a learning path without naming one and the server asks you which of the ten curated paths you want
Structured output - Tabular tools return
structuredContentwith real schemas alongside their TOON textOAuth 2.1 resource server - Optional bearer-token validation for the HTTP transport (JWKS or static dev tokens)
Registry-ready -
server.jsonmetadata,.well-knowndiscovery in HTTP mode, and automated MCP Registry publishing on release tags
Upcoming
v0.13.0: Production hardening, monitoring, advanced search
v1.0.0: First stable release with LTS commitment
For detailed roadmap information, see ROADMAP.md.
TOON Format Output
Laravel MCP Companion uses TOON (Token-Oriented Object Notation) for structured output, saving 30-60% on tokens compared to JSON/markdown.
Example Output
When you search for packages or list documentation, you get efficient structured data:
context: "authentication for SPA"
count: 2
packages[2]{id,name,description,categories,install}:
laravel/sanctum,Laravel Sanctum,"Featherweight authentication for SPAs",[authentication,spa],"composer require laravel/sanctum"
laravel/passport,Laravel Passport,"Full OAuth2 implementation",[authentication,api],"composer require laravel/passport"Compare to the equivalent JSON (nearly 2x the tokens):
{"context":"authentication for SPA","count":2,"packages":[{"id":"laravel/sanctum","name":"Laravel Sanctum",...}]}Why TOON?
Token efficient: LLMs understand TOON natively - no parsing overhead
Structured data: Arrays, objects, and metadata without JSON verbosity
AI-friendly: Designed specifically for LLM context windows
Auto-Discovery & Update Frequency
This application features an intelligent auto-discovery system that automatically finds and indexes Laravel documentation. Every day, it:
Auto-discovers new documentation sections across Laravel services (Forge, Vapor, Nova, Envoyer)
Retrieves the latest Laravel core documentation for all versions since 6.x
Fetches community package documentation (Spatie, Livewire, Inertia, Filament)
Adapts automatically to structural changes in documentation websites
Generates new patch releases automatically when updates are found
Development
Prerequisites
Python 3.12+
Node.js 18+ (for MCP Inspector)
Setup
git clone https://github.com/brianirish/laravel-mcp-companion
cd laravel-mcp-companion
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt -r requirements-dev.txtRunning Tests
# All tests with coverage
pytest --cov --cov-report=html
# Unit tests only
pytest tests/unit/
# Integration tests only
pytest tests/integration/
# Protocol compliance tests
pytest tests/protocol/ -m protocolManual Testing with MCP Inspector
The MCP Inspector provides a visual UI for testing MCP servers.
# Launch Inspector (opens browser at http://localhost:6274)
npx @modelcontextprotocol/inspector python laravel_mcp_companion.py
# With specific version
npx @modelcontextprotocol/inspector python laravel_mcp_companion.py --version 11.xUse the Inspector to:
Tools tab: Test all tools with auto-generated input forms
Resources tab: Browse
laravel://andlaravel-external://resourcesPrompts tab: Test prompt templates
Code Quality
ruff check --fix . # Linting
mypy --ignore-missing-imports . # Type checking
black . # FormattingLicense
This project is licensed under the MIT License - see the LICENSE file for details.
Contributing
Contributions are welcome! See CONTRIBUTING.md for guidelines.
Acknowledgements
Laravel for their excellent documentation
Laravel package authors for their contributions to the ecosystem
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceA collection of Laravel helper tools for integration with Cursor IDE, providing features like log viewing, error searching, artisan command execution, and model information display directly within the editor.Last updated12MIT
- Alicense-qualityDmaintenanceProvides instant access to 700+ programming documentation sources and creates isolated Docker containers for safe code testing and experimentation. Combines comprehensive documentation lookup with containerized development environments for enhanced development workflows.Last updatedAGPL 3.0
- FlicenseAqualityDmaintenanceProvides AI models with direct access to documentation for over 600 technologies from DevDocs.io, including popular languages, frameworks, and tools. It enables comprehensive searching, content retrieval, and offline access via an intelligent local caching system.Last updated122
- FlicenseAqualityDmaintenanceProvides AI assistants with direct access to Laravel documentation, coding rules, and implementation templates stored locally. It enables searching documentation, retrieving design system guides, and accessing domain-specific code examples to streamline Laravel development.Last updated8
Related MCP Connectors
Get up-to-date, version-specific documentation and code examples from official sources directly in…
@latest documentation and code examples to 9000+ libraries for LLMs and AI code editors in a singl…
DevDocs.io keyless docs index + entry search + content (Angular, MDN, Rust, etc.).
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/brianirish/laravel-mcp-companion'
If you have feedback or need assistance with the MCP directory API, please join our Discord server