Download the PHP package code-wheel/mcp-events without Composer

On this page you can find all versions of the php package code-wheel/mcp-events. 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-events

MCP Events

CI codecov Latest Stable Version PHP Version License

Standardized event classes for MCP (Model Context Protocol) tool execution lifecycle in PHP.

Zero dependencies - pure PHP 8.1+, framework-agnostic.

Installation

Usage

These events follow a standard structure for MCP tool execution observability. Use them with any PSR-14 compatible event dispatcher.

Dispatching Events

Listening to Events

Events

ToolExecutionStartedEvent

Dispatched when tool execution begins.

Property Type Description
toolName string MCP tool name
pluginId string Implementation plugin ID
arguments array Sanitized tool arguments
requestId string|int|null MCP request correlation ID
timestamp float Start timestamp (microtime)

ToolExecutionSucceededEvent

Dispatched when tool execution completes successfully.

Property Type Description
toolName string MCP tool name
pluginId string Implementation plugin ID
arguments array Sanitized tool arguments
result object Result object (e.g., CallToolResult from mcp/sdk)
durationMs float Execution duration in ms
requestId string|int|null MCP request correlation ID

ToolExecutionFailedEvent

Dispatched when tool execution fails.

Property Type Description
toolName string MCP tool name
pluginId string Implementation plugin ID
arguments array Sanitized tool arguments
reason string Failure reason constant
result object|null Result object if available
exception Throwable|null Exception if thrown
durationMs float Duration until failure in ms
requestId string|int|null MCP request correlation ID

Failure Reasons

Constant Description
REASON_VALIDATION Input validation failed
REASON_ACCESS_DENIED Permission denied
REASON_INSTANTIATION Failed to create tool instance
REASON_INVALID_TOOL Tool not found or invalid
REASON_RESULT Result processing failed
REASON_EXECUTION General execution failure
REASON_POLICY Blocked by policy
REASON_POLICY_APPROVAL Requires approval
REASON_POLICY_BUDGET Budget exceeded
REASON_POLICY_DRY_RUN Dry run mode
REASON_POLICY_SCOPE Insufficient scope

Helper Methods

JSON Serialization

All events implement JsonSerializable for easy logging:

Note: The result object is intentionally excluded from serialization as it may contain sensitive data.

Framework Integration

This package has zero dependencies. When using with mcp/sdk, the result object will be a CallToolResult:

License

MIT


All versions of mcp-events with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
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 code-wheel/mcp-events contains the following files

Loading the files please wait ...