Skip to main content

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​

  1. Lovrabet CLI installed
  2. Project configured with appcode (ran lovrabet init or lovrabet create)
  3. Logged into Lovrabet (ran lovrabet auth)

Configure Cursor MCP​

lovrabet mcp install --cursor

What Happens?

  1. CLI reads .lovrabetrc configuration to get appcode
  2. Creates .cursor/mcp.json file
  3. Writes MCP server configuration
  4. Copies .cursor/rules/lovrabet_rules.mdc rules 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-dataset MCP server is loaded in Cursor

Configure Claude Code MCP​

lovrabet mcp install --claude

What Happens?

  1. CLI reads .lovrabetrc configuration to get appcode
  2. Generates configuration command for you to execute manually
  3. Creates agents.md rules 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 NameDescription
login_browserBrowser login authentication
list_datasetsList all datasets
get_dataset_detailGet dataset details (including field metadata)
get_operation_detailGet operation details
search_datasetsSearch datasets
generate_sdkGenerate SDK code
compare_datasetsCompare two datasets

Environment Variables​

The MCP server supports the following environment variables:

Variable NameDescriptionRequired
LOVRABET_APP_CODEApp CodeYes
LOVRABET_ENVRuntime environment (online/daily)No, defaults to online

Verify Configuration​

Verify in Cursor​

  1. Restart Cursor
  2. Open Command Palette (Cmd+Shift+P)
  3. Type "MCP" to view MCP-related options
  4. Confirm lovrabet-dataset is in the list

Verify in Claude Code​

  1. Restart Claude Code
  2. In the chat, type: Can you access lovrabet datasets?
  3. AI should be able to call MCP tools

Troubleshooting​

Problem: MCP Server Not Loading​

Checklist:

  1. Confirm .lovrabetrc file exists and contains appcode
  2. Confirm you have run lovrabet auth to log in
  3. Restart IDE

Solution:

# Check configuration
cat .lovrabetrc

# Reconfigure
lovrabet mcp install --cursor

Symptom: MCP tools return authentication errors

Solution:

# Re-login
lovrabet auth

# Restart IDE

Problem: Dataset Not Found​

Checklist:

  1. Confirm appcode is correct
  2. Confirm you have access to the dataset
  3. Check environment variable configuration

Using with Skills​

MCP configuration works best when combined with Lovrabet AI Skills:

# Install AI Skills (recommended)
npx skills add lovrabet/lovrabet-skill

# Configure MCP
lovrabet mcp install --cursor

Skills provide:

  • TypeScript SDK Usage Guide (Filter, SQL, BFF three core APIs)
  • MCP SQL Creation Workflow (5-step mandatory process)
  • AntD UI Development Standards
  • API Integration Guide
  • Menu Management Guide
  • Backend Function Script Writing Standards