token-discipline
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
token-discipline-mcp
Stop your AI coding agent from burning through your usage limits.
A tiny MCP server (one file, zero dependencies) that loads a set of token-saving rules into every session of Claude Code, Claude Desktop, Cursor, or any MCP client.
What it makes your agent do
Rule | Effect |
π§ Main chat is a dispatcher | Plans and delegates; heavy work runs in subagents |
β Agents checkpoint at ~125k tokens | Commit, write |
π Grep before reading | Only the needed lines, never re-read files |
π₯ 1 or 2 agents by default, max 5 | Parallel fan-out is what kills a session |
π Pace huge tasks | Split across sessions instead of hitting the rate limit |
Full list: RULES.md.
Related MCP server: mcp-context-condenser
Setup (1 minute)
Needs Node 18+. Nothing to install: npx runs it straight from GitHub.
Claude Code
claude mcp add token-discipline --scope user -- npx -y github:Suhaib5333/token-discipline-mcpClaude Desktop, Cursor, Windsurf, others
Add this to your MCP config (claude_desktop_config.json, ~/.cursor/mcp.json, ...):
{
"mcpServers": {
"token-discipline": {
"command": "npx",
"args": ["-y", "github:Suhaib5333/token-discipline-mcp"]
}
}
}Restart the client. Done β
How it works
The rules reach the model 3 ways, so it works whatever your client supports:
Channel | What |
Server instructions | Sent automatically on connect |
Tool | The agent can fetch the rules any time |
Prompt | Load them manually ( |
Use your own rules
Point it at any Markdown file:
claude mcp add token-discipline --scope user -e TOKEN_RULES_FILE=/path/to/my-rules.md -- npx -y github:Suhaib5333/token-discipline-mcp(JSON config: add "env": { "TOKEN_RULES_FILE": "/path/to/my-rules.md" }.)
Or fork this repo, edit RULES.md, and swap Suhaib5333 for your username in the install command.
Run locally
git clone https://github.com/Suhaib5333/token-discipline-mcp
cd token-discipline-mcp
npm testContributing
Ideas for better rules are welcome. Open an issue or a PR (keep it zero-dependency and short). See CONTRIBUTING.md.
License
MIT: use it, fork it, ship it.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
This server cannot be deployed
Maintenance
Related MCP Connectors
Enforces architectural invariants and code quality rules inside your AI agent's edit loop.
Reduces AI Agent token usage by 40% via three-stage SOP workflow.
Rules-based context reduction, planning checks, research prompts and fixed experiences for agents.
Cuts coding agent token burn up to 72% continuously via contradiction-free memory & verification.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceReduces token consumption for AI coding agents by 50-70% through intelligent code context filtering, Git delta tracking, and local SQLite/Tree-sitter indexing.167 npmMIT
- AlicenseAqualityBmaintenanceEnables AI coding agents to reduce token usage by condensing source code into AST skeletons, extracting specific symbols, compressing logs, and estimating token budgets.4MIT
- AlicenseNot gradedqualityAmaintenanceSaves decisions, rules, bugs, to-dos and failed approaches from coding-agent chats as lines in a repo file, then brings the relevant ones back in later sessions. It also checks planned commands and file edits against those saved rules before they run, asking first when a rule might be broken.217 npmMIT
- AlicenseAqualityBmaintenanceEnables coding agents to reduce prompt token usage by extracting code skeletons and symbols, compressing test and command output, generating compact diffs, and tracking session token health to avoid rate-limit lockouts.6MIT