MCP.so
登录

Laravel MCP Server by OP.GG

@opgginc

关于 Laravel MCP Server by OP.GG

A Laravel package for implementing secure Model Context Protocol servers using Streamable HTTP and SSE transport, providing real-time communication and a scalable tool system for enterprise environments.

基本信息

分类

其他

许可证

MIT

运行时

php

传输方式

stdio

发布者

opgginc

配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "laravel-mcp-server": {
      "command": "python",
      "args": [
        "scripts/translate_readme.py"
      ]
    }
  }
}

工具

未检测到工具

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

What is Laravel MCP Server by OP.GG?

Laravel MCP Server by OP.GG is a package that provides route-based MCP endpoint registration for Laravel and Lumen. It allows developers to build MCP (Model Context Protocol) servers using familiar Laravel routing, with support for tools, resources, resource templates, and prompts over a Streamable HTTP transport.

How to use Laravel MCP Server by OP.GG?

Install via Composer: composer require opgginc/laravel-mcp-server. Register an MCP endpoint using Route::mcp('/mcp') in Laravel or McpRoute::register('/mcp') in Lumen, then chain setServerInfo, tools, and optional methods like enabledApi or dynamicTools. Verify with php artisan route:list | grep mcp and test with php artisan mcp:test-tool --list --endpoint=/mcp or curl.

Key features of Laravel MCP Server by OP.GG

  • Streamable HTTP as the sole transport protocol.
  • Route-first configuration with Route::mcp(...) / McpRoute::register(...).
  • Register tools, resources, resource templates, and prompts per endpoint.
  • Dynamic tool filtering based on query string parameters.
  • Generate MCP tools/resources from Swagger/OpenAPI specs (make:swagger-mcp-tool).
  • Export registered MCP tools to OpenAPI JSON (mcp:export-openapi).
  • Route cache compatible endpoint metadata.

Use cases of Laravel MCP Server by OP.GG

  • Expose a curated set of tools and resources to AI clients via a Laravel-based MCP server.
  • Dynamically adjust available tools based on client-provided query parameters (e.g., game phase).
  • Generate MCP tool classes from existing OpenAPI specs, saving development time.
  • Export MCP tool definitions as OpenAPI documents for external consumption.
  • Build a secure, middleware-protected MCP endpoint (e.g., with auth:sanctum).

FAQ from Laravel MCP Server by OP.GG

What are the runtime requirements?

PHP >= 8.2, Laravel (Illuminate) >= 9.x, or Lumen >= 9.x.

What transport protocol does the server use?

Streamable HTTP is the only supported transport (SSE/legacy transports were removed in v2.0.0).

How can I secure my MCP endpoint?

Apply standard Laravel middleware (e.g., auth:sanctum, throttle:100,1) to the route group containing your Route::mcp(...) call.

How do I migrate from v1.0.0 to v2.0.0?

Configuration moved from config files to route registration, setServerInfo(...) replaces multiple mutators, and transport is now Streamable HTTP only. Run php artisan mcp:migrate-tools and see the migration guide at docs/migrations/v2.0.0-migration.md.

Can I filter which tools a client sees based on URL parameters?

Yes, implement a DynamicToolResolverInterface and attach it to your route with ->dynamicTools(YourResolver::class). The resolver controls both the declared tool catalog and the per-request visible subset.

评论

其他 分类下的更多 MCP 服务器