Back to Home
dv-team icon

php-mcp-server

Verified Safe

by dv-team

Overview

A simple PHP-based MCP Server (JSON-RPC) for handling immediate requests, adaptable for database, prompt, and filesystem tasks.

Installation

Run Command
php -S 127.0.0.1:8080 public/index.php

Security Notes

The server demonstrates good practices for JSON-RPC parsing by using JSON_THROW_ON_ERROR and includes explicit checks for property existence and type validation for incoming parameters. It uses a PSR-3 Logger for debugging/error logging, and custom exception handling. The default HTTP binding is to localhost (127.0.0.1), limiting network exposure. No direct 'eval' or 'shell_exec' are present. The primary security consideration for a system like this, not directly visible in the provided code, would be how tools and prompts are registered. If the registration process were exposed to untrusted input, it could lead to arbitrary code execution via the 'handler' callables. However, based on the provided code, registration happens programmatically within the application code, not through user-controlled input.

Similar Servers

Stats

Interest Score0
Security Score8
Cost ClassLow
Avg Tokens500
Stars0
Forks0
Last Update2026-01-17

Tags

PHPJSON-RPCServerAPIMicroservice