Connect an Astra DB MCP server to Robility flow

Estimated reading: 2 minutes 144 views

This guide demonstrates how to use Robility flow as an MCP client by using the MCP Tools component to run a DataStax Astra DB MCP server in an agent flow.

1. Install an LTS release of Node.js.
2. Create an OpenAI API key. 
3. Create an Astra DB Serverless (Vector) database, if you don’t already have one.
4. Get your database’s Astra DB API endpoint and an Astra application token with the Database Administrator role. For more information, see Generate an application token for a database.
5. To follow along with this guide, create a flow based on the Simple Agent template.

You can also use an existing flow or create a blank flow.

6. Remove the URL tool and then replace it with an MCP Tools component
7. Configure the MCP Tools component as follows:

a. Select Stdio mode. 
b. In the MCP server field, add the following code to connect to an Astra DB MCP server:

npx -y @datastax/astra-db-mcp

8. In the Env fields, add variables for ASTRA_DB_APPLICATION_TOKEN and ASTRA_DB_API_ENDPOINT with the values from your Astra database.

Add each variable separately. To add another variable field click  Add More.

ASTRA_DB_APPLICATION_TOKEN=AstraCS:…

ASTRA_DB_API_ENDPOINT=https://…-us-east-2.apps.astra.datastax.com

8. In the Agent component, add your OpenAI API key.

The default model is an OpenAI model. If you want to use a different model, edit the Model ProviderModel Name, and API Key fields accordingly.

9. Open the Playground, and then ask the agent, What collections are available?

Since Robility flow is connected to your Astra DB database through the MCP server, the agent chooses the correct tool and connects to your database to retrieve the answer. For example:

The available collections in your database are:

collection_002

hardware_requirements

load_collection

nvidia_collection

software_requirements

Share this Doc

Connect an Astra DB MCP server to Robility flow

Or copy link

CONTENTS