Skip to main content
Glama
szepeviktor

spx-mcp-server

by szepeviktor

SPX MCP サーバー

php-spx レポートのための Web 専用 MCP サーバー。組み込みの SPX Web エンドポイントを呼び出し、完全なレポートを解析して、生のイベントストリームではなく LLM 向けのサイズに収めた JSON サマリーを返します。

前提条件

  • Node.js 20 以降

  • HTTP プロファイリング用に spx PHP 拡張機能が有効なアプリケーション

  • SPX HTTP アクセスが設定されていること。例:

spx.http_enabled=1
spx.http_key="dev"
spx.http_ip_whitelist="127.0.0.1"

Related MCP server: otel-mcp

ビルド

npm install
npm run build

ビルドされた stdio エントリポイントは次のとおりです:

/path/to/spx-mcp-server/dist/index.js

これらの環境変数をエージェント設定で設定するか、ツール呼び出しごとに渡します:

SPX_BASE_URL=http://localhost
SPX_KEY=dev

Codex CLI にインストール

~/.codex/config.toml を編集して次を追加します:

[mcp_servers.spx]
command = "node"
args = ["/path/to/spx-mcp-server/dist/index.js"]
env = { SPX_BASE_URL = "http://localhost", SPX_KEY = "dev" }

ファイル編集後、Codex CLI を再起動します。

Claude Code にインストール

ローカルプロジェクト設定:

claude mcp add --transport stdio --scope project \
  --env SPX_BASE_URL=http://localhost \
  --env SPX_KEY=dev \
  spx -- node /path/to/spx-mcp-server/dist/index.js

ユーザー全体の設定:

claude mcp add --transport stdio --scope user \
  --env SPX_BASE_URL=http://localhost \
  --env SPX_KEY=dev \
  spx -- node /path/to/spx-mcp-server/dist/index.js

確認:

claude mcp list
claude mcp get spx

同等の .mcp.json プロジェクト設定:

{
  "mcpServers": {
    "spx": {
      "type": "stdio",
      "command": "node",
      "args": ["/path/to/spx-mcp-server/dist/index.js"],
      "env": {
        "SPX_BASE_URL": "http://localhost",
        "SPX_KEY": "dev"
      }
    }
  }
}

Cline にインストール

Cline は MCP をサポートする人気のオープンソース VS Code エージェントです。

Cline CLI の場合、次を実行します:

cline mcp

次に、ローカル stdio サーバーを次のように追加します:

name: spx
command: node
args: /path/to/spx-mcp-server/dist/index.js
env:
  SPX_BASE_URL=http://localhost
  SPX_KEY=dev

VS Code 拡張機能の場合、Cline MCP Servers 設定を開き、次の JSON を追加します:

{
  "mcpServers": {
    "spx": {
      "command": "node",
      "args": ["/path/to/spx-mcp-server/dist/index.js"],
      "env": {
        "SPX_BASE_URL": "http://localhost",
        "SPX_KEY": "dev"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}

OpenClaw にインストール

OpenClaw は、mcp.servers の下で送信 MCP サーバーを管理できるオープンソースのパーソナルエージェント/ゲートウェイです。

~/.openclaw/openclaw.json または OPENCLAW_CONFIG_PATH が指すファイルを編集します:

{
  mcp: {
    servers: {
      spx: {
        command: "node",
        args: ["/path/to/spx-mcp-server/dist/index.js"],
        env: {
          SPX_BASE_URL: "http://localhost",
          SPX_KEY: "dev",
        },
      },
    },
  },
}

保存された設定を確認します:

openclaw mcp status --verbose
openclaw mcp probe spx

基本的なワークフロー

  1. プロファイリングしたい Web URL に対して profile_url を呼び出します。

  2. list_reports を呼び出します。

  3. 最新の一致するレポートを選択します。

  4. analyze_report または get_hot_paths を呼び出します。

ツール

  • profile_url: SPX クッキーを有効にして 1 つの HTTP リクエストを送信します。

  • list_reports: ?SPX_UI_URI=/data/reports/metadata を読み取ります。

  • get_report_metadata: 1 つのレポートメタデータ JSON を読み取ります。

  • analyze_report: ?SPX_UI_URI=/data/reports/get/<key> をダウンロードして解析します。

  • get_hot_paths: 最もコストのかかる呼び出しパスを返します。

  • get_function_profile: 1 つの関数の集計と呼び出し元/呼び出し先を返します。

  • get_raw_events: 生イベントのページングされたデバッグ用スライスを返します。

アナライザーはデフォルトで出力を制限します。大規模な SPX レポートには数百万のイベントが含まれる可能性があるため、完全な生レポート出力は通常のツール結果として意図的に公開されていません。get_raw_events は呼び出しあたり最大 1000 イベントに制限されており、パーサーやアナライザーの動作のデバッグを目的としています。

リファレンス

Install Server
A
license - permissive license
B
quality
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    -
    quality
    B
    maintenance
    An MCP server that converts Windows WPR .etl performance traces into structured JSON summaries and flamegraph-ready data for LLM analysis. It bridges Windows Performance Analyzer automation with LLM reasoning capabilities for performance troubleshooting.
    1
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    MCP server that gives AI agents access to your application's OpenTelemetry traces for querying, analysis, and debugging.
    5
    26
    2
    MIT
  • A
    license
    -
    quality
    D
    maintenance
    Remote MCP server that normalizes OpenTelemetry GenAI spans by mapping fields, provider attributes, and missing attributes, and exports dashboard schemas.
    MIT

View all related MCP servers

Related MCP Connectors

  • Remote MCP for GenAI span mapping, provider normalization, dashboard schemas, and receipts.

  • MCP server providing access to the Scorecard API to evaluate and optimize LLM systems.

  • AI Reasoning Cache & Consensus Layer with 11 MCP tools via Streamable HTTP.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/szepeviktor/spx-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server