Cursor Database
БесплатноНе проверенCursor database MCP — give Cursor a free cloud database it can query while it writes your code
Описание
Cursor database MCP — give Cursor a free cloud database it can query while it writes your code
README
Config, verification script and a worked dataset for pointing Cursor at a live cloud database over MCP, so the agent can run real queries against real rows while it edits your code.
The file
This is the whole integration. One object, one key.
{
"mcpServers": {
"crag": {
"url": "https://freebase.cloud/api/mcp/YOUR_TOKEN"
}
}
}
There is deliberately no "type" field here. Cursor infers the transport from the shape of
the entry: a url means a remote server, a command means a local stdio process. Adding
"type": "http" — which is what Claude Code requires, and what most blog posts copy from — is
the single most common reason a Cursor entry silently fails to load. If you are moving a config
between the two tools, strip the key on the way in.
crag is just a label. It becomes the prefix on every tool name Cursor sees, so pick something
short and descriptive of the data rather than the engine.
Where the file goes
| Scope | Path | Use it when |
|---|---|---|
| Global | ~/.cursor/mcp.json |
The database is yours, across every project you open |
| Project | <repo>/.cursor/mcp.json |
The database belongs to this codebase and you want teammates to inherit it |
Both files use the identical schema above. If both exist, project entries sit alongside global ones — they do not replace them, so two servers with the same name will collide. Name them differently.
A project-scoped file is committable, but the token is in the URL, so treat
.cursor/mcp.json exactly like you would treat a .env: either gitignore it, or commit a
placeholder and have each developer paste their own token. Cursor does not have VS Code's
prompt-for-input mechanism, so there is no way to keep the secret out of the file itself.
After saving, open Cursor Settings → MCP (or Tools & Integrations in recent builds). The server should appear with a green dot and an expandable list of four tools. If the dot is grey, skip to the checklist near the bottom.
Getting a URL
You need a database and a token. On freebase.cloud, sign up (no card), create a session, pick an engine, then go to Settings → MCP → New Token, select the connection you just made and copy the URL it gives you.
The token lives in the path segment of the URL. Nothing else authenticates — no header, no OAuth
dance, no env block in the config. That is why the Cursor entry is a single line. It also means
the URL is the credential; rotate it from the same screen if it leaks.
What Cursor gets
Four tools per connection, named after the connection:
| Tool | Behaviour |
|---|---|
crag_list_tables |
Enumerates tables, collections, keyspaces, indices or measurements, depending on the engine |
crag_query |
Runs a read query in the engine's own language and returns rows or documents |
crag_store |
Writes — inserts and upserts |
crag_annotate_table |
Attaches a plain-English description to a table so later queries are better informed |
annotate_table is the one people skip and then miss. Cursor's agent reads tool descriptions
before it plans; a one-line note like "sessions.grade uses the French scale, not YDS" is the
difference between a correct aggregate and a confidently wrong one.
PostgreSQL connections additionally
expose pg_dump, pg_restore and pg_tables helpers. SQLite connections expose
sqlite_master and sqlite_version.
Engines
All fifteen are reachable through the same MCP endpoint shape; only the query language inside
crag_query changes.
| Engine | Version | Language you write inside _query |
|---|---|---|
| PostgreSQL | 16.2 | SQL |
| MySQL | 8.0.36 | SQL |
| MariaDB | 11.3.2 | SQL |
| SQLite | 3.45.1 | SQL |
| CockroachDB | 23.2.4 | SQL (Postgres-compatible) |
| TimescaleDB | 2.14.2 | SQL + hypertable functions |
| MongoDB | 7.0.4 | Document queries / aggregation pipeline |
| Redis | 7.2.3 | Redis commands |
| Cassandra | 4.1.4 | CQL |
| DynamoDB | 2024.1 | Key/document operations |
| ClickHouse | 24.1.5 | OLAP SQL |
| Elasticsearch | 8.12.0 | Query DSL |
| Neo4j | 5.17.0 | Cypher |
| InfluxDB | 2.7.4 | Flux / InfluxQL |
| Prometheus | 2.50.1 | PromQL |
Three of them — PostgreSQL, Redis and MongoDB — also accept ordinary drivers over their real TCP wire protocol, so your app and the agent can hit the same data. The rest are HTTP and MCP only.
A worked exchange
The examples in this repo populate a collection of climbing routes at a fictional gym, on the MongoDB engine. Once it is seeded, a request in Cursor's Composer like:
Which walls have routes that nobody has sent in the last 60 days? Then add a
staleboolean to the wall summary component.
produces roughly this sequence: crag_list_tables to find the collections, crag_annotate_table
lookup for what sessions.sent means, one crag_query aggregation grouping sends by wall and
date, and then the edit — written against the field names it actually observed rather than the
ones it guessed. The point is not that the model is smarter; it is that a schema lookup is now
cheaper for it than a guess.
If it doesn't connect
Work down this list. It is ordered by how often each one is the answer.
- Remove
"type". Covered above, but it is genuinely the most common cause. - Restart the MCP server from Settings, not the whole editor. Cursor caches the tool list per server; the small refresh icon next to the entry re-handshakes without losing your chat.
- Check the JSON parses.
python3 -m json.tool ~/.cursor/mcp.json. A trailing comma produces no error message in the UI — the server just never appears. - Run
examples/verify-connection.mjs. If it prints four tools, the endpoint and token are fine and the problem is entirely on Cursor's side. If it fails, the token is wrong or revoked — issue a fresh one and paste it back in. - Confirm the tools are enabled in the conversation. A server can be connected and still have its tools toggled off for the current chat; agent mode also has to be on, since Ask mode does not call tools.
- Check the tool count. Cursor caps how many tools it will surface at once. If you have a dozen MCP servers registered, disable the ones you are not using and the database tools will reappear.
Limits worth knowing before you build on it
The free tier is aimed at development, prototyping and small production
workloads — that is the honest framing, and it is where it fits well. There is no published SLA and no managed backup
product, so anything you would be upset to lose should be dumped somewhere else on a schedule
(pg_dump and mongodump both work against the wire-protocol engines). MCP is a request/response
channel, not a replacement for a driver: use it for the agent, and use a real client library in
your application code.
Files here
examples/
mcp.json drop-in config, both scopes
verify-connection.mjs Node 18+, no dependencies — handshakes and lists tools
crag-routes.mongodb.js mongosh script: seeds and queries the route dataset
README.md how to run the two scripts
See also
- Free cloud database instances — engine list and signup
- Free PostgreSQL instance
- Free MongoDB instance
- The same endpoint set up in Claude — useful if you also run Claude Desktop or Claude Code
- Model Context Protocol specification
- Cursor's MCP documentation
freebase.cloud is an independent service and is not affiliated with Anysphere (Cursor), MongoDB, Inc. or the PostgreSQL Global Development Group.
Установка Cursor Database
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/freebase-cloud/cursor-database-mcpFAQ
Cursor Database MCP бесплатный?
Да, Cursor Database MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Cursor Database?
Нет, Cursor Database работает без API-ключей и переменных окружения.
Cursor Database — hosted или self-hosted?
Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.
Как установить Cursor Database в Claude Desktop, Claude Code или Cursor?
Открой Cursor Database на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
wenb1n-dev/SmartDB_MCP
A universal database MCP server supporting simultaneous connections to multiple databases. It provides tools for database operations, health analysis, SQL optim
автор: wenb1n-devPostgres Server
This server enables interaction with PostgreSQL databases through the Model Context Protocol, optimized for the AWS Bedrock AgentCore Runtime. It provides tools
автор: madhurprashPostgres
Query your database in natural language
автор: AnthropicPostgreSQL
Read-only database access with schema inspection.
автор: modelcontextprotocolRedis
Interact with Redis key-value stores.
автор: modelcontextprotocolSQLite
Database interaction and business intelligence capabilities.
автор: modelcontextprotocolmxcp
Open-source framework for building enterprise-grade MCP servers using just YAML, SQL, and Python, with built-in auth, monitoring, ETL and policy enforcement.
автор: raw-labstadas-github/a2asearch-mcp
MCP server to search 4,800+ MCP servers, AI agents, CLI tools and agent skills. Install: npx -y a2asearch-mcp. Ask Claude: "Find MCP servers for database access
автор: tadas-githubjulien040/anyquery
Query more than 40 apps with one binary using SQL. It can also connect to your PostgreSQL, MySQL, or SQLite compatible database. Local-first and private by desi
автор: julien040drakonkat/wizzy-mcp-tmdb
A MCP server for The Movie Database API that enables AI assistants to search and retrieve movie, TV show, and person information.
автор: drakonkatCompare Cursor Database with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории data
