MCP SDK for Laravel
@ronydebnath
关于 MCP SDK for Laravel
WIP - Model Context Protocol (MCP) SDK for Laravel. A robust, extensible Laravel package that implements the Model Context Protocol (MCP) for building AI-driven conversational applications.
基本信息
配置
工具
未检测到工具
工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。
概览
What is MCP SDK for Laravel?
MCP SDK for Laravel is a PHP package that provides both a client for interacting with Model Context Protocol (MCP) servers and tools for implementing MCP servers within a Laravel application. It is designed for Laravel developers who need to integrate or serve MCP-based conversational AI.
How to use MCP SDK for Laravel?
Install via Composer (composer require ronydebnath/mcp-sdk) and publish the config with php artisan vendor:publish. Configure environment variables like MCP_HOST, MCP_PORT, and MCP_TOKEN_EXPIRY, then use the MCPClient or StreamingMCPClient via dependency injection or the MCP facade to send messages. Set up an MCP server by adding a POST /mcp route and registering message handlers on MCPServer.
Key features of MCP SDK for Laravel
- Client for sending messages with streaming support
- Server implementation with custom message handlers
- Built-in authentication using bearer tokens or query parameters
- Memory and context management for conversation state
- Progress tracking for long-running operations
- Configurable via environment variables and publishable config file
Use cases of MCP SDK for Laravel
- Build a Laravel-powered MCP client to communicate with remote MCP servers
- Expose a Laravel application as an MCP server with custom logic
- Manage multi-turn conversations with memory persistence
- Stream responses from MCP servers to clients in real time
- Authenticate and authorize MCP requests using token-based middleware
FAQ from MCP SDK for Laravel
What does this package do?
It provides a Laravel SDK for both consuming and serving MCP (Model Context Protocol) endpoints, including client messaging, server handling, authentication, memory, and progress tracking.
How does authentication work?
The server supports token-based authentication. Clients can send a bearer token in the Authorization header or include it as a token query parameter. Tokens are generated via AuthProvider::generateToken() and validated by the AuthMiddleware.
Where is conversation memory stored?
Memory is kept in-memory by default. If MCP_MEMORY_PERSIST is set to true, data is persisted to the filesystem at the path specified by MCP_MEMORY_STORAGE_PATH (default storage_path('app/mcp/memory')).
What transport does the package use?
Connections are HTTP-based. The client sends messages to a configured host/port. The server listens on a POST /mcp route. Streaming is supported when the client sends an Accept: text/event-stream header.
What are the runtime requirements?
The package requires a Laravel application running on PHP 8.0+ with the Composer dependency manager. It uses standard Laravel features like service providers, facades, and dependency injection.
开发工具 分类下的更多 MCP 服务器
test
harlancA simple,high performance and secure live media server in pure Rust (RTMP[cluster]/RTSP/WebRTC[whip/whep]/HTTP-FLV/HLS).🦀
Burp Suite MCP Server Extension
PortSwiggerMCP Server for Burp
Unity MCP (Server + Plugin)
IvanMurzakAI Skills, MCP Tools, and CLI for Unity Engine. Full AI develop and test loop. Use cli for quick setup. Efficient token usage, advanced tools. Any C# method may be turned into a tool by a single line. Works with Claude Code, Gemini, Copilot, Cursor and any other absolutely for fr
Hello World MCP Server (Reference Extension)
anthropicsDesktop Extensions: One-click local MCP server installation in desktop apps
JetBrains MCP Proxy Server
JetBrainsA model context protocol server to work with JetBrains IDEs: IntelliJ, PyCharm, WebStorm, etc. Also, works with Android Studio
评论