Skip to main content
Glama
plaid-mcp

plaid-mcp

by cikasfm

plaid-mcp

CI Coverage License: MIT

A local-first, Cloudflare-Workers-ready TypeScript Model Context Protocol (MCP) server for querying your personal banking accounts, transactions, recurring bills, liabilities, and investments via Plaid.


Agent Self-Setup (Zero-Friction)

Want your AI coding agent (Antigravity, Claude Code, Codex, Cursor, etc.) to install and wire this up for you automatically? Paste this into your agent:

Set up https://github.com/cikasfm/plaid-mcp for me following the Agent Runbook in its README.

Agent Runbook

If you are an AI agent setting up plaid-mcp for the user, follow these steps in order:

  1. Prerequisites check

    • Verify Node.js >= 18 (node -v) and npm are available.

    • Choose an install directory (default: ~/dev/plaid-mcp).

  2. Clone, install, and build

    git clone https://github.com/cikasfm/plaid-mcp.git ~/dev/plaid-mcp
    cd ~/dev/plaid-mcp
    npm install
    npm run build
  3. Configure Plaid credentials securely (DO NOT ask the user to paste secrets in chat)

    • Ask the user to copy their Plaid client_id and secret from the Plaid Dashboard and run these commands locally in their own terminal (keeps secrets out of chat history, git, and MCP config files):

    • macOS (pbpaste):

      mkdir -p ~/.plaid-mcp && chmod 700 ~/.plaid-mcp
      # After copying PLAID_CLIENT_ID:
      printf 'PLAID_CLIENT_ID=%s\n' "$(pbpaste | tr -d '\r\n')" > ~/.plaid-mcp/.env
      # After copying PLAID_SECRET (use PLAID_ENV=sandbox to test first, or production for live banks):
      printf 'PLAID_SECRET=%s\nPLAID_ENV=production\nPLAID_PRODUCTS=transactions\nPLAID_COUNTRY_CODES=US\n' "$(pbpaste | tr -d '\r\n')" >> ~/.plaid-mcp/.env
      chmod 600 ~/.plaid-mcp/.env
    • Linux / Windows: Instruct the user to copy .env.example to ~/.plaid-mcp/.env, fill in PLAID_CLIENT_ID, PLAID_SECRET, and PLAID_ENV (production or sandbox), and restrict permissions (chmod 600 ~/.plaid-mcp/.env).

    • Optional: If the user wants brokerage holdings (get_investments) or APR/loan details (get_liabilities) and has those products enabled in Plaid, set PLAID_PRODUCTS=transactions,investments,liabilities.

  4. Link bank accounts via local Plaid Link

    • Once the user confirms ~/.plaid-mcp/.env is written, start the local Link helper in the background:

      node ~/dev/plaid-mcp/dist/link.js

      (For quick Sandbox testing without a browser, run node ~/dev/plaid-mcp/dist/link.js --sandbox instead.)

    • Tell the user to open http://localhost:8787, click Connect Bank via Plaid Link, and link all desired institutions.

    • Tokens are saved locally to ~/.plaid-mcp/tokens.json (0600).

    • Important: Once the user says they are done linking banks, stop the background link.js server so the local token-exchange endpoint is not left running.

  5. Register plaid-mcp in the user's MCP config

    • Merge the following entry into the existing mcpServers object (do not overwrite other servers):

      • Antigravity: ~/.gemini/config/mcp_config.json

      • Claude Desktop (macOS): ~/Library/Application Support/Claude/claude_desktop_config.json

      • Cursor: ~/.cursor/mcp.json

    {
      "mcpServers": {
        "plaid-mcp": {
          "command": "node",
          "args": ["/ABSOLUTE/PATH/TO/plaid-mcp/dist/index.js"]
        }
      }
    }

    (Replace /ABSOLUTE/PATH/TO/plaid-mcp with the resolved absolute path—never use ~ in args.)

  6. Verify end-to-end

    • Run node ~/dev/plaid-mcp/dist/link.js --list to confirm all linked institutions are saved.

    • Once the MCP client loads plaid-mcp, call list_institutions and get_accounts to verify live balances and present a clean summary to the user.


Related MCP server: Pluggy Finance MCP

Tools Exposed

Tool

Description

list_institutions

List connected banks / Plaid Items

get_accounts

List all accounts with balances (uses /accounts/get by default; optional realtime_balance: true)

get_transactions

Query & filter transactions by date, institution, account, merchant, category, and amount

get_spending_summary

Aggregate spend & income by category, month, and top merchants (excludes internal transfers & overdraft protection transfers by default)

sync_transactions

Incremental /transactions/sync with persisted cursor

get_recurring_transactions

Recurring bills, subscriptions, and paychecks

get_liabilities

Credit card APRs, minimum payments, and loan balances (if enabled)

get_investments

Brokerage holdings and securities (if enabled)


