Get started with RushDB
RushDB is the database for AI. You push JSON, and RushDB stores it as connected records that you can filter, traverse, aggregate and search by keywords or by meaning. This page gets you to a running engine on your machine and an AI client connected to it, in about five minutes.
Let your agent set it up
If you use a coding agent such as Claude Code, Codex or Cursor, paste this prompt into it. The agent installs the MCP server and the agent skills, and it starts a local engine or uses RushDB Cloud. The same instructions are at rushdb.com/agent-setup.
Set up RushDB as this project's database.
1. Install the RushDB MCP server (@rushdb/mcp-server) and the RushDB agent skills (github.com/rush-db/skills).
2. Use RushDB Cloud with an API key from app.rushdb.com, or a local engine:
curl -fsSL https://rushdb.com/install.sh | sh && rushdb up
(direct mode: engine URL http://127.0.0.1:3000, token local-token)
3. Before writing any query, read the schema catalog (labels, properties, types, relationship shapes) and use only fields that exist.
4. Docs: https://docs.rushdb.com/
To set it up by hand, follow the three steps below.
1. Run the engine
Install the rushdb binary and start a local node in your project directory:
curl -fsSL https://rushdb.com/install.sh | sh
rushdb up
If your shell can't find rushdb yet, open a new terminal, or run export PATH="$HOME/.rushdb/bin:$PATH". The install script works on Linux and macOS.
rushdb up prints where the node listens and which token it accepts, then keeps running in the foreground:
RushDB 3.0.16
HTTP http://127.0.0.1:3000
Postgres postgresql://127.0.0.1:5432
Data /home/you/my-app/.rushdb
Token local-token (local default; set --token or RUSHDB_TOKEN)
Press Ctrl+C to stop.
Leave it running, and use a second terminal for the next steps. The node keeps its data in ./.rushdb and listens only on 127.0.0.1, so the default token local-token is fine on your own machine. Set your own token before anything else can reach the node; see Go to production.
To check that the node is up, run rushdb health.
Other ways to run it: Homebrew, Docker, RushDB Cloud
- Homebrew
- Docker
- RushDB Cloud
brew install rush-db/tap/rushdb
rushdb up
The node prints the same summary and uses the token local-token.
Inside a container the engine listens on all interfaces, so it refuses to start with the default token. Create a token, start the container, and print the token:
export RUSHDB_TOKEN="$(openssl rand -hex 32)"
docker run -d --name rushdb \
-p 127.0.0.1:3000:3000 -p 127.0.0.1:5432:5432 \
-v rushdb-data:/data \
-e RUSHDB_TOKEN="$RUSHDB_TOKEN" \
rushdb/rushdb
echo "$RUSHDB_TOKEN"
In the next steps, use this token in place of local-token.
RushDB Cloud runs the engine for you and adds the dashboard, managed embeddings and natural-language search.
- Sign up at app.rushdb.com and create a project.
- Create an API key in the project.
In the next step, replace the three RUSHDB_* variables with one: RUSHDB_API_KEY set to your API key. Claude.ai and ChatGPT connect to RushDB Cloud without an API key.
Cargo, release archives and source builds are in Installation. To choose between Cloud and your own engine, see RushDB Cloud or a self-hosted engine.
2. Connect an MCP client
The RushDB MCP server, @rushdb/mcp-server, gives an AI client tools to read and write your records. Your client starts it with npx, so you need Node.js 18 or newer. Each snippet below connects to the engine from step 1 in direct mode, with the URL http://127.0.0.1:3000 and the token local-token.
- Claude Code
- Codex
- Cursor
- VS Code
- Claude Desktop
- Claude.ai and ChatGPT
claude mcp add rushdb \
-e RUSHDB_MODE=direct \
-e RUSHDB_ENGINE_URL=http://127.0.0.1:3000 \
-e RUSHDB_ENGINE_TOKEN=local-token \
-- npx -y @rushdb/mcp-server
The command adds the server for the current project. Add --scope user after add to use it in every project. Run /mcp in Claude Code to see the server and its status.
codex mcp add rushdb \
--env RUSHDB_MODE=direct \
--env RUSHDB_ENGINE_URL=http://127.0.0.1:3000 \
--env RUSHDB_ENGINE_TOKEN=local-token \
-- npx -y @rushdb/mcp-server
The command writes the server to ~/.codex/config.toml, so every Codex session can use it.
Add RushDB to Cursor opens Cursor with this server filled in. To add it by hand, put this in .cursor/mcp.json in your project, or in ~/.cursor/mcp.json for every project:
{
"mcpServers": {
"rushdb": {
"command": "npx",
"args": ["-y", "@rushdb/mcp-server"],
"env": {
"RUSHDB_MODE": "direct",
"RUSHDB_ENGINE_URL": "http://127.0.0.1:3000",
"RUSHDB_ENGINE_TOKEN": "local-token"
}
}
}
}
Put this in .vscode/mcp.json in your workspace. VS Code uses the key servers, not mcpServers:
{
"servers": {
"rushdb": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@rushdb/mcp-server"],
"env": {
"RUSHDB_MODE": "direct",
"RUSHDB_ENGINE_URL": "http://127.0.0.1:3000",
"RUSHDB_ENGINE_TOKEN": "local-token"
}
}
}
}
To add it to your user profile for every workspace instead, run:
code --add-mcp '{"name":"rushdb","type":"stdio","command":"npx","args":["-y","@rushdb/mcp-server"],"env":{"RUSHDB_MODE":"direct","RUSHDB_ENGINE_URL":"http://127.0.0.1:3000","RUSHDB_ENGINE_TOKEN":"local-token"}}'
Use the tools in Copilot Chat's agent mode.
Open Settings → Developer → Edit Config, or open the file yourself:
| OS | Config file |
|---|---|
| macOS | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Windows | %APPDATA%\Claude\claude_desktop_config.json |
| Linux | ~/.config/Claude/claude_desktop_config.json |
{
"mcpServers": {
"rushdb": {
"command": "npx",
"args": ["-y", "@rushdb/mcp-server"],
"env": {
"RUSHDB_MODE": "direct",
"RUSHDB_ENGINE_URL": "http://127.0.0.1:3000",
"RUSHDB_ENGINE_TOKEN": "local-token"
}
}
}
}
Quit Claude Desktop completely and start it again to load the server.
Web clients can't start a local process, so they can't reach an engine on your machine. They connect to RushDB Cloud through the hosted MCP server:
https://mcp.rushdb.com/mcp
- Claude.ai: open Settings → Integrations → Add integration, enter the URL, and sign in with your RushDB account.
- ChatGPT: open Settings → Connectors → Add connector, enter the URL, and sign in with your RushDB account.
Keep /mcp at the end of the URL. The sign-in asks which project to expose and whether the client may write. See Hosted OAuth.
If you started the engine with your own token, or in Docker, put that token in RUSHDB_ENGINE_TOKEN. For RushDB Cloud, drop the three RUSHDB_* variables and set RUSHDB_API_KEY to your API key instead. All settings are in the MCP configuration reference.
3. Check the connection
Start a new session in your client and ask:
Call getSchemaMarkdown and show me what labels exist in my RushDB project.
A new engine returns an empty schema. That means the client is connected: there are no records yet. If the call fails, see Troubleshooting.
Optionally, install the RushDB agent skills. They teach the agent to read the schema first and to build correct queries:
npx skills add rush-db/skills
Start a new session after you install them. See Agent skills and Agent memory.
Next steps
Use it from code
The TypeScript and Python SDKs connect to the same engine in direct mode:
- Python
- TypeScript
pip install rushdb
from rushdb import RushDB
db = RushDB("local-token", direct=True, engine_url="http://127.0.0.1:3000")
db.records.import_json(
{"name": "Search revamp", "TASK": [{"title": "Measure search latency", "status": "pending"}]},
label="PROJECT",
)
print(db.records.find({"labels": ["TASK"], "where": {"status": "pending"}}).total) # 1
npm install @rushdb/javascript-sdk
import RushDB from '@rushdb/javascript-sdk'
const db = new RushDB('local-token', { direct: true, engineUrl: 'http://127.0.0.1:3000' })
await db.records.importJson({
label: 'PROJECT',
data: { name: 'Search revamp', TASK: [{ title: 'Measure search latency', status: 'pending' }] }
})
console.log((await db.records.find({ labels: ['TASK'], where: { status: 'pending' } })).total) // 1
The Quick tutorial continues with queries across relationships, aggregations and search. The SDK guide covers both SDKs.
Query with SQL
rushdb up also serves SQL over the PostgreSQL wire protocol on port 5432. Connect with psql, with the token as the password:
PGPASSWORD=local-token psql "host=127.0.0.1 port=5432 user=rushdb dbname=rushdb sslmode=disable"
Labels appear as tables and properties as columns, so SELECT title FROM task; works after the SDK example above. See SQL and Cypher clients.
Go to production
Before the engine runs anywhere other than your own machine, replace local-token with a secret token:
export RUSHDB_TOKEN="$(openssl rand -hex 32)"
rushdb up
Then add TLS, backups and monitoring. Deploy RushDB lists the install channels and ready-made configurations, and the engine manual covers security, deployment and backup and restore.
More
- RushDB Cloud or a self-hosted engine: what each offers and how to move between them.
- What's new in RushDB 3 and Migrate from 2.x.
- Connect: SDKs, MCP, agents, LangChain, LlamaIndex and other integrations.
- Learn: records, relationships, SearchQuery and search.