iMDT/php-mcp-demo
3.1
If you are the rightful owner of php-mcp-demo and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
This project demonstrates a Model Context Protocol (MCP) server implementation in PHP, featuring a calculator service and employee data management.
PHP MCP Demo
A demonstration project showcasing a Model Context Protocol (MCP) server implementation in PHP, featuring a calculator service with configurable settings and employee data management.
Requirements
- PHP 8.0 or higher
- Composer
Installation
- Clone this repository:
git clone <repository-url>
cd php-mcp-demo
- Install dependencies:
composer install
Usage
Starting the Server
Run the MCP server:
php index.php
It will be available at: http://127.0.0.1:8080
;
Connect MCP to Claude (Anthropic)
Want to use this server with Claude or any AI that supports MCP? Follow these steps:
- Expose the local server using ngrok:
ngrok http 8080
- Copy the ngrok URL (e.g., https://abc123.ngrok.io)
- Create a connector in Claude pointing to:
https://abc123.ngrok.io/mcp
Done! You can now use the calculator and employee tools directly via Claude.