ynab_mcp CLAUDE.md

ynab_mcp CLAUDE.md is an instructions file for Claude Code from koonn/ynab_mcp. It costs 945 tokens per session, scanned A, original, Apache-2.0.

Project instructions for a personal, read-only MCP server that exposes YNAB budgets, categories, transactions, and spending summaries. YNAB, or You Need A Budget, is a budgeting app.

In plain words
What is it for?
Use them when developing or maintaining tools that read YNAB data and calculate daily, weekly, or monthly spending summaries.
Why use it?
They explain how to run, test, format, and check the server without allowing it to change financial data.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md; mentions Claude Code.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/koonn/ynab_mcp/claude-md
Clone the repo
git clone --depth 1 https://github.com/koonn/ynab_mcp

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 ynab_mcp CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/koonn/ynab_mcp/claude-md.svg)](https://agentmods.dev/instructions/koonn/ynab_mcp/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/koonn/ynab_mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/koonn/ynab_mcp/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 945 This file is loaded in full into every session.
When invoked 945 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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.00945 $0.00945
Opus 5 $0.00473 $0.00473
Sonnet 5 $0.00189 $0.00189
Haiku 4.5 $0.00094 $0.00094

Measured 5d ago against content hash 29a51c4bfe43, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

ynab_mcp CLAUDE.md 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 5d 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.md · 41 lines

How it starts

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

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project overview

ynab_mcp is a personal, read-only MCP server for YNAB (You Need A Budget). It exposes budgets/categories/transactions and server-computed daily/weekly/monthly spending summaries as MCP tools, for use from Claude Desktop / Claude Code. No write operations exist or are planned.

Source of truth for requirements/design: docs/requirements.ja.md and docs/design.ja.md (Japanese = authoritative; the .en.md counterparts are LLM-input snapshots only, not to be edited independently).

Commands

  • Install deps: uv sync
  • Lint: uv run ruff check .
  • Format: uv run ruff format .
  • Test (all): uv run pytest
  • Test (single): uv run pytest tests/test_aggregations.py::TestCalculatePace::test_zero_monthly_budget_does_not_raise
  • Run server (stdio, requires YNAB_API_TOKEN): uv run ynab-mcp
  • Import smoke test (no token required): uv run python -c "from ynab_mcp.server import mcp"
  • List registered tools/prompts without a real token: uv run python -c "import asyncio; from ynab_mcp.server import mcp; print(asyncio.run(mcp.list_tools()))"

Architecture

  • src/ynab_mcp/server.pyFastMCP instance, lifespan (owns the single YnabClient for the process lifetime), main() entry point (mcp.run(), stdio transport).
  • src/ynab_mcp/config.py — env var loading (YNAB_API_TOKEN required; YNAB_DEFAULT_BUDGET_ID / YNAB_MCP_CACHE_TTL / YNAB_MCP_WEEK_START optional). load_settings() is only called from lifespan, so importing server/tools never requires a token to be set.
  • src/ynab_mcp/client.py — async YNAB API client (httpx.AsyncClient), translates 401/429/404 into Japanese human-readable YnabApiError, routes every request through cache.py.
  • src/ynab_mcp/cache.py — in-process dict-based TTL cache, no persistence.
  • src/ynab_mcp/aggregations.py — pure functions only (period range resolution, transfer exclusion, category summarization, monthly-budget pace proration). This is the only module covered by tests/test_aggregations.py.
  • src/ynab_mcp/tools.py — the 4 MVP tools (list_budgets, get_categories, list_transactions, get_period_summary); glues client + aggregations, contains no aggregation logic of its own.
  • src/ynab_mcp/prompts.pydaily_review / weekly_review / monthly_review prompt templates.

Read the full file on GitHub · 41 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. 5d ago First seen · 41 lines · 945 tokens per session scan A 29a51c4bfe43

Subscribe to this mod's changes

ynab_mcp CLAUDE.md is an instructions file published in the GitHub repository koonn/ynab_mcp (0 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 945 tokens to every session, about $0.0047 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-31.

Related

Other instructions, from other repositories