Connect AI2Fin MCP in Cursor
Connect AI2Fin’s Finance MCP Server to Cursor IDE to access your financial data directly in your code editor. Ask questions about expenses, tax deductions, bills, and more—all from within Cursor.Quick Setup (3 Steps)
- Get API Key → Generate at app.ai2fin.com/#/api
- Copy Configuration → Use the copy buttons below
- Paste in Cursor → Add to Cursor’s MCP settings and restart
Step 1: Get API Key
Generate your API key in the AI2Fin dashboard (free account required)
Step 2: Copy Config
Copy the MCP JSON configuration below
Step 3: Add to Cursor
Paste into Cursor’s MCP settings file
Step 1: Get Your API Key
Before connecting, you need an API key from AI2Fin:- Log in to app.ai2fin.com
- Navigate to Settings → API Keys (or go to
/#/api) - Click “Create New API Key”
- Name it:
Cursor MCP Integration - Select scopes:
mcp:full(ormcp:read,mcp:tools:list,mcp:tools:call) - Copy the API key immediately (shown only once!)
Step 2: Configure MCP in Cursor
Option A: Using Cursor Settings UI
-
Open Cursor Settings:
- Click the gear icon (⚙️) in the top right
- Or go to
File→Settings→Features→MCP
-
Add MCP Server:
- Click “Add MCP Server” or “Configure MCP”
- Enter the configuration (see below)
Option B: Edit Configuration File Directly
-
Open Cursor’s MCP config file:
- Windows:
%APPDATA%\Cursor\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json - macOS:
~/Library/Application Support/Cursor/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json - Linux:
~/.config/Cursor/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
- Windows:
- Add the AI2Fin MCP configuration (see JSON below)
- Save and restart Cursor
MCP Configuration JSON
Copy this configuration and replaceYOUR_API_KEY_HERE with your actual API key:
Which to use?
- API Key (recommended): Use
/mcp/inspectorendpoint withX-API-Keyheader. Best for automation and long-term use. - OAuth (JWT): Use
/mcpendpoint withAuthorization: Bearerheader. Best for user-specific integrations. Tokens expire periodically.
Step 3: Verify Connection
After adding the configuration:- Restart Cursor completely (quit and reopen)
- Open Cursor Chat (Cmd/Ctrl + L)
- Test the connection by asking:
- “What financial tools are available from AI2Fin?”
- “Show me my tax deductible expenses”
- “What bills are due this week?”
Quick Copy Configuration
API Key Configuration (Recommended)
Copy this configuration and replaceYOUR_API_KEY_HERE with your API key from app.ai2fin.com/#/api:
OAuth Configuration (JWT Token)
For OAuth-based authentication, use this configuration with your JWT token:Authentication Methods
- API Key (Recommended)
- OAuth (JWT Token)
Best for: Long-term use, automation, MCP InspectorSteps:
- Generate API key at app.ai2fin.com/#/api
- Use endpoint:
https://api.ai2fin.com/mcp/inspector - Header:
X-API-Key: your_key_here - Scopes:
mcp:fullor["mcp:read", "mcp:tools:list", "mcp:tools:call"]
- ✅ Doesn’t expire (unless you set expiration)
- ✅ Better for automation
- ✅ Can be scoped to specific permissions
- ✅ Rate limit: 50 requests per 15 minutes per key
What Can You Do in Cursor?
Once connected, you can ask Cursor questions about your finances:Tax & Deductions
- “What are my tax deductible expenses this year?”
- “Show me deductions by category”
- “What percentage of expenses are tax deductible?”
Spending Analysis
- “Where do I spend the most money?”
- “Show me spending by category this month”
- “Compare my spending this month vs last month”
Bill Management
- “What bills are due this week?”
- “Do I have any overdue bills?”
- “How much do I spend on bills monthly?”
Transaction Organization
- “Categorize all my uncategorized transactions”
- “Find duplicate transactions”
- “Show me transactions from Uber”
Receipt Processing
- “Process this receipt image”
- “Extract data from this receipt”
Troubleshooting
Connection Not Working
Connection Not Working
Symptoms: Cursor doesn’t respond to financial queriesSolutions:
- ✅ Verify API key is correct (no extra spaces)
- ✅ Check API key hasn’t been revoked
- ✅ Ensure you restarted Cursor after adding config
- ✅ Verify endpoint URL is correct:
https://api.ai2fin.com/mcp/inspector - ✅ Check Cursor’s MCP logs for errors
Authentication Errors
Authentication Errors
Error:
401 Unauthorized or Invalid API keySolutions:- ✅ Regenerate API key at app.ai2fin.com/#/api
- ✅ Verify key format:
mcp_prefix + 64 hex characters - ✅ Check key hasn’t expired
- ✅ Ensure key has required scopes:
mcp:tools:call
Rate Limit Errors
Rate Limit Errors
Error:
429 Too Many RequestsSolutions:- ✅ Wait 15 minutes for rate limit to reset
- ✅ API Key limit: 50 requests per 15 minutes
- ✅ OAuth limit: 200 requests per 15 minutes
- ✅ Use batch operations when possible
Config File Not Found
Config File Not Found
Can’t find Cursor’s MCP config file?Solutions:
- ✅ Check Cursor version (MCP support in v0.40+)
- ✅ Look in Cursor settings:
Settings→Features→MCP - ✅ Try creating the file manually if it doesn’t exist
- ✅ Ensure Cursor has write permissions to the directory
Security Best Practices
Store Keys Securely
Never commit API keys to version control. Use environment variables or secure storage.
Use Minimal Scopes
Only grant necessary permissions. Use
mcp:read for read-only access when possible.Rotate Keys Regularly
Rotate API keys every 90 days. Revoke old keys immediately after generating new ones.
Monitor Usage
Review API key usage in the AI2Fin dashboard. Set up alerts for unusual activity.
Example Queries in Cursor
Once connected, try these queries in Cursor Chat:Next Steps
Quickstart Guide
Learn MCP basics and get started
Tools Reference
Explore all 65+ financial tools
Authentication Guide
Detailed authentication documentation
Code Examples
Integration examples and patterns
Need Help?
- Documentation: docs.ai2fin.com
- Support: [email protected]
- API Keys: app.ai2fin.com/#/api
Last updated: 2025-01-04
embracingearth.space - Enterprise-grade MCP integration
