Get the FREE Ultimate OpenClaw Setup Guide →

mcp

MCP Server to make Coding Assistant able to access errors and performance data directly from your monitoring tool.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio inspector-apm-mcp-server php absolute-path-to-your-app-vendor-folder/inspector-apm/mcp-server/server.php \
  --env INSPECTOR_APP_ID="xxxx" \
  --env INSPECTOR_API_KEY="xxxx"

How to use

Inspector MCP Server for PHP provides AI-assisted production debugging capabilities. It exposes tools that let a coding agent fetch recent production errors with rich context, perform detailed error analysis that includes code-level context, identify the ten worst-performing transactions in a given window, and view transaction timelines with per-task durations. This enables AI agents to understand recurring issues, prioritize fixes, and receive actionable guidance for root-cause analysis and resolution strategies. You can connect standard MCP clients (such as Claude Code or other agentic IDE integrations) to this server using the STDIO transport configuration described in the installation section.

Once connected, you can invoke the available tools to: get_production_errors for a broad view of recent issues with AI-powered recommendations; get_error_analysis to drill into a specific error group using a group hash and obtain code-contextual guidance; worst_performing_transactions to surface the top time-consuming transactions; and transaction_details to inspect a transaction’s timeline and each task’s duration. The combination of production context, code-level insights, and automated recommendations helps developers and AI agents diagnose problems faster and implement fixes with greater confidence.

How to install

Prerequisites:

  • PHP installed on your system with access to your project/vendor directory
  • Composer installed for PHP package management

Installation steps:

  1. Install the MCP server as a development dependency in your PHP project:

composer require inspector-apm/mcp-server --dev

  1. Create or prepare the MCP client configuration that points to your local server, following the example in the README. You will need:
  • Absolute path to your project’s vendor folder
  • Your Inspector API key
  • Your Inspector App ID
  1. Run the MCP server via the STDIO transport configuration defined in your client config. Example command (adjust the path to server.php):

php absolute-path-to-your-app-vendor-folder/inspector-apm/mcp-server/server.php

  1. Connect your MCP client (Claude Code, etc.) using the appropriate command provided in your client docs, pointing to the above PHP server path and including your environment variables.

Additional notes

Environment and configuration tips:

  • Ensure the INSPECTOR_API_KEY and INSPECTOR_APP_ID values are kept secure and are the ones generated from your Inspector dashboard.
  • The server.php script should be executable by PHP in your environment; if not, ensure proper permissions.
  • If you relocate the vendor folder, update the absolute-path-to-your-app-vendor-folder path in your MCP client config accordingly.
  • For best results, keep your PHP application’s production data accessible to the MCP server (production logs/errors) and confirm network access if using remote setups.
  • Common issues include mismatched PHP versions, incorrect vendor path, or missing API credentials; verify each step against the configuration example in the README.

Related MCP Servers

Sponsor this space

Reach thousands of developers