MCP Server
Enable AI coding agents like Claude Code and Cursor to interact with your Lubes projects.
Overview
The Lubes MCP Server implements the Model Context Protocol, allowing AI agents to directly interact with your database, functions, storage, and deployments.
What can AI agents do?
- • Query and modify your database
- • Browse table schemas and data
- • Deploy and manage functions
- • Upload and manage files in storage
- • View logs and deployment status
- • Manage environment variables
- • View Git repository info, branches, and commits
- • Manage SSH keys for Git access
Installation
Install the MCP server globally or use it directly with npx:
npm install -g @lubes/mcp-servernpx @lubes/mcp-serverClaude Desktop Setup
Add the following to your Claude Desktop configuration file:
{
"mcpServers": {
"lubes": {
"command": "npx",
"args": ["@lubes/mcp-server"],
"env": {
"LUBES_API_KEY": "your-api-key",
"LUBES_ORG": "your-org-slug",
"LUBES_PROJECT": "your-project-slug"
}
}
}
}{
"mcpServers": {
"lubes": {
"command": "npx",
"args": ["@lubes/mcp-server"],
"env": {
"LUBES_API_KEY": "your-api-key",
"LUBES_ORG": "your-org-slug",
"LUBES_PROJECT": "your-project-slug"
}
}
}
}After updating the config, restart Claude Desktop. You can get your API key from the API Keys section of your dashboard.
Claude Code Setup
For Claude Code (CLI), add the server to your project's .mcp.json file:
{
"mcpServers": {
"lubes": {
"command": "npx",
"args": ["@lubes/mcp-server"],
"env": {
"LUBES_API_KEY": "your-api-key",
"LUBES_ORG": "your-org-slug",
"LUBES_PROJECT": "your-project-slug"
}
}
}
}Cursor Setup
For Cursor IDE, add the MCP server in Settings → MCP Servers:
{
"mcpServers": {
"lubes": {
"command": "npx",
"args": ["@lubes/mcp-server"],
"env": {
"LUBES_API_KEY": "your-api-key",
"LUBES_ORG": "your-org-slug",
"LUBES_PROJECT": "your-project-slug"
}
}
}
}Configuration
Environment Variables
| Variable | Required | Description |
|---|---|---|
| LUBES_API_KEY | Yes | Your Lubes API key |
| LUBES_ORG | Yes | Organization slug |
| LUBES_PROJECT | Yes | Project slug |
| LUBES_API_URL | No | Custom API URL (default: https://api.lubes.dev) |
| LUBES_READ_ONLY | No | Enable read-only mode (no mutations) |
Available Tools
The MCP server exposes the following tools to AI agents:
Database Tools
db_list_tables- List all tables in the databasedb_get_table_schema- Get schema for a specific tabledb_query- Execute a SQL querydb_table_rows- Browse table data with paginationdb_table_count- Get row count for a tabledb_branch_list- List database branchesdb_branch_create- Create a new branch
Function Tools
fn_list- List deployed functionsfn_get- Get function detailsfn_invoke- Invoke a functionfn_logs- View function logs
Storage Tools
storage_list_buckets- List storage bucketsstorage_list_files- List files in a bucketstorage_upload- Upload a filestorage_download- Download a filestorage_delete- Delete a file
Deployment Tools
deploy_list- List deploymentsdeploy_status- Get deployment statusdeploy_logs- View deployment logs
Environment Variable Tools
env_list- List environment variablesenv_get- Get a variable valueenv_set- Set a variableenv_delete- Delete a variable
Git Repository Tools
repository_info- Get Git repository info and clone URLsrepository_branches- List Git branchesrepository_commits- List recent commits on a branch
SSH Key Tools
ssh_keys_list- List SSH keys for Git accessssh_key_add- Add a new SSH keyssh_key_delete- Delete an SSH key
Example Usage
Once configured, you can ask Claude to interact with your Lubes project:
Example prompts:
- "Show me all the tables in my database"
- "Query the users table and show me the first 10 rows"
- "Create a new table called 'posts' with id, title, content, and created_at columns"
- "What functions are deployed in my project?"
- "Upload this image to the avatars bucket"
- "Show me the recent deployment logs"
- "What's the Git clone URL for this project?"
- "Show me the recent commits on the main branch"
- "List my SSH keys"