Couchbase MCP Server for LLMs
🗄️ 适用于法学硕士的 Couchbase MCP 服务器
模型上下文协议 (MCP) 服务器,使 LLM 能够直接与 Capella 集群上的 Couchbase 数据库交互。查询存储桶、执行 CRUD 操作、执行 N1QL 查询,并通过自然语言无缝管理数据。
🚀 快速入门
先决条件
Node.js 16 或更高版本
Capella 上正在运行的 Couchbase 实例
Claude桌面应用程序
安装
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 buildClaude 桌面集成
将此配置添加到您的 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>"
}
}
}
}验证连接
重启Claude桌面
Couchbase MCP 服务器工具现在应该可以在您的对话中使用
Related MCP server: Couchbase MCP Server
📝 可用工具
基本操作
query:执行 N1QL 查询listBuckets:列出可用的 bucket
范围管理
createScope:在 bucket 中创建一个新范围deleteScope:删除现有范围listScopes:列出存储桶中的所有范围
收藏管理
createCollection:在范围内创建新集合dropCollection:从范围中删除集合
文档操作
createDocument:创建新文档getDocument:通过 ID 检索文档updateDocument:更新现有文档deleteDocument:通过 ID 删除文档bulkCreateDocuments:一次创建多个文档
指数管理
createIndex:在指定字段上创建新索引createPrimaryIndex:在集合上创建主索引listIndexes:列出存储桶中的所有索引dropIndex:删除现有索引
每个工具都支持可选的collection和scope参数,以针对特定的数据容器。
🔒 安全注意事项
始终对敏感凭据使用环境变量
考虑在生产环境中使用反向代理运行服务器
根据需要实施适当的访问控制和身份验证
📚 示例
以下是使用 MCP 服务器与 Claude 进行交互的一些示例:
列出所有存储桶:
Could you show me all available buckets in the database?创建范围和集合:
Create a new scope called "users" and a collection called "profiles" in it查询文件:
Find all users who signed up in the last 30 days创建文档:
Create a new user document with name "John Doe" and email "john@example.com"
🤝 贡献
欢迎贡献代码!欢迎提交 Pull 请求。
This server cannot be deployed
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
- mcpOAuthcom.gibsonai
GibsonAI MCP server: manage your databases with natural language
A Model Context Protocol server for Wix AI tools
The BigQuery remote MCP server is a fully managed service that uses the Model Context Protocol to connect AI applications and LLMs to BigQuery data sources. It provides secure, standardized tools for AI agents to list datasets and tables, retrieve schemas, generate and execute SQL queries through natural language, and analyze data—enabling direct access to enterprise analytics data without requiring manual SQL coding.
Related MCP Servers
FlicenseNot gradedqualityDmaintenanceA 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.-- AlicenseNot gradedqualityDmaintenanceA server that enables natural language interactions with Couchbase databases through the Model Context Protocol, allowing users to perform SQL++ queries on Couchbase Capella clusters using conversational commands.1MIT
- PythonApache 2.0
- AlicenseAqualityBmaintenanceA Model Context Protocol server that enables large language models to access database metadata and perform cross-engine data querying across diverse database ecosystems.1654Apache 2.0