mosafa697/test-mcp-server
If you are the rightful owner of test-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
MCP Server for testing new and challenging features and tools.
Laravel MCP Server Test Project
This project serves as a test implementation of Model Context Protocol (MCP) using Laravel, combining both php-mcp/laravel and laravel/mcp packages.
About MCP
Model Context Protocol (MCP) is a standardized way for AI models to request and receive contextual information during conversations. It enables more accurate and context-aware responses by allowing models to:
- Request specific files or documentation
- Query databases
- Execute commands
- Access system information
Project Setup
Requirements
- PHP 8.3+
- Laravel 12
- Composer
Installation
composer require php-mcp/laravel laravel/mcp
Features
This test server implements custom MCP tools and services:
Custom MCP Tools (app/Mcp/Tools/)
- AddTableTool: Creates new database tables with Laravel migrations, supports columns, indexes, and foreign keys
Custom MCP Services (app/Services/)
- CodeReviewService: Provides git diff functionality and pull request management
- Get local git diffs
- Fetch pull request diffs from Bitbucket
- Add summary and inline comments to PRs
- Application configuration resource
MCP Server (app/Mcp/Servers/)
- DBControlServer: Database control server with table management tools
Available Custom MCP Tools
get_local_git_diff: Return git diff between local HEAD and base branchget_pull_request_diff: Fetch PR diff by URL (supports Bitbucket)add_pr_summary_comment: Add a summary comment to a PRadd_pr_line_comments: Add multiple inline comments to a PRadd_table_tool: Create database tables with migrations
Usage
The MCP server automatically discovers tools and resources in the app/Mcp/ directory. Tools are registered using attributes and can be called through MCP clients.
Configuration is managed through config/mcp.php which supports multiple transports:
- stdio: CLI clients
- http_dedicated: Standalone server process
- http_integrated: Laravel routing integration
Configuration
The server can be configured through environment variables:
MCP_SERVER_NAME: Server name (default: Laravel MCP)MCP_SERVER_VERSION: Server versionMCP_AUTO_DISCOVER: Enable auto-discovery of tools- Transport-specific settings for HTTP endpoints
Resources
- MCP Introduction
- MCP Servers Repository
- PHP MCP Server
- Laravel MCP Package
- MCP Introduction (Anthropic)
- MCP Advanced Topics (Anthropic)
License
This project is open-sourced software licensed under the MIT license.