Download the PHP package nixphp/mcp without Composer

On this page you can find all versions of the php package nixphp/mcp. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package mcp

![Logo](https://nixphp.github.io/docs/assets/nixphp-logo-small-square.png) [![NixPHP MCP Plugin](https://github.com/nixphp/mcp/actions/workflows/php.yml/badge.svg)](https://github.com/nixphp/mcp/actions/workflows/php.yml)

← Back to NixPHP


nixphp/mcp

Model Context Protocol (MCP) server implementation for NixPHP (Tools-first).

This plugin turns your NixPHP application into an MCP server that exposes Tools to AI clients such as ChatGPT.

🧩 Part of the official NixPHP plugin collection.


📦 Features

⚠️ This plugin currently operates in Tools-only mode. MCP Resources are currently not supported.


📥 Installation

The plugin auto-registers an MCP endpoint at:

The endpoint uses MCP Streamable HTTP in its minimal request/response form:


Authentication

The endpoint is protected by Bearer token authentication by default. Tokens are stored file-based, so apps can use MCP without introducing database tables.

Default token file:

App configuration may override or disable this:

For internal or local-only projects authentication can be opened explicitly:

Create a token from application code:

If nixphp/cli is installed, the plugin registers token commands automatically:

Clients send the token as:

Tool Scopes

Tools may opt into scope checks by implementing ScopedToolInterface:

Supported scope patterns:


Core Concept: Tools

Tools represent actions.

They:

Examples:


How the model interacts with your app (initialize)

On connection, the MCP server announces capabilities, not concrete tools.

Response (simplified):

capabilities.tools signals that this server supports MCP tools.


Tool Discovery (tools/list)

Clients explicitly request the available tools:

Response:


Example Tool: Folder Size

PHP Tool Implementation


How the model is calling the tool (tools/call)

JSON-RPC Request

Response


Action-Based Tools (Optional Pattern)

Tools may expose multiple behaviors via an action parameter:

This allows grouping related operations into a single tool while keeping schemas explicit.

This pattern is optional but recommended for more complex tools.


Storage & Filesystem Access

The plugin ships with a FilesystemStore utility.

Important notes:

Its purpose is to provide:

Typical usage inside a tool:

Storage root (default):


About MCP Resources

This plugin currently does not expose MCP Resources (resources/read, resources/list, resources/write).

Reasoning:

Resources may be added later as an extension.


Requirements


📄 License

MIT License.


All versions of mcp with dependencies

PHP Build Version
Package Version
Requires php Version >=8.3
nixphp/framework Version ^0.1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package nixphp/mcp contains the following files

Loading the files please wait ...