Resources API¶
Auto-generated API reference for MCP resource functions. Resources are split between static knowledge content (YNAB methodology) and dynamic budget data (live from the YNAB API).
Knowledge Resources¶
Static YNAB methodology content loaded from markdown files at import time.
knowledge
¶
MCP Resource definitions for YNAB methodology knowledge.
Exposes static YNAB budgeting knowledge as MCP Resources at
ynab://knowledge/ URIs. LLMs can read these resources to
understand YNAB methodology without hallucinating concepts.
All resources return markdown content loaded at import time
from the methodology/ subpackage.
terminology
¶
YNAB terminology and key concepts reference.
Covers milliunits, on-budget vs off-budget accounts, age of money, To Be Budgeted, the Four Rules, and transaction states.
Returns:
-
str–Markdown content explaining YNAB terminology.
Source code in src/ynaa_mcp/knowledge.py
credit_cards
¶
YNAB credit card handling guide.
Covers the Credit Card Payment category, budgeting for purchases on credit, making payments, returns and refunds, pre-YNAB debt, and common mistakes.
Returns:
-
str–Markdown content explaining credit card handling in YNAB.
Source code in src/ynaa_mcp/knowledge.py
goals
¶
YNAB goal types reference.
Covers Target Category Balance, Monthly Savings Builder, Needed for Spending goal types with API field mappings and use case guidance.
Returns:
-
str–Markdown content explaining YNAB goal types.
Source code in src/ynaa_mcp/knowledge.py
overspending
¶
YNAB overspending behavior guide.
Covers cash vs credit overspending, negative balance rollover behavior, and strategies for handling overspent categories.
Returns:
-
str–Markdown content explaining overspending in YNAB.
Source code in src/ynaa_mcp/knowledge.py
reconciliation
¶
YNAB reconciliation process guide.
Covers the step-by-step reconciliation process, transaction statuses, adjustment transactions, and best practices for regular reconciliation.
Returns:
-
str–Markdown content explaining reconciliation in YNAB.
Source code in src/ynaa_mcp/knowledge.py
Budget Resources¶
Dynamic resources that fetch live data from the YNAB API for a specific budget.
resources
¶
MCP Resource definitions for YNAB budget structure.
Exposes budget accounts, categories, and payees as MCP Resources
at ynab:// URIs. LLMs can read these resources upfront to
understand budget structure without repeated tool calls.
All resources return JSON strings with filtered, current data. Deleted entities are always excluded. Categories also exclude hidden items, and payees exclude transfer payees.
AppContext
dataclass
¶
AppContext(client: YNABClient, cache: CacheStore)
Shared dependencies for all MCP tools.
Created during server lifespan and available to tools via
ctx.lifespan_context.
Attributes:
-
client(YNABClient) –The YNAB API client instance.
-
cache(CacheStore) –The delta cache store for YNAB API responses.
budget_accounts
async
¶
List all active accounts in a budget with current balances.
Returns a JSON array of non-deleted accounts, each containing id, name, type, on_budget, closed, and balance fields.
Parameters:
-
budget_id(str) –The YNAB budget ID.
-
ctx(Context) –The MCP context with lifespan dependencies.
Returns:
-
str–JSON string of account objects.
Source code in src/ynaa_mcp/resources.py
budget_categories
async
¶
List all active category groups and categories with budget amounts.
Returns a JSON array of non-deleted category groups, each containing a group name and nested array of non-deleted, non-hidden categories with id, name, budgeted, activity, and balance fields.
Groups with no visible categories after filtering are excluded.
Parameters:
-
budget_id(str) –The YNAB budget ID.
-
ctx(Context) –The MCP context with lifespan dependencies.
Returns:
-
str–JSON string of category group objects.
Source code in src/ynaa_mcp/resources.py
budget_payees
async
¶
List all non-transfer payees in a budget.
Returns a JSON array of non-deleted, non-transfer payees with id and name fields. Transfer payees (those linked to an account) are excluded.
Parameters:
-
budget_id(str) –The YNAB budget ID.
-
ctx(Context) –The MCP context with lifespan dependencies.
Returns:
-
str–JSON string of payee objects.