Couchbase MCP Server

MIT License

Integrations

  • Enables natural language queries on Couchbase Capella clusters, executing SQL++ queries against Couchbase databases and returning formatted results.

Couchbase MCP 服务器

模型上下文协议 (MCP) 是一种用于处理大型语言模型 (LLM) 与外部系统之间交互的协议。本代码库使用 Couchbase Node.js SDK 实现了 Couchbase MCP 服务器,使 MCP 客户端(例如 Claude Desktop)能够在 Couchbase Capella 集群上执行自然语言查询。

使用此服务器,您可以使用以下命令:

  • Show me the results of SELECT * FROM my_bucket LIMIT 10
  • Execute this query: SELECT name, age FROM users WHERE active = true
  • Get me the latest 5 documents from my_bucket
  • Summarize the latest 5 orders from the orders bucket for me

例子

以下屏幕截图展示了 MCP 服务器与 Claude Desktop 客户端的运行情况。用户用简单的英语发出一个通用请求,MCP 服务器将其转换为 SQL++ 查询,并针对 Couchbase Capella 集群执行。然后,结果以可读的格式返回给用户。

设置

  1. 克隆存储库并安装依赖项:
git clone git@github.com:hummusonrails/couchbase-mcp-server.git cd couchbase-mcp-server npm install
  1. 在根目录中创建一个.env文件并添加您的 Couchbase 连接字符串、用户名和密码:
COUCHBASE_CONNECTION_STRING=couchbases://your-cluster.cloud.couchbase.com COUCHBASE_USERNAME=your_username COUCHBASE_PASSWORD=your_password

请参阅.env.sample文件以了解所需的环境变量。

  1. 构建项目:
npm run build
  1. 使用 Stdio 传输运行服务器:
npx couchbase-mcp-server

MCP 服务器使用 StdioServerTransport,因此它通过标准输入/输出进行通信。请确保您的 MCP 客户端(例如 Claude Desktop)已配置为使用本地 MCP 服务器。请按照Claude Desktop 文档设置 MCP 客户端以连接到本地服务器。

特征

Couchbase查询工具

  • 工具名称: query-couchbase
  • **描述:**在您的 Couchbase Capella 集群上执行 SQL++ 查询语句。
  • 用法:调用时,服务器将使用 Couchbase Node.js SDK 执行提供的 SQL++ 查询并返回结果。

发展

要在本地开展项目:

  1. 安装依赖项:
npm install npm run build
  1. 使用 MCP 客户端测试服务器:

启动您的 MCP 客户端(例如,Claude Desktop),配置为使用示例查询连接并调用该工具。

  1. 调试

所有日志消息都会发送到stderr ,以确保stdout仅包含 MCP 协议 JSON。请检查您的日志以获取详细的连接和错误消息。

贡献

欢迎贡献代码!欢迎提交 Pull 请求或创建 Issue 提出您的建议。如有任何更改,请务必遵循项目的代码风格。

执照

本项目遵循 MIT 许可证。详情请参阅LICENSE文件。

-
security - not tested
A
license - permissive license
-
quality - not tested

通过模型上下文协议实现与 Couchbase 数据库进行自然语言交互的服务器,允许用户使用对话命令对 Couchbase Capella 集群执行 SQL++ 查询。

  1. Example
    1. Setup
      1. Features
        1. Couchbase Query Tool
      2. Developing
        1. Contributing
          1. License

            Related MCP Servers

            • -
              security
              F
              license
              -
              quality
              A server that enables interaction with PostgreSQL, MySQL, MariaDB, or SQLite databases through Claude Desktop using natural language queries.
              Last updated -
              Python
            • A
              security
              A
              license
              A
              quality
              A Model Context Protocol server that allows Large Language Models to interact with Astra DB databases, providing tools for managing collections and records through natural language commands.
              Last updated -
              10
              115
              12
              TypeScript
              Apache 2.0
              • Apple
            • A
              security
              F
              license
              A
              quality
              A Model Context Protocol server that provides a SQL interface for querying and managing Apache Iceberg tables through Claude desktop, allowing natural language interaction with Iceberg data lakes.
              Last updated -
              1
              2
              Python
            • -
              security
              F
              license
              -
              quality
              A Model Context Protocol server that enables large language models to interact directly with Couchbase databases through natural language, supporting operations like querying buckets, performing CRUD operations, and executing N1QL queries.
              Last updated -
              1,021
              4
              TypeScript
              • Apple

            View all related MCP servers

            ID: 92sia4gobg