{"type":"mcp_server","name":"mcp-sdk","description":"This repository provides a PHP SDK for the Model Context Protocol, facilitating communication between client and server applications. It offers Symfony integration for console commands and server-sent events, enabling easy","category":"Developer Tools","language":"PHP","stars":35,"forks":1,"owner":"php-llm","github_url":"https://github.com/php-llm/mcp-sdk","homepage":null,"setup":"## Setup\n\nTo install the SDK, run:\n\n```bash\ncomposer require php-llm/mcp-sdk\n```\n\nFor Symfony integration, the SDK provides server integration points tailored to Symfony Console and HttpFoundation (Laravel compatible).\n\nTo create a Console Command for STDIO Server, define a class extending `Symfony\\Component\\Console\\Command\\Command` and use `PhpLlm\\McpSdk\\Server` and `PhpLlm\\McpSdk\\Server\\Transport\\Stdio\\SymfonyConsoleTransport`.\n\nTo create a Controller for Server-Sent Events Server, define a controller using `PhpLlm\\McpSdk\\Server`, `PhpLlm\\McpSdk\\Server\\Transport\\Sse\\Store\\CachePoolStore`, and `PhpLlm\\McpSdk\\Server\\Transport\\Sse\\StreamTransport`.\n\nTo expose tools, use the `#[AsTool]` attribute from `PhpLlm\\LlmChain\\ToolBox\\Attribute\\AsTool` in combination with the [Symfony Bundle](https://github.com/php-llm/llm-chain-bundle).","tools":"## Available Tools\n\n1.  Model Context Protocol SDK (Provides a SDK for Client and Server applications in PHP).\n2.  Symfony Console Integration (Provides integration points for Symfony Console).\n3.  HttpFoundation Integration (Provides integration points for HttpFoundation, Laravel compatible).\n4.  STDIO Server (Provides a console command for STDIO server).\n5.  Server-Sent Events Server (Provides a controller for Server-Sent Events server).\n6.  Tool Exposing with `#[AsTool]` (Allows exposing tools using the `#[AsTool]` attribute from `PhpLlm\\LlmChain\\ToolBox\\Attribute\\AsTool`).","faq":null,"created_at":"2025-03-07T19:50:35+00:00","updated_at":"2025-03-28T21:31:59+00:00","source_url":"https://model-context-protocol.com/servers/php-model-context-protocol-sdk","related_articles":[]}