ArcadeDB for AI Agents: MCP Server and Agent Memory

ArcadeDB ships a Model Context Protocol server inside the database. Point Claude Desktop, Claude Code, Cursor or your own agent at it, and the agent can read your schema, query in five languages, run vector, full-text and graph hybrid search, and write long-term memory without duplicating it. Nothing extra to deploy, and every write is off until you turn it on.

Last updated

Why put the agent next to the graph

An agent that only has a vector store can find passages that look like the question. It cannot tell that a fact was superseded, that two names are one person, or which project a preference belongs to. Those are relationships, and they are what a graph stores. ArcadeDB keeps the graph, the documents, the vectors and the full-text index in one engine, so one MCP connection gives an agent all of them, against one consistent copy of the data.

That combination is the core of GraphRAG: retrieve by similarity, then follow edges to the context similarity alone would miss. If you are building the graph itself from documents, the knowledge graphs page covers modelling and extraction. This page is the practical part: how to switch the MCP server on, what it exposes, and how to wire it into your client.

Enable the MCP server

The MCP server is the mcp module of the ArcadeDB repository. The standard distribution and the Docker image include it and register it automatically, so there is no plugin to add. It is disabled by default. Once enabled, it answers JSON-RPC 2.0 over HTTP at POST /api/v1/mcp (MCP specification 2025-03-26) and authenticates every request with your ArcadeDB credentials, Basic auth or a Bearer API token.

1. Start ArcadeDB
docker run --rm -p 2480:2480 \
  -e JAVA_OPTS="-Darcadedb.server.rootPassword=playwithdata" \
  arcadedata/arcadedb:26.10.1
2. Turn MCP on (read-only)
curl -X POST -u root:playwithdata \
  -H "Content-Type: application/json" \
  -d '{"enabled": true, "allowReads": true, "allowedUsers": ["root"]}' \
  http://localhost:2480/api/v1/mcp/config
3. Check it answers
curl -X POST -u root:playwithdata \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' \
  http://localhost:2480/api/v1/mcp

You can do the same from Studio: open the Server panel, then the MCP tab, where you can enable the server, choose an API token, set permissions and copy a ready-made client configuration. For a file-based setup, edit config/mcp-config.json in the server directory.

Permissions

Each operation type has its own flag. The server decides which flag applies by parsing the statement, not by matching keywords, so a cleverly worded query cannot slip a write past a read-only setting.

SettingDefaultControls
enabledfalseMaster switch for the HTTP endpoint
allowReadstrueSELECT, MATCH and other reads, plus schema resources
allowInsert / allowUpdate / allowDeletefalseData writes. The upsert tools need both insert and update.
allowSchemaChangefalseCREATE TYPE, CREATE PROPERTY, CREATE INDEX and other DDL
allowAdminfalseAdministrative operations, the profiler, changing server settings
allowedUsers["root"]Users or API tokens allowed to use MCP ("*" for all)
profile"all"Tool profile: all, rag or admin
principalProfiles{}A narrower profile per user or API token
databases{}Per-database restrictions that can deny, never grant

For a retrieval agent, the rag profile hides everything except schema, query, search and the two upsert tools. Profiles only filter the tool list; the permission flags still apply on top.

What the agent can call

As of ArcadeDB 26.10.1 the server registers the tools below. Call tools/list for the authoritative list and input schemas of the version you run.

ToolWhat it doesProfile
list_databasesDatabases the authenticated user can accessall, rag, admin
get_schemaTypes, properties, indexes and inheritance of a databaseall, rag, admin
queryRead-only query in SQL, Cypher, Gremlin, GraphQL or MongoDB syntax; writes are rejectedall, rag, admin
sample_recordsThe first few records per type, so the agent sees real property shapesall, rag
vector_searchNearest neighbours on a dense or sparse vector index, with an optional SQL filterall, rag
full_text_searchBM25-ranked full-text search with boolean, phrase, prefix and fuzzy syntaxall, rag
hybrid_searchFuses vector, full-text and graph-expansion results into one rankingall, rag
upsert_entityCreate or update one vertex by match keys, without duplicatesall, rag
upsert_relationshipCreate or update one edge between two matched verticesall, rag
execute_commandWrites, schema changes and admin commands, checked against the permission flagsall, admin
server_statusVersion, query languages, databases, and HA status for adminsall, admin
profiler_start / profiler_stop / profiler_statusRecord queries with timings and plans for a bounded windowall, admin
get_server_settings / set_server_settingRead and change server settings at runtime; secrets are maskedall, admin

