Astra DB▌
by datastax
Astra DB offers cloud-native, scalable data storage and retrieval for AI apps, with seamless integration like AWS RDS an
Integrates with Astra DB, enabling cloud-native database operations for scalable data storage and retrieval in AI applications.
Both formats append explainx.ai attribution and the canonical URL for this MCP server listing.
best for
- / AI applications needing scalable data storage
- / Vector search and RAG implementations
- / Cloud-native app development
- / Real-time data processing workflows
capabilities
- / Query Astra DB collections
- / Insert and update documents
- / Perform vector similarity searches
- / Manage database schemas
- / Execute aggregation pipelines
what it does
Connects LLMs to Astra DB for cloud-native database operations. Enables AI applications to store and retrieve data from DataStax's managed database service.
about
Astra DB is an official MCP server published by datastax that provides AI assistants with tools and capabilities via the Model Context Protocol. Astra DB offers cloud-native, scalable data storage and retrieval for AI apps, with seamless integration like AWS RDS an It is categorized under databases.
how to install
You can install Astra DB in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.
license
Apache-2.0
Astra DB is released under the Apache-2.0 license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.
readme
Astra DB MCP Server
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.
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 object above, like so:
"env": {
"ASTRA_DB_APPLICATION_TOKEN": "your_astra_db_token",
"ASTRA_DB_API_ENDPOINT": "your_astra_db_endpoint",
"ASTRA_DB_KEYSPACE": "your_desired_keyspace"
}
Windows PowerShell Users:
npx is a batch command so modify the JSON as follows:
"command": "cmd",
"args": ["/k", "npx", "-y", "@datastax/astra-db-mcp"],
Cursor

