プロトタイプ · プレビュー版:公式レジストリのすべてのサーバーを掲載し、30分ごとに同期しています。Google でログインするとレビューを書けます。プロトタイプ · 30分ごとに更新
PopNx MCPAIを使う人のためのMCPサーバー · やさしい言葉で解説

MCP Agent Trace Inspector

作者:dbsectrainerバージョン 1.0.1i★ 0iパソコンで動く
レジストリ名io.github.dbsectrainer/mcp-agent-trace-inspector

インストール方法

What it does

Step-by-step observability for MCP agent workflows

  • Connects パソコンで動く
  • Account or key No key needed
  • Category 開発者ツール

インストール

使っているAIアプリを選んで、設定をコピーしてください。

チェック 3/3 合格 · あなたのパソコンで動きます · ✓ コマンド確認済み 2026年11月14日

まず:どの AI を使っていますか?

使っているアプリを選ぶと、下に手順が表示されます。

Claude につなげますが、先に準備が必要です

先にパソコンへ Node.js を入れてください(1 回だけ) · パソコン版 Claude アプリ(Windows または Mac)のみ。Web やスマホでは使えません

AI にインストールしてもらう

このメッセージを Claude のチャットに貼り付けます。AI がパソコンを確認し、変更するファイルを伝え、毎回あなたの了承を待ちます。

このパソコンの Claude に MCP server MCP Agent Trace Inspector を入れてください。順番に:1) node -v で Node.js があるか確認。なければ https://nodejs.org/en/download から入れるよう私に伝え、自分では入れない。2) この設定だけを使う(PopNx MCP の確認済み):{ "mcpServers": { "agent-trace-inspector": { "command": "npx", "args": [ "-y", "mcp-agent-trace-inspector" ] } } } 3) 変更するファイルのフルパスか実行するコマンドを伝えて、私の了承を待つ。4) キーは不要。5) 了承した内容を実行し、MCP Agent Trace Inspector のツールが本当に表示されるか確認する。

このメッセージにあなたのキーは含まれません。キーが必要な場合は、AI がファイルやアプリの入力欄にご自身で貼るよう案内します。

  1. Node.js を入れる(まだなければ)

    もう入っていますか?先に確認 · ターミナルを開き、このコマンドを入力して Enter

    node -v
    • バージョン番号(例 v26.13.1)が出る = 入っています。この手順は飛ばせます
    • "command not found"(Windows では "is not recognized")が出る = まだ入っていないか、入れた直後でターミナルを開き直す必要があります
    ターミナルの開き方

    Mac:⌘ + Space を押し、Terminal と入力して Enter

    Windows:スタートメニューを開き、Windows PowerShell と入力して「開く」

    まだ入っていない場合: 公式ダウンロードページで LTS 版と、クリックで進むインストーラーを選びます:Mac は .pkg、Windows は .msi。ダブルクリックして最後まで進めるだけで、curl コマンドは不要です

    Node.js のダウンロードページを開く ↗

    入れ終わったらターミナルを閉じて開き直し、同じコマンドをもう一度実行します。バージョン番号が出れば完了です: node -v

    一度入れれば、Node.js を使うすべてのツールで使えます

  2. パソコン版 Claude アプリの設定ファイルを開く

    SettingsDeveloperEdit Config

  3. この設定を貼り付けて保存

    {
      "mcpServers": {
        "agent-trace-inspector": {
          "command": "npx",
          "args": [
            "-y",
            "mcp-agent-trace-inspector"
          ]
        }
      }
    }
  4. Claude を終了してもう一度開く

  5. 試してみる

    MCP Agent Trace Inspector を使って、私に何ができるか教えて、1 つやってみせて

    ✓ Claude が MCP Agent Trace Inspector を使っていると言うか、回答に MCP Agent Trace Inspector のツール名が出れば接続成功です

追加の設定 2 項目(入力しなくても使えます)

上のコマンドはこれらがなくても動きます。変えたいときだけ作者の説明に沿って追加してください。

  • MCP_API_KEY Optional API key for the Streamable HTTP transport (stdio does not require it).
  • MCP_JWT_SECRET Optional HMAC-SHA256 secret for Bearer JWTs on the Streamable HTTP transport.

説明は英語の原文のままです。

メニュー名は 2026年11月11日 に Anthropic のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります

