token-discipline
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@token-disciplineload the token-saving rules and apply them to this session"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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: Smart Context MCP
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.
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.
Checks AI-written code against your rules as it is written, and keeps a record of what it found.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables AI coding agents to set budgets per task, check costs before expensive operations, and halt when budget is exhausted, with support for calibration and cloud sync.4MIT
- 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
- AlicenseAqualityBmaintenanceEnables coding agents to compact conversation contexts verbatim, make fast decisions through choice, boolean, and rubric scoring, and enforce command safety guardrails.6MIT