YNAB MCP Server
ynab-mcp-server
mcp-frameworkで構築されたモデルコンテキストプロトコル(MCP)サーバー。このMCPは、 https://ynab.comにあるYNAB予算設定を操作するためのツールを提供します。
AIがこのツールと連携するには、YNABから個人アクセストークンを取得する必要があります: https://api.ynab.com/#personal-access-tokens 。このMCPサーバーをクライアントに追加する際は、個人アクセストークンをYNAB_API_TOKENとして提供する必要があります。このトークンはLLMに直接送信されることはありません。YNAB APIで使用するために、環境変数に非公開で保存されます。
設定
環境変数を指定します:
YNAB_API_TOKEN(必須)
YNAB_BUDGET_ID(オプション)
Related MCP server: ynab-mcp
ゴール
このプロジェクトの目標は、AIとの会話を通じてYNABの予算管理ツールとやり取りできるようにすることです。実現したい主なワークフローは以下のとおりです。
ワークフロー:
初回セットアップ
利用可能な予算の中から予算を選択するよう求められます。最初に別のツールを使用しようとすると、デフォルトの予算を設定するよう求めるプロンプトが表示されます。
必要なツール: ListBudgets
支出超過カテゴリーを管理する
新しい取引を追加する
取引の承認
毎月の総支出と総収入を確認する
カテゴリー目標に基づいて資金を割り当てる準備ができた自動配分
現在の状態
利用可能なツール:
ListBudgets - アカウントで利用可能な予算を一覧表示します
BudgetSummary - 資金が不足しているカテゴリと低いアカウントの概要を提供します
GetUnapprovedTransactions - 承認されていないすべての取引を取得する
CreateTransaction - 指定された予算とアカウントのトランザクションを作成します。
例:
Add a transaction to my Ally account for $3.98 I spent at REI todayアカウントIDを知るために、まずGetBudgetを呼び出す必要があります
ApproveTransaction - YNAB予算内の既存の取引を承認します
承認には取引IDが必要です
GetUnapprovedTransactionsと組み合わせて使用することで、保留中の取引を承認することができます。
承認されていない取引を取得した後、プロンプト:
approve the transaction for $6.95 on the Apple Card
次:
1回の呼び出しで複数の取引を承認できる
updateCategory ツール - または、オプションパラメータを取得して zod および mcp フレームワークで正しく動作させることができれば、より一般的な updateTransaction ツール
MCP フレームワークから移行して、モデル コンテキスト プロトコル SDK を直接使用しますか?
クイックスタート
# Install dependencies
npm install
# Build the project
npm run build
プロジェクト構造
ynab-mcp-server/
├── src/
│ ├── tools/ # MCP Tools
│ └── index.ts # Server entry point
├── .cursor/
│ └── rules/ # Cursor AI rules for code generation
├── package.json
└── tsconfig.jsonコンポーネントの追加
YNAB SDK では、利用可能な API エンドポイントについて説明します: https://github.com/ynab/ynab-sdk-js 。
YNABオープンAPI仕様はこちらです: https://api.ynab.com/papi/open\ _api\_spec.yaml 。これを使用して、AIに新しいツールを生成するよう指示することができます。カーソルエージェントのプロンプトの例:
create a new tool based on the readme and this openapi doc: https://api.ynab.com/papi/open_api_spec.yaml
The new tool should get the details for a single budgetCLI を使用してさらにツールを追加できます。
# Add a new tool
mcp add tool my-tool
# Example tools you might create:
mcp add tool data-processor
mcp add tool api-client
mcp add tool file-handlerツール開発
ツール構造の例:
import { MCPTool } from "mcp-framework";
import { z } from "zod";
interface MyToolInput {
message: string;
}
class MyTool extends MCPTool<MyToolInput> {
name = "my_tool";
description = "Describes what your tool does";
schema = {
message: {
type: z.string(),
description: "Description of this input parameter",
},
};
async execute(input: MyToolInput) {
// Your tool logic here
return `Processed: ${input.message}`;
}
}
export default MyTool;npmへの公開
package.json を更新します。
nameが一意であり、npm の命名規則に従っていることを確認してください。適切な
versionを設定するdescription、author、licenseなどを追加します。binが正しいエントリファイルを指しているか確認する
ローカルでビルドしてテストします。
npm run build npm link ynab-mcp-server # Test your CLI locallynpm にログインします (必要に応じてアカウントを作成します)。
npm loginパッケージを公開します:
npm publish
公開後、ユーザーはそれをクロードデスクトップクライアント(下記参照)に追加したり、npxで実行したりすることができます。
Claude Desktopでの使用
Smithery経由でインストール
Smithery経由で Claude Desktop 用の YNAB Budget Assistant を自動的にインストールするには:
npx -y @smithery/cli install @calebl/ynab-mcp-server --client claude地域開発
この構成を Claude Desktop 構成ファイルに追加します。
MacOS : ~/Library/Application Support/Claude/claude_desktop_config.json Windows : %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"ynab-mcp-server": {
"command": "node",
"args":["/absolute/path/to/ynab-mcp-server/dist/index.js"]
}
}
}公開後
この構成を Claude Desktop 構成ファイルに追加します。
MacOS : ~/Library/Application Support/Claude/claude_desktop_config.json Windows : %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"ynab-mcp-server": {
"command": "npx",
"args": ["ynab-mcp-server"]
}
}
}その他のMCPクライアント
利用可能な他のクライアントについては、 https://modelcontextprotocol.io/clientsを確認してください。
構築とテスト
ツールに変更を加える
npm run buildを実行してコンパイルするサーバーは起動時にツールを自動的に読み込みます
もっと詳しく知る
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityAmaintenanceAn MCP server that allows users to interact with YNAB data, enabling access to account balances, transactions, and the creation of new transactions through the Model Context Protocol.86MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol (MCP) server for interacting with YNAB (You Need A Budget). Provides tools for accessing budget data through MCP-enabled clients like Claude Desktop.4MIT
- AlicenseNot gradedqualityCmaintenanceA Model Context Protocol server that enables interaction with You Need A Budget (YNAB) via their API, allowing users to manage budgets, accounts, categories, and transactions through natural language.2MIT
- AlicenseAqualityBmaintenanceA Model Context Protocol server for YNAB (You Need A Budget). Enables users to query budgets, accounts, categories, transactions, and more, as well as create, update, and delete transactions and manage scheduled transactions from any MCP client.252MIT
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
Hosted remote MCP server for YNAB on Cloudflare Workers with OAuth
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/calebl/ynab-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server