Lint, measure, and sync AI context files across Cursor, Claude Code, Copilot.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
How do you measure the token cost of your context?
You spent hours writing the perfect .md context file, just to find out that your agent got worse.
That's not a bug. That's what happens when nobody measures the cost of context.
You write a CLAUDE.md. Then someone adds .cursor/rules/. Then a teammate drops in an AGENTS.md. Then someone copies in a .cursorrules file from a blog post. Nobody removes the old ones.
Six months later your project has four context files that overlap, contradict each other, and dump 8,000 tokens of directory listings and "follow best practices" into every conversation. Your agent follows all of it. It gets slower. It gets confused. You blame the model.
An ETH Zurich study (February 2026) measured what actually happens when you give agents context files:
I kept hitting this in my own projects, so I built ai-context-kit - a toolkit to treat context like a budget. Measure it, trim it, inject only what the current task needs.
Run the CLI on any project to see what you're actually injecting:
Then lint it:
That's the difference between guessing and knowing.
| Other approaches | ai-context-kit | |
|---|---|---|
| Context cost | Nobody measures it | Token count per file with budget check |
| Conflicts | You find out when the agent does something weird | Detects contradictions across all files automatically |
| Duplicates | Same rule in 3 files, 3x the tokens | Flagged and scored |
| Task relevance | Every rule injected every time | select() picks only what matters for the current task |
| Multi-tool | Locked to one IDE's format | Works across Cursor, Claude Code, Copilot, Windsurf, Cline |
| CI | Hope for the best | lint exits with code 1 on errors. Drop it in your pipeline |
ai-context-kit reads every context file format in the ecosystem, parses frontmatter, estimates token cost, and gives you tools to analyze and manage them.
loadRules() | Auto-detects .cursor/rules/, .cursorrules, CLAUDE.md, AGENTS.md, copilot-instructions.md, .windsurfrules, .clinerules |
measure() | Token cost per rule, percentage of total, budget check |
lint() | Conflicts, duplicates, bloat, vague instructions, useless directory trees. Scores 0-100 |
select() | Picks rules relevant to the current task. Respects a token budget. alwaysApply rules first, then by relevance |
sync() | Single source of truth. Write once in .cursor/rules/, sync to CLAUDE.md, AGENTS.md, and the rest |
init() | Starter template with tips from the research |
loadRules(rootDir?)Returns RuleFile[] with parsed frontmatter, body, format, path, and token count.
measure(rules, budget?)lint(rules)What the linter catches:
| Rule | Severity | What it finds |
|---|---|---|
token-budget | warning/error | Files over 2,000 tokens (warning) or 5,000 (error) |
empty-rule | warning | Files too short to do anything |
duplicate-content | warning | Same instruction repeated across files |
conflict | error | "always use X" in one file, "never use X" in another |
directory-listing | warning | 10+ line directory trees that agents don't need |
vague-instruction | info | "follow best practices", "write clean code", "be consistent" |
select(rules, options)The core insight from the research: don't inject everything. Pick what matters.
Scoring: alwaysApply: true in frontmatter gets highest priority. Then task words matched against file paths and content. Then tag matches. Budget is respected - highest-scored rules are included first until the budget runs out.
sync(options)Factual signals from GitHub, npm, and our automated checks β not a rating.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/ai-context-kit)<a href="https://allmcps.com/mcp/ai-context-kit"><img src="https://allmcps.com/api/badge/ai-context-kit?style=directory" alt="AI Context Kit on AllMCPs" /></a>