Prototype · Preview: every server in the official registry, synced every 30 minutes. Sign in with Google to write reviews.Prototype · updated every 30 min
PopNx MCPMCP servers for people who use AI · explained in plain words

ctxcap

by Naeha-Sversion 0.1.4i★ 0iRuns on your computer
Registry nameio.github.Naeha-S/ctxcap

How to install

What it does

Offline context-budget MCP server for AI coding agents.

  • Connects Runs on your computer
  • Account or key No key needed
  • Category Developer tools

Install

Pick the AI app you use, then copy the settings.

Passed 3/3 checks · Runs on your computer · ✓ Commands checked Nov 13, 2026

First: which AI do you use?

Pick your app and the steps appear below.

Works with Claude, with some setup first

Install Node.js on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone

  1. Install Node.js

    One time only; it works for every server that needs Node.js

    Open the Node.js download page ↗

  2. Open the Claude desktop app’s settings file

    SettingsDeveloperEdit Config

  3. Paste these settings and save the file

    {
      "mcpServers": {
        "ctxcap": {
          "command": "npx",
          "args": [
            "-y",
            "ctxcap-mcp"
          ]
        }
      }
    }
  4. Quit Claude and open it again

  5. Try it

    Use ctxcap and tell me what you can do for me, then show me one thing

    ✓ If Claude says it is using ctxcap or shows a ctxcap tool in the answer, you are connected

Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version

ChatGPT cannot connect ctxcap yet

ctxcap runs on your computer, but ChatGPT can only connect servers that run on the web

What you can do instead

A · Use an app that can connect ctxcap

  • Install Node.js on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone
  • Install Node.js on your computer first (one time)
  • Install Node.js on your computer first (one time)
  • Install Node.js on your computer first (one time)

B · Others in Developer tools that work with ChatGPT

Picked from the most used in the same category, only ones that connect by address with no key

Works with Claude Code, with some setup first

Install Node.js on your computer first (one time)

  1. Install Node.js

    One time only; it works for every server that needs Node.js

    Open the Node.js download page ↗

  2. Open Terminal

    Mac: press Command+Space and type Terminal · Windows: open PowerShell

  3. Paste this command and press Enter

    claude mcp add --scope user ctxcap -- npx -y ctxcap-mcp
  4. Type /mcp in Claude Code

    You should see ctxcap listed as connected

  5. Try it

    Use ctxcap and tell me what you can do for me, then show me one thing

    ✓ If Claude Code says it is using ctxcap or shows a ctxcap tool in the answer, you are connected

Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Works with Cursor, with some setup first

Install Node.js on your computer first (one time)

  1. Install Node.js

    One time only; it works for every server that needs Node.js

    Open the Node.js download page ↗

  2. Click this button to open Cursor

    Open in Cursor

    Cursor asks you to confirm; click Install

  3. Open the AI chat in Cursor in Agent mode

  4. Try it

    Use ctxcap and tell me what you can do for me, then show me one thing

    ✓ If Cursor says it is using ctxcap or shows a ctxcap tool in the answer, you are connected

Menu names checked against Cursor’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Works with VS Code, with some setup first

Install Node.js on your computer first (one time)

  1. Install Node.js

    One time only; it works for every server that needs Node.js

    Open the Node.js download page ↗

  2. Click this button to open VS Code

    Open in VS Code

    VS Code asks you to confirm; click Install

  3. Open the AI chat in VS Code in Agent mode

  4. Try it

    Use ctxcap and tell me what you can do for me, then show me one thing

    ✓ If VS Code says it is using ctxcap or shows a ctxcap tool in the answer, you are connected

Menu names checked against VS Code’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Other apps that use MCP, such as Windsurf, Zed or Gemini CLI, each add servers differently. See how in the app list.

See every app that uses MCP →

JSON settings are under “For developers” below

Stuck? Ask people who use ctxcap💬 Discussion →
For developers: Terminal commands and JSON settings

Installed on your computer

Claude Code

claude mcp add --scope user ctxcap -- npx -y ctxcap-mcp

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "ctxcap": {
      "command": "npx",
      "args": [
        "-y",
        "ctxcap-mcp"
      ]
    }
  }
}

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "ctxcap": {
      "command": "npx",
      "args": [
        "-y",
        "ctxcap-mcp"
      ]
    }
  }
}

VS Code (mcp.json)

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

