Cursor IDE
Connect Lemonado to Cursor IDE using Model Context Protocol
Native MCP Support: Cursor has built-in support for Model Context Protocol, providing seamless integration with your Lemonado data.
Overview
Cursor is an AI-first code editor that enhances your development workflow with intelligent code completion and chat capabilities. With Lemonado's MCP integration, you can query your business data directly from Cursor's AI assistant.
Prerequisites
- Cursor IDE installed (version 0.42.0 or later)
- Active Lemonado AI Connector with MCP endpoint
- macOS, Windows, or Linux system
Setup Instructions
Step 1: Locate Cursor Configuration
Cursor stores MCP configuration in a JSON file. The location depends on your operating system:
- macOS:
~/Library/Application Support/Cursor/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json - Windows:
%APPDATA%\Cursor\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json - Linux:
~/.config/Cursor/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
If the file doesn't exist, create the directory structure and the file manually.
Step 2: Configure MCP Settings
Edit the MCP settings file to add Lemonado:
{
"mcpServers": {
"lemonado": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-fetch",
"https://mcp.lemonado.io/mcp"
],
"env": {
"MCP_AUTH_TYPE": "oauth",
"MCP_OAUTH_PROVIDER": "lemonado"
}
}
}
}
Step 3: Authenticate with OAuth
When you first use the Lemonado connector, you'll be prompted to authenticate via OAuth. This will open a browser window where you can log in to your Lemonado account and select which AI Connector to use.
Step 4: Restart Cursor
- Completely quit Cursor (Cmd+Q on macOS, Alt+F4 on Windows)
- Reopen Cursor
- The MCP connection will be automatically established
Step 5: Test the Connection
In Cursor's AI chat (Cmd+K or Ctrl+K), try a query like:
@lemonado What data sources are available?
If configured correctly, you'll receive a list of your connected data sources.
Using Lemonado in Cursor
Basic Queries
Use the @lemonado mention to query your data:
@lemonado Show me revenue trends for Q4 2024
@lemonado List all customers who signed up last month
Code Generation with Real Data
Cursor can generate code based on your actual data structure:
@lemonado Generate a TypeScript interface for our customer data model
@lemonado Create a SQL query to find top performing products
Data Analysis
@lemonado Analyze the correlation between marketing spend and conversions
@lemonado What's the average customer lifetime value by segment?
Advanced Configuration
Multiple AI Connectors
You can add multiple instances of Lemonado, each will prompt for OAuth authentication:
{
"mcpServers": {
"lemonado-sales": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-fetch",
"https://mcp.lemonado.io/mcp"
],
"env": {
"MCP_AUTH_TYPE": "oauth",
"MCP_OAUTH_PROVIDER": "lemonado"
}
},
"lemonado-analytics": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-fetch",
"https://mcp.lemonado.io/mcp"
],
"env": {
"MCP_AUTH_TYPE": "oauth",
"MCP_OAUTH_PROVIDER": "lemonado"
}
}
}
}
Features & Capabilities
Supported Operations
- Read Operations: Query any connected database or SaaS tool
- Data Analysis: Perform aggregations and calculations
- Schema Inspection: View table structures and relationships
- Real-time Data: Access the latest synchronized data
Context Awareness
Cursor's AI understands your project context and can:
- Suggest queries based on your code
- Generate type-safe interfaces from your data
- Create API endpoints that match your data structure
- Write tests using real data examples
Query Assistance
With Lemonado connected, Cursor can:
- Suggest appropriate queries for your use case
- Generate documentation from your data schema
- Help you understand your data structure
Best Practices
1. Use Specific Queries
Instead of broad queries, be specific:
- ❌ "Show me all data"
- ✅ "Show me customer orders from last week with totals over $1000"
2. Leverage Context
Reference your code when asking questions:
@lemonado Based on this UserService class, what customer fields should I include?
3. Iterate on Results
Start simple and refine:
- Get basic data structure
- Add filters and conditions
- Optimize the query
4. Security Considerations
Important: OAuth authentication ensures your credentials are never exposed in configuration files.
- OAuth tokens are managed securely by the MCP client
- Authentication happens in your browser
- You control which AI Connector to use
- Monitor usage in your Lemonado dashboard
Troubleshooting
Connection Not Working
-
Check MCP settings file location
- Ensure the file is in the correct directory
- Verify JSON syntax is valid
-
OAuth authentication issues
- Clear browser cookies and try again
- Ensure you're logged into the correct Lemonado account
-
Check Cursor version
- Update to the latest version if needed
- Some older versions may have MCP bugs
No Response from Lemonado
- Verify your AI Connector is active in Lemonado
- Check if you've exceeded rate limits
- Ensure your data sources are properly connected
Slow Queries
- Optimize your Lemonado connector permissions
- Use specific filters in your queries
- Consider upgrading your Lemonado plan for better performance
Authentication Errors
- Re-authenticate via OAuth if prompted
- Check if your AI Connector has been disabled
- Ensure you selected the correct AI Connector during OAuth flow
Tips & Tricks
Quick Data Exploration
@lemonado Show me the schema for the customers table
Generate Mock Data
@lemonado Create 5 sample customer records based on our actual schema
Debug Queries
@lemonado Explain the performance implications of this SQL query
Data Validation
@lemonado Check if there are any null values in critical fields
Comparison: Cursor vs Other IDEs
| Feature | Cursor | VS Code | IntelliJ |
|---|---|---|---|
| Native MCP | ✅ Built-in | ⚠️ Extension needed | ❌ Not available |
| AI Integration | ✅ Native | ⚠️ Copilot/Continue | ⚠️ Plugin required |
| Setup complexity | Simple | Moderate | Complex |
| Performance | Fast | Good | Varies |
| Context awareness | Excellent | Good | Limited |
Next Steps
- Explore available data connectors
- Learn about query optimization
Pro Tip: Use Cursor's multi-file editing with Lemonado queries to update multiple files based on your data schema simultaneously.