Server MCP
This is the primary tool for discovering and accessing new tools, methods, features, or capabilities. **If a user asks for a tool, method, feature, or capability that you do not currently have, you MU
What is Server MCP?
Server MCP is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to this is the primary tool for discovering and accessing new tools, methods, features, or capabilities. **if a user asks for a tool, method, feature, or capability that you do not currently have, you mu
This is the primary tool for discovering and accessing new tools, methods, features, or capabilities. **If a user asks for a tool, method, feature, or capability that you do not currently have, you MU
This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- search_mcp_servers
- get_mcp_server_details
- add_mcp_server_config
- remove_mcp_server_config
- stream_mcp_events
Use Cases
Maintainer
Works with
Installation
NPM
npx -y serverManual Installation
npx -y serverConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Server MCP
PHP MCP Server (php-mcp/server) is a PHP SDK that lets PHP developers build their own MCP servers exposing tools, resources, and prompt templates to AI clients such as Claude Desktop. Using PHP 8.1 attributes (#[McpTool], #[McpResource], #[McpPrompt]), developers annotate ordinary PHP methods and the SDK automatically registers them in the MCP protocol, handling serialization, session management, and transport — over stdio for direct client launches or Streamable HTTP for production deployments. It integrates with Laravel via a companion package, making it straightforward to expose existing application logic as AI-callable capabilities.
Prerequisites
- PHP 8.1 or later with the json, mbstring, and pcre extensions enabled
- Composer installed for dependency management
- An MCP-compatible client such as Claude Desktop to test the server
- Laravel (optional, for the php-mcp/laravel integration package)
Install the PHP MCP Server SDK
Add the php-mcp/server package to your PHP project using Composer.
composer require php-mcp/serverDefine a tool using the McpTool attribute
Annotate a PHP method with #[McpTool] to expose it as a callable tool. The SDK infers the input schema from the method's type-hinted parameters.
<?php
use PhpMcp\Server\Attributes\McpTool;
class MyTools
{
#[McpTool(name: 'add_numbers')]
public function add(int $a, int $b): int
{
return $a + $b;
}
#[McpTool(name: 'get_weather')]
public function weather(string $city): string
{
// call your weather API here
return "Sunny, 22°C in {$city}";
}
}Bootstrap and run the MCP server over stdio
Create a server entry-point script that discovers your annotated classes and starts listening on stdio transport.
<?php
require 'vendor/autoload.php';
use PhpMcp\Server\Server;
use PhpMcp\Server\Transports\StdioServerTransport;
$server = Server::make()
->withServerInfo('MyApp MCP', '1.0.0')
->build();
$server->discover(__DIR__, ['src']);
$transport = new StdioServerTransport();
$server->listen($transport);Add the server to your MCP client configuration
Edit claude_desktop_config.json to launch the PHP server script when the client starts.
{
"mcpServers": {
"php-mcp": {
"command": "php",
"args": ["/path/to/your/server.php"]
}
}
}Restart the client and verify tools are available
Restart Claude Desktop. Your annotated tools should appear in the tools panel and the AI can invoke them.
Install the Laravel integration (optional)
For Laravel applications, install the companion package which provides service provider auto-discovery and artisan commands for managing MCP tools.
composer require php-mcp/laravelServer MCP Examples
Client configuration
Claude Desktop config launching a PHP MCP server script over stdio transport.
{
"mcpServers": {
"php-mcp": {
"command": "php",
"args": ["/Users/yourname/projects/my-mcp-server/server.php"]
}
}
}Prompts to try
Use these prompts once your PHP MCP server is connected and your tools are registered.
- "Add 42 and 58 using the add_numbers tool."
- "Get the current weather for London."
- "List all the tools available in the PHP MCP server."
- "Read the resource at config://app/settings and show me its contents."Troubleshooting Server MCP
The server exits immediately after the client tries to launch it
Run 'php /path/to/server.php' manually in a terminal. Missing Composer autoload or a PHP syntax error will surface here. Ensure 'vendor/autoload.php' exists and 'composer install' has been run.
Annotated tools do not appear in the MCP client after connecting
Check that the $server->discover() call points to the correct source directory containing your annotated classes. The directory path must be relative to server.php or absolute. Verify the namespace is correct.
Session state is lost between calls when using HTTP transport
Switch the session handler to cache-backed storage with ->withSession('cache', 7200) which persists session state across requests. The default 'array' session is in-memory only and does not survive between HTTP requests.
Frequently Asked Questions about Server MCP
What is Server MCP?
Server MCP is a Model Context Protocol (MCP) server that this is the primary tool for discovering and accessing new tools, methods, features, or capabilities. **if a user asks for a tool, method, feature, or capability that you do not currently have, you mu It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Server MCP?
Install via npm with the command: npx -y server. Then add the server configuration to your AI client's JSON config file (e.g., claude_desktop_config.json or .cursor/mcp.json).
Which AI clients work with Server MCP?
Server MCP works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Server MCP free to use?
Yes, Server MCP is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
Server MCP Alternatives — Similar Developer Tools Servers
Looking for alternatives to Server MCP? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
Browse More Developer Tools MCP Servers
Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Server MCP in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Server MCP?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.