# mcpwatch [Health: Active]

**Category:** 💰 Finance & Fintech  
**Repository:** https://github.com/Sreelal727/mcpwatch  
**GitHub Stars:** 0  
**npm Downloads (last month):** 319  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/mcpwatch-2

## Description
Records MCP tool calls and itemises the token cost each server adds to your context.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "mcpwatch": {
    "command": "npx",
    "args": ["-y","@sreelal727/mcpwatch"]
  }
}
```

## Documentation

## 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.

_Full upstream README: https://allmcps.com/mcp/mcpwatch-2/readme_

