Astra DBSAFE
An MCP server for Astra DB workloads
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
A Model Context Protocol (MCP) server for interacting with Astra DB. MCP extends the capabilities of Large Language Models (LLMs) by allowing them to interact with external systems as agents.
Prerequisites
You need to have a running Astra DB database. If you don't have one, you can create a free database here. From there, you can get two things you need:
- An Astra DB Application Token
- The Astra DB API Endpoint
To learn how to get these, please read the getting started docs.
Adding to an MCP client
Here's how you can add this server to your MCP client.
IBM Bob
For [IBM Bob](https://bob.ibm.com) IDE, follow the procedure at this documentation.
For [IBM Bob](https://bob.ibm.com) Shell, follow the procedure at this documentation.
Claude Desktop
To add this to Claude Desktop, go to Preferences -> Developer -> Edit Config and add this JSON blob to claude_desktop_config.json:
{
"mcpServers": {
"astra-db-mcp": {
"command": "npx",
"args": ["-y", "@datastax/astra-db-mcp"],
"env": {
"ASTRA_DB_APPLICATION_TOKEN": "your_astra_db_token",
"ASTRA_DB_API_ENDPOINT": "your_astra_db_endpoint"
}
}
}
}Optional Keyspace Configuration: By default, this server uses the keyspace configured in the underlying Astra DB library (typically default_keyspace). If you need to connect to a specific keyspace, you can add the ASTRA_DB_KEYSPACE variable to the `env
9a34d9206e9bOBSERVED · 2026-10-08Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.
claude mcp add astra-db-mcp --env ASTRA_DB_APPLICATION_TOKEN=${ASTRA_DB_APPLICATION_TOKEN} --env ASTRA_DB_KEYSPACE=${ASTRA_DB_KEYSPACE} -- npx -y @datastax/[email protected]{
"mcpServers": {
"astra-db-mcp": {
"command": "npx",
"args": [
"-y",
"@datastax/[email protected]"
],
"env": {
"ASTRA_DB_APPLICATION_TOKEN": "${ASTRA_DB_APPLICATION_TOKEN}",
"ASTRA_DB_KEYSPACE": "${ASTRA_DB_KEYSPACE}"
}
}
}
}Exposed tools (42)
22 read · 13 write · 7 destructive. Blast radius: 7 tools can delete or overwrite — an agent that can be talked into calling a tool can be talked into calling this one.
| Tool | Risk | Description |
|---|---|---|
AlterTable | destructive | Alter a table schema (add columns, drop columns, add vector columns) |
BulkCreateRecords | write | Create multiple records in a collection at once |
BulkDeleteRecords | destructive | Delete multiple records from a collection at once |
BulkUpdateRecords | write | Update multiple records in a collection at once |
CreateCollection | write | Create a new collection with optional vector, metric, auto-vectorize service, or indexing options |
CreateKeyspace | write | Create a new keyspace in the Astra DB database |
CreateRecord | write | Create a new record in a collection |
CreateTable | write | Create a structured table with typed columns and primary key in Astra DB |
CreateTableIndex | write | Create a regular secondary index on a table column |
CreateTableVectorIndex | write | Create a vector index on a vector column in a table |
DeleteCollection | destructive | Delete a collection from the database |
DeleteRecord | destructive | Delete a record from a collection |
DeleteTableRow | destructive | Delete one or multiple rows matching a filter from a table |
DropKeyspace | destructive | Drop a keyspace from the Astra DB database |
DropTable | destructive | Drop a table from the current keyspace |
EstimateDocumentCount | read | Estimate the number of documents in a collection using a fast, approximate count method |
FindAndRerank | read | Perform hybrid (lexical + vector) search with optional reranking on a collection |
FindDistinctValues | read | Find distinct values for a field in a collection |
FindRecord | read | Find records in a collection by a single field value |
FindWithFilter | read | Find records in a collection using rich MongoDB-style filter expressions ($and, $or, $gt, $in, $exists, etc.) with sorting and pagination |
FindWithVector | read | Find records via vector similarity search using raw vector embeddings |
FindWithVectorize | read | Find records in a vectorized collection using plain text (auto-vectorization using collection |
GetCollectionInfo | read | Get metadata, options, vector settings, and defaultId type of a collection |
GetCollections | read | Get all collections in the active Astra DB keyspace |
GetCurrentKeyspace | read | Get the currently active keyspace |
GetDatabaseInfo | read | Get database environment metadata (id, name, region, environment, status, keyspaces) |
GetRecord | read | Get a specific record from a collection by ID |
HelpAddToClient | write | Help the user add the Astra DB client to their MCP client |
HybridSearch | read | Search for records using both vector similarity and text matching |
InsertTableRow | write | Insert a single row or multiple rows into a table |
ListEmbeddingProviders | read | List all available vector embedding providers and models supported by Astra DB Vectorize |
ListKeyspaces | read | List all keyspaces in the Astra DB database |
ListRecords | read | List records from a collection with optional sorting, pagination, and projection |
ListRerankingProviders | read | List all available reranking providers and models supported by Astra DB for hybrid search |
ListTables | read | List all tables in the current keyspace |
OpenBrowser | read | Open a web browser to a specific URL |
QueryTable | read | Query rows in a table with filter, sorting, pagination, and projection |
UpdateCollection | write | Update an existing collection in the database |
UpdateRecord | write | Update an existing record in a collection |
UpdateTableRow | write | Update one or multiple rows matching a filter in a table |
UseKeyspace | read | Switch the active working keyspace for subsequent queries |
VectorSearch | read | Search for records in a collection using vector similarity |
Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | WARN |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- declared (1 observation(s))
- Network
- declared (1 observation(s))
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (8)
AlterTable, BulkDeleteRecords, DeleteCollection, DeleteRecord, DeleteTableRow, DropKeyspace, DropTable
vi.mock("../../util/db.js", () => {import { BulkCreateRecords } from "../../tools/BulkCreateRecords.js";import { BulkDeleteRecords } from "../../tools/BulkDeleteRecords.js";import { BulkUpdateRecords } from "../../tools/BulkUpdateRecords.js";import { CreateCollection } from "../../tools/CreateCollection.js";@datastax/astra-db-ts, @modelcontextprotocol/core, @modelcontextprotocol/server, dotenv, jsonschema, mcp-evals, @modelcontextprotocol/inspector, @types/node
The evals package loads an mcp client that then runs the index.ts file, so there is no need to rebuild between tests. You can load environment variables by prefixing the npx command. Full documentatio
Gates applied: no_behavioural_pass.
9a34d9206e9bfull audit observations/trust-audit/mcp-server/datastax__astra-db.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-08 | 9a34d9206e9b | SAFE | B | 89 | first audit |
Questions
What is the Astra DB MCP server?
An MCP server for Astra DB workloads
What tools does Astra DB expose?
42 in total: 22 read-only, 13 that write, and 7 that can delete or overwrite (AlterTable, BulkDeleteRecords, DeleteCollection, DeleteRecord, DeleteTableRow). Every one is listed on this page with its risk.
Is Astra DB safe to connect to an agent?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B. Separately from the audit: 7 of its tools can destroy data, so scope the token you give it to what you actually need.
What credentials does Astra DB need?
It reads ASTRA_DB_APPLICATION_TOKEN and ASTRA_DB_KEYSPACE from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How does Astra DB run?
It speaks stdio, so it runs as a local process your client starts. It is published on npm as @datastax/astra-db-mcp at 1.3.4.
How current is this page?
The grade is for one exact copy of the source (9a34d9206e9b), read on 2026-10-08. The repository is watched and re-audited when it changes.