Transport (OpenAPI)
OpenAPI documents the HTTP transport, not each tool’s parameters:GET /api/mcp returns 405 — use POST with a JSON-RPC body.
Per-tool input and output JSON Schemas are returned only from tools/list (outputSchema uses JSON Schema draft 2020-12 for validating structuredContent from tools/call). Tool descriptors also include OAuth securitySchemes for ChatGPT linking. They are intentionally not duplicated in OpenAPI.
Read tools
Write tools
Write tools are off unless the OAuth grant or personal access token includes the scope.transactions:write and budgets:write are not in the default scope set. Existing connections stay read-only until the user approves a client that includes them. After a client gains a write scope, delete and recreate the connector so consent runs again.
GET /v1/me reports capabilities.readonly. It is true when the token has neither write scope.
Write tools are annotated readOnlyHint: false and destructiveHint: true. MCP hosts such as Claude and ChatGPT use those hints to ask the user before the call. Vings does not add a second confirmation inside the tool. A client that ignores annotations can still call the tool if the token has the scope.
REST stays read-only. These changes are MCP tools only.
Each write tool returns the saved rows in
structuredContent.items. Amounts are integer cents. A missing scope returns JSON-RPC error -32602 with code FORBIDDEN. Invalid arguments return -32602 (Invalid tool arguments, or BAD_REQUEST / NOT_FOUND from the mutation). More than 50 mutation calls in 10 minutes returns -32029 (RATE_LIMITED).
create_transactions
Insert manual transactions the user owns. Amounts are integer cents. The batch is one insert. A failure, including the monthly cap of 1000 created rows, writes nothing.
These rows are not linked to a bank account.
INTERNAL_TRANSFER rows cannot be created. Calling the tool again inserts another row.
structuredContent.items.
delete_transactions
Delete 1–100 transactions by id. Manual rows are permanently deleted. Plaid-imported rows are marked removed and remain in the database, so a later sync does not recreate them as new spending. If any id does not exist, or any id is repeated, nothing is written.
structuredContent.items is { "id", "outcome" }. outcome is deleted for a manual row and removed for a Plaid row.
update_transactions
Replace fields on transactions the user owns. Fetch the current row with search_transactions first: every field below is required, and omitted fields are not left as-is.
INTERNAL_TRANSFER rows cannot be edited with this tool. Change those with mark_transactions_internal and unmark_transactions_internal. Unlink a pair with unlink_internal_transfers.
transactions to edit a batch. One edit is an array of one.
mark_transactions_internal
Mark 1–100 unlinked TRANSFER_IN, TRANSFER_OUT, or credit-card repayment transactions as internal. They then drop out of spending, cashflow, and budget totals. Each id must be unlinked. A positive charge on a known credit account is rejected.
unmark_transactions_internal
Revert 1–100 unlinked internal transfers to the category stored when they were marked, so they count in spending and budgets again. Linked pairs must be unlinked with unlink_internal_transfers first. The argument is the same transactionIds array as mark_transactions_internal.
link_internal_transfers
Mark and link two unlinked transactions as one internal transfer. Both sides must belong to the same user, use different accounts, have opposite directions, and be posted within 7 days. Eligible rows are TRANSFER_IN, TRANSFER_OUT, already-marked internal transfers, and credit-card repayments. A positive charge on a known credit account is rejected. Same-currency amounts must match exactly. Different currencies must match within 5% after conversion.
structuredContent.items contains the transaction_id_a row after both sides are marked and linked. Find candidate ids with search_transactions (showInternalTransfers: true when a side is already internal). The transaction payload includes linked_transaction_id.
unlink_internal_transfers
Clear the reciprocal linked_transaction_id values on a linked pair. Both sides stay INTERNAL_TRANSFER and continue to be excluded from spending, income, cashflow, and budget totals. Use unmark_transactions_internal afterward if you need to restore original categories. Pass either transaction id. Calling unlink again on an already-unlinked row is a no-op.
update_budgets
Create, change, or delete budget targets. Amounts are cents. category is a leaf income or expense category.
Test locally
Frompackages/external, run the API (for example bun run dev), then use MCP Inspector:
http://localhost:<port>/api/mcp and set:
OAuth for AI apps
The same MCP URL works for ChatGPT, Claude, Gemini, Grok, and Muse. Pastehttps://external.vin.gs/api/mcp into the app’s custom connector flow, then approve access on the Vings consent screen. Creating, updating, and deleting transactions, and updating budgets, stay off unless that approval includes a write scope.
Discovery URLs:
GET /.well-known/oauth-protected-resourceGET /api/.well-known/oauth-protected-resource/mcpGET /.well-known/oauth-authorization-server(includesoffline_accessfor refresh tokens andregistration_endpointfor dynamic client registration)GET /.well-known/openid-configuration
POST /api/oauth/register is the RFC 7591 registration endpoint. It accepts public clients whose redirect URIs belong to these apps, then creates a known_mcp OAuth client. Leave client ID and secret blank in the app when it offers dynamic registration.
Allowed callbacks include:
- ChatGPT:
https://chatgpt.com/connector_platform_oauth_redirectandhttps://chatgpt.com/connector/oauth/{callback_id} - Claude hosted apps:
https://claude.ai/api/mcp/auth_callbackandhttps://claude.com/api/mcp/auth_callback - Claude Code:
http://localhost:{port}/callbackandhttp://127.0.0.1:{port}/callback - Gemini consumer apps:
https://oauth-redirect.googleusercontent.com/r/…and the sandbox and test hosts, plus/a/… - Gemini Enterprise:
https://vertexaisearch.cloud.google.com/oauth-redirect - Grok:
https://grok.com/connectors-oauth-exchange-code - Muse:
https://agent.meta.ai/api/hatch/oauth/callback
/api):
GET /.well-known/openai-apps-challenge— ChatGPT Apps SDKGET /.well-known/google-connected-apps— Gemini Connected Apps (JSON body, no.jsonsuffix)
GET /api/oauth/authorize on the external host, which forwards to Supabase after removing offline_access. Token exchange and refresh go through POST /api/oauth/token on the same host, which forwards the grant to Supabase after dropping a client secret.
After updating OAuth discovery, delete and recreate the connector so cached metadata is refreshed (OpenAI connector OAuth guidance).
Deploying new MCP tools
- Merge to the branch that deploys
packages/external(production hosthttps://external.vin.gs). - Confirm the Vercel
vings-externalproduction deployment includes the commit. - Ensure the OAuth grant or personal access token includes
transactions:writefor link/unlink. Default grants stay read-only. - Delete and recreate the ChatGPT (or Claude / Gemini / Grok / Muse) connector so
tools/listis refetched. Cached connectors can keep an older tool list after a deploy. - Call
tools/listagainstPOST https://external.vin.gs/api/mcpand confirmlink_internal_transfersandunlink_internal_transfersare present.
known_mcp client from packages/server/scripts/createKnownMcpOAuthClient.ts (--preset chatgpt|claude|gemini|grok|muse). Directory listings that hold a client ID for you, such as a ChatGPT app submission, use that client. Dynamic registration covers the connect-by-URL path.