# CLAUDE.md - Plaid Transactions MCP
## Adding a New Bank Account
When the user asks to "add a new bank account", "link a new account", "connect a bank", or similar:
**Run this command:**
```bash
lsof -ti:8765 | xargs kill -9 2>/dev/null; sleep 1 && python3 /Users/sfinnerty/CodingProjects/plaid-transactions-mcp/add_account.py
```
This launches a local web portal (port 8765) that:
1. Opens the browser automatically
2. Runs Plaid Link for secure bank authentication
3. Stores the access token in macOS Keychain
4. The new account will be available immediately via `plaid_list_accounts`
The command includes cleanup of any stale processes on port 8765.
## Available MCP Tools
- `plaid_list_accounts` - Show all linked accounts
- `plaid_get_balance` - Get current balances
- `plaid_get_transactions` - Fetch transactions with date range
- `plaid_search_transactions` - Search by merchant, amount, category
## Credentials
All credentials stored in macOS Keychain under service "PlaidTracker":
- `plaid_client_id` - Plaid API client ID
- `plaid_secret` - Plaid API secret
- `access_token_*` - Individual bank access tokens
## MCP Configuration
Claude Code has **two separate MCP config files** depending on the mode:
| Mode | Config File |
|------|-------------|
| Normal | `~/.claude/mcp.json` |
| YOLO (`--yolo`) | `~/.claude/mcp/yolo.json` |
**Both files must be updated** when changing MCP server settings.
### Correct Plaid MCP Config
```json
{
"mcpServers": {
"plaid": {
"command": "/Users/sfinnerty/codingProjects/plaid-transactions-mcp/.venv/bin/python",
"args": ["/Users/sfinnerty/codingProjects/plaid-transactions-mcp/plaid_mcp.py"]
}
}
}
```
### Troubleshooting
If Plaid MCP shows "failed" in `/mcp`:
1. Check logs: `~/.cache/claude-cli-nodejs/-Users-sfinnerty/mcp-logs-plaid/`
2. Common issue: Wrong Python path (e.g., pointing to a Python version that doesn't exist)
3. Test manually: `echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}' | /Users/sfinnerty/codingProjects/plaid-transactions-mcp/.venv/bin/python /Users/sfinnerty/codingProjects/plaid-transactions-mcp/plaid_mcp.py`
4. After fixing config, restart Claude Code completely