docs / agents

AI Agents (MCP)

Ask your agent instead of opening a dashboard. The CLI includes a Model Context Protocol server, so Claude Code, Cursor, and Gemini CLI can answer “what has this session cost?”, “what did the team spend on AI this week?”, or “is any budget about to run over?” with live numbers.

Set it up

Nothing extra. promptconduit install registers the server for Claude Code, Cursor, and Gemini CLI alongside the hooks. If you installed before CLI v0.29.0, it is added once after the CLI updates itself. Start a new agent session to pick it up.

bash
promptconduit mcp install            # every tool that has PromptConduit hooks
promptconduit mcp install cursor     # or name them: claude-code, cursor, gemini-cli
promptconduit mcp uninstall          # remove everywhere, and don't re-add after updates
promptconduit mcp tools              # what your agent sees
promptconduit status                 # where it's registered

For Claude Code the CLI runs claude mcp add --scope user, so the server is available in every project. Cursor gets an entry in ~/.cursor/mcp.json and Gemini CLI one in ~/.gemini/settings.json; other servers in those files are left alone. Any other MCP client can run promptconduit mcp over stdio. To skip it, install with --no-mcp.

Free: your own sessions

These tools need no account and read only files on your machine. Nothing is sent anywhere.

session_cost
What the current session has cost: total, tokens, and USD per model, priced from local transcripts and Cursor hook data.
cost_history
Daily cost on this machine over the last 1 to 90 days.
recent_sessions
Recent sessions with their directory, branch, last prompt, and resume id.
setup_status
Which tools have hooks and the MCP server, whether you are signed in, and whether events sync.

Teams: spend, savings, and budgets

Sign in once with promptconduit login. If you belong to more than one team, the agent passes the team name, or you can set PROMPTCONDUIT_ORG.

team_spend
Totals and spend by member, repo, client, model, branch, pull request, and day. Lists are capped so they fit in context.
team_savings
Cache savings earned, the monthly saving from running light premium-model turns on Sonnet, and runaway sessions.
team_budgets
Each budget with month-to-date spend, percent used, and projected month-end spend.
team_export_csv
Spend as CSV grouped by client, repo, member, pr, or day.
team_list
The teams you belong to, with your role and plan.
team_members
Members with email, name, role, and member id.
team_billing
Plan, seats used and available, subscription status, and trial end.

These change shared team settings. They are marked as writes, so your agent asks before running them. Budgets, tags, invites, billing, members, and Slack alerts need an owner or admin. Removing a member and disconnecting Slack also need an explicit confirm: true.

team_set_budget
Create or change a monthly budget for the team, a repo, or a member (by email).
team_remove_budget
Delete a budget. Marked destructive.
team_tag_repo
Attribute a repo’s spend to a client, or clear the tag.
team_invite
Invite someone by email and get the link to send them.
team_create
Start a team with you as owner. Free for up to 3 people.
team_join
Accept an invite link.
team_billing_checkout
Get a Stripe Checkout link for the Team or Growth plan. You open it and enter payment details there; the agent never sees them.
team_billing_portal
Get a billing portal link to change plan, update the card, see invoices, or cancel.
team_connect_slack
Send budget alerts to a Slack channel through an incoming webhook. A test message is posted first.
team_set_member_role
Change a member’s role. Only owners grant admin or owner, and a team always keeps an owner. Marked destructive.
team_remove_member
Remove a member. Marked destructive and needs confirm: true.
team_disconnect_slack
Stop Slack budget alerts (email alerts continue). Marked destructive and needs confirm: true.

You: synced spend, insights, and trends

The same numbers as the dashboard’s Overview and Trends pages, from the events your CLI has synced. Needs promptconduit login.

my_spend
Your own spend across every synced machine: total, change vs the previous period, cache savings, and spend by model, day, and branch.
my_insights
Your usage summary: sessions, streaks, top tools and success rates, and error patterns.
my_trends
How you work with agents over time (plan mode, subagents, interruptions, tool success) and coaching suggestions with a guide for each.

Prompts

The server also ships three prompts. In Claude Code they appear as slash commands, for example /mcp__promptconduit__spend_review.

  • spend_review: spend for a period, the biggest costs, and the three changes that would save the most.
  • budget_check: every budget against month-to-date and projected spend, with anything at risk flagged.
  • session_cost: what this session has cost so far.

The same from a terminal

Every team tool is also a command, so scripts and agents without MCP can use it. Add --json to any of them.

promptconduit team
The teams you belong to.
promptconduit team spend [--period 7d|30d|90d] [--by member|repo|client|model|branch|pr|day]
Team spend totals and breakdowns.
promptconduit team savings
The savings report.
promptconduit team budgets
Budgets with month-to-date and projected spend.
promptconduit team budgets set --org-wide|--repo <name>|--member <email> --monthly <usd>
Create or change a budget.
promptconduit team budgets rm <id>
Remove a budget.
promptconduit team tag <repo> <client> | --clear
Tag a repo with a client.
promptconduit team export [--by …] [-o file]
CSV export.
promptconduit team create <name> · invite <email> · join <link>
Start a team, invite people, accept an invite.
promptconduit team members · members role <email> <role> · members rm <email> --yes
List members, change a role, remove someone.
promptconduit team billing · billing checkout --tier team|growth · billing portal [--open]
Plan and seats; print or open a Stripe checkout or billing portal link.
promptconduit team alerts · alerts slack <webhook-url|-> · alerts slack --disconnect --yes
Where budget alerts go; connect or disconnect Slack.
promptconduit insights spend · insights trends [--period 7d|30d|90d] [--json]
Your own synced spend and coaching trends.
bash
promptconduit team spend --period 7d
promptconduit team spend --by client --json
promptconduit team budgets set --repo acme/api --monthly 500
promptconduit team tag acme/api "Acme Corp"

Troubleshooting

  • The agent doesn’t see the tools. Start a new session. In Claude Code, /mcp lists connected servers. In Cursor, check that the server is turned on under Settings → MCP.
  • Registration with Claude Code failed. The claude command has to be on your PATH. Otherwise run claude mcp add --scope user promptconduit -- "$(which promptconduit)" mcp.
  • Team tools say “not signed in”. Run promptconduit login. The local tools keep working without it.