# context-doctor (npm · context-doctor)

Cut LLM agent token use in Claude Code, Cursor, Codex, Gemini CLI. Local, no API key. gAI Ventures.

- Trust score: 95/100 (high trust)
- Change this week: +15
- Registry status: active
- Liveness: live
- Owner verified: no
- Last scored: 2026-11-05

## Components

- npm · `context-doctor`: 95/100 (this document), [markdown](https://verifymcp.io/servers/kushalp1-context-doctor/context-doctor.md), [page](https://verifymcp.io/servers/kushalp1-context-doctor/context-doctor)

## Channel facts

- Registry: `npm`
- Package: `context-doctor`
- Version: `0.43.0`
- Transport: `stdio`

## Trust breakdown

How this component scores in each security and reliability category. Every signal is checked automatically from public evidence about the published package, including repeated runs of it in an isolated sandbox, and we only credit what we can confirm. Scores are 0–100 per category. Scoring method: https://verifymcp.io/docs/scoring (what has changed: https://verifymcp.io/docs/scoring/changelog)

Scored 2026-11-05.

- **Supply Chain Security**: 100/100
  - No malware found by supply-chain analysis.
  - No known CVEs affecting this package version or its production dependencies.
  - No install/post-install scripts declared.
  - No production dependencies, so there is no dependency health to assess.
- **Provenance & Transparency**: 97/100
  - Source repository is publicly reachable at the declared URL.
  - Cryptographically verified build provenance (signed, bound to KushalP1/context-doctor).
  - Clear OSI-approved license (MIT).
  - Actively maintained (last published 0 days ago).
  - Disclosure check failed: no security disclosure policy was found in the source repository.
- **Schema Quality & AI Usability**: 77/100
  - 100% of prompts and resources have a non-trivial description (not blank, and not just the item's name).
  - AI-judged instruction clarity (good).
  - Context-footprint check failed: tool/resource definitions use about 869 tokens (~124/item across 7 items; 6 tools + 1 resources), over budget; trim descriptions and params.
  - Usage-examples check failed: none of the tools include examples.
- **Stability & Change Management**: 100/100
  - No destabilizing schema changes in the last 30 days.
- **Tool Coverage**: 91/100
  - 100% of tools have a non-trivial description (not blank, and not just the tool's name).
  - 74% of tool parameters carry a description.
- **Tool Safety**: 100/100
  - No prompt-injection markers were found in the server instructions, tool names or descriptions we captured.
  - We read all 6 captured tool definition(s), and no name or description among them implies an irreversible operation.
  - An AI judge read all 8 captured unit(s) of tool text and found none that tries to manipulate the model reading it.
- **Capabilities**: 100/100
  - Implements a supported MCP spec version (2025-11-25); the latest is 2026-07-28.

## Install

### How do I install the context-doctor MCP server?

context-doctor runs locally as an npm package, launched with npx -y context-doctor. Ready-made configuration for Claude, Cursor, VS Code, Codex and 5 more is on this page, copied from each client's own documentation.

### Claude

```bash
claude mcp add kushalp1-context-doctor -- npx -y context-doctor
```

### Cursor

```json
{
  "mcpServers": {
    "kushalp1-context-doctor": {
      "command": "npx",
      "args": [
        "-y",
        "context-doctor"
      ]
    }
  }
}
```

### VS Code

```json
{
  "servers": {
    "kushalp1-context-doctor": {
      "command": "npx",
      "args": [
        "-y",
        "context-doctor"
      ]
    }
  }
}
```

### Codex

```bash
codex mcp add kushalp1-context-doctor -- npx -y context-doctor
```

### opencode

```json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "kushalp1-context-doctor": {
      "type": "local",
      "command": [
        "npx",
        "-y",
        "context-doctor"
      ],
      "enabled": true
    }
  }
}
```

### OpenClaw

```bash
openclaw mcp add kushalp1-context-doctor --command npx --arg -y --arg context-doctor
```

### Hermes

```yaml
mcp_servers:
  kushalp1-context-doctor:
    command: "npx"
    args: ["-y", "context-doctor"]
```

### Netclaw

```json
{
  "McpServers": {
    "kushalp1-context-doctor": {
      "Transport": "stdio",
      "Command": "npx",
      "Arguments": [
        "-y",
        "context-doctor"
      ]
    }
  }
}
```

### Vellum

```bash
assistant mcp add kushalp1-context-doctor -t stdio -c npx -a -y context-doctor
```

### Other

```json
{
  "mcpServers": {
    "kushalp1-context-doctor": {
      "command": "npx",
      "args": [
        "-y",
        "context-doctor"
      ]
    }
  }
}
```

## Changelog

Every change recorded for this component, newest first. Days that predate change tracking, or that we cannot explain, say so: "we were watching and nothing happened" and "we were not watching" are different claims.

### 2026-11-05 (score 95, +15)

- [security improvement] Malware scan: unverified → pass

### 2026-11-04 (score 80, −15)

- [security regression] Malware scan: pass → unverified
- [functional] Package version: 0.42.0 → 0.43.0

### 2026-11-03 (score 95, +15)

- [security improvement] Malware scan: unverified → pass
- [functional] Package version: 0.41.0 → 0.42.0

### 2026-11-02 (score 80, −15)

- [security regression] Malware scan: pass → unverified
- [functional] Package version: 0.40.0 → 0.41.0

### 2026-10-30 (score 95, +15)

- [security improvement] Malware scan: unverified → pass
- [functional] Package version: 0.39.0 → 0.40.0

### 2026-10-29 (score 80, −15)

- [security regression] Malware scan: pass → unverified
- [functional] Package version: 0.38.0 → 0.39.0

### 2026-10-28 (score 95, +27)

- [security improvement] Malware scan: unverified → pass
- [security improvement] Known CVEs: unverified → pass
- [security] Stability: 0.97 → pass
- [functional improvement] Dependency health: unverified → pass

### 2026-10-27 (score 68, 0)

- [security improvement] Malware scan: unverified → pass
- [security improvement] Known CVEs: unverified → pass
- [functional regression] Tool coverage: 81% → 74%
- [functional improvement] Schema quality: 153 → 124
- [functional improvement] Dependency health: unverified → pass
- [functional] Package version: 0.37.0 → 0.38.0

## MCP tools (6)

### `profile_context` (~146 tokens)

Profile a conversation's context: token breakdown, largest blocks, wasted context. Pass `conversation` (JSON or text) or, in a chat app, a `sketch` (~120 tokens). Call it when the user asks about tokens, cost, speed or limits, and once past ~30 turns or 3+ large pastes. Act on the top finding.

Input parameters:

- `conversation` (string): JSON or text; in a chat app pass `sketch`
- `model` (string): e.g. claude-sonnet-5
- `sketch` (object): For chat apps. One size hint per block: lines for code, words for prose, chars for logs.

### `optimize_context` (~129 tokens)

Rewrite a conversation to reclaim tokens (dedupe, trim stale tool results, strip base64; prune-history is lossy). Returns slimmed JSON and the savings. Use after profile_context finds waste the user wants fixed; prune-history only with the user's consent, then write the summary the result asks for.

Input parameters:

- `conversation` (string, required): Conversation JSON
- `keep_recent` (integer): Tail messages kept (default 6)
- `max_tool_result_tokens` (integer): Per trimmed result (default 300)
- `strategies` (array): Default: dedupe, trim-tool-results, strip-base64

### `pack_context` (~181 tokens)

Read only the parts of large files a question needs: the chunks that best match `query` within `max_tokens`, with ids and line ranges. No query: an outline; pick with `ids`. Use instead of reading a big doc, log or folder whole when not editing it. Text, code, PDF, Word, PowerPoint, ODT.

Input parameters:

- `ids` (array): Chunk ids, e.g. docs/guide.md#4
- `max_tokens` (integer): Budget, default 4000
- `model` (string): Model to count for
- `paths` (array): Files or folders, absolute paths
- `query` (string): The question; omit for an outline
- `semantic` (boolean): Also rank by meaning (local Ollama embeddings)
- `text` (string): Raw text to pack instead of files

### `save_handoff` (~125 tokens)

Save a handoff for continuing in a new chat (a chat's history cannot be cut; a new chat can). Write `brief` yourself (≤400 tokens: goal, decisions, state, open items, identifiers); put what must stay exact in `verbatim`. Only when the user agrees.

Input parameters:

- `brief` (string, required)
- `chat_tokens` (number): Chat size, from profile_context
- `model` (string)
- `title` (string)
- `turns` (number)
- `verbatim` (array): Code, config, figures

### `recall` (~56 tokens)

Search this session's transcript on disk (compacted turns, cleared tool output) for `query`: best excerpts with time and position. Use before asking the user again.

Input parameters:

- `max_tokens` (number)
- `query` (string, required)

### `context_best_practices` (~35 tokens)

Checklist for keeping context lean and prompts cacheable, optionally per provider.

Input parameters:

- `provider` (string): Default: general

## Diagnostics

Captured diagnostic sections: Provenance, Dependencies. The full working is on the page: https://verifymcp.io/servers/kushalp1-context-doctor/context-doctor#diagnostics

## Score history

- 2026-11-05: 95
- 2026-11-04: 80
- 2026-11-03: 95
- 2026-11-02: 80
- 2026-11-01: 95
- 2026-10-31: 95
- 2026-10-30: 95
- 2026-10-29: 80
- 2026-10-28: 95
- 2026-10-27: 68
- 2026-10-26: 68
- 2026-10-25: 94
- 2026-10-24: 93
- 2026-10-23: 78
- 2026-10-22: 92
- 2026-10-21: 92
- 2026-10-20: 65
- 2026-10-19: 91
- 2026-10-18: 91
- 2026-10-17: 75
- 2026-10-16: 89
- 2026-10-15: 89
- 2026-10-14: 88
- 2026-10-13: 38
- 2026-10-12: 49
- 2026-10-05: 84
- 2026-10-04: 84
- 2026-10-03: 69
- 2026-10-02: 83
- 2026-10-01: 72

## Common questions

### What is the context-doctor MCP server?

context-doctor is an MCP server listed in the public MCP registry as io.github.KushalP1/context-doctor. Cut LLM agent token use in Claude Code, Cursor, Codex, Gemini CLI. Local, no API key. gAI Ventures. This page covers its npm package (context-doctor).

### Is the context-doctor MCP server safe to use?

context-doctor scores 95 out of 100 on VerifyMCP. We found no known CVEs affecting it as of 5 November 2026. It declares no install or post-install scripts. Its build provenance is signed and verified. That is a record of what we were able to check automatically, not an endorsement. The category breakdown on this page shows every signal behind the number, including the ones we could not confirm.

### What tools does the context-doctor MCP server expose?

context-doctor exposes 6 tools: profile_context, optimize_context, pack_context, save_handoff, recall, context_best_practices. Their descriptions and schemas cost roughly 672 tokens of context every time the server is loaded.

### Is the context-doctor MCP server still maintained?

context-doctor is still listed as active in the MCP registry. We last reached this channel on 5 November 2026. Those dates come from our own scans of the registry and the channel itself, not from anything the publisher announced.

### What licence is the context-doctor MCP server under?

context-doctor declares the MIT licence, which is OSI-approved. That covers the source only, and says nothing about the cost of any service it calls.

## Links

- npm package: https://www.npmjs.com/package/context-doctor
- Socket report: https://socket.dev/npm/package/context-doctor
- Repository: https://github.com/KushalP1/context-doctor
- Changelog RSS feed: https://verifymcp.io/servers/kushalp1-context-doctor/context-doctor.xml
- Changelog JSON feed: https://verifymcp.io/servers/kushalp1-context-doctor/context-doctor.json
- HTML version of this page: https://verifymcp.io/servers/kushalp1-context-doctor/context-doctor
