mcpField
🐉
🐉 The fast, PHP way to build MCP servers

🐉 The fast, PHP way to build MCP servers

Local
github.com/pronskiyDeveloper Tools125Updated 60w ago

About 🐉 The fast, PHP way to build MCP servers

pronskiy/mcp is a PHP library for building MCP servers, installed with Composer. It targets PHP developers who want to define tools, resources and prompts in clean PHP code.

Key features

  1. 01Tool creation
  2. 02Resource exposure
  3. 03Prompt definition
  4. 04Composer installation

Use cases

  1. 01Giving an LLM custom tools implemented in PHP
  2. 02Exposing application data to MCP clients as resources

MCP support

The project implements MCP servers, exposing tools, resources and prompts to MCP clients.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

🐉 The fast, PHP way to build MCP servers

The Model Context Protocol (MCP) is a new, standardized way to provide context and tools to your LLMs, and pronskiy/mcp makes building MCP servers simple and intuitive.

Create tools, expose resources, define prompts, and connect components with clean PHP code.

Installation

With composer:

composer require pronskiy/mcp

Usage

require 'vendor/autoload.php';

$server = new \Pronskiy\Mcp\Server('simple-mcp-server');

$server
    ->tool(
        'add-numbers',
        'Adds two numbers together',
        fn(float $num1, float $num2) => "The sum of {$num1} and {$num2} is " . ($num1 + $num2)
    )
    ->tool(
        'multiply-numbers',
        'Multiplies two numbers',
        fn(float $num1, float $num2) => "The product of {$num1} and {$num2} is " . ($num1 * $num2)
    )
;

$server->run();

Credits

License

The MIT License (MIT). Please see License File for more information.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.