opgginc/laravel-mcp-server
Laravel MCP Server by OP.GG is a Laravel package that implements a secure and scalable Model Context Protocol server using Server-Sent Events (SSE) transport for real-time communication and enterprise-grade security.
Relay is a PHP package that bridges Prism, a Laravel library for building applications on language models, with Model Context Protocol servers. It installs through Composer as prism-php/relay and publishes a config/relay.php file in which every MCP server is declared explicitly under a unique name. A server entry selects a transport: the stdio transport runs a local process, for example npx with the Puppeteer MCP server package, optionally with environment variables and a timeout, while the HTTP transport points at a URL and may carry a static api_key and extra request headers. A cache_duration setting, expressed in minutes, controls how long the discovered tool list is kept before the servers are queried again, and zero disables that cache. In application code the Relay facade returns the tools of a named server, and those tools are passed straight into a Prism text request through withTools, so the model can call them across a multi step run. The README shows this in an Artisan command that prompts the user, builds a Prism request against Anthropic with a system prompt from a Blade view, attaches the Puppeteer tools and prints the answer, letting the agent browse the web and report back. For HTTP servers the package also fits the authorization model of the MCP specification, but implements only its final step. The application itself is responsible for discovering the authorization server from the WWW-Authenticate header or the protected resource metadata endpoint, running the OAuth 2.1 authorization code flow with PKCE and the resource parameter, and storing and refreshing the token. Relay then attaches that bearer token to every request when withToken is called, taking priority over any static api_key, and raises an AuthorizationException when the server answers with HTTP 401. It targets Laravel developers adding external tool use to Prism agents.
https://github.com/prism-php/relay
Laravel MCP Server by OP.GG is a Laravel package that implements a secure and scalable Model Context Protocol server using Server-Sent Events (SSE) transport for real-time communication and enterprise-grade security.
A Laravel package that turns an application into an MCP server over stdio, streamable HTTP or SSE, with a facade for defining tools and toolkits on top of Prism plus model, factory and Stripe tools.