Spec Driven Development
MCP Server that facilitates spec-driven development workflows, not just Vibe Coding.
作者提供的说明(英文原文)
Runtime budget authority for AI agents — reserve, enforce, reconcile spend across providers
这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。
我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。
选择你使用的 AI 应用,然后复制设置。
CYCLES_API_KEY, CYCLES_BASE_URL, CYCLES_MOCK, CYCLES_DEFAULT_TENANT, CYCLES_DEFAULT_WORKSPACE, CYCLES_DEFAULT_APP, CYCLES_DEFAULT_WORKFLOW, CYCLES_DEFAULT_AGENT, CYCLES_DEFAULT_TOOLSET标为机密的值是你账户的钥匙。千万不要分享给别人,也不要粘贴到聊天里。
你需要
你用的是哪个应用?
在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。
打开 Claude Desktop → Settings → Developer → Edit Config,把下面的内容粘贴到 claude_desktop_config.json
{
"mcpServers": {
"cycles": {
"command": "npx",
"args": [
"-y",
"@runcycles/mcp-server"
],
"env": {
"CYCLES_API_KEY": "your-value",
"CYCLES_BASE_URL": "your-value",
"CYCLES_MOCK": "your-value",
"CYCLES_DEFAULT_TENANT": "your-value",
"CYCLES_DEFAULT_WORKSPACE": "your-value",
"CYCLES_DEFAULT_APP": "your-value",
"CYCLES_DEFAULT_WORKFLOW": "your-value",
"CYCLES_DEFAULT_AGENT": "your-value",
"CYCLES_DEFAULT_TOOLSET": "your-value"
}
}
}
}在终端中运行这条命令
claude mcp add cycles --env CYCLES_API_KEY=your-value --env CYCLES_BASE_URL=your-value --env CYCLES_MOCK=your-value --env CYCLES_DEFAULT_TENANT=your-value --env CYCLES_DEFAULT_WORKSPACE=your-value --env CYCLES_DEFAULT_APP=your-value --env CYCLES_DEFAULT_WORKFLOW=your-value --env CYCLES_DEFAULT_AGENT=your-value --env CYCLES_DEFAULT_TOOLSET=your-value -- npx -y @runcycles/mcp-server运行前请先填写空着的值。
粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json
{
"mcpServers": {
"cycles": {
"command": "npx",
"args": [
"-y",
"@runcycles/mcp-server"
],
"env": {
"CYCLES_API_KEY": "your-value",
"CYCLES_BASE_URL": "your-value",
"CYCLES_MOCK": "your-value",
"CYCLES_DEFAULT_TENANT": "your-value",
"CYCLES_DEFAULT_WORKSPACE": "your-value",
"CYCLES_DEFAULT_APP": "your-value",
"CYCLES_DEFAULT_WORKFLOW": "your-value",
"CYCLES_DEFAULT_AGENT": "your-value",
"CYCLES_DEFAULT_TOOLSET": "your-value"
}
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
粘贴到项目中的 .vscode/mcp.json
{
"servers": {
"cycles": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@runcycles/mcp-server"
],
"env": {
"CYCLES_API_KEY": "your-value",
"CYCLES_BASE_URL": "your-value",
"CYCLES_MOCK": "your-value",
"CYCLES_DEFAULT_TENANT": "your-value",
"CYCLES_DEFAULT_WORKSPACE": "your-value",
"CYCLES_DEFAULT_APP": "your-value",
"CYCLES_DEFAULT_WORKFLOW": "your-value",
"CYCLES_DEFAULT_AGENT": "your-value",
"CYCLES_DEFAULT_TOOLSET": "your-value"
}
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
这个服务器在你的电脑上运行,而 ChatGPT 只能连接互联网上的服务器。请选择其他应用。
你的选择通过 Cookie 保存在这台设备上,无需账户。
CYCLES_MOCK envCYCLES_DEFAULT_TENANT envCYCLES_DEFAULT_WORKSPACE envCYCLES_DEFAULT_APP envCYCLES_DEFAULT_WORKFLOW envCYCLES_DEFAULT_AGENT envCYCLES_DEFAULT_TOOLSET env这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。
它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。
我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月7日
注册名称已通过 GitHub 账户 runcycles 验证,该账户拥有此仓库
我们还没有从 GitHub 读取这个仓库
我们还没有从 GitHub 读取这个仓库
它在你的电脑上运行,没有互联网端点
在你的电脑上运行,改用本地设置
它在你的电脑上运行;我们只能读取互联网端点的工具列表
与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。
它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。
你需要填写:CYCLES_API_KEY, CYCLES_BASE_URL
它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。
GitHub 仓库最后更新于–,最新版本(0.6.1)于3个月前进入注册中心。
支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Node.js。
同一分类中有:Spec Driven Development, Remote Desktop Commander, MCP Server Autocad Lisp Helper
同一分类中其他作者的服务器,按星标数排序。
如何看卡片:★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i
MCP Server that facilitates spec-driven development workflows, not just Vibe Coding.
Remote Desktop Commander: use files, terminal and processes on your own computers from any AI app.
High-precision static analysis and debug server for AutoCAD AutoLISP (.lsp) files.
按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。
MCP server that gives any MCP-compatible AI agent (Claude Code, Cursor, Windsurf, custom agents) runtime budget, action, and audit authority — enforce LLM cost limits, tool call caps, action permissions, and audit trails before execution, with zero agent code changes. Connect via MCP and use the budget tools (cycles_reserve, cycles_commit, cycles_release, cycles_decide) directly from the agent's tool-calling loop. Powered by Cycles. See Security Model & Enforcement Boundary for what is enforced server-side versus cooperatively in the agent loop.
Autonomous AI agents (Claude, GPT, custom agents) call LLMs, invoke tools, and hit external APIs — but have no built-in way to cap how much they spend. A single agent loop can burn through hundreds of dollars before anyone notices. Multiply that across tenants and teams, and cost control becomes a real problem.
This MCP server gives any MCP-compatible agent a runtime budget authority: a set of tools to check, reserve, spend, and release budget before and after every costly operation. The agent asks "can I afford this?" before acting, and reports what it actually used afterward.
Who needs this:
Why MCP specifically:
MCP is the standard protocol that AI hosts (Claude Desktop, Claude Code, Cursor, Windsurf, custom agents) use to discover and call tools. By exposing Cycles as an MCP server, any MCP-compatible agent gets budget awareness as a plug-in — just add the server to your config. No SDK integration in the agent's own code required.
The server also ships built-in prompts so an AI assistant can help you design your budget strategy, generate integration code, and diagnose budget overruns — not just enforce budgets at runtime.
You run a Claude Code agent that writes and iterates on code. Each task should cost no more than $5. The agent calls cycles_reserve before every LLM call with a cost estimate in USD_MICROCENTS. If the reservation comes back DENY, the agent stops and reports "budget exhausted" instead of silently racking up charges. When the call completes, cycles_commit records the actual token cost so the running total stays accurate.
Your platform lets customers deploy AI assistants. Each customer has a monthly budget. The agent calls cycles_check_balance at the start of a conversation to see what's left, then cycles_reserve before each tool invocation (web search, code execution, API calls). If customer Acme is near their limit, the decision comes back ALLOW_WITH_CAPS — the agent automatically drops to a cheaper model and skips optional tools. Customer budgets are isolated; one customer's heavy usage never affects another.
You have an orchestrator that fans out to specialist agents — a researcher, a coder, and a reviewer. All three draw from the same workflow budget. Each agent calls cycles_reserve before its work; the Cycles server tracks concurrent reservations so the total never exceeds the workflow limit. If the researcher burns through 80% of the budget, the coder's next reservation gets DENY and the orchestrator can decide to skip the review step instead of going over budget.
An agent processes a large dataset in chunks, each chunk taking several minutes. It calls cycles_reserve with a 5-minute TTL before each chunk, then cycles_extend every 60 seconds to keep the reservation alive while processing. If the agent crashes, the reservation expires automatically and the locked budget returns to the pool — no manual cleanup needed.
You have an existing system that already makes LLM calls and you just want to track spend, not gate it. After each call completes, the agent fires cycles_create_event with the actual cost. No reservation needed — the event is applied atomically to all budget scopes (tenant, workspace, app). You get a real-time spend dashboard without changing your existing call flow.
Grok Bot can call custom MCP tools, but installing the standalone Cycles tools beside a paid-media connector remains cooperative: the Bot could call the other connector directly. The Grok Bot paid-media gateway shows the hard-enforcement shape instead. Its mutation handler derives scope from trusted server configuration, requires a live RISK_POINTS reservation, propagates the reservation ID to the downstream API, and conservatively settles ambiguous outcomes.
npm install @runcycles/mcp-server
One-click (recommended): download cycles-mcp-server- .mcpb from the latest release and open it with Claude Desktop (double-click, or Settings → Extensions → drag it in). Claude Desktop shows a config screen for your Cycles server URL and API key — or enable mock mode to explore the tools without a server (no enforcement).
Manual (JSON config): add to your claude_desktop_config.json:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json{
"mcpServers": { "cycles": { "command": "npx", "args": ["-y", "@runcycles/mcp-server"], "env": { "CYCLES_BASE_URL": "http://localhost:7878", "CYCLES_API_KEY": "your-api-key-here" } } } }
For local development without an API key, use mock mode:
{
"mcpServers": { "cycles": { "command": "npx", "args": ["-y", "@runcycles/mcp-server"], "env": { "CYCLES_MOCK": "true" } } } }
claude mcp add cycles -- npx -y @runcycles/mcp-server
Set your environment variables:
export CYCLES_BASE_URL=http://localhost:7878
export CYCLES_API_KEY=your-api-key-here
Use stdio transport with:
command: npx
args: ["-y", "@runcycles/mcp-server"] env: { CYCLES_API_KEY: "your-key", CYCLES_BASE_URL: "http://localhost:7878" }
export CYCLES_API_KEY=your-api-key-here # required (unless CYCLES_MOCK=true)
export CYCLES_BASE_URL=http://localhost:7878 # required — your Cycles server URL export CYCLES_MOCK=false # true disables live enforcement and returns synthetic responses export CYCLES_ALLOW_MOCK_IN_PRODUCTION=false # must be true to use mock mode with NODE_ENV=production export PORT=3000 # optional, for HTTP transport export HOST=127.0.0.1 # optional HTTP bind address; unset binds all interfaces export MCP_HTTP_AUTH_TOKEN=replace-me # optional bearer token required on /mcp when set
export CYCLES_DEFAULT_TENANT=acme export CYCLES_DEFAULT_WORKSPACE=prod export CYCLES_DEFAULT_APP=support-bot export CYCLES_DEFAULT_WORKFLOW= export CYCLES_DEFAULT_AGENT= export CYCLES_DEFAULT_TOOLSET=
Agent-ergonomics behavior: explicit subject fields always win over CYCLES_DEFAULT_* values, and cycles_check_balance accepts an empty call when defaults supply a filter. idempotencyKey remains required on every mutating tool — same-key replay is the protocol's retry deduplication and evidence-suppression mechanism, and only the caller can hold a key stable across retries. Responses carry plain-text hints after the JSON payload when the budget is under pressure (DENY, ALLOW_WITH_CAPS, or under ~15% remaining), so agents self-regulate without host support.
Mock mode prints a prominent warning on every startup, and generated mock reservation/event IDs begin with mock_. The server refuses to start with CYCLES_MOCK=true and NODE_ENV=production unless CYCLES_ALLOW_MOCK_IN_PRODUCTION=true is also set.
For HTTP transport, set MCP_HTTP_AUTH_TOKEN to require Authorization: Bearer on every /mcp request. Blank or whitespace-only configured tokens are rejected at startup. /health remains public. If no token is configured while HTTP binds to a non-loopback address, the server prints a prominent warning.
Need an API key? API keys are created via the Cycles Admin Server (port 7979). See the deployment guide to create one, or run:
curl -s -X POST http://localhost:7979/v1/admin/api-keys \
-H "Content-Type: application/json" \ -H "X-Admin-API-Key: admin-bootstrap-key" \ -d '{"tenant_id":"acme-corp","name":"dev-key","permissions":["reservations:create","reservations:commit","reservations:release","reservations:extend","reservations:list","balances:read","decide","events:create"]}' | jq -r '.key_secret'
The key (e.g. cyc_live_abc123...) is shown only once — save it immediately. For key rotation and lifecycle details, see API Key Management.
Individual vs. team use: For individual use or evaluation, set
CYCLES_MOCK=true— no server or API key required. If you're deploying agents for multiple users or workspaces, see the multi-tenant setup guide.
# stdio transport (default — for Claude Desktop / Claude Code)
npx @runcycles/mcp-server
npx @runcycles/mcp-server --transport http
| Tool | Protocol Endpoint | Description |
|---|---|---|
cycles_reserve | POST /v1/reservations | Reserve budget before a costly operation |
cycles_commit | POST /v1/reservations/{id}/commit | Commit actual usage after operation completes |
cycles_release | POST /v1/reservations/{id}/release | Release reservation without committing |
cycles_extend | POST /v1/reservations/{id}/extend | Extend reservation TTL (heartbeat) |
cycles_decide | POST /v1/decide | Lightweight preflight budget check |
cycles_check_balance | GET /v1/balances | Check current budget balance for a scope |
cycles_list_reservations | GET /v1/reservations | List reservations with filters |
| cycles_get_reservation | GET /v1/reservations/{id} | Get reservation deta
只显示了开头部分;其余内容请在仓库中阅读