MCP Configuration
MCP (Model Context Protocol) is a protocol that enables AI IDEs to access external data and servers. Lovrabet CLI provides one-click MCP configuration, allowing you to directly access Lovrabet datasets in IDEs like Cursor, Claude Code, and more.
What is Lovrabet MCP?
The Lovrabet MCP server (@lovrabet/dataset-mcp-server) is an MCP service that enables AI IDEs to:
- 📋 List datasets - View all available Lovrabet datasets
- 🔍 Get dataset details - View dataset field definitions, types, enum values, etc.
- 📝 Generate SDK code - Automatically generate SDK call code for datasets
- 🔎 Search datasets - Search datasets by name
- 📊 Compare datasets - Compare differences between two datasets
Use Cases
In an AI IDE, you can directly converse with AI:
You: Help me query the user dataset to get all active users
AI: [Uses MCP tools to get dataset information]
I'll help you write the query code...
You: Generate TypeScript type definitions for the order dataset
AI: [Uses MCP to get dataset fields]
Here are the generated type definitions...
Quick Start
Prerequisites
- Lovrabet CLI installed
- Project configured with appcode (ran
lovrabet initorlovrabet create) - Logged into Lovrabet (ran
lovrabet auth)
Configure Cursor MCP
lovrabet mcp install --cursor
What happens?
- CLI reads
.lovrabetrcconfiguration to get appcode - Creates
.cursor/mcp.jsonfile - Writes MCP server configuration
- Copies
.cursor/rules/lovrabet_rules.mdcrules file
Configuration example:
{
"mcpServers": {
"lovrabet-dataset": {
"command": "npx",
"args": ["-y", "@lovrabet/dataset-mcp-server"],
"env": {
"LOVRABET_APP_CODE": "your-app-code",
"LOVRABET_ENV": "online"
}
}
}
}
After completion:
- Restart Cursor
- Confirm
lovrabet-datasetMCP server is loaded in Cursor
Configure Claude Code MCP
lovrabet mcp install --claude
What happens?
- CLI reads
.lovrabetrcconfiguration to get appcode - Generates configuration command for you to execute manually
- Creates
agents.mdrules file
Execute the output command:
claude mcp add lovrabet-dataset --scope user npx -y @lovrabet/dataset-mcp-server -e LOVRABET_APP_CODE=your-app-code
After completion:
- Restart Claude Code
- Confirm MCP server is loaded in Claude Code
Other IDE Configuration
lovrabet mcp install --other
This displays the generic MCP configuration JSON, which you can copy to your IDE's configuration file.
Configuration template:
{
"mcpServers": {
"lovrabet-dataset": {
"command": "npx",
"args": ["-y", "@lovrabet/dataset-mcp-server"],
"env": {
"LOVRABET_APP_CODE": "your-app-code",
"LOVRABET_ENV": "online"
}
}
}
}
MCP Tools Reference
After configuration, the AI IDE can use the following MCP tools:
| Tool Name | Description |
|---|---|
login_browser | Browser login authentication |
list_datasets | List all datasets |
get_dataset_detail | Get dataset details (including field metadata) |
get_operation_detail | Get operation details |
search_datasets | Search datasets |
generate_sdk | Generate SDK code |
compare_datasets | Compare two datasets |
Environment Variables
The MCP server supports the following environment variables:
| Variable Name | Description | Required |
|---|---|---|
LOVRABET_APP_CODE | Application code | Yes |
LOVRABET_ENV | Runtime environment (online/daily) | No, defaults to online |
Verify Configuration
Verify in Cursor
- Restart Cursor
- Open Command Palette (
Cmd+Shift+P) - Type "MCP" to view MCP-related options
- Confirm
lovrabet-datasetis in the list
Verify in Claude Code
- Restart Claude Code
- In the chat, type:
Can you access lovrabet datasets? - AI should be able to call MCP tools
Troubleshooting
Problem: MCP Server Not Loading
Check:
- Confirm
.lovrabetrcfile exists and contains appcode - Confirm you have run
lovrabet authto log in - Restart IDE
Solution:
# Check configuration
cat .lovrabetrc
# Reconfigure
lovrabet mcp install --cursor
Problem: Cookie Expired
Symptom: MCP tools return authentication errors
Solution:
# Re-login
lovrabet auth
# Restart IDE
Problem: Dataset Not Found
Check:
- Confirm appcode is correct
- Confirm you have access to the dataset
- Check environment variable configuration
Using with Skills
MCP configuration works best with Lovrabet skills:
# Install skill
lovrabet skill install cursor
# Configure MCP
lovrabet mcp install --cursor
Skills provide:
- Filter query building standards (avoid common errors)
- MCP SQL creation workflow
- AntD UI development standards
- API integration guide
Related Documentation
- skill Installation - Install development standards and guides
- Command Reference - All CLI commands
- MCP Official Documentation - Learn about the MCP protocol