These settings are generated from the maker’s registry entry. If the README says otherwise, follow the README.

At a glance

Downloads per weeki
Not on npm/PyPI
Connection
Runs on your computer
Latest versioni
0.1.4
Published to registryi
Nov 13, 2026
Code last changedi
Nov 13, 2026
Maker
Naeha-S
Packages
npm: ctxcap-mcp
Website
github.com
Registry status
Active

Which apps can use it

Based on how this server connects and on each app’s own docs, checked Nov 10, 2026.

Run on your computer in

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

All apps, with pros and cons →

Related guides

What it can do

Runs on your computer; the tool list appears in your AI app after you install it.

Basic checksi

We check information anyone can see; we have not read the code. Checks that do not apply are left out of the count. · Checked Nov 13, 2026

  • ✓ Pass

    Maker matches the repo

    The registry name was verified with the GitHub account Naeha-S, which owns the repo

  • ✓ Pass

    Still maintained

    Code last changed today

  • ✓ Pass

    Has a licence

    Uses MIT

  • – Not applicable

    Endpoint responds

    This one runs on your computer; there is no internet endpoint

  • – Not applicable

    Sign-in with OAuth

    Runs on your computer and uses local settings instead

  • … Not checked yet

    No hidden instructions in tool descriptions

    Runs on your computer; we can only read tool lists from internet endpoints

Discussion

Ask, share a tip or report that it does not work. Sorted by what people marked helpful.

No posts yet. Be the first to ask or share.

Posts here are written by users, not the PopNx team.

Sign in with Google to post

User reviews

No reviews yet

Sign in with Google to write a review

Compared with others in Developer toolsi

  • More stars than 0% of the other 5839 servers in this category
  • Published to the registry more recently than 99% of the other 5839 servers in this category
  • Basic checks equal to or better than 100% of the other 5839 servers in this category

Compared with every active server in this category in the registry. Stars count only when the publisher owns the repo.

Common questions

Is ctxcap safe?

It passed 3 of 3 applicable basic checks. We have not read the code. Before adding a key or token, see what access the server asks for and use a key with only the permissions you need.

What keys or codes does it need?

The registry does not list a required key, though some servers ask you to sign in on first use.

Does it run on my computer or in the cloud?

It runs on your computer. Your AI app starts it when needed, and data does not pass through the maker’s servers (unless it calls an online service itself).

Is it still maintained?

The GitHub repo last changed today, and the latest version (0.1.4) reached the registry today.

Which apps can use it?

Apps that support MCP, such as Claude Desktop, Claude Code, Cursor and VS Code. You also need Node.js on your computer.

What can I use instead?

In the same category: REA, GitHub, Serena MCP: the IDE for your agent

Others in the same category

Servers in the same category from other makers, sorted by stars.

Reading a card:↓ Downloads per weeki★ GitHub starsiThree pillars: reviews · checks · usageiUpdated = latest version published to the registryi

REA

Reverse engineer anything from your terminal or agent with one CLI and MCP server.

by morlutoWidely used↓ 388.7K/wk★ 455.4KUpdated yesterday

Runs on your computer

GitHub

GitHub’s official server lets AI read and manage code, issues and pull requests in your account. Use GitHub’s hosted version or run it locally with Docker.

by githubWidely used★ 34.4KUpdated 10 days ago

Computer or cloud

Serena MCP: the IDE for your agent

A powerful toolkit for coding, providing semantic retrieval and editing capabilities.

by oraiosWidely used↓ 35.2K/wk★ 31.3KUpdated 6 months ago

Runs on your computer

README from the maker

Open the README

Copied from the maker’s repo as written. PopNx MCP has not reviewed or endorsed it. HTML, images and scripts are removed. Links lead off this site.

ctxcap

