mcp-template
Verified Safeby zero-to-prod
Overview
This repository serves as a template for creating custom Model Context Protocol (MCP) servers in PHP, allowing developers to quickly scaffold and deploy tool-based services.
Installation
docker run -d -p 8080:80 -e MCP_DEBUG=true :docker_registry_username/:docker_image_name:latestEnvironment Variables
- MCP_DEBUG
- APP_DEBUG
- APP_VERSION
Security Notes
The `configure.php` script uses `shell_exec` for system interactions (e.g., git config, grep), which is inherently risky if user input were directly passed. However, this script is designed for one-time developer setup and is not part of the runtime server. The core server runtime (`public/index.php`) does not show direct `eval` or `shell_exec` on untrusted input. Environment variables (`APP_DEBUG`, `MCP_DEBUG`, `APP_VERSION`) are used for configuration, which is good practice. File-based session storage (`storage/mcp-sessions`) requires appropriate file permissions. No obvious hardcoded secrets or malicious patterns were found in the provided runtime source code.
Similar Servers
mcp-servers
A curated collection of Model Context Protocol (MCP) server configurations to integrate various developer tools and services with AI agents.
tmcp
A server implementation for the Model Context Protocol (MCP) to enable LLMs to access external context and tools.
php-mcp
Facilitates communication and integration between LLM applications and external data sources or tools by implementing the Model Context Protocol (MCP).
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.