ChatGPT はまだ MCP Agent Trace Inspector につなげません

MCP Agent Trace Inspector はパソコンに入れて使うものですが、ChatGPT は Web 上で動くサーバーにしかつなげません

代わりにできること

A · MCP Agent Trace Inspector につなげるアプリを使う

  • 先にパソコンへ Node.js を入れてください(1 回だけ) · パソコン版 Claude アプリ(Windows または Mac)のみ。Web やスマホでは使えません
  • 先にパソコンへ Node.js を入れてください(1 回だけ)
  • 先にパソコンへ Node.js を入れてください(1 回だけ)
  • 先にパソコンへ Node.js を入れてください(1 回だけ)

B · 開発者ツール の中で ChatGPT につなげる別のサーバー

同じカテゴリでよく使われているものから、キーなしでアドレスだけでつなげるものを選びました

Claude Code につなげますが、先に準備が必要です

先にパソコンへ Node.js を入れてください(1 回だけ)

AI にインストールしてもらう

このメッセージを Claude Code のチャットに貼り付けます。AI がパソコンを確認し、変更するファイルを伝え、毎回あなたの了承を待ちます。

このパソコンの Claude Code に MCP server MCP Agent Trace Inspector を入れてください。順番に:1) node -v で Node.js があるか確認。なければ https://nodejs.org/en/download から入れるよう私に伝え、自分では入れない。2) この設定だけを使う(PopNx MCP の確認済み):claude mcp add --scope user agent-trace-inspector -- npx -y mcp-agent-trace-inspector 3) 変更するファイルのフルパスか実行するコマンドを伝えて、私の了承を待つ。4) キーは不要。5) 了承した内容を実行し、MCP Agent Trace Inspector のツールが本当に表示されるか確認する。

このメッセージにあなたのキーは含まれません。キーが必要な場合は、AI がファイルやアプリの入力欄にご自身で貼るよう案内します。

  1. Node.js を入れる(まだなければ)

    もう入っていますか?先に確認 · ターミナルを開き、このコマンドを入力して Enter

    node -v
    • バージョン番号(例 v26.13.1)が出る = 入っています。この手順は飛ばせます
    • "command not found"(Windows では "is not recognized")が出る = まだ入っていないか、入れた直後でターミナルを開き直す必要があります
    ターミナルの開き方

    Mac:⌘ + Space を押し、Terminal と入力して Enter

    Windows:スタートメニューを開き、Windows PowerShell と入力して「開く」

    まだ入っていない場合: 公式ダウンロードページで LTS 版と、クリックで進むインストーラーを選びます:Mac は .pkg、Windows は .msi。ダブルクリックして最後まで進めるだけで、curl コマンドは不要です

    Node.js のダウンロードページを開く ↗

    入れ終わったらターミナルを閉じて開き直し、同じコマンドをもう一度実行します。バージョン番号が出れば完了です: node -v

    一度入れれば、Node.js を使うすべてのツールで使えます

  2. ターミナルを開く

    Mac:Command+スペースで Terminal と入力 · Windows:PowerShell を開く

  3. このコマンドを貼り付けて Enter

    claude mcp add --scope user agent-trace-inspector -- npx -y mcp-agent-trace-inspector
  4. Claude Code で /mcp と入力

    MCP Agent Trace Inspector が一覧にあり、接続済みと表示されれば OK です

  5. 試してみる

    MCP Agent Trace Inspector を使って、私に何ができるか教えて、1 つやってみせて

    ✓ Claude Code が MCP Agent Trace Inspector を使っていると言うか、回答に MCP Agent Trace Inspector のツール名が出れば接続成功です

追加の設定 2 項目(入力しなくても使えます)

上のコマンドはこれらがなくても動きます。変えたいときだけ作者の説明に沿って追加してください。

  • MCP_API_KEY Optional API key for the Streamable HTTP transport (stdio does not require it).
  • MCP_JWT_SECRET Optional HMAC-SHA256 secret for Bearer JWTs on the Streamable HTTP transport.

説明は英語の原文のままです。

メニュー名は 2026年11月11日 に Anthropic のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります

Cursor につなげますが、先に準備が必要です

先にパソコンへ Node.js を入れてください(1 回だけ)

AI にインストールしてもらう

このメッセージを Cursor のチャットに貼り付けます。AI がパソコンを確認し、変更するファイルを伝え、毎回あなたの了承を待ちます。

