nlqdb

Solve · Agent builders

How do I give Claude or Cursor a SQL database it can create and query?

If you want Claude Desktop, Cursor, or any MCP host to have a SQL database — not just a connection to one you configured yourself — point it at nlqdb's hosted MCP server. The `nlqdb_query` tool provisions Postgres from the agent's first English goal (no connection string, no schema) and answers in English with the SQL shown.

Every database MCP server (Postgres, SQL Server, SQLite) assumes you've already provisioned the database, designed the schema, and pasted a connection string into the host config. That's the right shape when an existing warehouse is the source of truth. But an agent that needs a scratch database to write to and query — a place to log what it does and answer 'how many' over it — has nowhere to put one without a human doing the DBA work first.

Drop this in your HTML

The first thing an MCP host does with a fresh database — provision it, then ask an aggregate over it — is one English goal here, not a connection string plus a CREATE TABLE.

> tasks grouped by status with a count of each
<nlq-data goal="tasks grouped by status with a count of each"></nlq-data>

What nlqdb actually does for this

  • Point Claude Desktop, Cursor, Cline, or Claude Code at `mcp.nlqdb.com` — the `nlqdb_query` tool needs no connection string and no schema setup.
  • Calling `nlqdb_query` with no `db` set provisions Postgres from the agent's first English goal — create and query are one call, no separate create tool.
  • `nlqdb_list_databases` and `nlqdb_describe` let the host enumerate and inspect schemas; every answer returns rows plus the compiled SQL to audit.
  • Per-`(mcp_host, device_id)` `sk_mcp_*` keys scope access per agent and device; revocation is per-device and shown in the dashboard.

What nlqdb doesn't do here

  • No connecting to a database you already run — nlqdb provisions and owns the Postgres it queries; bring-your-own-Postgres is roadmap, not shipped. To query an existing DB over MCP, a Postgres-MCP server is the right shape.
  • No native vector search — nlqdb is Postgres-first; unstructured similarity recall over text strings is Mem0 or pgvector's job.
  • No public `nlqdb_create_database` verb — provisioning is implicit in `nlqdb_query` by design (`SK-MCP-002`, trust boundary).

Questions buyers ask

How is this different from a Postgres or SQL Server MCP server?
Those connect an MCP host to a database you already provisioned, configured, and supplied a connection string for. nlqdb provisions the Postgres itself from the agent's first English goal — no connection string, no schema authored by hand. The trade-off is honest: nlqdb owns its database, so it can't query one you already run.
Which MCP hosts can use the nlqdb database?
Any host that speaks MCP — Claude Desktop, Cursor, Cline, Claude Code. Point it at the hosted server `mcp.nlqdb.com` (no local install), or run the `@nlqdb/mcp` npm binary for local stdio. The `@nlqdb/sdk` TypeScript client is the typed fallback for non-MCP integrations.
How does the agent create the database — is there a create tool?
No separate create tool. The agent calls `nlqdb_query` with no `db` set and an English goal; when it has no database, nlqdb provisions Postgres from the goal and answers in the same call. Keeping create implicit in query is a deliberate trust-boundary choice (`SK-MCP-002`).
Can the agent see the SQL it ran?
Yes — every `nlqdb_query` answer returns the result rows plus the compiled SQL, so the host (and you) can audit the grain before trusting it. nlqdb never hides the SQL behind the answer.

Where this pain shows up in public

Enduring discussion hubs where you can verify the theme without taking our word for it. We don't quote individual posts; we cite search-result and subreddit URLs that stay live as new threads land.

Try nlqdb in 30 seconds

No sign-in. The anonymous database lasts 72 hours; adopt it with one click if you keep it.

Start with a goal →

Looking at this from a different angle? Browse all solve pages or browse competitor comparisons.