Download the PHP package prism-php/relay without Composer
On this page you can find all versions of the php package prism-php/relay. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download prism-php/relay
More information about prism-php/relay
Files in prism-php/relay
Package relay
Short Description A Prism tool for interacting with MCP servers
License MIT
Informations about the package relay
Relay
A seamless integration between Prism and Model Context Protocol (MCP) servers that empowers your AI applications with powerful, external tool capabilities.
Installation
You can install the package via Composer:
After installation, publish the configuration file:
Configuration
The published config file (config/relay.php
) is where you'll define your MCP server connections.
Configuring Servers
You must define each MCP server explicitly in the config file. Each server needs a unique name and the appropriate configuration parameters:
Basic Usage
Here's how you can integrate MCP tools into your Prism agent:
The agent can now use any tools provided by the Puppeteer MCP server, such as navigating to webpages, taking screenshots, clicking buttons, and more.
Real-World Example
Here's a practical example of creating a Laravel command that uses MCP tools with Prism:
This command creates an interactive CLI that lets you input prompts that will be sent to Claude. The agent can use Puppeteer tools to browse the web, complete tasks, and return the results.
Transport Types
Arc supports multiple transport mechanisms:
HTTP Transport
For MCP servers that communicate over HTTP:
STDIO Transport
For locally running MCP servers that communicate via standard I/O:
[!NOTE] The STDIO transport launches a subprocess and communicates with it through standard input/output. This is perfect for running tools directly on your application server.
[!TIP] The
env
option allows you to pass environment variables to the MCP server process. This is useful for configuring server behavior, enabling debugging, or setting authentication details.
Advanced Usage
Using Multiple MCP Servers
You can combine tools from multiple MCP servers in a single Prism agent:
Error Handling
The package uses specific exception types for better error handling:
License
The MIT License (MIT). Please see the License File for more information.