Back to Home
dtyq icon

php-mcp

Verified Safe

by 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

Run Command
php server.php

Security 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

Stats

Interest Score38
Security Score8
Cost ClassLow
Stars25
Forks4
Last Update2025-11-20

Tags

LLMAIProtocolServerPHPTooling