# Connect RushDB

Source: https://docs.rushdb.com/connect/

Start with the path that matches how you work. Every path below works with **RushDB Cloud** (sign in at [app.rushdb.com](https://app.rushdb.com) and use an API key) or with a **self-hosted RushDB engine** (the `rushdb` binary on your own machines, reached with its URL and token).

| Goal                                                 | Fastest path                                      | Cloud | Self-hosted |
| ---------------------------------------------------- | ------------------------------------------------- | :---: | :---------: |
| Build an application or data pipeline                | [Use an SDK](#use-an-sdk)                         | ✓     | ✓           |
| Give Cursor, Claude Desktop, or VS Code RushDB tools | [Local MCP server](#local-mcp-server)             | ✓     | ✓           |
| Use RushDB from ChatGPT or Claude.ai                 | [Hosted MCP connector](#hosted-mcp-connector)     | ✓     | —           |
| Teach an AI agent correct RushDB workflows           | [Install Agent Skills](#install-agent-skills)     | ✓     | ✓           |
| Add persistent memory to an agent                    | [Agent memory](#agent-memory)                     | ✓     | ✓           |
| Build RAG or agents with LangChain or LangGraph      | [LangChain & LangGraph](#langchain--langgraph)    | ✓     | ✓           |
| Build a knowledge graph with LlamaIndex              | [LlamaIndex](#llamaindex)                         | ✓     | ✓           |
| Sync an existing database (change data capture)      | [Debezium](#debezium)                             | ✓     | ✓           |
| Search an Obsidian vault and give agents your notes  | [Obsidian](#obsidian)                             | ✓     | ✓           |
| Query with PostgreSQL or Neo4j drivers, or gRPC      | [SQL and Cypher clients](./sql-and-cypher.mdx)    | —     | ✓           |

---

## Use an SDK

The TypeScript and Python SDKs have one API for both. On RushDB Cloud, pass an API key; for a self-hosted engine, pass its token with `direct: true` and its URL.

```typescript

const db = new RushDB(process.env.RUSHDB_API_KEY!) // RushDB Cloud
// const db = new RushDB('local-token', { direct: true, engineUrl: 'http://127.0.0.1:3000' }) // a local `rushdb up`

await db.records.importJson({
  label: 'PROJECT',
  data: {
    name: 'RushDB adoption',
    TASK: [
      { title: 'Connect RushDB', status: 'done' },
      { title: 'Query linked records', status: 'pending' }
    ]
  }
})
```

One nested import creates the records and the relationships between them.

[Connect with TypeScript or Python →](./sdks.mdx)

---

## Local MCP server

For Claude Desktop, Cursor, VS Code, and other local MCP clients, run the MCP server with a RushDB Cloud API key:

```json
{
  "mcpServers": {
    "rushdb": {
      "command": "npx",
      "args": ["-y", "@rushdb/mcp-server"],
      "env": {
        "RUSHDB_API_KEY": "your-api-key-here"
      }
    }
  }
}
```

or point it at your own engine with `RUSHDB_MODE=direct`, `RUSHDB_ENGINE_URL` and `RUSHDB_ENGINE_TOKEN`. Restart your client, then ask:

> Call `getSchemaMarkdown` and show me what labels exist in my RushDB project.

[Choose your MCP client and mode →](./mcp.mdx)

---

## Hosted MCP connector

For ChatGPT, Claude.ai, and other web-based MCP clients, add this URL as a connector:

```
https://mcp.rushdb.com/mcp
```

Sign in with your RushDB account and choose the project to expose. No local installation or API key is required. The hosted connector is part of RushDB Cloud.

[Set up a hosted MCP connector →](./mcp.mdx#hosted-oauth-no-installation)

---

## Install agent skills

Install RushDB Agent Skills so your assistant knows how to query, model data, and manage persistent memory:

```bash
npx skills add rush-db/skills
```

Start a new agent session after installation so the skills are discovered.

[Install and verify Agent Skills →](./skills.mdx)

---

## Agent memory

Give an agent durable, searchable memory through MCP, or natively in OpenClaw and Hermes:

- [Agent Memory Quickstart](../learn/agent-memory/quickstart.mdx) — MCP plus skills, any agent
- [OpenClaw Native Memory](./openclaw-memory.mdx) and [Hermes Native Memory Provider](./hermes-memory.mdx) — automatic recall and capture
- [Agents](./agents.mdx) — the shared memory contract behind them

On a self-hosted engine, recall by meaning needs an embedding model of your own; each integration explains how to supply one.

---

## LangChain & LangGraph

`langchain-rushdb` (Python) and `@rushdb/langchain` (TypeScript) make RushDB a LangChain vector store and hybrid retriever, and LangGraph's long-term memory store and checkpointer:

```python
from langchain_rushdb import RushDBSaver, RushDBStore, RushDBVectorStore

graph = builder.compile(checkpointer=RushDBSaver(client=client), store=RushDBStore(client=client))
```

[Set up LangChain & LangGraph →](./langchain.mdx)

---

## LlamaIndex

`llama-index-graph-stores-rushdb` makes RushDB the graph store of a LlamaIndex `PropertyGraphIndex`: extracted entities keep their own labels, embeddings live in the same database, and text-to-Cypher prompts get the schema derived from your data:

```python
from llama_index.core import PropertyGraphIndex
from llama_index.graph_stores.rushdb import RushDBPropertyGraphStore

index = PropertyGraphIndex.from_documents(documents, property_graph_store=RushDBPropertyGraphStore(client))
```

[Set up LlamaIndex →](./llamaindex.mdx)

---

## Debezium

Keep RushDB in sync with PostgreSQL, MySQL, MongoDB, SQL Server, Oracle and other databases: Debezium Server with the RushDB sink streams every insert, update and delete, with no Kafka.

```bash
docker run --rm -v $PWD/config:/debezium/config -e RUSHDB_API_KEY=... \
  ghcr.io/rush-db/debezium-server-rushdb:latest
```

[Set up Debezium →](./debezium.mdx)

---

## Obsidian

The RushDB community plugin indexes an Obsidian vault into RushDB: notes, properties, tags and links. Search it from Obsidian, see each note's related notes, and point the MCP server at the same data so an agent can query your notes. Install **RushDB** from **Settings → Community plugins → Browse**.

[Set up Obsidian →](./obsidian.mdx)

---

## Engine protocols

A self-hosted engine also serves its own interfaces, next to the SDKs. [SQL and Cypher clients](./sql-and-cypher.mdx) shows how to turn them on and connect `psql`, node-postgres, psycopg and the Neo4j drivers.

| Interface               | Use it for                                                 |
| ----------------------- | ---------------------------------------------------------- |
| [Native HTTP protocol](../engine/connectivity/http-api.md) | The complete engine API, from any language |
| [PostgreSQL wire](../engine/connectivity/postgresql-wire.md) | SQL from `psql`, drivers and BI tools |
| [Bolt](../engine/connectivity/bolt.md)                    | openCypher from Neo4j drivers |
| [gRPC](../engine/connectivity/grpc.md)                    | The native protocol over gRPC |
| [CLI](../engine/connectivity/cli.md)                      | `rushdb up` and operational commands |

---

## Choose what to build

| Use case                          | Guide                                                                      |
| --------------------------------- | -------------------------------------------------------------------------- |
| Persistent agent memory           | [Agent Memory Quickstart](../learn/agent-memory/quickstart.mdx)            |
| Keyword and hybrid search         | [Keyword Search](../learn/semantic-search/keyword-search.mdx)              |
| Semantic search over your data    | [Semantic Search](../learn/semantic-search/semantic-search.mdx)            |
| Natural-language search box [Cloud] | [Smart Search](../learn/search-query/smart-search.mdx)                   |
| Graph-enriched retrieval          | [GraphRAG Tutorial](../learn/tutorials/ai-and-rag/graphrag.mdx)            |
| Explore an unknown dataset safely | [Discovery Queries](../learn/tutorials/search-and-queries/discovery-queries.mdx) |
