set_api_key
Store a YNAB personal access token in your operating system's keychain to authenticate API requests securely. Future runs automatically use the saved token unless the YNAB_API_KEY environment variable is set.
Instructions
Store a YNAB personal access token in the OS keychain.
The token is persisted in the platform keychain (macOS Keychain,
Windows Credential Locker, or Linux Secret Service) under
service=``mcp-ynab`` user=``YNAB_API_KEY``. After this returns, future
requests in this process and future runs will pick the key up via
``_resolve_api_key`` — though the ``YNAB_API_KEY`` env var still wins
if it is set.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"api_key": "<api_key>"
},
"name": "set_api_key"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| api_key | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |