Get the FREE Ultimate OpenClaw Setup Guide →

laravel

MCP server from benjibee/laravel-mcp-server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio benjibee-laravel-mcp-server node build/index.js

How to use

The Laravel MCP server provides a structured, cached interface to the official Laravel documentation. It exposes tools to list topics, fetch details for a topic, retrieve usage examples, search docs by keyword, and list documentation categories. This enables AI-assisted workflows where you can query for Laravel topics, drill into specifics about a given topic (such as routing, authentication, Eloquent relationships, migrations, etc.), and retrieve concrete code examples drawn from the Laravel docs. The server caches content locally for offline access and organizes data by categories, making it easier to explore Laravel’s documentation programmatically.

To use the server, connect via MCP-enabled tooling (e.g., Augment in VS Code, Claude Desktop, Windsurf, Cursor, or any client that speaks MCP). You can request a list of topics, filter by category (e.g., Eloquent ORM, Database, Security), or ask for detailed topic content and examples. For example, ask for all topics in the Eloquent ORM category, request details for “Laravel routing,” or fetch code examples for “Laravel migrations.” The server also supports a search function to find topics by keyword such as “authentication” or “middleware,” returning relevant topics and their embedded documentation sections and code snippets.

In practice, you’ll typically start by listing topics or searching for a concept, then request detailed descriptions and practical code examples to guide implementation tasks such as building routes, defining models, performing migrations, or configuring authentication and middleware.

How to install

Prerequisites:

  • Node.js (v14+ is recommended)
  • npm (comes with Node.js)
  • Git (to clone repositories or fetch dependencies if needed)

Installation steps:

  1. Install dependencies and build the MCP server

    • npm install
    • npm run build
  2. Run the server locally (for development/testing)

    • npm run start Note: The exact start command may vary depending on your package.json scripts. If there is no start script, you can run the built entry point directly, for example: node build/index.js
  3. Configure your MCP client (Augment, Claude Desktop, Windsurf, Cursor) to point at the server

    • Example Augment configuration: { "mcpServers": { "laravel-server": { "command": "node", "args": ["build/index.js"] } } }
  4. Verify the server is reachable via your MCP client and begin issuing queries (list topics, get topic details, etc.)

Optional advanced steps:

  • If you clone the repository to a custom path, ensure the path in your client configuration points to the built entry file (e.g., /absolute/path/to/laravel-mcp-server/build/index.js).
  • Use the MCP Inspector tooling for debugging to obtain a browser-based debugging URL.

Additional notes

Tips and best practices:

  • The server caches Laravel docs locally to support offline usage. If topics are missing or data seems stale, restart the server to refresh the cache and/or delete the cache directory to force a refresh.
  • If you’re behind a proxy or firewall, GitHub API access may be restricted; rely on the server’s fallback data for common topics in such cases.
  • When integrating with multiple clients (Augment, Claude, Windsurf, Cursor), ensure the server name (laravel-server) matches exactly in the client configuration to avoid “server not found” errors.
  • The server extracts code examples from Laravel’s Markdown docs and detects the language where possible; you can request “Show me code examples for routing” to get practical snippets.
  • If you want to customize topics or fallback data, you can modify the source code’s data caches or add topics to the embedded fallback dataset.

Related MCP Servers

Sponsor this space

Reach thousands of developers