Cycles MCP Server
@runcycles
Cycles MCP Server について
AI agents call LLMs, invoke tools, and hit APIs — but have no built-in way to cap spend. A single agent loop can burn hundreds of dollars before anyone notices. Cycles MCP Server gives any MCP-compatible agent a runtime budget authority: tools to check, reserve, spend, and releas
基本情報
設定
以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。
{
"mcpServers": {
"cycles": {
"command": "npx",
"args": [
"-y",
"@runcycles/mcp-server"
],
"env": {
"CYCLES_BASE_URL": "http://localhost:7878",
"CYCLES_API_KEY": "<YOUR_API_KEY>"
}
}
}
}ツール
9Reserve budget before a costly operation (LLM call, tool invocation, external action). Returns a reservation_id to commit or release later. If decision is not ALLOW, do not proceed with the operation. For lightweight preflight checks without reserving, use cycles_decide instead.
Commit actual usage after an operation completes. Always call this after cycles_reserve whether the operation succeeded or failed. Finalizes the budget charge and releases any unused reserved amount back to the pool.
Release a reservation without committing. Use when an operation is cancelled, skipped, or fails before execution. Returns the released budget amount back to the pool.
Extend the TTL of an active reservation. Use as a heartbeat for long-running operations to prevent the reservation from expiring. Does not change the reserved amount.
Lightweight preflight check — ask whether an action would be allowed without reserving budget. Does not create a reservation. Use at workflow start to decide strategy. For concurrency-safe budget locking, use cycles_reserve instead.
Check current budget balance for a scope. Returns remaining, reserved, spent, allocated, and debt amounts. At least one subject filter (tenant, workspace, app, workflow, agent, or toolset) is required. Do not use as a substitute for cycles_reserve — balances can change between check and action.
List reservations, optionally filtered by status (ACTIVE, COMMITTED, RELEASED, EXPIRED) or subject fields. Useful for debugging stuck reservations or auditing budget usage.
Get details of a specific reservation by ID. Returns status, subject, action, reserved amount, timestamps, and affected scopes. Useful for debugging and monitoring long-running operations.
Record a usage event directly without the reserve/commit lifecycle. Use for fire-and-forget metering of completed operations where pre-estimation is not available. The event is applied atomically to all derived scopes.
概要
What is Cycles MCP Server?
Cycles MCP Server gives any MCP-compatible autonomous agent a runtime budget authority — a set of tools to check, reserve, spend, and release budget before and after every costly operation. It integrates with the Cycles platform and is built for platform teams, agent developers, and enterprises that need per-customer or per-workspace spend limits.
How to use Cycles MCP Server?
Install the package via npm install @runcycles/mcp-server, then add the server to your MCP host’s configuration (Claude Desktop, Claude Code, Cursor, Windsurf, or custom agents). The agent invokes MCP tools like cycles_reserve, cycles_commit, cycles_check_balance, cycles_create_event, and cycles_extend to manage budget at runtime. Built-in prompts help design budget strategy and generate integration code.
Key features of Cycles MCP Server
- Runtime budget reservation and commit tools
- Balance checking and event logging without gating
- Reservation extension with TTL for long operations
- Built-in prompts for budget strategy and integration
- Works with any MCP-compatible host out of the box
Use cases of Cycles MCP Server
- Coding agent with a per-task dollar cap (e.g., 5 USD limit)
- Multi-tenant SaaS with isolated per-customer budgets
- Multi-agent pipeline sharing a single workflow budget
- Long-running data pipeline with heartbeat-based reservations
- Fire-and-forget usage metering for existing call flows
FAQ from Cycles MCP Server
What does Cycles MCP Server do?
It provides runtime budget authority for autonomous agents, allowing them to check, reserve, spend, and release budget before costly operations like LLM calls or API invocations.
Do I need to modify my agent’s code to use it?
No. Because Cycles is exposed as a standard MCP server, any MCP-compatible agent can use it by simply adding the server to its configuration — no SDK integration in the agent’s own code is required.
What tools does it expose?
The server exposes five tools: cycles_reserve, cycles_commit, cycles_check_balance, cycles_create_event, and cycles_extend.
Who is this for?
Platform teams building multi-tenant agent systems, agent developers who want agents to self-regulate (e.g., degrade to cheaper models when budget is low), and enterprises deploying AI agents that need guardrails against runaway spending.
Can I track spend without gating operations?
Yes. After a call completes, you can fire cycles_create_event with the actual cost. No reservation is needed — the event is applied atomically to all budget scopes for real-time spend tracking.
「その他」の他のコンテンツ
Mcp
browsermcpBrowser MCP is a Model Context Provider (MCP) server that allows AI applications to control your browser
IDA Pro MCP
mrexodiaAI-powered reverse engineering assistant that bridges IDA Pro with language models through MCP.
MCP Registry
modelcontextprotocolA community driven registry service for Model Context Protocol (MCP) servers.
Blender
ahujasidOpen-source MCP to use Blender with any LLM
🚀 Model Context Protocol (MCP) Curriculum for Beginners
microsoftThis open-source curriculum introduces the fundamentals of Model Context Protocol (MCP) through real-world, cross-language examples in .NET, Java, TypeScript, JavaScript, Rust and Python. Designed for developers, it focuses on practical techniques for building modular, scalable,
コメント