このパソコンの Cursor に MCP server MCP Agent Trace Inspector を入れてください。順番に:1) node -v で Node.js があるか確認。なければ https://nodejs.org/en/download から入れるよう私に伝え、自分では入れない。2) この設定だけを使う(PopNx MCP の確認済み):{ "mcpServers": { "agent-trace-inspector": { "command": "npx", "args": [ "-y", "mcp-agent-trace-inspector" ] } } } 3) 変更するファイルのフルパスか実行するコマンドを伝えて、私の了承を待つ。4) キーは不要。5) 了承した内容を実行し、MCP Agent Trace Inspector のツールが本当に表示されるか確認する。

このメッセージにあなたのキーは含まれません。キーが必要な場合は、AI がファイルやアプリの入力欄にご自身で貼るよう案内します。

  1. Node.js を入れる(まだなければ)

    もう入っていますか?先に確認 · ターミナルを開き、このコマンドを入力して Enter

    node -v
    • バージョン番号(例 v26.13.1)が出る = 入っています。この手順は飛ばせます
    • "command not found"(Windows では "is not recognized")が出る = まだ入っていないか、入れた直後でターミナルを開き直す必要があります
    ターミナルの開き方

    Mac:⌘ + Space を押し、Terminal と入力して Enter

    Windows:スタートメニューを開き、Windows PowerShell と入力して「開く」

    まだ入っていない場合: 公式ダウンロードページで LTS 版と、クリックで進むインストーラーを選びます:Mac は .pkg、Windows は .msi。ダブルクリックして最後まで進めるだけで、curl コマンドは不要です

    Node.js のダウンロードページを開く ↗

    入れ終わったらターミナルを閉じて開き直し、同じコマンドをもう一度実行します。バージョン番号が出れば完了です: node -v

    一度入れれば、Node.js を使うすべてのツールで使えます

  2. このボタンで Cursor を開く

    Cursor で開く

    Cursor がインストールの確認をするので Install を押します

  3. Cursor の AI チャットを Agent モードで開く

  4. 試してみる

    MCP Agent Trace Inspector を使って、私に何ができるか教えて、1 つやってみせて

    ✓ Cursor が MCP Agent Trace Inspector を使っていると言うか、回答に MCP Agent Trace Inspector のツール名が出れば接続成功です

追加の設定 2 項目(入力しなくても使えます)

上のコマンドはこれらがなくても動きます。変えたいときだけ作者の説明に沿って追加してください。

  • MCP_API_KEY Optional API key for the Streamable HTTP transport (stdio does not require it).
  • MCP_JWT_SECRET Optional HMAC-SHA256 secret for Bearer JWTs on the Streamable HTTP transport.

説明は英語の原文のままです。

メニュー名は 2026年11月11日 に Cursor のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります

VS Code につなげますが、先に準備が必要です

先にパソコンへ Node.js を入れてください(1 回だけ)

AI にインストールしてもらう

このメッセージを VS Code のチャットに貼り付けます。AI がパソコンを確認し、変更するファイルを伝え、毎回あなたの了承を待ちます。

このパソコンの VS Code に MCP server MCP Agent Trace Inspector を入れてください。順番に:1) node -v で Node.js があるか確認。なければ https://nodejs.org/en/download から入れるよう私に伝え、自分では入れない。2) この設定だけを使う(PopNx MCP の確認済み):{ "servers": { "agent-trace-inspector": { "type": "stdio", "command": "npx", "args": [ "-y", "mcp-agent-trace-inspector" ] } } } 3) 変更するファイルのフルパスか実行するコマンドを伝えて、私の了承を待つ。4) キーは不要。5) 了承した内容を実行し、MCP Agent Trace Inspector のツールが本当に表示されるか確認する。