To add this to Cursor, go to Settings -> Cursor Settings -> MCP
From there, you can add the server by clicking the "+ Add New MCP Server" button, where you should be brought to an mcp.json file.
Tip: there is a
~/.cursor/mcp.jsonthat represents your Global MCP settings, and a project-specific.cursor/mcp.jsonfile that is specific to the project. You probably want to install this MCP server into the project-specific file.
Add the same JSON as indiciated in the Claude Desktop instructions.
Alternatively you may be presented with a wizard, where you can enter the following values (for Unix-based systems):
- Name: Whatever you want
- Type: Command
- Command:
env ASTRA_DB_APPLICATION_TOKEN=your_astra_db_token ASTRA_DB_API_ENDPOINT=your_astra_db_endpoint npx -y @datastax/astra-db-mcp
Note: ASTRA_DB_KEYSPACE is optional. If omitted, the default keyspace configured in the Astra DB library will be used.
Once added, your editor will be fully connected to your Astra DB database.
Available Tools
The server provides the following tools for interacting with Astra DB:
Collection Management
GetCollections: Get all collections in the databaseCreateCollection: Create a new collection in the database (with vector support)UpdateCollection: Update an existing collection in the databaseDeleteCollection: Delete a collection from the databaseEstimateDocumentCount: Get estimate of the number of documents in a collection
Record Operations
ListRecords: List records from a collection in the databaseGetRecord: Get a specific record from a collection by IDCreateRecord: Create a new record in a collectionUpdateRecord: Update an existing record in a collectionDeleteRecord: Delete a record from a collectionFindRecord: Find records in a collection by field valueFindDistinctValues: Find distinct values for a specific field in a collection
Bulk Operations
BulkCreateRecords: Create multiple records in a collection at onceBulkUpdateRecords: Update multiple records in a collection at onceBulkDeleteRecords: Delete multiple records from a collection at once
Vector Search
VectorSearch: Perform vector similarity search on vector embeddingsHybridSearch: Combine vector similarity search with text search
Utility
OpenBrowser: Open a web browser for authentication and setupHelpAddToClient: Get assistance with adding Astra DB client to your MCP client
New Features and Capabilities
Vector Search Capabilities
The Astra DB MCP server now includes powerful vector search capabilities for AI applications:
VectorSearch
Perform similarity search on vector embeddings:
// Example usage
const results = await VectorSearch({
collectionName: "my_vector_collection",
queryVector: [0.1, 0.2, 0.3, ...], // Your embedding vector
limit: 5, // Optional: Number of results to return (default: 10)
minScore: 0.7, // Optional: Minimum similarity score threshold
filter: { category: "article" } // Optional: Additional filter criteria
});
HybridSearch
Combine vector similarity search with text search for more accurate results:
// Example usage
const results = await HybridSearch({
collectionName: "my_vector_collection",
queryVector: [0.1, 0.2, 0.3, ...], // Your embedding vector
textQuery: "climate change", // Text query to search for
weights: { // Optional: Weights for hybrid search
vector: 0.7, // Weight for vector similarity (0.0-1.0)
text: 0.3 // Weight for text relevance (0.0-1.0)
},
limit: 5, // Optional: Number of results to return
fields: ["title", "content"] // Optional: Fields to search in for text query
});
Enhanced Collection Creation
The CreateCollection tool now supports more vector configuration options:
// Example usage
const result = await CreateCollection({
collectionName: "my_vector_collection",
vector: true, // Enable vector search
dimension: 1536, // Vector dimension (e.g., 1536 for OpenAI embeddings)
metric: "cosine" // Similarity metric: "cosine", "euclidean", or "dot_product"
});
Finding Distinct Values
The new FindDistinctValues tool allows you to find unique values for a field:
// Example usage
const distinctValues = await FindDistinctValues({
collectionName: "my_collection",
field: "category", // Field to find distinct values for
filter: { active: true } // Optional: Filter to apply
});
Optimized Bulk Operations
Bulk operations now use native batch processing for better performance:
// Example: Bulk create records
const result = await BulkCreateRecords({
collectionName: "my_collection",
records: [
{ title: "Record 1", content: "Content 1" },
{ title: "Record 2", content: "Content 2" },
// ... more records
]
});
// Example: Bulk update records
const updateResult = await BulkUpdateRecords({
collectionName: "my_collection",
records: [
{ id: "record1", record: { title: "Updated Title 1" } },
{ id: "record2", record: { title: "Updated Title 2" } },
// ... more records
]
});
// Example: Bulk delete records
const deleteResult = await BulkDeleteRecords({
collectionName: "my_collection",
recordIds: ["record1", "record2", "record3"]
});
Improved Error Handling
The server now provides more detailed error messages with error codes to help diagnose issues more easily.
Changelog
All notable changes to this project will be documented in this file. The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Running evals
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 documentation can be found here.
OPENAI_API_KEY=your-key npx mcp-eval evals.ts tools.ts
❤️ Contributors
Badges
FAQ
- What is the Astra DB MCP server?
- Astra DB is a Model Context Protocol (MCP) server profile on explainx.ai. MCP lets AI hosts (e.g. Claude Desktop, Cursor) call tools and resources through a standard interface; this page summarizes categories, install hints, and community ratings.
- How do MCP servers relate to agent skills?
- Skills are reusable instruction packages (often SKILL.md); MCP servers expose live capabilities. Teams frequently combine both—skills for workflows, MCP for APIs and data. See explainx.ai/skills and explainx.ai/mcp-servers for parallel directories.
- How are reviews shown for Astra DB?
- This profile displays 73 aggregated ratings (sample rows for discoverability plus signed-in user reviews). Average score is about 4.5 out of 5—verify behavior in your own environment before production use.
Use Cases▌
Direct Database Queries from AI
Enable Claude to query your database directly using natural language
Example
Ask 'Show me top 10 customers by revenue this month' and get SQL results instantly
Eliminate manual SQL writing for ad-hoc queries, get insights 10x faster
Data Analysis & Reporting
Generate complex reports and analytics without leaving conversation
Example
Analyze sales trends, cohort retention, user behavior patterns conversationally
Democratize data access—non-technical team members can query databases
Schema Exploration
Understand database structure, relationships, and data models
Example
'Explain the user_orders table schema and its relationships'
Onboard engineers faster, explore unfamiliar databases efficiently
Data Validation & Quality Checks
Run data quality queries to catch anomalies and inconsistencies
Example
Find duplicate records, missing values, orphaned foreign keys automatically
Maintain data integrity with less manual SQL work
Implementation Guide▌
Prerequisites
- ›Claude Desktop 0.7.0+ or Cursor with MCP support
- ›Database credentials (read-only recommended for safety)
- ›Network access from Claude client to database
- ›Understanding of database security and access control
Time Estimate
15-30 minutes including configuration and testing
Installation Steps
- 1.Install MCP server: npm install -g @modelcontextprotocol/server-[name]
- 2.Configure database connection in Claude Desktop config (~/.claude/mcp.json)
- 3.Provide connection string: host, port, database, username, password
- 4.Restart Claude Desktop to load MCP server
- 5.Test connection: 'List all tables in database'
- 6.Run simple query: 'Show me 5 rows from users table'
- 7.Verify results and permissions are correct
- 8.Document query patterns for team use
Troubleshooting
- ⚠Connection refused: Check database is running and network accessible
- ⚠Authentication failed: Verify credentials, check user permissions
- ⚠Claude can't see tables: Grant appropriate read permissions to database user
- ⚠Slow queries: Add indexes, limit result set size, use read replicas
- ⚠MCP server not loading: Check config syntax, restart Claude Desktop
Best Practices▌
✓ Do
- +Use read-only database credentials to prevent accidental writes
- +Connect to read replica, not production primary database
- +Set query timeout limits to prevent long-running queries
- +Document database schema and common queries for AI context
- +Monitor query performance and optimize slow queries
- +Use connection pooling for better performance
- +Test with non-production data first
✗ Don't
- −Don't use production write credentials—risk of data corruption
- −Don't query production database during peak traffic hours
- −Don't expose sensitive PII without proper access controls
- −Don't skip query result validation—AI can misinterpret schema
- −Don't allow unlimited result set sizes—set LIMIT clauses
- −Don't share database credentials in plain text config files
💡 Pro Tips
- ★Create database views for common queries to simplify AI access
- ★Add schema comments/descriptions so AI understands column meanings
- ★Use semantic table/column names ('customer_lifetime_value' not 'clv')
- ★Set up query logging to audit what Claude is querying
- ★Create saved query templates for recurring analysis
- ★Combine with data visualization tools for better insights
Technical Details▌
Architecture
MCP server acts as bridge between Claude and database, translating natural language to SQL queries and returning results in structured format.
Protocols
- Model Context Protocol (MCP)
- Database-specific protocols (PostgreSQL, MySQL, MongoDB)
Compatibility
- PostgreSQL
- MySQL
- SQLite
- MongoDB
- Redis
When to Use This▌
✓ Use When
Use for ad-hoc data queries, exploratory analysis, report generation, schema exploration, and democratizing data access. Best for read-heavy analytics workloads.
✗ Avoid When
Avoid for production write operations, mission-critical transactions, real-time OLTP workloads, or when database contains sensitive PII without proper access controls. Use read replicas, not primary.
Integration▌
- →Read replica connection for analytics queries
- →Database view layer to abstract complex joins
- →Query result caching for repeated questions
- →Audit logging of all AI-generated queries
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
List & Promote Your MCP Server
Share your MCP server with the developer community
Ratings
4.5★★★★★73 reviews- ★★★★★Carlos Torres· Dec 16, 2024
Useful MCP listing: Astra DB is the kind of server we cite when onboarding engineers to host + tool permissions.
- ★★★★★Sofia Khan· Dec 16, 2024
Astra DB is among the better-indexed MCP projects we tried; the explainx.ai summary tracks the official description.
- ★★★★★Luis Sethi· Dec 16, 2024
Astra DB is a well-scoped MCP server in the explainx.ai directory — install snippets and categories matched our Claude Code setup.
- ★★★★★Min Garcia· Dec 16, 2024
Astra DB reduced integration guesswork — categories and install configs on the listing matched the upstream repo.
- ★★★★★Ganesh Mohane· Dec 12, 2024
According to our notes, Astra DB benefits from clear Model Context Protocol framing — fewer ambiguous “AI plugin” claims.
- ★★★★★Advait Chen· Dec 8, 2024
We wired Astra DB into a staging workspace; the listing’s GitHub and npm pointers saved time versus hunting across READMEs.
- ★★★★★Carlos Flores· Nov 27, 2024
According to our notes, Astra DB benefits from clear Model Context Protocol framing — fewer ambiguous “AI plugin” claims.
- ★★★★★Arjun Chawla· Nov 23, 2024
We evaluated Astra DB against two servers with overlapping tools; this profile had the clearer scope statement.
- ★★★★★Alexander Abbas· Nov 7, 2024
Strong directory entry: Astra DB surfaces stars and publisher context so we could sanity-check maintenance before adopting.
- ★★★★★Liam Sharma· Nov 7, 2024
Astra DB has been reliable for tool-calling workflows; the MCP profile page is a good permalink for internal docs.
showing 1-10 of 73
