Get up and running in a few steps to test the MCP Astra DB server and tools in a temporary Meshagent Room:

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

  1. Install Meshagent CLI and dependencies:
    pip install "meshagent[all]"
    
  2. Sign Up and Authenticate:
  3. Launch MCP Astra DB Service in a Test Room:
    meshagent service test --room=test --role=agent --image=meshagent/mcp-astra-db:latest \
    --env MESHAGENT_PORT=8001 \
    --env ASTRA_DB_API_ENDPOINT=<your_astra_db_api_endpoint> \
    --env ASTRA_DB_APPLICATION_TOKEN=<your_astra_db_token> \
    --port="num=8001 path=/webhook liveness=/ type=meshagent.callable" \
    --name=mcp-astra-db-service-test
    
    • 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.
  4. Join the Room with a Chatbot Agent Using the MCP Astra DB Toolkit:
    meshagent chatbot join --room=test --agent-name=mcp-astra-db --name=mcp-astra-db --toolkit=mcp-astra-db
    
    • 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.
  5. 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:

meshagent service create --role=agent --image=meshagent/mcp-astra-db:latest \
--env MESHAGENT_PORT=8001 \
--env ASTRA_DB_API_ENDPOINT=<your_astra_db_api_endpoint> \
--env ASTRA_DB_APPLICATION_TOKEN=<your_astra_db_token> \
--port="num=8001 path=/webhook liveness=/ type=meshagent.callable" \
--name=mcp-astra-db-service

2. Deploy the Chatbot Service:

meshagent service create --image="meshagent/cli:latest" \
--port="num=9001 path=/agent liveness=/ type=meshagent.callable participant_name=mcp-astra-db-chatbot" \
--env="MESHAGENT_PORT=9001" \
--name="mcp-astra-db-chatbot-service" \
--command="meshagent chatbot service --agent-name=mcp-astra-db-chatbot --toolkit=mcp-astra-db"
  • Both services will automatically join all new rooms created in your Meshagent project, requiring no manual launches.

Tools Available

Tools provided by this MCP ServerShort Description
BulkCreateRecordsCreate multiple records in a collection at once
BulkDeleteRecordsDelete multiple records from a collection at once
BulkUpdateRecordsUpdate multiple records in a collection at once
CreateCollectionCreate a new collection in the database
CreateRecordCreate a new record in a collection
DeleteCollectionDelete a collection from the database
DeleteRecordDelete a record from a collection
EstimateDocumentCountEstimate the number of documents in a collection using a fast, approximate count method
FindRecordFind records in a collection by field value
GetCollectionsGet all collections in the Astra DB database
GetRecordGet a specific record from a collection by ID
HelpAddToClientHelp the user add the Astra DB client to their MCP client
ListRecordsList records from a collection in the database
OpenBrowserOpen a web browser to a specific URL
UpdateCollectionUpdate an existing collection in the database
UpdateRecordUpdate an existing record in a collection

Tools Details

Tool: BulkCreateRecords

Create multiple records in a collection at once
ParametersTypeDescription
collectionNamestringName of the collection to create the records in
recordsarrayArray of records to insert

Tool: BulkDeleteRecords

Delete multiple records from a collection at once
ParametersTypeDescription
collectionNamestringName of the collection containing the records
recordIdsarrayArray of record IDs to delete

Tool: BulkUpdateRecords

Update multiple records in a collection at once
ParametersTypeDescription
collectionNamestringName of the collection containing the records
recordsarrayArray of records to update with their IDs

Tool: CreateCollection

Create a new collection in the database
ParametersTypeDescription
collectionNamestringName of the collection to create
dimensionnumber (optional)The dimensions of the vector collection, if vector is true
vectorboolean (optional)Whether to create a vector collection

Tool: CreateRecord

Create a new record in a collection
ParametersTypeDescription
collectionNamestringName of the collection to create the record in
recordobjectThe record data to insert

Tool: DeleteCollection

Delete a collection from the database
ParametersTypeDescription
collectionNamestringName of the collection to delete

Tool: DeleteRecord

Delete a record from a collection
ParametersTypeDescription
collectionNamestringName of the collection containing the record
recordIdstringID of the record to delete

Tool: EstimateDocumentCount

Estimate the number of documents in a collection using a fast, approximate count method
ParametersTypeDescription
collectionNamestringName of the collection to estimate document count for

Tool: FindRecord

Find records in a collection by field value
ParametersTypeDescription
collectionNamestringName of the collection to search in
fieldstringField name to search by (e.g., ‘title’, ‘_id’, or any property)
valuestringValue to search for in the specified field
limitnumber (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
ParametersTypeDescription
collectionNamestringName of the collection to get the record from
recordIdstringID 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
ParametersTypeDescription
collectionNamestringName of the collection to list records from
limitnumber (optional)Maximum number of records to return

Tool: OpenBrowser

Open a web browser to a specific URL
ParametersTypeDescription
urlstringThe URL to open in the browser

Tool: UpdateCollection

Update an existing collection in the database
ParametersTypeDescription
collectionNamestringName of the collection to update
newNamestringNew name for the collection

Tool: UpdateRecord

Update an existing record in a collection
ParametersTypeDescription
collectionNamestringName of the collection containing the record
recordobjectThe updated record data
recordIdstringID of the record to update

Meshagent Resources