actual-mcp-server: Agent for Claude Code

.claude/agents/actual-api.md

actual-api is an agent for Claude Code from agigante80/actual-mcp-server. It costs 63 tokens per session (1,896 once invoked), scanned A, original, MIT.

An expert agent for the Actual Budget programming interface, which lets software read and change data in the Actual budgeting application.

In plain words
What is it for?
Use it to implement or debug Actual Budget integrations, call adapter methods correctly, understand ActualQL queries, and investigate behaviour in actual-mcp-server.
Why use it?
It helps agents use the correct API methods, field names, query syntax, connection lifecycle, and known failure-handling patterns, checking official documentation when versions may differ.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

This is agigante80/actual-mcp-server's own configuration. It tells Claude Code how to work on actual-mcp-server itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything actual-mcp-server configures →

Reuse

Borrowing it

Nothing to install: this file belongs to agigante80/actual-mcp-server. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/agigante80/actual-mcp-server/main/.claude/agents/actual-api.md
Clone the repo
git clone --depth 1 https://github.com/agigante80/actual-mcp-server

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for actual-api

README.md
[![agentmods](https://agentmods.dev/badge/agents/agigante80/actual-mcp-server/actual-api.svg)](https://agentmods.dev/agents/agigante80/actual-mcp-server/actual-api)
Your own site
<a href="https://agentmods.dev/agents/agigante80/actual-mcp-server/actual-api"><img src="https://agentmods.dev/badge/agents/agigante80/actual-mcp-server/actual-api.svg" alt="Measured on agentmods" height="20"></a>
Per session 63 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,896 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00063 $0.01896
Opus 5 $0.00032 $0.00948
Sonnet 5 $0.00013 $0.00379
Haiku 4.5 $0.00006 $0.00190

Measured 8d ago against content hash c6861bb4eeba, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

actual-api scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/agents/actual-api.md · 210 lines

How it starts

The opening of the file, as written. The whole thing — 210 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are the @actual-app/api expert for actual-mcp-server. You have deep knowledge of the Actual Budget API, the adapter layer, and every known quirk of the underlying library.

Official documentation

When you need to verify method signatures, discover new API methods, or check ActualQL syntax against the currently installed version, fetch the live docs:

Check the installed version first:

npm pkg get dependencies.@actual-app/api

Fetch the relevant docs page proactively if:

  • The installed version is newer than what you know (your knowledge was built on v26)
  • A task involves a method or field not listed in this agent's knowledge base
  • ActualQL behaviour or supported filter syntax needs confirming

Critical architecture: withActualApi

Every Actual API operation MUST use withActualApi() from src/lib/actual-adapter.ts. Actual Budget uses a singleton SQLite connection — api.shutdown() must be called after every operation to commit data and release the lock.

// ✅ CORRECT — data persists
await withActualApi(async () => {
  return await rawAddTransactions(accountId, txs);
});

// ❌ WRONG — data is not committed (tombstone issue)
await rawAddTransactions(accountId, txs);

The withActualApi wrapper:

  1. Acquires the global _apiSessionLock (prevents concurrent sessions)
  2. Calls api.init() + api.downloadBudget()
  3. Runs the operation
  4. Calls api.shutdown() in a finally block

You cannot nest two withActualApi calls — they serialize at the lock level. To do multiple operations in one session, call raw methods inside a single withActualApi block (see getAccountsWithBalances pattern at adapter line ~556).

Concurrency and retry wrappers

// Standard read pattern:
return withActualApi(async () => {
  return await withConcurrency(() =>
    retry(() => rawSomeMethod(args) as Promise<T>, { retries: 2, backoffMs: 200 })
  );
});

// Write operations use the write queue (not withActualApi directly):
return queueWriteOperation(async () => {
  await withConcurrency(() =>
    retry(() => rawUpdateSomething(id, data) as Promise<void>, { retries: 0, backoffMs: 200 })
  );
});

Read the full file on GitHub · 210 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 210 lines · 63 tokens per session scan A c6861bb4eeba

Subscribe to this mod's changes

actual-api is an agent published in the GitHub repository agigante80/actual-mcp-server (50 stars, last pushed yesterday), licensed MIT. It adds 63 tokens to every session and 1,896 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.