@yardstickai/mcp
v0.0.1
Published
Yardstick MCP server: let your coding agent report its own cost and ROI.
Maintainers
Readme
@yardstickai/mcp
Yardstick MCP server. Let your coding agent report its own cost and ROI. Ask Claude Code, Cursor, or any MCP client what your AI agents cost this month, their cost per merged PR, ROI, and budget status.
Yardstick measures what AI coding agents cost against the value they ship. This server exposes that data to the agents themselves over the Model Context Protocol.
Tools
- get_cost_summary this month's AI spend, value created, ROI, merged PRs, and cost per merged PR.
- list_agents each measured agent with its cost per merged PR, merged count, spend, and acceptance rate.
- list_reports recent monthly reports, to see the trend over time.
- get_budget_status budgets, month-to-date burn, forecast, and any overages.
All tools are read-only and scoped to the organization the API key belongs to.
Setup
You need a Yardstick API key (it starts with ysk_). Create one under Connect in the Yardstick dashboard.
Claude Code
Add it from the CLI:
claude mcp add yardstick --env YARDSTICK_API_KEY=ysk_your_key -- npx -y @yardstickai/mcpOr add it to ~/.claude/mcp.json (or a project .mcp.json):
{
"mcpServers": {
"yardstick": {
"command": "npx",
"args": ["-y", "@yardstickai/mcp"],
"env": {
"YARDSTICK_API_KEY": "ysk_your_key_here"
}
}
}
}Cursor
~/.cursor/mcp.json (global) or .cursor/mcp.json (project), same shape as the JSON above.
Other MCP clients
Any client that supports stdio MCP servers works (Windsurf, Zed, Continue, and others). Point it at npx -y @yardstickai/mcp with YARDSTICK_API_KEY in the server's env.
Configuration
| Env var | Required | Default | Notes |
| --- | --- | --- | --- |
| YARDSTICK_API_KEY | yes | | A ysk_ key from Connect in the dashboard. Scopes every read to that org. |
| YARDSTICK_API_URL | no | https://api.yardstick.fi | Point at a self-hosted or local API when needed. |
Example
Once connected, ask your agent:
What did our AI coding agents cost this month, and what is the ROI?
It calls get_cost_summary and answers from your live Yardstick data.
Development
pnpm build
YARDSTICK_API_KEY=ysk_... YARDSTICK_API_URL=http://localhost:4000 node dist/index.jsCopyright (c) Yardstick Labs, Inc.