Manual CLI Reference

# Link one or more banks in your browser (http://localhost:8787)
npm run link

# Instantly link Plaid's sandbox test bank (requires PLAID_ENV=sandbox)
npm run link -- --sandbox

# List currently linked banks
npm run link -- --list

# Remove a linked bank
npm run link -- --remove <item_id>

Architecture & Cloudflare Workers Readiness

  • src/plaid-client.ts — Pure Web-standard fetch Plaid REST client (zero Node-only dependencies).

  • src/server.ts — Runtime-agnostic McpServer factory (createPlaidMcpServer(client, store)).

  • src/types.ts — Pluggable TokenStore interface so local JSON storage (src/store.ts) can be swapped for Cloudflare KV / D1 / Durable Objects without changing any MCP tool logic.

  • src/index.ts — Local Stdio MCP entrypoint.

  • src/link.ts — Local browser Plaid Link helper with OAuth redirect support (/oauth-return).

To deploy to Cloudflare Workers:

  1. Implement TokenStore backed by Cloudflare KV or D1.

  2. Mount createPlaidMcpServer(client, kvStore) behind Cloudflare's agents (McpAgent) or Streamable HTTP transport with OAuth/Bearer auth.

Security Notes

  • All API keys (~/.plaid-mcp/.env) and Plaid access_tokens (~/.plaid-mcp/tokens.json) are stored strictly outside this repository with 0600 permissions.

  • All MCP tools are read-only—they cannot initiate transfers, payments, or trades.

  • Never commit .env or tokens.json.

Available Tools

8 tools
get_accountsC

List all linked bank, credit card, loan, and investment accounts with their balances.

Inputs: institution, realtime_balance.

get_investmentsA

Fetch investment holdings and securities across linked brokerage accounts (requires the investments product to be enabled for the linked item).

Inputs: institution.

get_liabilitiesA

Fetch credit card APRs, minimum payments, statement balances, mortgages, and student loans (requires the liabilities product to be enabled for the linked item).

Inputs: institution.

get_recurring_transactionsB

List detected recurring inflows (paychecks, deposits) and recurring outflows (subscriptions, utilities, rent, bills).

Inputs: institution.

get_spending_summaryA

Aggregate spending and income by category, month, and top merchants over a date range. Ideal for building financial reports, cash-flow analysis, and recommendations without flooding context with raw transactions.

Inputs: end_date, start_date, institution, top_merchants, +1 more.

get_transactionsA

Fetch and filter bank/credit card transactions across linked accounts for a date range. Note: in Plaid, positive amounts are outflows/expenses and negative amounts are inflows/income/refunds.

Inputs: limit, category, end_date, account_id, +6 more.

list_institutionsA

List all connected financial institutions (Plaid Items) available for querying in the current Plaid environment.

Inputs: no named parameters.

sync_transactionsA

Run Plaid's incremental /transactions/sync for one or all linked institutions and persist the updated sync cursor.

Inputs: institution, reset_cursor.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 8 tools

    Disambiguation5/5

    The four transaction-related tools are cleanly separated: get_transactions fetches raw data, get_spending_summary aggregates it, sync_transactions manages the incremental cursor, and get_recurring_transactions detects subscriptions/paychecks. Each tool targets a distinct resource or operation with no genuine overlap.

    Naming Consistency4/5

    All names are snake_case with a verb_noun structure (get_accounts, sync_transactions, list_institutions), which is highly predictable. The minor blemish is mixing 'get_' and 'list_' for retrieval operations (list_institutions vs get_accounts), but this is a small deviation.

    Tool Count5/5

    Eight tools is well within the sweet spot and each maps to a concrete Plaid data domain (accounts, transactions, spending, recurring, liabilities, investments). No tool feels redundant or filler.

    Completeness4/5

    The read/query surface is broad: institutions, accounts, raw and aggregated transactions, incremental sync, recurring streams, liabilities, and investments. Gaps exist around item lifecycle (creating a link token, removing/disconnecting an item) and the higher-level /identity or balance endpoints, but core analysis workflows are covered.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      Enables read-only access to personal bank accounts via the TrueLayer API, allowing querying of accounts, balances, transactions, and generating financial analytics such as spending by category, subscriptions, and monthly summaries.
      9
      1
      MIT
    • F
      license
      B
      quality
      C
      maintenance
      Provides read-only access to personal financial data via Pluggy, including accounts, transactions, investments, credit cards, and aggregations like total balance, monthly expenses, and net worth.
      18
      -
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables Claude to query linked bank and credit card accounts through Plaid, covering balances, transaction search, recurring charges, liabilities, and investment holdings. All access is read-only and runs locally, so no tool can move money or change anything at a bank.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables read-only access to connected personal and business bank and credit card accounts for cash flow analysis, expense and subscription tracking, transaction search, and finance reviews.
      MIT