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.
Languages: English (this file) · 日本語
Repository layout (monorepo)
costgate/
├── packages/
│ ├── schema/ @costgate/schema — shared log schema
│ ├── probe/ @costgate/probe — measurement MCP (npm)
│ ├── cli/ @costgate/cli — npm entry (launcher, Dashboard, hooks)
│ └── 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: Refract
Packages
Package | Dist | Description |
npm | Recommended entry — | |
npm | Measurement MCP — baseline token usage, call stats, JSONL logs | |
GitHub Releases | Gateway MCP (Go) — filtered tools, Shield, cost reduction | |
workspace | Shared JSON Schema for logs |
Quick start (production — recommended)
Install with Node only (no Go build). init downloads the Gate binary from GitHub Releases.
npx @costgate/cli@latest init
# Restart Cursor (reconnect MCP)What init does:
~/.costgate/bin/costgate-gate— Go binary~/.cursor/mcp.json—npx @costgate/cli gate(Dashboard auto-start)~/.cursor/hooks.json— Shield, prompt-intent, etc.~/.costgate/backends.json— template (if missing)
Update: npx @costgate/cli update
Details: packages/cli/README.md · docs/releases.md
Global install (optional)
npm install -g @costgate/cli
costgate initQuick start (developers — clone repo)
git clone https://github.com/YukiMiyatake/costgate.git
cd costgate
npm install
npm run build:gate # or ./scripts/install-gate.sh
cp examples/backends.github.json ~/.costgate/backends.json
npm run cursor:production # update mcp.json with local paths
npm run cursor:registry # install hooksDocker only: docs/docker.md
Quick start (Probe — measurement only)
Option A — npx (published)
npx @costgate/probe@latestAdd to Cursor ~/.cursor/mcp.json:
{
"mcpServers": {
"costgate-probe": {
"command": "npx",
"args": ["-y", "@costgate/probe"],
"env": {
"COSTGATE_CONFIG": "~/.costgate/backends.json",
"COSTGATE_PROBE_LOG_DIR": "~/.costgate/logs"
}
}
}
}Option B — from source
npm install
npm run build:probeSee examples/cursor/ for measurement configuration.
Gate (advanced — binary only)
Minimal setup without Dashboard or hooks:
./scripts/install-gate.sh # → ~/.local/bin/costgate-gate
costgate-gate --versionExample ~/.cursor/mcp.json: examples/cursor/mcp-gate-github.json
Build from repo: npm run build:gate (Go 1.25+)
Releases: GitHub Releases · docs/RELEASE.md
Filter mode (default): Tier A/B/C + discover_tools / invoke_tool. See packages/gate/README.md.
Compare reduction: npm run compare (definitions) · npm run compress-report (definitions + tool results).
Session breakdown: npm run session-report (fixed + variable + overall % scenarios).
Measured benchmarks: docs/benchmarks.md
Production Cursor setup (clone): npm run cursor:production — see examples/cursor/README.md.
Cloud metrics (opt-in): npm run cloud:upload — see costgate-cloud.
Plans (roadmap)
Plan | Scope |
Free (OSS) | CostGate — Probe + Gate + Dashboard |
LoopGate Starter / Pro / Enterprise | Hosted LoopOps SaaS — see costgate-cloud (private) |
OSS vs Cloud feature split: docs/ecosystem/plans.md · 日本語
See docs/roadmap.md for OSS phase details.
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.
Related MCP Servers
- Alicense-qualityAmaintenanceA proxy server that wraps existing MCP servers to significantly reduce token consumption by compressing tool descriptions into a two-step interface. It enables users to integrate extensive toolsets without exceeding context limits or incurring high API costs.Last updated97Apache 2.0
- AlicenseAqualityBmaintenanceMCP proxy that compresses tool schemas on the fly. Up to 98% token reduction, 100% signal preserved verified after every compression. Zero LLM calls, fully deterministic.Last updated52MIT
- Alicense-qualityBmaintenanceAn open-source, vendor-agnostic MCP governance proxy that sits between AI clients and tool servers to apply response projection, metering, and retry policies, reducing token bloat and providing per-tool cost visibility.Last updated1MIT
- Alicense-qualityBmaintenanceOptimizes MCP tool menus from OpenAPI specs by grouping operations by tag and trimming schemas to reduce token usage, improving agent tool-selection accuracy.Last updated51MIT
Related MCP Connectors
Agent Token Budget MCP — hard per-session token + spend cap with signed budget-exhausted
SaaS intelligence for AI agents. 5 unified tools cover 1,000+ services with 91-96% token savings.
Remote MCP for Copilot CLI switch gate MCP, structured receipts, audit logs, and reviewer-ready evid
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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