このメッセージにあなたのキーは含まれません。キーが必要な場合は、AI がファイルやアプリの入力欄にご自身で貼るよう案内します。

  1. Node.js を入れる(まだなければ)

    もう入っていますか?先に確認 · ターミナルを開き、このコマンドを入力して Enter

    node -v
    • バージョン番号(例 v26.13.1)が出る = 入っています。この手順は飛ばせます
    • "command not found"(Windows では "is not recognized")が出る = まだ入っていないか、入れた直後でターミナルを開き直す必要があります
    ターミナルの開き方

    Mac:⌘ + Space を押し、Terminal と入力して Enter

    Windows:スタートメニューを開き、Windows PowerShell と入力して「開く」

    まだ入っていない場合: 公式ダウンロードページで LTS 版と、クリックで進むインストーラーを選びます:Mac は .pkg、Windows は .msi。ダブルクリックして最後まで進めるだけで、curl コマンドは不要です

    Node.js のダウンロードページを開く ↗

    入れ終わったらターミナルを閉じて開き直し、同じコマンドをもう一度実行します。バージョン番号が出れば完了です: node -v

    一度入れれば、Node.js を使うすべてのツールで使えます

  2. このボタンで VS Code を開く

    VS Code で開く

    VS Code がインストールの確認をするので Install を押します

  3. VS Code の AI チャットを Agent モードで開く

  4. 試してみる

    MCP Agent Trace Inspector を使って、私に何ができるか教えて、1 つやってみせて

    ✓ VS Code が MCP Agent Trace Inspector を使っていると言うか、回答に MCP Agent Trace Inspector のツール名が出れば接続成功です

追加の設定 2 項目(入力しなくても使えます)

上のコマンドはこれらがなくても動きます。変えたいときだけ作者の説明に沿って追加してください。

  • MCP_API_KEY Optional API key for the Streamable HTTP transport (stdio does not require it).
  • MCP_JWT_SECRET Optional HMAC-SHA256 secret for Bearer JWTs on the Streamable HTTP transport.

説明は英語の原文のままです。

メニュー名は 2026年11月11日 に VS Code のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります

Windsurf、Zed、Gemini CLI など MCP を使える他のアプリは追加方法がそれぞれ違います。アプリ一覧で確認してください

MCP を使えるアプリをすべて見る →

JSON 設定は下の「開発者向け」にあります

つまずいたら?MCP Agent Trace Inspector を使っている人に聞いてみましょう💬 ディスカッション →
開発者向け:ターミナルのコマンドと JSON 設定

パソコンにインストール

Claude Code

claude mcp add --scope user agent-trace-inspector -- npx -y mcp-agent-trace-inspector

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "agent-trace-inspector": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-agent-trace-inspector"
      ]
    }
  }
}

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "agent-trace-inspector": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-agent-trace-inspector"
      ]
    }
  }
}

VS Code (mcp.json)

{
  "servers": {
    "agent-trace-inspector": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "mcp-agent-trace-inspector"
      ]
    }
  }
}

自分で入力する値

  • MCP_API_KEY 秘密 env
    Optional API key for the Streamable HTTP transport (stdio does not require it).
  • MCP_JWT_SECRET 秘密 env
    Optional HMAC-SHA256 secret for Bearer JWTs on the Streamable HTTP transport.

説明は英語の原文のままです。

この設定は、作者のレジストリ登録情報から作成しています。READMEと違う場合は、READMEに従ってください。

ひと目でわかる

週あたりのダウンロードi
326/週
接続方法
パソコンで動く
最新バージョンi
1.0.1
レジストリ公開日i
2026年11月4日
コードの最終更新i
2026年11月9日
作者
dbsectrainer
パッケージ
npm: mcp-agent-trace-inspector
レジストリでの状態
有効

使えるアプリ

このサーバーのつなぎ方と、各アプリの公式ドキュメントに基づきます。2026年11月10日に確認。

パソコン上で動かせるアプリ

ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast

すべてのアプリと長所・短所 →

できること

パソコンで動くサーバーです。インストールすると、ツール一覧がAIアプリに表示されます。

基本チェックi

誰でも見られる情報をチェックしており、コードは読んでいません。当てはまらない項目は数に入れていません。 · 2026年11月15日にチェック

  • ✓ 合格

    作者とリポジトリが一致

    レジストリ名は、リポジトリを所有するGitHubアカウント dbsectrainer で確認済みです

  • ✓ 合格

    今もメンテナンスされている

    コードの最終更新:6 日前

  • ✓ 合格

    ライセンスがある

    MITを使用

  • – 対象外

    エンドポイントが応答する

    これはパソコンで動くため、インターネット上のエンドポイントはありません

  • – 対象外

    OAuthでサインイン

    パソコンで動き、代わりにローカルの設定を使います

  • … 未チェック

    ツールの説明に隠れた指示がない

    パソコンで動くサーバーです。ツール一覧を読み取れるのは、インターネット上のエンドポイントがある場合だけです

