DLP lets your AI coding assistant read your database
Database Lookup Protocol (DLP)
DLP lets your AI coding assistant read your database — so it writes better code, faster.
Ever had your AI assistant guess what your database looks like, only to generate wrong column names or miss relationships? DLP solves that. It gives tools like Claude Code, Cursor, VS Code Copilot, and antigravity (Gemini) read-only access to your database schema and data — no debug code needed, no copy-pasting table structures into chat.
🌐 dlp-mcp.vercel.app — Give Your AI Database Eyes
What does DLP do?
Think of DLP as a bridge between your AI assistant and your database. Once set up:
- Your AI can see your tables, columns, and relationships automatically
- It can preview actual data to understand what's stored
- It can run safe read-only queries to answer questions about your data
- All of this happens without you writing any code or pasting schema dumps
Example: Instead of telling your AI "I have a users table with id, name, email columns...", it can just look at the database itself.
How it works
DLP uses the Model Context Protocol (MCP) — an open standard that lets AI assistants use external tools. When you set up DLP:
- Your IDE spawns DLP as a background process
- DLP connects to your database using the
DATABASE_URLfrom your project - Your AI assistant gets four new tools to inspect the database
- Everything runs locally on your machine — your data never leaves
Your AI Assistant <--> DLP (MCP Server) <--> Your Database
(Claude, etc.) (runs locally) (Postgres, MySQL, etc.)
Installation
npm install database-lookup-protocol
Or use it directly without installing (via npx):
npx database-lookup-protocol set cursor
Quick Start
Setting up DLP takes two steps and under a minute.
Prerequisites
- Node.js v18 or higher installed
- A database you want to connect to (PostgreSQL, MySQL, MongoDB, SQL Server, or Prisma)
- An IDE that supports MCP (Claude Code, Cursor, VS Code, or antigravity)
Step 1: Add your database connection to `.env`
Make sure your project has a .env file with your database connection. If you already have one (most projects do), you're good — skip to Step 2.
Option A: Single connection string (most common)
DATABASE_URL=postgresql://user:password@localhost:5432/mydb
Option B: Individual variables (if your project uses separate host/user/password vars)
# PostgreSQL
PG_HOST=localhost
PG_PORT=5432
PG_DATABASE=mydb
PG_USER=admin
PG_PASSWORD=secret
# MySQL
MYSQL_HOST=localhost
MYSQL_PORT=3306
MYSQL_DATABASE=mydb
MYSQL_USER=admin
MYSQL_PASSWORD=secret
# MongoDB
MONGODB_URI=mongodb://localhost:27017/mydb
# SQL Server
MSSQL_HOST=localhost
MSSQL_PORT=1433
MSSQL_DATABASE=mydb
MSSQL_USER=admin
MSSQL_PASSWORD=secret
DLP automatically detects whichever format you use — DATABASE_URL or individual variables.
Not sure what your DATABASE_URL looks like? See the Connection String Formats section below for examples for each database.
Step 2: Connect DLP to your IDE
Open a terminal inside your project folder (where your .env file is) and run:
# For antigravity (Gemini)
npx dlp set antigravity
# For Cursor
npx dlp set cursor
# For VS Code
npx dlp set vscode
# For Claude Code
npx dlp set claude
# For all IDEs at once
npx dlp set all
That's it! Restart your IDE and DLP is ready to use.
What just happened? The
dlp setcommand read your database connection variables from your project's.envfile (eitherDATABASE_URLor individual vars likePG_HOST,MYSQL_HOST, etc.) and wrote the MCP configuration to your IDE's global config directory. Your AI assistant will now see DLP as an available tool.
Using DLP in your AI assistant
Once set up, your AI assistant automatically has access to four database tools. You don't need to do anything special — just ask questions about your database naturally:
- "What tables are in my database?"
- "Show me some sample data from the users table"
- "What columns does the orders table have?"
- "Find all users who signed up in the last week"
Your AI will use DLP tools behind the scenes to answer these questions.
Available tools
| Tool | What it does | Example use |
|---|---|---|
dlp_get_schema |
Shows all |
Tools (1)
dlp_get_schemaRetrieves the database schema including tables, columns, and relationships.Environment Variables
DATABASE_URLrequiredConnection string for PostgreSQL, MySQL, MongoDB, or SQL ServerConfiguration
{"mcpServers": {"dlp": {"command": "npx", "args": ["-y", "database-lookup-protocol"]}}}