Skip to content
Agentmart
Submit a tool

context-doctor

Cut LLM agent token use in Claude Code, Cursor, Codex, Gemini CLI.

Connector by KushalP1 · GitHub account verified by the MCP Registry

IndexedMITLocal (stdio)★ 2
Write a review

Chalk Labs

Need help deploying context-doctor?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Codex, VS Code, Cursor, Windsurf, Claude Desktop. Read the repository before you give any tool access to your data.

npx agentmarket install connector/kushalp1-context-doctor

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

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

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this server can do and what it asks for, from its tool list, install config and code. Checked Oct 25, 2026.

Tools
4 read · 0 write · 0 deleteRead-only
Secrets
None asked for
Install scripts
None found
Runs as
Node.js package

Tools by what they do 4

Read from the source code; the running server may list different tools.

Read 4 · Look things up without changing anything.

  • context_best_practices
  • optimize_context
  • pack_context
  • profile_context

Network hosts it talks to 8

  • api.anthropic.com · found in code
  • api.openai.com · found in code
  • apple.com · found in code
  • chatgpt.com · found in code
  • gai.ventures · found in code
  • generativelanguage.googleapis.com · found in code
  • github.com · found in code
  • glama.ai · found in code

Files it touches

  • /etc/gshadow
  • /etc/master.passwd
  • /etc/shadow
  • /etc/ssh
  • /etc/sudoers
  • /opt/homebrew/bin/claude
  • Your home directory (~)
  • Any path the agent passes to its tools

Tools (4)

Read from the source code; the running server may differ. Descriptions are the server’s own words; hidden characters are shown as [U+…].

  • context_best_practicesContext best practicesread-only

    Curated checklist of context-management practices, optionally for one provider. Call it when the user asks how to keep context lean or how to structure prompts for caching.

  • optimize_contextOptimize contextread-only

    Rewrite a conversation to reclaim tokens with deterministic strategies (dedupe, trim stale tool results, strip base64; prune-history is optional and lossy). Returns the slimmed JSON and a savings summary; no LLM calls. Results over 100k chars are not echoed back (summary and a CLI command instead). Use after profile_context finds waste the user wants fixed. Add prune-history only with the user's consent, then write the replacement summary as the result instructs.

  • pack_contextPack contextread-only

    Read only the parts of large files a question needs: chunks files or folders along their structure, ranks the chunks against `query` and returns the best that fit `max_tokens`, each with an id and line range. 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.

  • profile_contextProfile contextread-only

    Profile an LLM conversation or prompt: token breakdown, largest blocks, and findings about wasted context (duplicates, oversized pastes or tool results, base64 blobs, long history). Pass ONE input: `conversation` (full OpenAI/Anthropic JSON or raw text) or `sketch` (chat apps such as Claude Desktop or ChatGPT, where you cannot export the conversation: the turn count plus the few blocks that matter, ~120 tokens). Call it whenever the user asks about token usage, context size, cost, speed or limits, and once on your own when the conversation first passes ~30 turns or 3+ large pastes. Act on the …

Signals

Stars
2
Forks
1
Open issues
0
Last commit
Oct 23, 2026 (7 days ago)
Last release
Oct 26, 2026 (5 days ago)

From GitHub (fetched Oct 24, 2026).

Details

Registry name
io.github.KushalP1/context-doctor
Version
0.37.0
Auth
No auth
Packages
npm context-doctor
License
MIT
First seen
Oct 24, 2026
Last checked
Oct 26, 2026

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get context-doctor running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying context-doctor?

CallGet help
Cite this page

context-doctor MCP server. Agent Mart. https://agentmart.dev/connectors/kushalp1-context-doctor (last updated 2026-10-26)