Resources. Each database publishes its schema as arcadedb://{database}/schema, so a client that reads resources gets the schema at session start without spending a tool call.

Prompts. Two guided templates: graphrag_query answers a question with the retrieval tools and cites the @rid of every record it used, and build_knowledge_graph extracts entities and relationships from text and writes them with the upsert tools. A prompt is only offered when the caller's profile and permissions allow every tool it names.

Connect your client

Every client needs the endpoint URL and an Authorization header. Use a Bearer API token created in Studio (Security panel, Add API Token), or Basic auth, which is Basic followed by the base64 of user:password. The examples use Basic auth for root:playwithdata; replace it with your own value, and prefer a token scoped to the databases the agent needs.

Claude Desktop

Claude Desktop launches local servers as processes, so it reaches the HTTP endpoint through the mcp-remote bridge (needs Node.js for npx). Add this to claude_desktop_config.json:

{
  "mcpServers": {
    "arcadedb": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "http://localhost:2480/api/v1/mcp",
        "--header",
        "Authorization: Basic cm9vdDpwbGF5d2l0aGRhdGE="
      ]
    }
  }
}

Claude Code

Claude Code speaks Streamable HTTP directly. Add the server from the command line:

claude mcp add --transport http arcadedb http://localhost:2480/api/v1/mcp \
  --header "Authorization: Basic cm9vdDpwbGF5d2l0aGRhdGE="

or commit it to a project's .mcp.json:

{
  "mcpServers": {
    "arcadedb": {
      "type": "http",
      "url": "http://localhost:2480/api/v1/mcp",
      "headers": {
        "Authorization": "Basic cm9vdDpwbGF5d2l0aGRhdGE="
      }
    }
  }
}

Cursor

Put a remote server entry in .cursor/mcp.json (project) or ~/.cursor/mcp.json (global):

{
  "mcpServers": {
    "arcadedb": {
      "url": "http://localhost:2480/api/v1/mcp",
      "headers": {
        "Authorization": "Basic cm9vdDpwbGF5d2l0aGRhdGE="
      }
    }
  }
}

Stdio, for clients that start their own server

If you run ArcadeDB from the distribution rather than Docker, bin/mcp-stdio.sh starts a server and speaks MCP over standard input and output. It always authenticates as root, so the root password is required, and it ignores the enabled flag while every other setting in mcp-config.json still applies.

{
  "mcpServers": {
    "arcadedb": {
      "command": "/opt/arcadedb/bin/mcp-stdio.sh",
      "env": {
        "ARCADEDB_SETTINGS": "-Darcadedb.server.rootPassword=playwithdata"
      }
    }
  }
}

Prefer to run Google's MCP server in front of several databases? ArcadeDB is also a source in MCP Toolbox for Databases.

GraphRAG in one command

The graph-rag demo in the arcadedb-usecases repository builds a small GraphRAG dataset (text chunks with embeddings, the people, concepts and organizations they mention, and the edges between them) and runs five retrieval patterns: hybrid vector plus graph, multi-hop entity bridging, latest chunk per document, composite scoring, and an agentic multi-step flow. You need Docker, curl and jq.

git clone https://github.com/ArcadeData/arcadedb-usecases.git && cd arcadedb-usecases/graph-rag && docker compose up -d && ./setup.sh && ./queries/queries.sh

No API keys needed, and no LLM in the loop. The sample data uses 4-dimensional toy embeddings so it runs anywhere, and the optional Java LangChain4j examples run the AllMiniLmL6V2 embedding model in-process. The demo shows retrieval; producing a written answer is the job of the LLM you connect. The Compose file pins its own ArcadeDB version and uses port 2480, so stop any other local ArcadeDB first.

Then ask Claude about it

The demo's root password is arcadedb. Enable MCP on it and register it with Claude Code:

