Plaid Transactions MCP Server
Enables secure interaction with Plaid's Transactions API to sync, search, and analyze financial transactions from linked bank accounts using natural language queries.
README
Plaid Transactions MCP Server
A Model Context Protocol (MCP) server that provides tools for interacting with Plaid's Transactions API. This server enables Claude to sync, search, and analyze your financial transactions securely.
Features
🛠️ Four Powerful Tools
-
plaid_list_accounts- List all your linked Plaid accounts- Shows all accounts stored in keychain
- Displays friendly names (e.g., "American Express", "Citibank")
- Use this to see which accounts you can query
-
plaid_sync_transactions- Sync all transactions with automatic pagination- Retrieves added, modified, and removed transactions
- Supports filtering by account and date range
- Handles cursor-based pagination automatically
- Works with multiple accounts - specify by name
- Returns data in Markdown or JSON format
-
plaid_get_transaction_categories- Get Plaid's transaction category taxonomy- Shows all available categories and their hierarchy
- Useful for understanding transaction categorization
- No authentication required
-
plaid_search_transactions- Search and filter transactions intelligently- Filter by merchant name, category, amount range, or date
- Supports partial matching for merchant and category searches
- Works with multiple accounts - specify by name
- Combines sync + filtering in one operation
🔐 Security Features
- Stores credentials in macOS Keychain (never in files)
- No credentials in code or environment files
- Follows secure credential management best practices
⚡ Smart Features
- Automatic pagination - Fetches all data without manual paging
- Response truncation - Handles large datasets gracefully with helpful guidance
- Clear error messages - Actionable error messages guide you to solutions
- Dual output formats - Human-readable Markdown or machine-readable JSON
Installation
1. Install Dependencies
cd ~/plaid-transactions-mcp
pip install -r requirements.txt
2. Set Up Plaid Credentials in Keychain
You need to store three values in macOS Keychain:
# Store your Plaid Client ID
security add-generic-password -s "PLAID_CLIENT_ID" -a "plaid" -w "your_client_id_here"
# Store your Plaid Secret
security add-generic-password -s "PLAID_SECRET" -a "plaid" -w "your_secret_here"
# Store your Plaid Access Token (obtained after linking an account)
security add-generic-password -s "PLAID_ACCESS_TOKEN" -a "plaid" -w "access-sandbox-xxx"
Where to get these values:
- Client ID & Secret: Get from Plaid Dashboard
- Access Token: Obtained after a user completes Plaid Link flow (see below)
3. Getting an Access Token
To get transactions, you first need an access token by having a user link their bank account:
- Create a Link Token using
/link/token/createwithtransactionsin the products array - User completes Plaid Link flow in your app
- Exchange the public token for an access token using
/item/public_token/exchange - Store the access token in Keychain
For testing, use Plaid Sandbox credentials.
4. Configure Claude Desktop
Add this to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"plaid-transactions": {
"command": "python",
"args": ["/Users/sfinnerty/plaid-transactions-mcp/plaid_mcp.py"]
}
}
}
5. Restart Claude Desktop
After updating the config, restart Claude Desktop to load the MCP server.
Usage Examples
List Your Accounts
What Plaid accounts do I have?
Claude will use plaid_list_accounts to show all your linked accounts.
Sync All Recent Transactions
Show me my recent American Express transactions
Claude will use plaid_sync_transactions with the American Express account.
Show me all transactions from my Citibank account
Claude will automatically select the Citibank account.
Search for Specific Merchants
Find all my Starbucks purchases from last month
Claude will use plaid_search_transactions with merchant and date filters.
Filter by Amount
Show me all transactions over $100 in December 2024
Claude will search with amount and date filters.
View Transaction Categories
What categories does Plaid use for transactions?
Claude will use plaid_get_transaction_categories.
Filter by Category
List all my travel expenses from Q4 2024
Claude will search for transactions in travel-related categories.
Tool Details
plaid_sync_transactions
Purpose: Retrieve all transaction updates since last cursor position.
Parameters:
access_token(required): Your Plaid access tokencursor(optional): Pagination cursor from previous synccount(optional): Transactions per page (default: 100, max: 500)account_ids(optional): Filter to specific accountsdate_start(optional): Start date (YYYY-MM-DD)date_end(optional): End date (YYYY-MM-DD)response_format(optional): "markdown" or "json" (default: markdown)
Returns:
- Added transactions (new since last sync)
- Modified transactions (updated since last sync)
- Removed transactions (deleted since last sync)
- Next cursor for incremental syncing
plaid_get_transaction_categories
Purpose: Get the complete taxonomy of Plaid transaction categories.
Parameters: None
Returns:
- Hierarchical list of all categories
- Category IDs and full paths (e.g., "Food and Drink > Restaurants > Coffee Shop")
plaid_search_transactions
Purpose: Search and filter transactions by multiple criteria.
Parameters:
access_token(required): Your Plaid access tokenmerchant_name(optional): Filter by merchant (partial match)category(optional): Filter by category (partial match)min_amount(optional): Minimum transaction amountmax_amount(optional): Maximum transaction amountdate_start(optional): Start date (YYYY-MM-DD)date_end(optional): End date (YYYY-MM-DD)account_ids(optional): Filter to specific accountsresponse_format(optional): "markdown" or "json" (default: markdown)
Returns:
- Filtered list of matching transactions
- Summary of filters applied and match count
Environment Configuration
Switching Between Sandbox and Production
By default, the server uses Plaid's production API. To use sandbox for testing:
Edit plaid_mcp.py line 26:
# For sandbox testing
PLAID_API_URL = "https://sandbox.plaid.com"
# For production
PLAID_API_URL = "https://production.plaid.com"
Sandbox Test Users
Plaid provides test users in sandbox mode:
user_good- Standard test user with transactionsuser_transactions_dynamic- Generates new transactions on refresh
Error Handling
The server provides clear, actionable error messages:
- Invalid access token: "The token may have expired. Re-link the account via Plaid Link."
- Rate limit exceeded: "Plaid limits to 100 requests/minute. Wait 60 seconds."
- Item login required: "User needs to re-authenticate via Plaid Link."
- Missing keychain credential: Provides exact command to store the credential
Troubleshooting
"Failed to retrieve from keychain"
Make sure you've stored all three values in Keychain:
# Verify credentials are stored
security find-generic-password -s "PLAID_CLIENT_ID" -w
security find-generic-password -s "PLAID_SECRET" -w
"Invalid access token"
Your access token may have expired. You'll need to:
- Have the user re-authenticate via Plaid Link
- Exchange the new public token for a fresh access token
- Update the keychain with the new token
"Rate limit exceeded"
Plaid limits requests to 100 per minute in production. Wait 60 seconds before retrying.
Server not appearing in Claude Desktop
- Check the config file path is correct
- Verify the Python path in the config
- Restart Claude Desktop completely
- Check Claude Desktop logs for errors
Development
Testing the Server
# Check syntax
python -m py_compile plaid_mcp.py
# Run the server (will hang waiting for stdio - this is normal)
python plaid_mcp.py
Code Structure
- Utility Functions: Keychain access, API requests, error handling, formatting
- Pydantic Models: Input validation for all tools
- Tool Implementations: Three main tools with comprehensive docstrings
- Error Handling: Clear, actionable error messages throughout
Security Best Practices
✅ DO:
- Store credentials in macOS Keychain
- Use environment-specific API URLs (sandbox vs. production)
- Validate all inputs with Pydantic models
- Handle errors gracefully with clear messages
❌ DON'T:
- Store credentials in
.envfiles - Commit credentials to git
- Hardcode API keys in code
- Expose sensitive data in error messages
Resources
License
This MCP server is provided as-is for use with Plaid's Transactions API. Make sure to comply with Plaid's terms of service and API usage policies.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。