Mcpwatch logo

Mcpwatch

Records MCP traffic locally, measures token costs, diagnoses failures, and exposes usage data to agents through MCP tools.

Install Mcpwatch

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

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "mcpwatch-2": {
      "command": "npx",
      "args": [
        "-y",
        "@sreelal727/mcpwatch"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Claude Code command
claude mcp add --transport stdio mcpwatch-2 -- npx -y @sreelal727/mcpwatch

Run in your terminal. Add --scope project to share it with your team through .mcp.json.

We couldn’t confirm it starts correctly

We ran the install command but it didn't respond within our test window — this can mean a slow first-time install rather than a real problem.

npx -y @sreelal727/mcpwatch

Process exited before answering initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

The mcpwatch MCP server records traffic between coding agents and configured MCP servers, then reports token usage, latency, failures, and repeated calls. It can audit tool-definition costs without instrumentation, or proxy and record live stdio and Streamable HTTP traffic in a local SQLite store. Its MCP tools let an agent inspect costs, failures, health, call history, and exact request or response payloads. Reach for it when context usage is unexplained, an MCP server is unreliable, or you need evidence before changing an MCP configuration.

Use cases

  • Measure tool-definition tokens before changing MCP configuration
  • Find unused servers that inflate every session
  • Diagnose failed, slow, or protocol-corrupting MCP calls
  • Inspect repeated calls and oversized responses
  • Export a recorded session for bug investigation

Key features

  • Audits MCP tool-definition token costs
  • Records stdio and Streamable HTTP traffic
  • Exposes cost, failure, health, search, and call-detail MCP tools
  • Provides JSON output, live tailing, and a local dashboard
  • Redacts common secrets in stored records
  • Exports sessions as self-contained HTML reports

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 61d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 4d ago via OSV.dev · @sreelal727/mcpwatch (npm)

Adoption & maintenance

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

npm downloads319Package downloads in the last 30 days.
Last commit3mo agoMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window — often a slow first install.

How Mcpwatch works

What the mcpwatch MCP server does

The mcpwatch MCP server helps measure the context cost and runtime behavior of other MCP servers. It records the requests and responses exchanged between a coding agent and its MCP servers, including duration and status. The resulting data shows both the fixed cost of loading tool definitions and the variable cost of tool responses and repeated calls.

Use audit for a one-time estimate of configured servers. It starts each configured server, requests its tool list, measures the result, and exits without requiring a client restart. Use init to add recording to the local setup, then run the client normally before inspecting results with cost or doctor.

How it works

For stdio servers, the execution path places mcpwatch between the agent and the target server. It forwards the protocol traffic while writing an account of calls to SQLite under ~/.mcpwatch. The recorded data includes paired requests and responses, elapsed time, status, and protocol or tool errors. Lines written incorrectly to stdout are also captured and reported because they can corrupt MCP communication.

Streamable HTTP servers can be handled with mcpwatch http <url>, which acts as a recording reverse proxy and supports SSE responses. A local dashboard is available through mcpwatch ui; tail provides a live one-line stream of calls. Commands support --json, which is useful for shell-based agents, hooks, or CI workflows.

Setup and configuration

The package requires Node.js 22 or newer. Run commands without a global installation through npx @sreelal727/mcpwatch <command>, or install it globally with npm i -g @sreelal727/mcpwatch and use mcpwatch <command>.

A typical recording workflow is:

  1. Run mcpwatch init.
  2. Restart the coding client so recording and the mcpwatch MCP server are loaded.
  3. Work normally for a period of time.
  4. Run mcpwatch cost or mcpwatch doctor.

Stored copies redact API keys, bearer tokens, JWTs, and password-like JSON fields by default. --no-redact disables this behavior, while MCPWATCH_REDACT_EXTRA adds extra redaction patterns. gc manages retention, and deleting ~/.mcpwatch removes the local data. The project states that it does not use an account, SaaS service, or telemetry.

Tools and capabilities

After initialization, the mcpwatch MCP server exposes these agent-facing tools:

  • token_costs reports the setup’s token costs and possible removals.
  • recent_failures finds recent errors, arguments, and server messages.
  • server_health checks crashes, latency, hangs, and protocol corruption.
  • find_calls searches prior calls and arguments.
  • get_call returns the exact recorded request and response JSON for a call.

The command-line interface can also estimate per-session tool-definition costs, project usage from observed startup rates, rank unused or oversized server activity, stream calls, inspect a local dashboard, and export a session as a self-contained HTML report.

Limitations and notes

Cost projections depend on recorded usage and are not shown until enough history exists to support a projection. The initial audit measures tool definitions, but it does not replace recording when response sizes, retries, repeated calls, or failures need analysis.

Redaction applies to the stored copy rather than the live stream. Disabling it may leave sensitive values in local records. The dashboard listens on 127.0.0.1, and the project stores its data locally under the user’s home directory.

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 Mcpwatch

mcpwatch is an MCP server that connects to an agent’s configured MCP servers through local stdio recording or an HTTP proxy. Its main tools are token_costs, recent_failures, server_health, find_calls, and get_call, which report token costs, errors, health, call history, and exact request or response data.

Run `npx @sreelal727/mcpwatch init`, then restart your coding client. For a global command, install Node.js 22 or newer and run `npm i -g @sreelal727/mcpwatch`; afterward, use `mcpwatch init`.

It measures the bytes exchanged by configured MCP servers and converts tool definitions and recorded traffic into token-cost reports. `audit` measures initial tool lists without instrumentation, while `cost` uses recorded sessions to analyze definitions, responses, repeats, and failures.

Yes, the README names Cursor as a supported coding client. Run `init`, restart Cursor, record normal work, and then inspect the results with `cost`, `doctor`, the local UI, or the agent-facing MCP tools.

Run `mcpwatch doctor` for a recent error summary, or use the `recent_failures` MCP tool from your agent. `get_call` can show the exact recorded request and response JSON for an individual call, including the server’s error details.

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 PreviewMcpwatch AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/mcpwatch-2?style=directory)](https://allmcps.com/mcp/mcpwatch-2)
HTML Embed
<a href="https://allmcps.com/mcp/mcpwatch-2"><img src="https://allmcps.com/api/badge/mcpwatch-2?style=directory" alt="Mcpwatch on AllMCPs" /></a>