opsenDocs
Developers

MCP, plugins and API

.md

Ask opsen from Claude Code, Cursor, Codex or any MCP client, or read it over a REST API.

opsen runs an MCP server at https://opsen.dev/mcp. Your coding agent can ask what you spend, what is wasted, and for the exact prompt to fix waste in the repository it is working in. The same data is available as JSON over a REST API. Every call reads your latest audit and changes nothing.

Create a key

Settings → API keys and MCP → Create a key. The key is shown once; opsen stores only its hash. Each key reads one workspace. Revoke it from the same page at any time. Every call is in the audit log.

Claude Code

Install the opsen plugin. It adds the MCP server, a skill that knows when to use it, and the /opsen:fix and /opsen:spend commands. Claude Code asks for your key and keeps it in your system keychain.

/plugin marketplace add opsen-dev/plugins
/plugin install opsen@opsen

Or connect the server alone:

Terminal
claude mcp add --transport http opsen https://opsen.dev/mcp --header "Authorization: Bearer opsen_sk_…"

Then, in a repository: /opsen:fix finds every fix opsen has for it and makes them.

Cursor

Press Add opsen to Cursor on the settings page after creating a key, or add this to .cursor/mcp.json:

JSON
{"mcpServers": {"opsen": {"url": "https://opsen.dev/mcp", "headers": {"Authorization": "Bearer ${env:OPSEN_API_KEY}"}}}}

Codex

In ~/.codex/config.toml:

toml
[mcp_servers.opsen]
url = "https://opsen.dev/mcp"
bearer_token_env_var = "OPSEN_API_KEY"

Or install the plugin, which Codex reads from the same marketplace: codex plugin marketplace add opsen-dev/plugins.

Tools

Tool Returns
opsen_summary Monthly spend, what is not used, and the five largest findings
list_findings Every finding with its cost, basis and how to fix it; optional category
get_finding One finding with its items (people, seats, workflows)
fix_prompts Fixable waste in code with a ready prompt for each; pass repo for one repository
spend_by_source Spend and waste per source and platform
budgets Each budget, this month's spend against it and its state
cost_per_pull_request Claude Code spend per engineer and per merged pull request

The server speaks MCP over Streamable HTTP, both the 2026-07-28 revision and the 2025 handshake, and answers every request with one JSON response.

REST API

Terminal
curl -s https://opsen.dev/api/v1/summary -H "Authorization: Bearer opsen_sk_…"
Endpoint Same as
GET /api/v1/summary opsen_summary
GET /api/v1/findings?category= list_findings
GET /api/v1/findings/{id} get_finding
GET /api/v1/fixes?repo= fix_prompts
GET /api/v1/spend spend_by_source
GET /api/v1/budgets budgets
GET /api/v1/report The full report JSON

Fix in your IDE

Every finding that can be fixed in code has a Fix in your IDE menu on its row. It opens Cursor, Claude Code (terminal or VS Code) or the Codex app with the fix prompt filled in for you to review, or starts the fix in the cloud with Devin, a Cursor cloud agent or GitHub Copilot's coding agent. Cloud agents are connected in Settings → Coding agents; Copilot uses your own GitHub sign-in.