plaid-mcp
Let an AI coding assistant (like Claude Code) answer questions about yourown bank balances and transactions — by talking to the official PlaidCLI on your own computer.
This project doesn't store your bank data, doesn't see your bankcredentials, and doesn't talk to Plaid's servers itself. It's a smalltranslator program that sits between an AI assistant and a tool you alreadytrust (the Plaid CLI), so the assistant can ask it questions like "what'smy checking account balance?" or "list last month's transactions."
If you've never heard of "MCP" or "Claude Code" before, start with the nextsection — it explains everything from scratch. If you already know whatthose are and just want the tool reference, jump toTool reference.
Contents
- New here? Start with this
- Is this safe? / Who should (and shouldn't) use this
- Glossary
- Prerequisites
- Setting up a Plaid account and the Plaid CLI
- Quick start
- Registering with Claude Code
- Using this with OpenCode
- Tool reference
- Error handling model
- Item health statuses
- Project structure
- Development
- Frequently asked questions
- Troubleshooting
- Non-goals / scope
- License
New here? Start with this
Three things you need to know about before any of this will make sense:
Plaid is a company that banks and financial apps use to securelyconnect to your bank account — it's the technology behind the "Connect yourbank" button in apps like Venmo or budgeting apps. Plaid also publishes acommand-line tool called the Plaid CLIthat lets a developer log in to their own Plaid account and pull their ownlinked bank data from a terminal, without writing any code.
MCP (Model Context Protocol) is an open standard that lets an AIassistant call out to external programs — called "tools" — to do things itcan't do on its own, like read a file, run a search, or (in this case) askthe Plaid CLI for your account balance. An "MCP server" is just a smallprogram that offers a fixed set of these tools over a standard interface.This project is an MCP server: it offers six tools (listed below) thatall revolve around reading Plaid data.
Claude Code is Anthropic's officialcommand-line AI coding assistant. It can be extended with MCP servers, sothat in addition to reading and writing code, it can also call out totools like this one. This project was built for and tested against ClaudeCode, but since MCP is an open standard, any MCP-compatible client shouldbe able to use it too — this README also includes setup steps forOpenCode, a popular open-source alternative (seeUsing this with OpenCode), and the samegeneral approach should work for other MCP clients as well.
Put together: this repository is code you run on your own computer thatlets Claude Code (or another MCP client) ask your already-set-up Plaid CLIfor your own bank data, and hand the answer back to you in conversation —e.g. "What did I spend on groceries last week?"
Is this safe? / Who should (and shouldn't) use this
This project never sees your bank login, and never talks to Plaid'sservers directly. All of that is handled entirely by the official PlaidCLI, which you install and log into yourself, independently of thisproject. This server's only job is to run CLI commands likeplaid balance --json as a subprocess and hand back whatever the CLIprints out. There is no code anywhere in this repository that stores,transmits, or has access to a Plaid API key, access token, or bankpassword — which is also exactly why it's safe for this repository to bepublic: there's nothing secret in it to leak.
This is a good fit for you if:
- You're comfortable using a terminal / command line.
- You already use (or are willing to set up) the Plaid CLI with your ownPlaid account and a real linked bank account.
- You use Claude Code (or another MCP-compatible AI assistant) and want itto be able to answer questions about your own finances.
This is not:
- A hosted service — there's no server to sign up for; you run ityourself, locally, and it only ever talks to your own machine's PlaidCLI.
- A way to view other people's bank data, or anyone's data but your ownlinked Plaid account(s).
- Officially affiliated with Plaid or Anthropic — it's an independent,personal project that happens to use both of their tools.
Glossary
Terms used throughout this README, in case any are unfamiliar:
| Term | Meaning |
|---|---|
| Terminal / command line / shell | A text-based way of running programs on your computer, instead of clicking icons. On macOS this is the "Terminal" app; the commands in this README are typed there. |
| Repository ("repo") | A folder of code tracked by Git (see below), often hosted on a site like GitHub so others can view or download it. |
Git / git clone |
Git is the version-control tool that tracks changes to code. git clone <url> downloads a copy of a repository to your computer. |
Node.js / npm |
Node.js is a runtime for running JavaScript/TypeScript code outside a web browser; this project is written in TypeScript and runs on Node.js. npm is Node's package manager — npm install downloads the libraries this project depends on. |
| Plaid Item | Plaid's term for one linked bank connection (e.g. "my checking account at Bank X"). Referred to as item or item_id throughout this README and in the tools below. |
| MCP server | A program that exposes a set of "tools" an AI assistant can call. This project is one. |
| Tool | One specific action an MCP server offers — e.g. get_balances. Each tool has defined inputs and returns a defined kind of result. |
| stdio transport | The way this MCP server communicates with its client (like Claude Code): by reading/writing structured messages over standard input/output, the same input/output channel a terminal program normally uses for text. You don't need to understand the mechanics of this — it just means "runs locally as a subprocess," not "listens on the network." |
--json flag |
A flag supported by the Plaid CLI that makes it print machine-readable JSON output instead of human-formatted text. This server always uses it. |
Prerequisites
You'll need all of the following installed and working before setting upthis project. None of them are things this project installs for you.
| Requirement | What it is | How to get it |
|---|---|---|
| A terminal | See glossary | Built into macOS/Linux ("Terminal"); on Windows, use WSL or Git Bash. |
| Git | Used to download this repository | brew install git (macOS) or see git-scm.com/downloads |
| Node.js v22 or newer | Runs this project's code | Download from nodejs.org (includes npm), or brew install node on macOS |
Plaid CLI (plaid) |
The tool this server talks to | See Setting up a Plaid account and the Plaid CLI, below |
| A Plaid account, logged in via the CLI | Lets the CLI actually fetch your data | See Setting up a Plaid account and the Plaid CLI, below |
| At least one linked bank ("Item") | The actual bank connection you want to ask about | See Setting up a Plaid account and the Plaid CLI, below |
| Claude Code | The AI assistant that will use this server | See Anthropic's installation instructions |
Check your Plaid CLI setup works before going any further — every toolin this project will fail the same way if this part isn't working yet:
plaid config # shows whether you're logged in
plaid item list --json # should print your linked bank(s) as JSON, not an error
If either of those doesn't work, fix that first (usually by runningplaid login and/or plaid link, both covered step by step below) — thisproject can't do anything the CLI itself can't already do.
Setting up a Plaid account and the Plaid CLI
If you've never used Plaid before, this section walks through everythingfrom "I have no Plaid account" to "the CLI can see my real bank balance" —all of it happens through Plaid's own CLI and dashboard, before you evertouch this project's code.
1. Install the Plaid CLI
The official Plaid CLI docs onlydocument one installation method, via Homebrew:
brew install plaid/plaid-cli/plaid
- macOS: works directly, as above. If you don't have Homebrew yet, installit first from brew.sh.
- Linux: Homebrew also works on Linux (Linuxbrew) — install Homebrew first, then run the same command.
- Windows: Plaid doesn't document a native Windows install. The mostreliable path is to install WSL(Windows Subsystem for Linux), then install Homebrew and the CLI insideyour WSL Linux environment as above.
Confirm it installed correctly:
plaid --version
2. Create a Plaid account
If you don't already have one, sign up right from the CLI:
plaid register
This opens Plaid's dashboard signup page in your browser. Create youraccount there (email/password or SSO, plus verifying your email) — this isPlaid's own signup flow, not anything specific to this project.
Every new Plaid account automatically gets access to the Sandboxenvironment — a fake/test environment with fake banks and fake data, meantfor developers to try things out safely. Sandbox alone isn't enough to seeyour own real bank data — for that, you need Production access, which isthe next step.
3. Log in via the CLI
plaid login
This opens your browser to log in to the account you just created. Onceyou approve it, the CLI stores your login locally and automaticallyfetches your API keys — you don't need to find or copy/paste any keysyourself.
4. Get approved for Production access (to use a real bank)
By default your account can only use Plaid's fake Sandbox data. To connectan actual bank account, you need to apply for Plaid's Trial plan:
plaid trial
This opens a short application form in your browser — no businesspaperwork required for the Trial plan, and Plaid states that around 90% ofapplicants are auto-approved within about 60 seconds. Once approved, pulldown your newly-unlocked Production API keys:
plaid keys fetch
5. Link a real bank account
plaid link
This opens Plaid's own "Link" flow in your browser — the same securebank-connection widget used by apps like Venmo. Search for your bank, login with your real online banking credentials (this happens inside Plaid'sown widget — this project, and the Plaid CLI itself, never see or storeyour bank password), and choose which account(s) to connect. Plaid callseach connection you create this way an Item (seeGlossary).
6. Confirm it worked
plaid item list --json
This should print JSON describing the bank connection you just linked. Ifit does, you're fully set up — continue to Quick start toset up this project itself.
Quick start
Once every item in Prerequisites above is working, here'sthe whole setup, start to finish:
# 1. Download this project
git clone https://github.com/nicholasg-dev/plaid-cli-mcp-server.git
cd plaid-cli-mcp-server
# 2. Install its dependencies
npm install
# 3. Compile it (this project is written in TypeScript, which needs to be
# turned into plain JavaScript before it can run)
npm run build
# 4. Tell Claude Code about it
claude mcp add plaid --scope user -- node $(pwd)/dist/index.js
That's it. Open (or restart) Claude Code and ask it something like "What'smy current bank balance?" — it should recognize it has a plaid toolavailable and use it.
To confirm it's registered correctly at any point:
claude mcp list # "plaid" should show up as connected
Registering with Claude Code
The one command from step 4 above, explained:
claude mcp add plaid --scope user -- node $(pwd)/dist/index.js
This tells Claude Code: "there's an MCP server named plaid; to start it,run node on this compiled file." Everything after -- is the exactcommand Claude Code will run as a subprocess whenever it needs to use oneof this server's tools.
--scope user matters: it registers the server for every Claude Codesession on your computer, not just when you happen to be working insidethis specific folder (which is what claude mcp add does by default,without --scope user). Since asking about your bank balance isn't tiedto any one coding project, user scope is almost always what you want here.
Useful follow-up commands:
claude mcp list # see all registered MCP servers, and whether they're connected
claude mcp get plaid # see the exact command Claude Code has stored for "plaid"
claude mcp remove plaid # unregister it
If you later move this folder to a different location on disk, re-run theclaude mcp add command from that new location — the registration storesan absolute file path, which won't update itself.
Using this with OpenCode
OpenCode is another open-source, terminal-based AIcoding assistant, unrelated to Anthropic, that also supports MCP servers.This project works with it the same way it works with Claude Code — sameprerequisites, same compiled dist/index.js — only theregistration step is different, since OpenCode is configured via a JSONfile instead of a CLI command.
1. Build this project first, if you haven't already (seeQuick start):
npm install
npm run build
2. Add it to an OpenCode config file. OpenCode reads a JSON config fileeither per-project (opencode.json in your project's root folder) orglobally, for every project (~/.config/opencode/opencode.json — createthis file and any missing folders in the path if it doesn't exist yet).Global is usually what you want here, for the same reason --scope useris recommended for Claude Code above: your bank balance isn't tied to anyone coding project.
Add a "plaid" entry under "mcp", using the absolute path to thisproject's compiled dist/index.js:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"plaid": {
"type": "local",
"command": ["node", "/absolute/path/to/plaid-cli-mcp-server/dist/index.js"],
"enabled": true
}
}
}
Replace /absolute/path/to/plaid-cli-mcp-server with wherever you clonedthis repository — run pwd inside the project folder to get that path.If a "mcp" key (or the file itself) already exists with other servers init, just add the "plaid" entry alongside them rather than replacing thewhole file.
3. Confirm it's picked up:
opencode mcp list # "plaid" should appear, enabled
Then, from an OpenCode session, ask it something like "what's my bankbalance?" the same way you would with Claude Code — it should recognizeand call the plaid tools automatically.
Tool reference
This section is the detailed reference for each of the six tools thisserver offers. You won't normally need to read this to use the server —just ask Claude Code what you want in plain English and it'll pick theright tool. This section is for understanding exactly what's happeningunder the hood, or for developers extending this project.
All inputs are validated with zod schemas that map 1:1onto the underlying plaid CLI's own flags — nothing is renamed orreshaped between what the AI assistant sends and what the CLI receives.Every tool call runs plaid <subcommand> ... --json and returns theparsed JSON as the result.
A successful tool call looks like:
{
"content": [{ "type": "text", "text": "<pretty-printed JSON from the CLI>" }]
}
A failed one sets isError: true, with the Plaid CLI's own error messageas the content (see Error handling model):
{
"content": [{ "type": "text", "text": "<error message from the plaid CLI>" }],
"isError": true
}
list_items
Lists every bank connection ("Item") you've linked via the Plaid CLI.
- Runs:
plaid item list --json - Inputs: none
- Returns: an object with an
itemsarray; each entry has at least anitem_id, which you can pass to the other tools below.
This is usually the first tool called, since every other tool that takesan item argument needs an item_id from here.
get_item
Gets details for one linked Item, including its accounts.
Runs:
plaid item get --item <id> --jsonInputs:
Field Type Required Description itemstringyes The item_idto look up (fromlist_items)If the
itemid doesn't exist: returnsisError: truewith amessage containingITEM_NOT_FOUND(seeItem health statuses).
get_balances
Gets current account balances — for one linked Item, or all of them.
Runs:
plaid balance --json [--item <id> | --all]Inputs:
Field Type Required Description itemstringno Only get balances for this one Item allbooleanno Get balances for every linked Item Only specify one of
itemorall, not both — that mirrors the PlaidCLI's own rule, which this server doesn't duplicate; it just passesalong whatever you asked for and lets the CLI validate it.
list_transactions
Lists transactions in a date range.
Runs:
plaid transactions list --json [--item <id> | --all] [--start-date <date>] [--end-date <date>] [--count <n>] [--offset <n>]Inputs:
Field Type Required Description itemstringno Only this one Item allbooleanno Every linked Item startDatestring(YYYY-MM-DD)no Start of the date range. If left out, the CLI defaults to the last 30 days. endDatestring(YYYY-MM-DD)no End of the date range countintegerno Maximum number of results to return offsetintegerno How many results to skip (for paging through a long list)
sync_transactions
Fetches only new or changed transactions since the last time this wascalled, using Plaid's official incremental-sync mechanism. Useful for"what's changed since I last checked."
Runs:
plaid transactions sync --json [--item <id> | --all] [--limit <n>] [--page-size <n>]Inputs:
Field Type Required Description itemstringno Only this one Item allbooleanno Every linked Item limitintegerno Maximum total results to return pageSizeintegerno How many results to fetch per underlying request The first time this runs for a given Item, it returns that Item's fulltransaction history (there's nothing to compare against yet). Every callafter that only returns what's new or changed. The bookkeeping needed toknow "what's changed since last time" (called a cursor) is handledentirely by the Plaid CLI — this project doesn't store or manage it.
check_item_health
Checks whether one or all linked Items are working normally, or need yourattention (e.g. because a bank requires you to log in again).
Inputs:
Field Type Required Description itemstringno Check just this one Item. Left out: checks every linked Item. How it works: the Plaid CLI has no single "check health" command, sothis tool does it in two steps: list the Item(s) to check (via
plaid item list, unless you gave a specificitem), then runplaid item geton each one and see whether it succeeds. If checkingmultiple Items, one broken Item won't stop the others from beingchecked — you always get a result for every Item you asked about.Example result:
[ { "itemId": "abc123", "status": "healthy" }, { "itemId": "def456", "status": "re_auth_required" } ]See Item health statuses for what each possible
statusvalue means.
Error handling model
Every call to the Plaid CLI goes through one function(src/plaidCli.ts) — nothing else in this codebase runs the plaidbinary directly. It always runs the CLI safely (as a plain argument list,never as a shell command string someone could tamper with), and alwaysadds the --json flag.
- If the CLI exits successfully: its JSON output is parsed andreturned as the tool's result.
- If the CLI exits with an error: whatever it printed as its errormessage is captured, and the tool returns a normal (non-crashing) resultwith
isError: trueand that message as the content. This covers thingslike: not being logged in, an unrecognizeditemid, a malformed date,or theplaidprogram not being found at all.
For example, asking about an Item that doesn't exist produces an errormessage shaped like this from the CLI itself:
{"error":{"code":"ITEM_NOT_FOUND","message":"no item matching \"bogus-item\" found","type":"INVALID_INPUT"}}
Item health statuses
check_item_health reads the Plaid CLI's error messages and turns theminto one of these plain-English statuses:
| Underlying Plaid error code | status returned |
What it means |
|---|---|---|
| (no error — the check succeeded) | healthy |
Everything's working normally |
ITEM_LOGIN_REQUIRED |
re_auth_required |
The bank needs you to log back in via plaid link (common after a password change on the bank's side) |
ITEM_LOCKED |
item_locked |
The bank connection is temporarily locked |
PENDING_EXPIRATION |
pending_expiration |
The connection will need re-authentication soon |
ITEM_NOT_FOUND |
not_found |
That item_id doesn't exist |
| anything else / an unrecognized error | unknown_error |
See the reason field in the result for details |
Project structure
For anyone looking to read or modify the code:
plaid-mcp/
src/
index.ts # Starts the MCP server and registers all six tools
tools.ts # Defines each tool's inputs and what it does when called
plaidCli.ts # The one place that actually runs the `plaid` CLI program
itemHealth.ts # Logic behind check_item_health
tests/ # Automated tests (see Development, below)
dist/ # Compiled output — created by `npm run build`, not checked into Git
package.json # Project metadata and dependency list
tsconfig.json # TypeScript compiler settings
Development
npm test # runs the automated test suite
npm run build
npm start # runs the compiled server directly, for manual testing
Note: the test suite runs against your real, logged-in Plaid CLI —there are no fake/mock responses. That means running npm test requiresthe same setup as using the server day-to-day (seePrerequisites): plaid installed, logged in, with atleast one bank linked.
Frequently asked questions
Does this project ever see my bank password or Plaid API keys?No. It only ever runs commands like plaid balance --json and reads theoutput. All login and credentials live inside the Plaid CLI's own localconfiguration, which this project never reads or touches.
Is my data sent anywhere other than my own computer and Plaid?This project itself makes no network calls at all — it only starts alocal subprocess (plaid) and reads its output. Whatever Claude Code (orwhichever AI assistant you're using) does with the resulting data — e.g.sending it to Anthropic's API as part of your conversation — is betweenyou and that assistant, the same as with anything else you ask it about.
Is this an official Plaid or Anthropic product?No — this is an independent personal project. "Plaid" and "Claude Code"are the names of the respective companies' own products that this projectintegrates with; this repository isn't published or endorsed by eithercompany.
Can I use this with something other than Claude Code?Yes — see Using this with OpenCode for asecond, fully-documented client. More generally, since MCP is an openstandard, any MCP client that supports stdio-transport servers should beable to run it the same way; consult that client's own documentation forhow to add an MCP server by command or config file.
Can this create new bank connections, or move money?No. It only reads data that's already there (linked Items, balances,transactions). There's no code path anywhere in this project that links anew bank, removes one, or initiates any transfer or payment. SeeNon-goals / scope.
Troubleshooting
| Symptom | Likely cause / fix |
|---|---|
command not found: plaid (or every tool call errors similarly) |
The plaid CLI isn't installed, or isn't on your PATH. Run which plaid in the same terminal Claude Code uses to confirm it can be found. |
command not found: node or npm |
Node.js isn't installed — see Prerequisites. |
| Tool calls fail with a login/auth-related error | Run plaid login again — your CLI session may have expired. |
| One specific bank ("Item") keeps failing | Run the check_item_health tool (or plaid item get --item <id> --json directly) to see exactly why — often it just needs plaid link run again for that bank. |
claude mcp list doesn't show plaid, or shows it as disconnected |
Re-run the claude mcp add command from Quick start. Make sure npm run build has been run so dist/index.js actually exists. |
| Made a code change but nothing seems different | Run npm run build again — Claude Code runs the compiled dist/ files, not the TypeScript source directly. |
Non-goals / scope
To be explicit about what this project intentionally does not do:
- No write access. It can't link a new bank, remove one, or movemoney — only ever reads data from banks you've already linked yourself.
- No direct connection to Plaid's servers. All communication withPlaid goes through the official CLI; this project never calls Plaid'sAPI directly.
- No investments or liabilities data — only Items, balances, andtransactions are covered.
- No credential storage. Login and API keys are entirely the PlaidCLI's responsibility; this project has nowhere to keep them even if itwanted to.
License
MIT — free and open source. You're welcome to use, modify,and distribute this code, including commercially, as long as the originalcopyright notice is kept. See the LICENSE file for the fulltext.