Required Environment Variables
ASTRA_DB_API_ENDPOINT
: (string) — The API endpoint for your Astra DB instance.ASTRA_DB_APPLICATION_TOKEN
: (string) — Your Astra DB application token.
Steps
-
Install Meshagent CLI and dependencies:
-
Sign Up and Authenticate:
- Follow the getting started guide to create an account and authenticate your CLI.
-
Launch MCP Astra DB Service in a Test Room:
- This will start a Meshagent Room called
test
with a dedicated MCP Astra DB server. - The service and room will be automatically removed when inactive.
- This will start a Meshagent Room called
-
Join the Room with a Chatbot Agent Using the MCP Astra DB Toolkit:
- This starts a chatbot in the same Meshagent Room that can use the Astra DB tools.
- You may use multiple toolkits simultaneously in the same room if needed.
- The CLI will provide a link to access the room in your browser.
-
Test the Integration:
- Visit the room link from the output above in your web browser.
- Send messages to the chatbot agent to interact with your MCP Server tools.
Project Level Deployment
For production, deploy persistent MCP services at your Meshagent project level to make MCP server tools and chatbot agents available in every room as they’re created:1. Deploy the MCP Astra DB Agent Service:
2. Deploy the Chatbot Service:
- Both services will automatically join all new rooms created in your Meshagent project, requiring no manual launches.
Tools Available
Tools provided by this MCP Server | Short Description |
---|---|
BulkCreateRecords | Create multiple records in a collection at once |
BulkDeleteRecords | Delete multiple records from a collection at once |
BulkUpdateRecords | Update multiple records in a collection at once |
CreateCollection | Create a new collection in the database |
CreateRecord | Create a new record in a collection |
DeleteCollection | Delete a collection from the database |
DeleteRecord | Delete a record from a collection |
EstimateDocumentCount | Estimate the number of documents in a collection using a fast, approximate count method |
FindRecord | Find records in a collection by field value |
GetCollections | Get all collections in the Astra DB database |
GetRecord | Get a specific record from a collection by ID |
HelpAddToClient | Help the user add the Astra DB client to their MCP client |
ListRecords | List records from a collection in the database |
OpenBrowser | Open a web browser to a specific URL |
UpdateCollection | Update an existing collection in the database |
UpdateRecord | Update an existing record in a collection |
Tools Details
Tool: BulkCreateRecords
Create multiple records in a collection at once
Parameters | Type | Description |
---|---|---|
collectionName | string | Name of the collection to create the records in |
records | array | Array of records to insert |
Tool: BulkDeleteRecords
Delete multiple records from a collection at once
Parameters | Type | Description |
---|---|---|
collectionName | string | Name of the collection containing the records |
recordIds | array | Array of record IDs to delete |
Tool: BulkUpdateRecords
Update multiple records in a collection at once
Parameters | Type | Description |
---|---|---|
collectionName | string | Name of the collection containing the records |
records | array | Array of records to update with their IDs |
Tool: CreateCollection
Create a new collection in the database
Parameters | Type | Description |
---|---|---|
collectionName | string | Name of the collection to create |
dimension | number (optional) | The dimensions of the vector collection, if vector is true |
vector | boolean (optional) | Whether to create a vector collection |
Tool: CreateRecord
Create a new record in a collection
Parameters | Type | Description |
---|---|---|
collectionName | string | Name of the collection to create the record in |
record | object | The record data to insert |
Tool: DeleteCollection
Delete a collection from the database
Parameters | Type | Description |
---|---|---|
collectionName | string | Name of the collection to delete |
Tool: DeleteRecord
Delete a record from a collection
Parameters | Type | Description |
---|---|---|
collectionName | string | Name of the collection containing the record |
recordId | string | ID of the record to delete |
Tool: EstimateDocumentCount
Estimate the number of documents in a collection using a fast, approximate count method
Parameters | Type | Description |
---|---|---|
collectionName | string | Name of the collection to estimate document count for |
Tool: FindRecord
Find records in a collection by field value
Parameters | Type | Description |
---|---|---|
collectionName | string | Name of the collection to search in |
field | string | Field name to search by (e.g., ‘title’, ‘_id’, or any property) |
value | string | Value to search for in the specified field |
limit | number (optional) | Maximum number of records to return |
Tool: GetCollections
Get all collections in the Astra DB database
Tool: GetRecord
Get a specific record from a collection by ID
Parameters | Type | Description |
---|---|---|
collectionName | string | Name of the collection to get the record from |
recordId | string | ID of the record to retrieve |
Tool: HelpAddToClient
Help the user add the Astra DB client to their MCP client
Tool: ListRecords
List records from a collection in the database
Parameters | Type | Description |
---|---|---|
collectionName | string | Name of the collection to list records from |
limit | number (optional) | Maximum number of records to return |
Tool: OpenBrowser
Open a web browser to a specific URL
Parameters | Type | Description |
---|---|---|
url | string | The URL to open in the browser |
Tool: UpdateCollection
Update an existing collection in the database
Parameters | Type | Description |
---|---|---|
collectionName | string | Name of the collection to update |
newName | string | New name for the collection |
Tool: UpdateRecord
Update an existing record in a collection
Parameters | Type | Description |
---|---|---|
collectionName | string | Name of the collection containing the record |
record | object | The updated record data |
recordId | string | ID of the record to update |
Meshagent Resources
- Meshagent: https://www.meshagent.com/
- Read The Docs: https://docs.meshagent.com
- Meshagent MCP Tool Image: https://hub.docker.com/r/meshagent/mcp-astra-db