公開済みの脆弱性(OSV.dev)

まだ確認していません

確認していること → · JSON

作者の方へ:再確認の依頼・情報の誤りの報告

話し合い

質問、コツの共有、使えないことの報告ができます。「役に立った」の多い順です。

まだ投稿はありません。最初の質問や共有をどうぞ。

ここの投稿は利用者によるもので、PopNx チームのものではありません。

Google でログインして投稿

ユーザーレビュー

まだレビューはありません

Google でログインしてレビューを書く

開発者ツールのほかのサーバーとの比較i

  • このカテゴリのほかの5909件のうち0%よりスターが多い
  • このカテゴリのほかの5909件のうち69%より最近レジストリに公開
  • 基本チェックの結果が、このカテゴリのほかの5909件のうち100%と同じかそれ以上

レジストリでこのカテゴリにある有効なすべてのサーバーと比較しています。スターは、公開者がリポジトリの所有者である場合だけ数えます。

よくある質問

MCP Agent Trace Inspectorは安全ですか?

当てはまる基本チェック3項目のうち3項目に合格しました。コードは読んでいません。キーやトークンを追加する前に、サーバーがどんなアクセスを求めているかを確認し、必要な権限だけを持つキーを使ってください。

どんなキーやコードが必要ですか?

レジストリには必須のキーは載っていません。ただし、最初に使うときにサインインを求めるサーバーもあります。

パソコンで動きますか、それともクラウドですか?

あなたのパソコンで動きます。必要なときにAIアプリが起動し、データは作者のサーバーを通りません(サーバー自体がオンラインサービスを呼び出す場合を除きます)。

今もメンテナンスされていますか?

GitHubリポジトリの最終更新は6 日前、最新バージョン(1.0.1)がレジストリに届いたのは11 日前です。

どのアプリで使えますか?

Claude Desktop、Claude Code、Cursor、VS CodeなどのMCP対応アプリで使えます。パソコンにNode.jsも必要です。

代わりに使えるものは?

同じカテゴリには:GitDiagram, Appllama, Cloudflare MCP, Omnara, Repowise

似た働きのほかの候補

同じカテゴリでほかの作者のもの。コマンドは確認済み。公式を先に、次にスター順。

カードの見方:↓ 週あたりのダウンロードi★ GitHubスターi3つの柱:レビュー · チェック · 利用状況i更新=最新バージョンをレジストリに公開した日i

GitDiagram

Architecture diagrams, explanations and Mermaid source for public GitHub repositories.

作者:ahmedkhaleel2004広く使われている★ 1.9万2 か月前更新

クラウドで動く✓ 提供元 · gitdiagram.comPopNx チームが実際に試用

Appllama

Study screens, flows and paywalls from top-earning iOS apps, then build from what wins.

作者:Appllama広く使われている★ 51743 か月前更新

クラウドで動く✓ 提供元 · appllama.io

Cloudflare MCP

Cloudflare MCP servers

作者:cloudflare広く使われている★ 446614 か月前更新

クラウドで動く✓ 提供元 · mcp.cloudflare.comPopNx チームが実際に試用

Omnara

Deploy durable AI agents with Omnara, an open-source managed-agent platform.

作者:omnara-ai広く使われている★ 33952 か月前更新

クラウドで動く✓ 提供元 · omnara.com

Repowise

Codebase intelligence for AI coding agents: graph, git history, docs, decisions, code health.

作者:repowise-dev広く使われている↓ 6506/週★ 8138 リポジトリ全体のスター一昨日更新

パソコンでもクラウドでも✓ 提供元 · repowise.dev
  • GitDiagram — クラウドで動き、インストール不要 · キー不要
  • Appllama — クラウドで動き、インストール不要 · キー不要
  • Cloudflare MCP — クラウドで動き、インストール不要 · キー不要 · Claude のディレクトリに掲載
  • Omnara — クラウドで動き、インストール不要 · キー不要
  • Repowise — クラウドでもパソコンにインストールでも使える · キー不要

作者のREADME

READMEを開く

作者のリポジトリから書かれたとおりにコピーしたものです。PopNx MCPは内容を確認・推奨していません。HTML、画像、スクリプトは取り除いています。リンクはこのサイトの外へ移動します。