Offline token-budget linter for agent context files. It measures CLAUDE.md, AGENTS.md, prompts/**, and .cursor/rules/**, finds references that no longer resolve, and hands your agent a ranked, verifiable plan to get back under budget.

No config, API key, network, or telemetry. Node >= 20. Two runtime dependencies: fast-glob and gpt-tokenizer.

npx ctxcap --json

The loop

Context files get trimmed by agents badly: the agent rewrites the file from memory, drops the ## Never rules, hits the budget, and ships a worse file. ctxcap closes that loop with line ranges, safety flags, and verification.

npx ctxcap --plan --budget 40000              # ranked plan, JSON

npx ctxcap --plan --budget 40000 --apply # splice atomically npx ctxcap --verify # catch drift and violations

Three rules for the agent:

  1. Splice by startLine/endLine. Never rewrite a file from scratch.
  2. Never cut a span listed in preserve.
  3. If satisfiable is false, report minAchievable and stop.
Where plans live

CLI plans are written to .ctxcap/plans/ .json. Add .ctxcap/ to .gitignore; plans are local working state, not source. Plans expire after 24 hours. If a plan is missing or expired, verification returns the structured PLAN_EXPIRED error and you should generate a new plan. Run --apply on a clean tree, then review with git diff before committing. Do not run --apply in CI.

Agents can fetch the five-line loop from llms.txt.

Before and after

This is a real measurement from the ctxcap repository itself:

$ npx ctxcap --json

total: 476 baseline: 363 delta: +113 files: 2

$ npx ctxcap --plan --budget 400 satisfiable: false current: 476 minAchievable: 476 tokensRemaining: 76 plan: [] preserve: AGENTS.md:19-20, llms.txt:17-30

The result correctly stops instead of cutting load-bearing instructions. For a successful before/after case study, use a public repository with a larger context file and publish the commit, JSON reports, plan, and verification result together.

To publish a reproducible case study, include the repository commit, the ctxcap --json report before and after, the plan JSON, and the verification result. This makes the reclaim measurable and lets readers reproduce it.

Context can be stale as well as large. Run the dead-reference pass to find paths, commands, globs, and @path/#path references that no longer resolve:

npx -y ctxcap --stale --json

It reports reclaimable tokens and emits inline SARIF annotations with --sarif. Use --fail-on stale to gate CI, or --stale-fix to print a deletion diff without modifying files.

The stale pass skips fenced code blocks and suspicious tokens containing ~, $, ://, or <. Add to a line to suppress that line. --stale-fix prints a deletion diff; there is deliberately no --stale --apply mode.

Why

Agent context files — CLAUDE.md, AGENTS.md, prompts/**, .cursor/rules/ — grow every sprint. They get pasted into every request and silently burn your context window. Nothing gates them at the repo level.

ctxcap fixes that: it measures context files, tracks token deltas against a committed baseline, finds stale references, produces ranked plans, verifies edits, fails CI when you define a budget, and exposes an MCP server so agents can check themselves.

How this differs from tokenlint

tokenlint hooks your editor and reminds you per turn about wasteful habits. ctxcap gates the repo: it measures context files against a committed baseline, reports the delta on every PR, and fails only when you ask it to. Different layer — CI and review, not keystrokes.

No baseline, stale-reference pass, ranked plan, verify step, SARIF, or MCP surface there. If you want per-turn nudges inside Claude Code, use theirs; if you want a gate on prompts/**, use this.

Install

npm i -D ctxcap

npx ctxcap --update-baseline

Or run without installing:

npx -y ctxcap --json

Test another repository

Run the unpinned latest ctxcap from the repository you want to inspect. It reads the current working directory, so no files need to be copied into the ctxcap repository:

cd path/to/your-repo

npx ctxcap --json npx ctxcap --stale --json npx ctxcap --plan --budget 40000

Use the pinned version in release checks or reproducible CI. For a real edit loop, review the plan, apply it, then verify the saved plan:

npx -y ctxcap@1.2.0 --plan --budget 40000

npx -y ctxcap@1.2.0 --plan --budget 40000 --apply npx -y ctxcap@1.2.0 --verify

Start with a baseline when you want pull requests to report growth:

npx -y ctxcap@1.2.0 --update-baseline

git add ctxcap-baseline.json git commit -m "Add ctxcap baseline"

Add a .ctxcap.json file to customize included paths, ignored paths, or budgets. The default scan is intentionally limited to common agent context files.

CLI

FlagEffect
--jsonMachine-readable JSON report on stdout
--sarifSARIF 2.1.0 on stdout
--suggestInclude compression suggestions
--staleFind dead paths, commands, globs, and references
--stale-globInclude globs that match zero files
--stale-fixPrint a deletion diff; never writes files
`--fail-on increase\budget\stale\never`When to exit 1 (default: never)
--baseline Read baseline from a git ref (CI uses merge base automatically)
--update-baselineWrite ctxcap-baseline.json and exit
--config Config file path (default: .ctxcap.json)
--root Working directory (default: .)
--planPrint a ranked context-budget edit plan
--applyApply the generated plan atomically
--verify Verify a saved plan and preserve spans
--budget Target budget for --plan

Exit codes: 0 clean, 1 breach under --fail-on, 2 internal error.

Config

.ctxcap.json — all fields optional:

{

"include": ["AGENTS.md", "prompts/", ".cursor/rules/"], "ignore": ["prompts/archive/**"], "budgets": { "total": 40000, "AGENTS.md": 500, "prompts/system.md": 8000 }, "failOn": "budget" }

Defaults (when no config exists): scans CLAUDE.md, AGENTS.md, .github/copilot-instructions.md, prompts/**, *.prompt, .cursor/rules/**.

GitHub Action

permissions:

contents: read pull-requests: write security-events: write # for SARIF upload; drop if you set upload-sarif: false

steps:

  • uses: actions/checkout@v4 with: { fetch-depth: 0 }
  • uses: Naeha-S/ctxcap@v1 with: { fail-on: increase }

Pinned form for reproducibility: uses: Naeha-S/ctxcap@v1.2.0

Inputs:

InputDefaultDescription
fail-onneverincrease \budget \stale \never
config.ctxcap.jsonPath to config file
path.Root directory to lint
commenttruePost sticky PR comment
upload-sariftrueUpload SARIF to code scanning
stalefalseRun the stale-reference pass
stale-globfalseInclude zero-match globs

What you get on every run:

  • Workflow annotations on over-budget files
  • Job step summary with token table and delta

When the token can write (non-fork PRs):

  • Sticky PR comment, updated in place (one comment, not a new one each run)
  • SARIF upload to GitHub code scanning
Fork PRs

With plain pull_request, fork PRs get a read-only token: annotations and job summary only. For the full experience on forks, use pull_request_target as shown in examples/pull-request-target.yml.

Code scanning requires GitHub Advanced Security on private repos; SARIF upload silently no-ops without it.

MCP

Run the MCP server directly — no config needed:

npx -y ctxcap-mcp

Configure in your MCP client:

{

"mcpServers": { "ctxcap": { "command": "npx", "args": ["-y", "ctxcap-mcp"] } } }

The same stdio command works with Claude Code, Codex, and Cursor. See the MCP package guide for client-specific setup. The server reads the MCP client's current working directory and makes no network calls. Registry metadata is prepared in server.json; publication is manual and intentionally not performed by this repository workflow.

Tools exposed:

ToolDescription
measure_contextReturns the full JSON report for the current working directory
context_budget_planReturns a deterministic ranked splice plan with safety classifications and preserve spans
context_budget_verifyReports missed edits and preserve-span violations after applying a plan
trim_to_budgetDeprecated alias for context_budget_plan; always returns apply: false

The agent loop is also available as the five-line llms.txt contract. The standalone MCP wrapper keeps plan verification in the same server process; the CLI persists plans under .ctxcap/plans/.

Output schema

{

"schema": "ctxcap/v1", "approximate": true, "tokenizer": "gpt-tokenizer@3.0.1", "total": 1247, "totalBudget": 40000, "delta": +82, "over": false, "baselineFound": true, "files": [ { "path": "AGENTS.md", "tokens": 420, "delta": +12, "budget": 500 } ], "suggestions": [] }

Full report schema: schema/report.schema.json. Plan schema: schema/plan.schema.json. Plan responses include ranked plan entries, preserve spans, and a diff summary.

Accuracy

Counts, tokensFreed, and confidence use heuristics and are approximate against Claude and Gemini (±5% for token counts). Every report carries "approximate": true and the tokenizer ID. Compare deltas, not absolutes; review the plan before applying it.

Packages

PackageDescription
ctxcapCLI + GitHub Action + embedded MCP server
ctxcap-mcpStandalone MCP server wrapper (thin bin, pulls ctxcap as a dep)

Publish and share

The packages are published on npm:

npm view ctxcap version       # 1.2.0

npm view ctxcap-mcp version # 0.1.2

Share the npm packages, the GitHub repository, or the pinned GitHub Action:

For a release post, show a real before/after from another repository, include the plan and verification loop, and link to the cold-install results. Ask early users to report false positives from their context-file layouts.

MIT.