Skip to main content
Glama

Couchbase MCP Server for LLMs

by Aniket310101

🗄️ 适用于法学硕士的 Couchbase MCP 服务器

模型上下文协议 (MCP) 服务器,使 LLM 能够直接与 Capella 集群上的 Couchbase 数据库交互。查询存储桶、执行 CRUD 操作、执行 N1QL 查询,并通过自然语言无缝管理数据。

🚀 快速入门

  1. 先决条件
    • Node.js 16 或更高版本
    • Capella 上正在运行的 Couchbase 实例
    • Claude桌面应用程序
  2. 安装Couchbase MCP Server 可以通过两种方式安装:

选项 1:使用 NPX(推荐)

最快的入门方式是使用 NPX:

npx -y @couchbasedatabase/couchbase-mcp

选项 2:手动安装

如果您希望手动克隆并运行项目:

# Clone the repository git clone https://github.com/Aniket310101/MCP-Server-Couchbase.git cd MCP-Server-Couchbase # Install dependencies npm install # Build the project npm run build
  1. Claude 桌面集成将此配置添加到您的 Claude Desktop 配置文件:Windows%APPDATA%/Claude/claude_desktop_config.json
    MacOS~/Library/Application Support/Claude/claude_desktop_config.json

选项 1:使用软件包安装

{ "mcpServers": { "couchbase": { "command": "npx", "args": ["-y", "@couchbasedatabase/couchbase-mcp"], "env": { "COUCHBASE_URL": "<COUCHBASE CONNECTION STRING>", "COUCHBASE_BUCKET": "<BUCKET NAME>", "COUCHBASE_USERNAME": "<COUCHBASE USERNAME>", "COUCHBASE_PASSWORD": "<COUCHBASE PASSWORD>" } } } }

选项 2:手动安装

{ "mcpServers": { "couchbase": { "command": "node", "args": ["path/to/MCP-Server-Couchbase/dist/index.js"], "env": { "COUCHBASE_URL": "<COUCHBASE CONNECTION STRING>", "COUCHBASE_BUCKET": "<BUCKET NAME>", "COUCHBASE_USERNAME": "<COUCHBASE USERNAME>", "COUCHBASE_PASSWORD": "<COUCHBASE PASSWORD>" } } } }
  1. 验证连接
    • 重启Claude桌面
    • Couchbase MCP 服务器工具现在应该可以在您的对话中使用

📝 可用工具

基本操作

  • query :执行 N1QL 查询
  • listBuckets :列出可用的 bucket

范围管理

  • createScope :在 bucket 中创建一个新范围
  • deleteScope :删除现有范围
  • listScopes :列出存储桶中的所有范围

收藏管理

  • createCollection :在范围内创建新集合
  • dropCollection :从范围中删除集合

文档操作

  • createDocument :创建新文档
  • getDocument :通过 ID 检索文档
  • updateDocument :更新现有文档
  • deleteDocument :通过 ID 删除文档
  • bulkCreateDocuments :一次创建多个文档

指数管理

  • createIndex :在指定字段上创建新索引
  • createPrimaryIndex :在集合上创建主索引
  • listIndexes :列出存储桶中的所有索引
  • dropIndex :删除现有索引

每个工具都支持可选的collectionscope参数,以针对特定的数据容器。

🔒 安全注意事项

  • 始终对敏感凭据使用环境变量
  • 考虑在生产环境中使用反向代理运行服务器
  • 根据需要实施适当的访问控制和身份验证

📚 示例

以下是使用 MCP 服务器与 Claude 进行交互的一些示例:

  1. 列出所有存储桶:
    Could you show me all available buckets in the database?
  2. 创建范围和集合:
    Create a new scope called "users" and a collection called "profiles" in it
  3. 查询文件:
    Find all users who signed up in the last 30 days
  4. 创建文档:
    Create a new user document with name "John Doe" and email "john@example.com"

🤝 贡献

欢迎贡献代码!欢迎提交 Pull 请求。

-
security - not tested
F
license - not found
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

模型上下文协议服务器,使大型语言模型能够通过自然语言直接与 Couchbase 数据库交互,支持查询存储桶、执行 CRUD 操作和执行 N1QL 查询等操作。

  1. 🚀 快速入门
    1. 选项 1:使用 NPX(推荐)
    2. 选项 2:手动安装
    3. 选项 1:使用软件包安装
    4. 选项 2:手动安装
  2. 📝 可用工具
    1. 基本操作
    2. 范围管理
    3. 收藏管理
    4. 文档操作
    5. 指数管理
  3. 🔒 安全注意事项
    1. 📚 示例
      1. 🤝 贡献

        Related MCP Servers

        • -
          security
          A
          license
          -
          quality
          A Model Context Protocol server that enables Large Language Models to seamlessly interact with ClickHouse databases, supporting resource listing, schema retrieval, and query execution.
          Last updated -
          1
          Python
          MIT License
          • Linux
          • Apple
        • 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 enables large language models to interact with Apache Superset databases through REST API, supporting database queries, table lookups, field information retrieval, and SQL execution.
          Last updated -
          4
          3
          TypeScript
        • -
          security
          F
          license
          -
          quality
          A Model Context Protocol server that enables Large Language Models to access and interact with database connections, including viewing schemas and performing CRUD operations on connected databases.
          Last updated -
          • Apple

        View all related MCP servers

        MCP directory API

        We provide all the information about MCP servers via our MCP API.

        curl -X GET 'https://glama.ai/api/mcp/v1/servers/Aniket310101/MCP-Server-Couchbase'

        If you have feedback or need assistance with the MCP directory API, please join our Discord server