CostGate
Allows cost-gated access to GitHub tools and operations, integrating with GitHub backend for tool delegation and token optimization.
Click on "Install 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., "@CostGateHelp me cut my AI bill by gating my MCP tools."
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.
CostGate
Gate your MCP. Cut your bill.
CostGate reduces AI token consumption by optimizing MCP tool definitions and responses. Cursor-first, compatible with Claude Desktop and other MCP clients.
Repository layout (monorepo)
costgate/
├── packages/
│ ├── schema/ @costgate/schema — shared log schema
│ ├── probe/ @costgate/probe — measurement MCP (npm)
│ └── gate/ costgate-gate — gateway MCP (Go binary)
├── docs/
├── examples/
└── scripts/See docs/structure.md for why Probe and Gate share one repo.
Related MCP server: PlanckBot
Packages
Package | Dist | Description |
npm | Measurement MCP — baseline token usage, call stats, JSONL logs | |
binary | Gateway MCP — filtered tool exposure, delegation, cost reduction | |
workspace | Shared JSON Schema for logs |
Quick start (Probe)
npm install
npm run build:probeAdd to Cursor ~/.cursor/mcp.json:
{
"mcpServers": {
"costgate-probe": {
"command": "node",
"args": ["/path/to/costgate/packages/probe/dist/index.js"],
"env": {
"COSTGATE_PROBE_LOG_DIR": "~/.costgate/logs"
}
}
}
}Or after npm publish: npx @costgate/probe
See examples/cursor/ for full configuration.
Quick start (Gate)
Requires Go 1.25+.
npm run build:gate
npm run test:gate # smoke test (GitHub backend via ~/.costgate/backends.json)Add to Cursor ~/.cursor/mcp.json (keep serena direct; see mcp-gate-github.json):
{
"mcpServers": {
"costgate-gate": {
"command": "/path/to/costgate/packages/gate/bin/costgate-gate",
"env": {
"COSTGATE_CONFIG": "~/.costgate/backends.json"
}
}
}
}Filter mode (default): Tier A/B/C + discover_tools / invoke_tool. Set COSTGATE_GATE_MODE=transparent for pass-through baseline. See packages/gate/README.md.
Compare reduction: npm run compare (Before/After tools/list token estimate).
Production Cursor setup: npm run cursor:production — see examples/cursor/README.md.
Plans (roadmap)
Plan | Scope |
Free (OSS) | Probe + Gate core |
Pro | Automated cloud reports (costgate-cloud) |
Team / Enterprise | Team dashboard, policies, custom proposals, support |
Documentation
License
MIT — see LICENSE
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/YukiMiyatake/costgate'
If you have feedback or need assistance with the MCP directory API, please join our Discord server