php-mcp-protocol-server

php-mcp-protocol-server

0

The PHP MCP Protocol Server integrates PHP with the Claude AI tool from Anthropic using the official MCP SDK, offering a seamless approach to execute PHP code and manage environment details. It features error handling, automatic file cleanup, and easy integration through configurable local server settings.

PHP MCP Protocol Server

Features

  • Execute PHP code directly from Claude
  • Based on Anthropic's official MCP SDK
  • Error handling and exception management
  • Automatic cleanup of temporary files
  • PHP environment verification support

Requirements

  • Node.js (v14 or higher)
  • PHP (v7.0 or higher)
  • npm or yarn

Installation

  • Install globally via npm: npm install -g php-mcp-protocol-server
  • Start the server: php-mcp-server
  • Alternatively, install locally via npm or clone via GitHub

Usage

  • Verify PHP environment: npm run verify
  • Start the server: npm start (default port: 7654)
  • Integrate with Claude AI by configuring for local MCP tool at localhost:7654

MCP API Tools

  • executePhp: Execute PHP code and return output
  • phpInfo: Return PHP environment information