MCP Agent Trace Inspector

Local-first, MCP-native observability for agent workflows. Every tool call, prompt transformation, latency, token estimate, and cost estimate is recorded in a local SQLite database — no cloud account, no API key, and no traces leaving your machine.

Built specifically for MCP rather than bolted onto a generic LLM proxy.

Tools · Configuration · HTTP transport · Verification · Known limitations · Contributing

Overview

mcp-agent-trace-inspector is an MCP server. Agents call its tools to start a trace, record each step they take, and finish the trace. Humans then inspect summaries, compare runs, export a self-contained HTML dashboard, export OTLP/JSON spans, or stream the compliance audit log.

Agent / MCP client

│ trace_start → trace_step → trace_end ▼ MCP Agent Trace Inspector ├── SQLite (~/.mcp/traces.db) ├── JSONL audit log (~/.mcp/trace-inspector-audit.jsonl) └── tools: summaries, diffs, HTML, OTLP/JSON, retention, alerts

Key features

  • Tool-call tracing — inputs, outputs, latency, caller-supplied or automatic token estimates for every step.
  • Persistent local storage — SQLite via Node's built-in node:sqlite; traces survive restarts and never require a service.
  • Self-contained HTML dashboard — error highlighting, step timeline, latency waterfall, responsive layout, and expandable input/output JSON.
  • Cost estimation — offline cl100k_base tokenizer plus a configurable pricing table; no API calls and no billing-account data.
  • Trace comparison — aggregate and step-by-step diffs between two runs.
  • Reasoning-chain extraction — finds reasoning/thinking/planning steps.
  • OTLP/JSON export — standard resourceSpans → scopeSpans → spans documents.
  • Compliance audit log — append-only JSONL of recorded steps, exportable as JSON or CSV with date filtering.
  • Alerts — persisted latency, error-rate, and cost thresholds evaluated when a trace ends; optional Slack or generic webhook delivery.
  • Retention controls — startup purge or explicit archive/delete policy.
  • Two transports — stdio (default) and stateless Streamable HTTP with optional API-key/JWT authentication and rate limiting.

Technology stack

LayerChoice
RuntimeNode.js ≥ 22.13 (ESM, built-in node:sqlite)
LanguageTypeScript 5, strict mode
Protocol@modelcontextprotocol/sdk (tools, resources, prompts)
HTTPExpress 5 + MCP Streamable HTTP transport
StorageSQLite through node:sqlite
Tokenizationgpt-tokenizer (cl100k_base)
CLIyargs
TestsVitest + V8 coverage
Lint / formattingESLint + Prettier
CIGitHub Actions (install, audit, lint, format, test, build)

Requirements

  • Node.js 22.13.0 or newer. node:sqlite first became available in Node 22.5.0 behind --experimental-sqlite; it is unflagged from 22.13.0. This project does not pass the flag.
  • npm.
  • No database server, API key, or external account is required for core tracing.

Quick start (MCP client)

Add the server to your MCP client configuration:

{

"mcpServers": { "trace-inspector": { "command": "npx", "args": ["-y", "mcp-agent-trace-inspector@latest"] } } }

Use a project-specific database:

{

"mcpServers": { "trace-inspector": { "command": "npx", "args": [ "-y", "mcp-agent-trace-inspector@latest", "--db=~/traces/my-project.db" ] } } }

Then ask your agent to trace its own work:

Start a trace named "test-run" with trace_start.

Record a trace_step for each tool you call, including that tool's input and output. Call trace_end when you are done, then call get_trace_summary for the trace.

The summary contains the step count, estimated token total, total recorded latency, wall-clock duration, cost estimate, and reasoning-chain detection. Tracing is explicit: the inspector records steps when the agent calls trace_step; it does not intercept other MCP servers automatically.

From source
npm ci

npm run build node dist/index.js --db=~/.mcp/traces.db

Development mode runs TypeScript directly and logs MCP protocol messages on stderr:

npm run dev -- --db=/tmp/traces.db

Streamable HTTP transport

HTTP mode is useful for a local team instance or a container. It is stateless: every POST gets a fresh MCP server and transport, there is no Mcp-Session-Id, and the endpoint does not offer a server-initiated SSE stream. Send every JSON-RPC message as its own POST /mcp request.

