php-mcp
Verified Safeby dtyq
Overview
Implements the Model Context Protocol (MCP) to enable seamless integration between LLM applications and external data sources and tools, providing a server-side framework in PHP.
Installation
php server.phpSecurity Notes
The project demonstrates robust input validation for JSON-RPC messages and uses type-safe constructs. Dynamic method invocation through annotations (e.g., in `McpCollector.php`) is a standard framework pattern but requires vigilance to ensure the annotated methods themselves are secure and do not expose unsafe operations to external input. The HTTP transport's `FileSessionManager` is explicitly noted as unsuitable for production, which is a good practice, and encourages using `RedisSessionManager`. Default CORS settings (`Access-Control-Allow-Origin: *`) might need review in production environments for specific client origins. No direct `eval` or `shell_exec` on user-controlled input is evident in the provided snippets.
Similar Servers
fastmcp
FastMCP is a Python framework for building and interacting with Model Context Protocol (MCP) servers. It provides client and server capabilities, enabling the creation of AI agents and services through definable tools, resources, and prompts. It supports various transports, authentication methods, logging, and background task execution, with strong integration for OpenAPI specifications.
tmcp
Build Model Context Protocol (MCP) servers for AI agents, providing schema-agnostic tools, resources, and prompts, with optional OAuth 2.1 authentication and distributed session management.
mcp-server
This plugin implements a Model Context Protocol (MCP) server for WordPress, exposing WordPress's data and functionality through its REST API to AI clients.
php-mcp-sdk
A PHP SDK for building Model Context Protocol (MCP) servers that expose AI capabilities (tools, prompts, sampling) and data resources to clients, facilitating AI agent orchestration and structured human-AI interaction.