[KongchangAI]
Productlaravel/mcp

Laravel MCP

An official Laravel package for Model Context Protocol integration, enabling Laravel applications to expose tools, data, and prompt templates to AI agents via the Model Context Protocol. The package supports fine-grained permission control and a searchable tool directory.

Core Facts

Timeline (last 90 days)

Oct 15

It is recommended to make inspector testing a fixed step in the development process, running it once after every change to a tool definition before connecting to a real client.

Unverified50%
Oct 15

The Laravel MCP package generates a separate routes/ai.php route file, isolated from web.php and api.php, to avoid routing and security policies contaminating each other.

Unverified50%
Oct 15

Laravel MCP provides Mcp::web() for registering servers in remote/production environments and Mcp::local() for registering servers in local development.

Unverified50%
Oct 15

Laravel MCP server classes use the #[Name], #[Version] and #[Instructions] attributes, which AI clients read to determine when to call the server.

Unverified50%
Oct 15

#[IsReadOnly] indicates that a tool only reads data and produces no side effects; #[IsIdempotent] indicates that the result is the same no matter how many times it is called; #[IsDestructive] warns that a tool may modify or delete data.

Unverified50%
Oct 15

The built-in interactive session started by php artisan mcp:inspector is essentially a built-in MCP client that can initiate a handshake according to the protocol specification, request the list of capabilities, display tool JSON Schemas and allow calls to be triggered manually.

Unverified50%
Oct 15

AI models read the #[Description] of a tool class and the description of each field to decide how to call the tool, and leaving descriptions blank or overly generic noticeably increases the failure rate of calls.

Unverified50%
Oct 15

Security annotations are lightweight contractual declarations that convey risk levels to AI clients; they do not replace permission checks at the code level but complement them.

Unverified50%
Oct 15

When already exposed to hosted AI clients, Mcp::web() must be used and rate-limiting middleware considered; for local debugging only, Mcp::local() is simpler.

Unverified50%
Oct 15

The official Laravel MCP package requires PHP 8.2 or above and Laravel 12.x or 13.x.

Unverified50%

8 more timeline events

All Facts (18)

Verified

Laravel MCP can be integrated into an application with a single command: composer require laravel/mcp

65%
Unverified

It is recommended to make inspector testing a fixed step in the development process, running it once after every change to a tool definition before connecting to a real client.

50%
Unverified

Laravel MCP provides Mcp::web() for registering servers in remote/production environments and Mcp::local() for registering servers in local development.

50%
Unverified

Laravel MCP server classes use the #[Name], #[Version] and #[Instructions] attributes, which AI clients read to determine when to call the server.

50%
Unverified

#[IsReadOnly] indicates that a tool only reads data and produces no side effects; #[IsIdempotent] indicates that the result is the same no matter how many times it is called; #[IsDestructive] warns that a tool may modify or delete data.

50%
Unverified

The built-in interactive session started by php artisan mcp:inspector is essentially a built-in MCP client that can initiate a handshake according to the protocol specification, request the list of capabilities, display tool JSON Schemas and allow calls to be triggered manually.

50%
Unverified

AI models read the #[Description] of a tool class and the description of each field to decide how to call the tool, and leaving descriptions blank or overly generic noticeably increases the failure rate of calls.

50%
Unverified

Security annotations are lightweight contractual declarations that convey risk levels to AI clients; they do not replace permission checks at the code level but complement them.

50%
Unverified

When already exposed to hosted AI clients, Mcp::web() must be used and rate-limiting middleware considered; for local debugging only, Mcp::local() is simpler.

50%
Unverified

The official Laravel MCP package requires PHP 8.2 or above and Laravel 12.x or 13.x.

50%
Unverified

The Laravel MCP package generates a separate routes/ai.php route file, isolated from web.php and api.php, to avoid routing and security policies contaminating each other.

50%
Unverified

The core of a Laravel MCP tool is the handle method, and the two methods schema and outputSchema constrain the AI's inputs and outputs, where schema defines parameters and validation rules, and outputSchema defines the returned data structure.

50%
Unverified

The original author ran 17 tools on one MCP server and saved a significant amount of context space after adopting an on-demand discovery mechanism

50%
Unverified

Laravel MCP version 1.0 introduces stateless servers support

50%
Unverified

Laravel MCP can expose tools, data, and prompts within an application for invocation by any MCP-compatible Agent

50%
Unverified

The searchable tool catalog reduces context usage from O(total number of tools) to O(number of tools relevant to the current task)

50%
Unverified

Laravel MCP version 1.0 introduces a stricter OAuth authentication mechanism

50%
Unverified

The MCP (Model Context Protocol) package officially released by Laravel has reached its stable version 1.0

50%

Source Articles