mcpField
L
laravel-mcp-server

laravel-mcp-server

Local
github.com/tadhgboyleDeveloper Tools0Updated 42w ago

About laravel-mcp-server

laravel-mcp-server is a package for Laravel developers to register tools and prompts for use through the Model Context Protocol. It provides an MCP server integrated with Laravel applications.

Key features

  1. 01Register MCP tools
  2. 02Register MCP prompts
  3. 03Laravel application integration

Use cases

  1. 01Expose Laravel application tools to MCP clients
  2. 02Make prompts available through MCP

MCP support

It implements an MCP server for Laravel applications, exposing registered tools and prompts to MCP clients.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"laravel-mcp-server-tadhgboyle": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/inspector"
]
}
}
}
Run commandnpx -y @modelcontextprotocol/inspector

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@modelcontextprotocol/inspector

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

laravel-mcp-server

Latest Version on Packagist Total Downloads

This package provides a Model Context Protocol (MCP) server for Laravel applications. It allows you to create and register tools and prompts that can be used in conjunction with the MCP protocol.

The MCP protocol is a standard for building tools that can interact with language models, enabling developers to create powerful applications that leverage the capabilities of these models.

Read more about the MCP protocol https://modelcontextprotocol.io.

Installation

You can install the package via composer:

composer require aberdeener/laravel-mcp-server

Usage

// Within your AppServiceProvider.php

use Aberdeener\LaravelMcpServer\Protocol\Tools\ToolRegistry;
use Aberdeener\LaravelMcpServer\Protocol\Prompts\PromptRegistry;

public function boot(): void
{
    // ...

    app(ToolRegistry::class)->registerTool(new GetWeatherTool);
    app(PromptRegistry::class)->registerPrompt(new ReviewPhpCode);
}

Experiment with the official MCP inspector:

npx @modelcontextprotocol/inspector php /path/to/your/laravel/app/artisan mcp:stdio

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.