Phpray logo

Phpray

Reads PHP request traces through MCP to identify slow pages, SQL, plugins, errors, and request-level performance changes.

Install Phpray

Pick your client, then add it in one click or paste the config.

Streamable HTTP (Remote)
Server URL
https://phpray.dev/mcp

Remote servers are added in the app, not the config file: Customize → Connectors → Add custom connector, then paste this URL.

Overview

The phpray MCP server lets coding agents inspect PHP request traces from a local collector or PHPRay's hosted console. It exposes read-only tools for sites, slow pages, SQL fingerprints, component timing, errors, traces, comparisons, and alerts, with a separate tool for enabling function profiling. Use it when an agent needs evidence about PHP performance problems without opening the dashboard; cloud access uses a console token, while local stdio mode reads the same machine's collector.

Use cases

  • Find the slowest PHP pages from recorded request traces
  • Identify SQL fingerprints with the highest recorded cost
  • Compare request performance before and after a deployment
  • Inspect errors and complete traces through an AI agent
  • Enable function profiling for a URL prefix during an investigation

Key features

  • Local stdio and hosted HTTP MCP modes
  • Read-only site, page, SQL, error, trace, comparison, and alert tools
  • Per-component timing breakdowns for sampled requests
  • Optional URL-prefix function profiling
  • Console-token scoping for cloud sites
  • Local collector access without an account

Tools10

What Phpray lets your agent do. Expand a tool for its parameters.

Verified live~1.0k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

14/14 checks healthy over the last 62d

What it can do

From the 10 tools this server returned when we ran it.

Handles credentials · 2Makes network requests · 2Read-only tools · 10

Observed 2026-10-20 in an isolated sandbox. A description of reach, not a security audit.

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

Last commit2mo agoMost recent push to the default branch.
Tools exposed10Callable tools this server registers over MCP.
Directory activity1 viewsConfig copies, upvotes, and views on AllMCPs.

How Phpray works

What the phpray MCP server does

The phpray MCP server connects an MCP-compatible agent to PHPRay performance data. PHPRay records PHP request timing, CPU and memory use, SQL activity, outbound HTTP calls, errors, and N+1 patterns. The MCP interface lets an agent query that data to investigate which pages are slow, which SQL fingerprints consume time, which components contribute to a request, and when performance changed.

The server supports two data sources. Cloud mode reads sites available to a PHPRay console token. Local mode reads the collector on the same machine and does not require an account. A public HTTP endpoint provides read-only demo data from a recorded WooCommerce site, so the workflow can be tested without installing PHPRay or supplying credentials.

How it works

The phpray MCP server is available as a streamable HTTP endpoint or as a local binary using stdio. For HTTP access, an agent connects to https://phpray.dev/mcp; authenticated requests include a console token in an Authorization header. The local binary can be installed for Linux or macOS on amd64 or arm64 and started by the MCP client.

Most operations are read-only. The available tools cover site listings, aggregate overviews, slow pages, slow SQL, component breakdowns, errors, trace searches, complete individual traces, before-and-after comparisons, and alerts. An additional phpray_profile_url tool enables per-function profiling for a URL prefix. That operation changes profiling state and is not exposed by the unauthenticated public demo.

Setup and configuration

For the hosted demo, add the HTTP endpoint to an MCP client. The demo needs no token but only exposes ten read-only tools. To inspect your own cloud sites, provide the console token when configuring the HTTP connection.

For local use, download the platform-specific phpray-mcp binary, make it executable, and register it with the client as a stdio server. Running it without a token selects the collector on the local machine. Supplying PHPRAY_TOKEN scopes cloud access to the sites allowed by that console token.

The MCP server is useful only when PHPRay data is available at the selected source. Installing the MCP binary alone does not create request traces; a local deployment needs the PHPRay collector and PHP tracing setup on the machine being inspected.

Tools and capabilities

The phpray MCP server supports investigation workflows such as:

  • Listing monitored sites and reviewing aggregate performance.
  • Finding slow pages and expensive SQL fingerprints.
  • Examining plugin or component timing for sampled detailed requests.
  • Reviewing errors and full request traces.
  • Comparing performance before and after a change.
  • Reading configured alerts.
  • Enabling function-level profiling for a URL prefix when authenticated or running locally.

PHPRay records every request, while detailed per-function profiling is sampled by default. That distinction matters when an agent explains a single failing request versus a broader component-level pattern.

Limitations and notes

The unauthenticated HTTP demo uses fixed, read-only demo data and does not expose the profiling-state tool. Cloud results depend on the sites permitted by the supplied console token. Local mode is limited to the collector accessible from the machine where the binary runs.

The project states that its repository code is Apache-2.0 licensed. The hosted PHPRay Cloud console is a separate paid, closed-code service; the local extension, collector, CLI, dashboard, panel plugins, and MCP binary are described as open source in the repository material.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Phpray

phpray is an MCP server that connects AI agents to PHPRay PHP request traces from a local collector or hosted console. Its main tools list sites, inspect overviews, find slow pages and SQL, review component timing, errors and traces, compare periods, read alerts, and enable URL-prefix profiling when authorized.

Install it by downloading the platform-specific phpray-mcp binary, making it executable, and registering it with an MCP client over stdio. Alternatively, connect the client to https://phpray.dev/mcp for the read-only demo, which requires no local installation or account.

Connect using a PHPRay console token in cloud mode, or run the binary locally without a token to read the collector on that machine. Cloud access is limited to the sites allowed by the supplied token.

Yes, phpray works without an account in two cases: the hosted endpoint provides read-only demo data, and local stdio mode reads a same-machine collector without requiring an account. Your own hosted sites require a console token.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewPhpray AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/phpray?style=directory)](https://allmcps.com/mcp/phpray)
HTML Embed
<a href="https://allmcps.com/mcp/phpray"><img src="https://allmcps.com/api/badge/phpray?style=directory" alt="Phpray on AllMCPs" /></a>