MCP database guide
MCP Database: A Hosted Database Your AI Agent Can Manage
What an MCP database is, how it differs from a database MCP server, and how to give Claude Code or Cursor a hosted database with auth and row policies.
Updated October 16, 2026
Two different things called an “MCP database”
The Model Context Protocol lets an AI application call tools on an external server. Search for “MCP database” and you will find two kinds of products that use it, and they solve different problems.
A database MCP server sits in front of a database you already have, such as Postgres, MySQL, SQL Server or a local SQLite file. The AI client gets tools to list tables and run queries, which is useful for analysis, debugging and asking questions about production data. You still own the database, its hosting, its users and its security.
An agent-managed database starts from nothing. The coding agent creates the project, defines tables, turns on sign-up and login, and decides who can read each row, all through MCP tools. Your app then talks to a generated REST API. This is what MCPBackend does: it is the backend for an app you are building with Claude Code or Cursor, not a window into an existing database.
MCP database options compared
The table compares the common ways to give an AI coding tool a database. It describes approaches rather than every vendor feature, so check each product’s current documentation before you commit.
| Approach | Where the data lives | What the agent does | Good for |
|---|---|---|---|
| Local SQLite MCP server | A file on your machine | Runs SQL against the file | Prototypes and local analysis; nothing is reachable by a deployed app |
| Postgres / MySQL MCP server | Your existing database server | Inspects tables and runs queries, often read-only | Querying and debugging data you already host |
| Platform MCP (for example Supabase) | The platform’s managed Postgres | Manages the platform project, including SQL and settings | Teams that want Postgres and a broad platform |
| MCPBackend | A hosted SQLite database per project | Creates projects, tables, auth, row policies, scoped keys and webhooks through narrow tools | New CRUD apps built by an agent that need auth and per-user data quickly |
If you are weighing MCPBackend against a Postgres platform specifically, the Supabase comparison goes through the tradeoffs in more detail.
Give your agent a database in five minutes
MCPBackend runs a hosted MCP server at https://mcp.mcpbackend.com/mcp. It uses Streamable HTTP and OAuth 2.1, so there is nothing to install and no token to paste into a config file.
Claude Code:
claude mcp add --transport http mcpbackend https://mcp.mcpbackend.com/mcpCursor, in ~/.cursor/mcp.json:
{
"mcpServers": {
"mcpbackend": { "url": "https://mcp.mcpbackend.com/mcp" }
}
}In Claude or Claude Desktop, open Settings → Connectors → Add custom connector and enter the same URL. The MCP config generator writes the snippet for other clients. Then ask for what you want:
- 1
Describe the app and who sees what
For example: “Add a backend for my recipe app. Users sign up with email, and each user only sees their own recipes.”
- 2
The agent creates the project and tables
It calls create_project, then create_table for recipes with the columns and an index on anything it will filter by.
- 3
It turns on auth and sets row policies
set_auth_enabled switches on email/password sign-up, and set_table_rls sets reads and writes to owner so each user only reaches their own rows.
- 4
It wires the app to the REST API
get_project_api returns the live routes and the OpenAPI contract, so the agent writes fetch calls against real endpoints instead of guessing.
- 5
You review it in the dashboard
Tables, policies, keys and usage are all visible, so you can check the agent’s work before real users arrive.
What the agent can and cannot do
The tools are deliberately small. A narrow tool such as “set this table to owner-only” is easier for an agent to call correctly, and easier for you to review, than a general SQL console.
Projects
list_projects, create_project (optionally with EU data residency) and get_project.
Schema
get_schema reads the live tables; create_table and add_column change them, including foreign keys and indexes.
Access
set_auth_enabled for end-user login and set_table_rls for public, authenticated or owner-only reads and writes.
Credentials
create_api_key mints a full-access or per-table scoped key. The secret is shown once and belongs on a server, not in the browser.
Events and usage
create_webhook subscribes a URL to row changes; get_usage shows the month’s usage against plan limits.
Not included
No arbitrary SQL, no dropping tables through MCP, and no access to databases hosted elsewhere.
Keeping an agent-managed database safe
An agent that can change your backend should work with the same care you would expect from a new teammate. A few habits cover most of the risk:
- Have the agent call
get_schemabefore it edits models or queries, so it works from the live database rather than its memory of the chat. - Use owner-only policies for anything personal, and test with two separate accounts. Machine API keys bypass row policies, so keep them server-side.
- Keep a separate project for experiments. The free plan’s single project is enough to try the workflow before anything important depends on it.
- Watch the caps. Write and storage limits block writes, the request limit blocks reads too, and there are no overage charges. The capacity calculator estimates which plan an app needs.
The developer library has short guides on the problems people hit most, such as unauthorized errors after connecting and an agent working in the wrong project.
When to use something else
Use a Postgres or MySQL MCP server when the data already exists and the job is to query it. MCPBackend cannot attach to your current database. Choose a Postgres platform when you need extensions, stored procedures, complex SQL or realtime subscriptions. And if you only need a scratch database for local analysis, a local SQLite MCP server is simpler and free.
MCPBackend fits best when you are building a new web app, internal tool, directory or small SaaS product with an AI editor and you want the database, sign-up, per-user data and API set up by the agent in one pass. For the bigger picture, read what an MCP backend is or how a remote MCP server connects to your client.
Frequently asked questions
What is an MCP database?+
People use the phrase for two things. Most often it means a database MCP server: a connector that lets an AI client such as Claude or Cursor query a database you already run. It can also mean a database built to be created and managed by an agent over MCP, where the agent provisions the project, defines tables and sets access rules. MCPBackend is the second kind.
Is MCPBackend a Postgres or SQLite MCP server?+
Neither in the usual sense. MCPBackend does not connect to a database you already host. Each project gets its own hosted SQLite database, a generated REST API, email/password auth and row policies, and the remote MCP server exposes structured tools for managing those projects.
Can the agent run arbitrary SQL through MCP?+
No. The MCP tools are narrow: list and create projects, read the schema, create tables with columns, foreign keys and indexes, add columns, set row policies, enable auth, mint scoped API keys, create webhooks, read usage and manage team members. Application reads and writes go through the REST API.
Which AI tools can use it?+
Any MCP client that supports remote Streamable HTTP servers with OAuth. The setup guide has configuration for Cursor and Claude Code, and Claude and Claude Desktop can add it as a custom connector with the URL https://mcp.mcpbackend.com/mcp.
Is there a free plan?+
Yes. The free plan includes one project with 50 MB of storage, 5 tables, 10k rows written and 1M rows read per month, and every feature, including MCP, auth, row policies and webhooks. Paid plans raise the numbers rather than unlocking features.
Can I get my data out?+
Yes. A project is a standard SQLite database, and eject gives you a SQL export plus a compatible Node.js/SQLite runtime. The export does not include the hosted dashboard, the MCP server, webhooks, metering or managed backups.
Build the backend, skip the setup
Give your AI editora real backend
Start with a free project. Database, REST API, auth, permissions, webhooks, and MCP are included.