node dist/index.js --db=~/.mcp/traces.db --http-port=3000 --http-host=127.0.0.1

stderr: MCP Agent Trace Inspector HTTP server listening on http://127.0.0.1:3000/mcp

Initialize the endpoint:

curl -s http://127.0.0.1:3000/mcp \

-H 'Content-Type: application/json' \ -H 'Accept: application/json, text/event-stream' \ -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"curl","version":"1"}}}'

The response is an SSE frame. Call a tool:

curl -s http://127.0.0.1:3000/mcp \

-H 'Content-Type: application/json' \ -H 'Accept: application/json, text/event-stream' \ -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"list_traces","arguments":{}}}'

BehaviorValue
EndpointPOST /mcp
GET / DELETE /mcp405 with Allow: POST
Default bind address127.0.0.1 (loopback only)
Request body limit10 MB
Rate limit60 requests / 60 s per validated API key or client IP
Auth (optional)X-API-Key and/or Authorization: Bearer
DNS-rebinding guardHost header must be localhost/127.0.0.1 when bound to loopback
HTTP authentication

Set one or both environment variables before starting the server:

MCP_API_KEY=change-me \

MCP_JWT_SECRET=change-me-too \ node dist/index.js --http-port=3000 --http-host=127.0.0.1

  • If MCP_API_KEY is set, every HTTP request must send X-API-Key: .
  • If MCP_JWT_SECRET is set, every HTTP request must send Authorization: Bearer ; exp and nbf claims are checked.
  • If both are set, both are required.
  • The stdio transport ignores both variables.

--http-host=0.0.0.0 is allowed but the server warns. Put TLS and an authenticating reverse proxy in front of any non-loopback deployment; do not expose the raw endpoint to an untrusted network.

When the server is bound to loopback behind a reverse proxy, the proxy must rewrite the Host header to 127.0.0.1: . The loopback DNS-rebinding guard rejects other Host values with 403 by design.

Configuration

CLI flags
FlagDefaultDescription
--db, --db-path~/.mcp/traces.dbSQLite database file. ~ is expanded. :memory: is supported for tests.
--retention-days0On startup, delete traces older than N days. 0 disables.
--pricing-tablebuilt-in tableJSON file of { "model": { "input": number, "output": number } }. Merged over built-in rates.
--no-token-countfalseDisable automatic token counting (token_count values become null).
--http-portunsetStart in HTTP mode on this port (1–65535) instead of stdio.
--http-host127.0.0.1HTTP bind address. Prefer loopback unless authentication and TLS are used.
--help—Show usage.
--version—Print the package version.
Environment variables

The server does not load .env files automatically. Export variables in your shell or configure them in your MCP client.

VariableDefaultPurpose
MCP_API_KEYunsetHTTP only: require X-API-Key on every request.
MCP_JWT_SECRETunsetHTTP only: require a valid HS256 Bearer JWT.
MCP_AUDIT_LOG_PATH~/.mcp/trace-inspector-audit.jsonlCompliance audit log path. Created owner-readable/writable (0600).
MCP_SLACK_WEBHOOKunsetSlack incoming-webhook URL used when an alert fires.
MCP_ALERT_WEBHOOKunsetGeneric JSON webhook URL used when an alert fires.

See .env.example for a copy-paste template. Never commit real secrets or database files; both are ignored by .gitignore.

Tools

The server exposes 13 tools. Tool annotations mark state-changing tools (readOnlyHint: false) and destructive retention (destructiveHint: true).

Trace lifecycle
ToolPurpose
trace_startBegin a trace. Returns a trace_id. Pass "auto" or an empty string for a generated name.
trace_stepRecord one step for a running trace. Steps are rejected after trace_end.
trace_endMark a trace completed, evaluate alert rules, and return fired alerts. Repeated calls are idempotent.

trace_step requires trace_id, tool_name, input (object), and output (object). token_count must be a non-negative integer; latency_ms must be a finite, non-negative number. Caller-supplied token counts are used as-is.

Inspection
ToolPurpose
list_tracesList traces, newest first. Optional positive-integer limit.
get_trace_summaryStep/token/latency totals, duration, cost estimate, reasoning detection.

| compare_traces | Diff two traces: aggregates, tool coverage, and per-position steps.

冒頭だけを表示しています。続きはリポジトリで読めます