Server MCP

v1.0.0Developer Toolsstable

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

servermcpai-integration
Share:
842
Stars
0
Downloads
0
Weekly
0/5

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

Discovery and access to new tools and capabilities
Tool management and integration hub
php-mcp

Maintainer

LicenseMIT
Languagephp
Versionv1.0.0
UpdatedMay 21, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

NPM

npx -y server

Manual Installation

npx -y server

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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)
1

Install the PHP MCP Server SDK

Add the php-mcp/server package to your PHP project using Composer.

composer require php-mcp/server
2

Define 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}";
    }
}
3

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);
4

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"]
    }
  }
}
5

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.

6

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/laravel

Server 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.

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.

Quick Config Preview

{ "mcpServers": { "server": { "command": "npx", "args": ["-y", "server"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides