Skip to main content

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.

Text
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:

Shell
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:

Text
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
Shell
brew install rush-db/tap/rushdb
rushdb up

The node prints the same summary and uses the token local-token.

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.

Shell
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.

Another token, or RushDB Cloud

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:

Text
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:

Shell
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:

Shell
pip install rushdb
Python
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

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:

Shell
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:

Shell
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​