curl -X POST -u root:arcadedb -H "Content-Type: application/json" \
  -d '{"enabled": true, "allowReads": true}' \
  http://localhost:2480/api/v1/mcp/config

claude mcp add --transport http arcadedb-graphrag http://localhost:2480/api/v1/mcp \
  --header "Authorization: Basic cm9vdDphcmNhZGVkYg=="

Now ask something like "In the GraphRAG database, which documents are connected to Vector Search through shared entities?". The agent reads the schema, writes the Cypher traversal and cites the records. Because the sample vectors are only 4-dimensional, the agent will lean on query rather than vector_search here; with your own data and a real embedding model, all the retrieval tools apply.

Agent memory

Agents need two kinds of durable memory: episodic (what happened, turn by turn) and semantic (facts learned about people, projects and systems, which change over time). Both are naturally a graph: episodes mention entities, facts are about entities, and a newer fact supersedes an older one instead of overwriting it.

Through MCP, an agent can write that memory itself. upsert_entity matches a vertex by key properties and updates it or creates it; upsert_relationship does the same for an edge between two matched vertices. Repeating the same extraction resolves to the same records instead of piling up duplicates. Two things make it reliable:

{"name": "upsert_relationship", "arguments": {
  "database": "memory",
  "fromType": "Person",  "fromMatchKeys": {"email": "[email protected]"},
  "toType": "Project",   "toMatchKeys": {"code": "ANALYTICAL-ENGINE"},
  "relType": "WORKS_ON", "relProperties": {"since": 1843}
}}

The build_knowledge_graph prompt packages this workflow: it reads the existing schema, picks stable match keys, and calls the upsert tools once per entity and relationship.

Memory frameworks that already use ArcadeDB

Cognee

The upstream hybrid adapter uses ArcadeDB as Cognee's graph store and vector store at once.

arcadedb-claude

A community Claude Code plugin that keeps sessions, decisions with validity windows, and a code graph in ArcadeDB.

LangChain and LlamaIndex

Graph stores for agents built on those frameworks, over Bolt and HTTP respectively.

For a single-process agent, the same graph and vector memory can also run in-process with the embedded Python package, with no server at all.

Give your agent a database

ArcadeDB is Apache 2.0 and free in production. Start it, enable MCP, and connect your client in a few minutes.

Frequently Asked Questions

Does ArcadeDB have an MCP server?

Yes. The MCP server is built into ArcadeDB and included in the standard distribution and the Docker image. It is disabled by default; enable it from Studio, through POST /api/v1/mcp/config, or in config/mcp-config.json. Clients connect to http://<host>:2480/api/v1/mcp, or launch bin/mcp-stdio.sh for the stdio transport.

Which tools does the ArcadeDB MCP server expose?

list_databases, get_schema, query, execute_command, sample_records, vector_search, full_text_search, hybrid_search, upsert_entity, upsert_relationship, server_status, profiler_start, profiler_stop, profiler_status, get_server_settings and set_server_setting. It also publishes each database schema as a resource and offers two guided prompts, graphrag_query and build_knowledge_graph. Tool profiles (all, rag, admin) narrow what a client sees.

Can the AI modify my data through MCP?

Only if you allow it. Insert, update, delete, schema change and admin permissions all default to false, and the server classifies each statement by parsing it, not by matching keywords. You can also restrict permissions and users per database and give individual users or API tokens a narrower tool profile.

Does ArcadeDB generate embeddings for vector search?

No. vector_search and hybrid_search take a query vector that the caller computes with its own embedding model. The vector must have the same number of dimensions as the index.

Does the GraphRAG demo need an OpenAI or Anthropic API key?

No. The graph-rag demo in the arcadedb-usecases repository runs with Docker, curl and jq only. Its sample data uses small 4-dimensional embeddings, and the optional LangChain4j examples run the AllMiniLmL6V2 embedding model in-process. The demo covers retrieval; generating an answer with an LLM is up to the client you connect, for example Claude through MCP.

How do agents store memory in ArcadeDB without creating duplicates?

Use the upsert_entity and upsert_relationship tools. They match a vertex or edge by key properties and either update it or create it, so repeated extraction resolves to the same records. Create a UNIQUE index on the match-key properties, and enable both allowInsert and allowUpdate, which the tools require.