MCP YNAB サーバー
モデル コンテキスト プロトコルを通じて YNAB (You Need A Budget) 機能へのアクセスを提供する MCP サーバー実装。
特徴
口座残高と取引を表示する
新しい取引を作成する
標準化された MCP リソースを通じて YNAB データにアクセスする
Related MCP server: ABAP-ADT-API MCP-Server
インストール
uv pip install -e .
構成
サーバーが機能するにはYNAB APIキーが必要です。YNAB開発者設定から取得できます。
API キーは次の方法で提供できます。
環境変数:
YNAB_API_KEY=your_api_keyMCP秘密管理システム
プロジェクトルートの
.envファイル
使用法
サーバーの実行
# Development mode with hot reload and browser launch
task dev
# Production install for Claude Desktop, Goose, or any other MCP-supported environment
task install
利用可能なリソース
ynab://accounts- すべての YNAB アカウントをリストしますynab://transactions/{account_id}- 特定のアカウントの最近の取引を取得する
利用可能なツール
create_transaction- 新しいトランザクションを作成するget_account_balance- アカウントの現在の残高を取得する
使用例
# Create a new transaction
result = await create_transaction(
account_id="your_account_id",
amount=42.50, # in dollars
payee_name="Coffee Shop",
category_name="Dining Out",
memo="Morning coffee"
)
# Get account balance
balance = await get_account_balance("your_account_id")
# List accounts
accounts = await ctx.read_resource("ynab://accounts")
# Get recent transactions
transactions = await ctx.read_resource(f"ynab://transactions/{account_id}")
発達
# Install dependencies (uses uv)
task deps
# Run all tests including integration tests (you will need a YNAB API key for this)
task test:all
# Generate coverage report
task coverage
# Format and lint code
task fmt # Should add this to Taskfile
プロジェクトタスク
このプロジェクトでは、一般的な操作にタスクファイルを使用します。主なコマンドは次のとおりです。
task dev # Start dev server with auto-reload
task test # Run unit tests
task coverage # Generate test coverage report
task install # Install production build
task deps # Synchronize dependencies
利用可能なすべてのタスクについては、 Taskfile.yml を参照してください。