Astra DB MCP Server

Astra DB MCP Server
官方

一个模型上下文协议服务器,允许大型语言模型与 Astra DB 数据库交互,提供通过自然语言命令管理集合和记录的工具。

数据库
TypeScript
访问服务器

Tools

GetCollections

Get all collections in the Astra DB database

CreateCollection

Create a new collection in the database

UpdateCollection

Update an existing collection in the database

DeleteCollection

Delete a collection from the database

ListRecords

List records from a collection in the database

GetRecord

Get a specific record from a collection by ID

CreateRecord

Create a new record in a collection

UpdateRecord

Update an existing record in a collection

DeleteRecord

Delete a record from a collection

FindRecord

Find records in a collection by field value

README

Astra DB MCP 服务器

用于与 Astra DB 交互的模型上下文协议 (MCP) 服务器。MCP 通过允许大型语言模型 (LLM) 作为代理与外部系统交互,扩展了 LLM 的功能。

<a href="https://glama.ai/mcp/servers/tigix0yf4b"> <img width="380" height="200" src="https://glama.ai/mcp/servers/tigix0yf4b/badge" alt="Astra DB Server MCP server" /> </a>

前提条件

您需要有一个正在运行的 Astra DB 数据库。如果您没有,可以在这里创建一个免费数据库。从那里,您可以获得您需要的两样东西:

  1. 一个 Astra DB 应用程序令牌
  2. Astra DB API 端点

要了解如何获取这些信息,请阅读入门文档

添加到 MCP 客户端

以下是如何将此服务器添加到您的 MCP 客户端。

Claude Desktop

Claude Desktop

要将其添加到 Claude Desktop,请转到 Preferences -> Developer -> Edit Config 并将此 JSON blob 添加到 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"
      }
    }
  }
}

Windows PowerShell 用户: npx 是一个批处理命令,因此请按如下方式修改 JSON:

  "command": "cmd",
  "args": ["/k", "npx", "-y", "@datastax/astra-db-mcp"],

Cursor

Cursor

要将其添加到 Cursor,请转到 Settings -> Cursor Settings -> MCP

从那里,您可以通过单击“+ Add New MCP Server”按钮来添加服务器,您应该会进入一个 mcp.json 文件。

提示:有一个 ~/.cursor/mcp.json 代表您的全局 MCP 设置,以及一个特定于项目的 .cursor/mcp.json 文件 这是特定于项目的。您可能希望将此 MCP 服务器安装到特定于项目的文件中。

添加与 Claude Desktop 说明中指示的相同的 JSON。

或者,您可能会看到一个向导,您可以在其中输入以下值(对于基于 Unix 的系统):

  • 名称:任何你想要的
  • 类型:命令
  • 命令:
env ASTRA_DB_APPLICATION_TOKEN=your_astra_db_token ASTRA_DB_API_ENDPOINT=your_astra_db_endpoint npx -y @datastax/astra-db-mcp

添加后,您的编辑器将完全连接到您的 Astra DB 数据库。

可用工具

该服务器提供以下工具来与 Astra DB 交互:

  • GetCollections: 获取数据库中的所有集合
  • CreateCollection: 在数据库中创建一个新集合
  • UpdateCollection: 更新数据库中现有的集合
  • DeleteCollection: 从数据库中删除一个集合
  • ListRecords: 列出数据库中集合中的记录
  • GetRecord: 通过 ID 从集合中获取特定记录
  • CreateRecord: 在集合中创建一个新记录
  • UpdateRecord: 更新集合中现有的记录
  • DeleteRecord: 从集合中删除一个记录
  • FindRecord: 通过字段值查找集合中的记录
  • BulkCreateRecords: 一次在集合中创建多个记录
  • BulkUpdateRecords: 一次更新集合中的多个记录
  • BulkDeleteRecords: 一次从集合中删除多个记录
  • OpenBrowser: 打开一个 Web 浏览器进行身份验证和设置
  • HelpAddToClient: 获取有关将 Astra DB 客户端添加到您的 MCP 客户端的帮助
  • EstimateDocumentCount: 获取集合中文档数量的估计值

更新日志

此项目的所有重大更改都将记录在此文件中。 格式基于 Keep a Changelog,并且此项目遵循 Semantic Versioning

❤️ 贡献者

astra-db-mcp contributors


推荐服务器

Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Playwright MCP Server

Playwright MCP Server

提供一个利用模型上下文协议的服务器,以实现类人浏览器的自动化,该服务器使用 Playwright,允许控制浏览器行为,例如导航、元素交互和滚动。

精选
本地
TypeScript
Apple MCP Server

Apple MCP Server

通过 MCP 协议与 Apple 应用(如“信息”、“备忘录”和“通讯录”)进行交互,从而使用自然语言发送消息、搜索和打开应用内容。

精选
本地
TypeScript
contentful-mcp

contentful-mcp

在你的 Contentful Space 中更新、创建、删除内容、内容模型和资源。

精选
TypeScript
Supabase MCP Server

Supabase MCP Server

一个模型上下文协议(MCP)服务器,它提供对 Supabase 管理 API 的编程访问。该服务器允许 AI 模型和其他客户端通过标准化的接口来管理 Supabase 项目和组织。

精选
JavaScript
serper-search-scrape-mcp-server

serper-search-scrape-mcp-server

这个 Serper MCP 服务器支持搜索和网页抓取,并且支持 Serper API 引入的所有最新参数,例如位置。

精选
TypeScript
The Verge News MCP Server

The Verge News MCP Server

提供从The Verge的RSS feed获取和搜索新闻的工具,允许用户获取今日新闻、检索过去一周的随机文章,以及在最近的Verge内容中搜索特定关键词。

精选
TypeScript
MCP Server Trello

MCP Server Trello

通过 Trello API 促进与 Trello 看板的交互,提供速率限制、类型安全、输入验证和错误处理等功能,以实现对卡片、列表和看板活动的无缝管理。

精选
TypeScript
MCP DuckDB Knowledge Graph Memory Server

MCP DuckDB Knowledge Graph Memory Server

一个为 Claude 设计的记忆服务器,它使用 DuckDB 存储和检索知识图谱数据,从而增强了对话的性能和查询能力,并能持久保存用户信息。

精选
TypeScript