CouchDB MCP Server
CouchDB-MCP-服务器
用于与 CouchDB 交互的模型上下文协议服务器
这是一个基于 TypeScript 的 MCP 服务器,提供管理 CouchDB 数据库和文档的工具。它使 AI 助手能够通过简单的界面与 CouchDB 进行交互。
特征
工具
基础工具(所有 CouchDB 版本)
createDatabase创建一个新的 CouchDB 数据库将
dbName作为必需参数如果数据库不存在则创建它
listDatabases- 列出所有 CouchDB 数据库返回数据库名称数组
deleteDatabase- 删除 CouchDB 数据库将
dbName作为必需参数删除指定的数据库及其所有文档
createDocument创建新文档或更新数据库中的现有文档必需参数:
dbName:数据库名称docId:文档 IDdata:文档数据(JSON对象)对于更新,请在
_rev字段中包含当前文档修订版本
返回:
对于新文档:文档 ID 和新修订版本
对于更新:文档 ID 和更新的修订版本
根据
_rev字段的存在自动检测操作是创建还是更新
getDocument从数据库中获取文档必需参数:
dbName:数据库名称docId:文档 ID
返回文档内容
Mango 查询工具(仅限 CouchDB 3.x+)
createMangoIndex创建一个新的 Mango 索引必需参数:
dbName:数据库名称indexName:索引的名称fields:要索引的字段名称数组
创建新索引以实现高效查询
deleteMangoIndex- 删除 Mango 索引必需参数:
dbName:数据库名称designDoc:设计文档名称indexName:索引的名称
删除现有的 Mango 索引
listMangoIndexes- 列出数据库中的所有 Mango 索引必需参数:
dbName:数据库名称
返回数据库中所有索引的信息
findDocuments- 使用 Mango 查询来查询文档必需参数:
dbName:数据库名称query:Mango 查询对象
使用 CouchDB 的 Mango 查询语法执行查询
Related MCP server: MCP Docs RAG Server
版本支持
服务器自动检测 CouchDB 版本并启用相应的功能:
所有版本:基本数据库和文档操作
CouchDB 3.x+:Mango 查询支持(索引和查询)
配置
服务器需要 CouchDB 连接 URL 和版本信息。您可以通过环境变量提供这些信息:
COUCHDB_URL=http://username:password@localhost:5984
COUCHDB_VERSION=1.7.2
You can create a `.env` file in the project root with this configuration. If not provided, it defaults to `http://localhost:5984`.
## Development
Install dependencies:
```bash
npm install构建服务器:
npm run build对于使用自动重建的开发:
npm run watch安装
通过 Smithery 安装
要通过Smithery自动为 Claude Desktop 安装 coachdb-mcp-server:
npx -y @smithery/cli install @robertoamoreno/couchdb-mcp-server --client claude要与 Claude Desktop 一起使用,请添加服务器配置:
在 MacOS 上: ~/Library/Application Support/Claude/claude_desktop_config.json
在 Windows 上: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"couchdb-mcp-server": {
"command": "/path/to/couchdb-mcp-server/build/index.js",
"env": {
"COUCHDB_URL": "http://username:password@localhost:5984"
}
}
}
}先决条件
Node.js 14 或更高版本
运行 CouchDB 实例
如果启用了身份验证,则需要正确的 CouchDB 凭据
调试
由于 MCP 服务器通过 stdio 进行通信,调试起来可能比较困难。我们推荐使用MCP Inspector ,它以包脚本的形式提供:
npm run inspector检查器将提供一个 URL 来访问浏览器中的调试工具。
错误处理
该服务器包括针对常见场景的强大错误处理功能:
数据库名称或文档 ID 无效
数据库已存在/不存在
连接问题
身份验证失败
无效的文档数据
所有错误均经过正确格式化并通过 MCP 协议返回相应的错误代码和消息。
Available Tools
5 toolscreateDatabaseC
Create a new CouchDB database
| Name | Required | Description | Default |
|---|---|---|---|
| dbName | Yes | Database name |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool creates a database but lacks critical details: it doesn't specify if this requires admin privileges, what happens if the database already exists (e.g., error or overwrite), or any rate limits or side effects. This leaves significant gaps for an agent to understand the tool's behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that directly states the tool's purpose without any wasted words. It's appropriately sized and front-loaded, making it easy for an agent to parse quickly, though it could benefit from more detail given the lack of annotations.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity of a database creation tool with no annotations and no output schema, the description is insufficient. It doesn't cover behavioral aspects like permissions, error handling, or what the tool returns upon success. For a mutation tool with zero annotation coverage, more completeness is needed to guide an agent effectively.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, with 'dbName' documented as 'Database name'. The description adds no additional meaning beyond this, such as naming conventions, length restrictions, or character constraints. Since the schema does the heavy lifting, the baseline score of 3 is appropriate, but the description doesn't compensate with extra context.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Create') and resource ('a new CouchDB database'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'createDocument' or 'listDatabases', which would require more specificity about what distinguishes database creation from document creation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like 'createDocument' or 'deleteDatabase'. There's no mention of prerequisites, such as needing admin permissions or checking if a database already exists, nor any explicit exclusions or recommended contexts for usage.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
createDocumentC
Create a new document or update an existing document in a database
| Name | Required | Description | Default |
|---|---|---|---|
| dbName | Yes | Database name | |
| docId | Yes | Document ID | |
| data | Yes | Document data |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. While it mentions the tool can both create and update documents, it doesn't specify whether updates are partial or full replacements, what permissions are required, whether operations are idempotent, or what happens on conflicts. For a mutation tool with zero annotation coverage, this leaves significant behavioral gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that clearly states the tool's dual functionality. It's appropriately sized for the tool's purpose without unnecessary elaboration, though it could potentially be more front-loaded with critical behavioral information given the lack of annotations.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a document creation/update tool with no annotations and no output schema, the description is insufficiently complete. It doesn't explain what happens when creating versus updating, what the response looks like, error conditions, or important behavioral constraints. Given the mutation nature and complexity of the operation, more contextual information is needed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, so all three parameters (dbName, docId, data) are documented in the schema. The description doesn't add any meaningful parameter semantics beyond what's already in the schema, such as format requirements for docId or constraints on data structure. This meets the baseline expectation when schema coverage is complete.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose with specific verbs ('create' and 'update') and resource ('document in a database'), making it easy to understand what the tool does. However, it doesn't explicitly distinguish this from sibling tools like 'createDatabase' or 'getDocument', which would require more specific differentiation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like 'createDatabase' for creating databases or 'getDocument' for retrieving documents. There's no mention of prerequisites, error conditions, or typical use cases, leaving the agent with insufficient context for appropriate tool selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
deleteDatabaseC
Delete a CouchDB database
| Name | Required | Description | Default |
|---|---|---|---|
| dbName | Yes | Database name to delete |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It states 'Delete' which implies a destructive mutation, but doesn't disclose critical behavioral traits: whether deletion is permanent, if it requires specific permissions, what happens to contained documents, or error conditions. This is a significant gap for a destructive tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence with zero waste. It's appropriately sized and front-loaded, directly stating the tool's purpose without unnecessary elaboration.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given this is a destructive mutation tool with no annotations and no output schema, the description is inadequate. It doesn't explain what happens after deletion (success/failure responses), doesn't warn about irreversible data loss, and doesn't provide context about the CouchDB environment. For a tool that permanently removes resources, this lacks critical completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% (the single parameter 'dbName' is fully described in the schema as 'Database name to delete'). The description doesn't add any parameter meaning beyond what the schema provides, so it meets the baseline of 3 when schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Delete') and target resource ('a CouchDB database'), providing specific verb+resource pairing. It doesn't explicitly distinguish from sibling tools like 'createDatabase' or 'listDatabases', but the verb 'Delete' inherently differentiates it from creation and listing operations.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided about when to use this tool versus alternatives. The description doesn't mention prerequisites (e.g., database must exist), consequences (e.g., irreversible data loss), or relationships to sibling tools like 'createDatabase' for recreation or 'listDatabases' for verification.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
getDocumentC
Get a document from a database
| Name | Required | Description | Default |
|---|---|---|---|
| dbName | Yes | Database name | |
| docId | Yes | Document ID |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool retrieves a document but lacks details on permissions required, error handling (e.g., if the document doesn't exist), response format, or any side effects. This is a significant gap for a read operation in a database context, where such information is crucial for safe usage.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that directly states the tool's purpose without any unnecessary words. It is front-loaded with the core action and resource, making it easy to parse. Every part of the sentence earns its place by conveying essential information, achieving optimal conciseness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity of database operations and the lack of annotations and output schema, the description is incomplete. It doesn't address behavioral aspects like error cases, return values, or security requirements, which are critical for an agent to use the tool effectively. The description alone is insufficient for safe and informed tool invocation in this context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, with clear documentation for both parameters ('dbName' and 'docId'). The description adds no additional meaning beyond what the schema provides, such as examples or constraints. According to the rules, when schema coverage is high (>80%), the baseline score is 3, which applies here as the description doesn't compensate with extra param details.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Get') and resource ('a document from a database'), making the purpose immediately understandable. It distinguishes from siblings like 'createDocument' and 'deleteDatabase' by specifying retrieval rather than creation or deletion. However, it doesn't explicitly differentiate from 'listDatabases' in terms of scope (single document vs. listing databases), which prevents a perfect score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an existing database and document), exclusions (e.g., not for creating or deleting), or comparisons to sibling tools like 'listDatabases' for broader queries. This leaves the agent with minimal context for tool selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
listDatabasesB
List all CouchDB databases
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden for behavioral disclosure. It states what the tool does but doesn't describe how it behaves - no information about pagination, rate limits, authentication requirements, error conditions, or return format. 'List all' implies completeness but doesn't guarantee it.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that states exactly what the tool does with zero wasted words. It's appropriately sized for a simple list operation and front-loads the core functionality.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a read operation with no annotations and no output schema, the description is insufficient. It doesn't explain what the output looks like (array of database names? objects with metadata?), potential limitations, or error handling. The agent would need to guess about the return format and behavior.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, and schema description coverage is 100% (though empty). The description appropriately doesn't discuss parameters since none exist, earning a baseline score of 4 for tools with no parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('List') and target resource ('all CouchDB databases'), providing a specific verb+resource combination. However, it doesn't differentiate from sibling tools like 'getDocument' or 'createDatabase' beyond the obvious scope difference, which prevents a perfect score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided about when to use this tool versus alternatives. While the purpose is clear, there's no mention of prerequisites, timing considerations, or comparison to sibling tools like 'getDocument' for retrieving specific database information.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Each tool has a distinct purpose targeting specific resources and actions: createDatabase, deleteDatabase, and listDatabases handle database-level operations, while createDocument and getDocument handle document-level operations. There is no overlap or ambiguity between tools.
All tool names follow a consistent verb_noun pattern (e.g., createDatabase, getDocument) using camelCase throughout. The naming is predictable and uniform across all five tools.
With 5 tools, this server is well-scoped for basic CouchDB operations, covering database and document management without being overly sparse or bloated. Each tool serves a clear and necessary function.
The toolset covers core CRUD operations for databases (create, delete, list) and documents (create, get), but lacks document deletion and update tools, which are common in database workflows. This minor gap might require workarounds but does not severely hinder functionality.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
- mcpOAuthcom.gibsonai
GibsonAI MCP server: manage your databases with natural language
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Related MCP Servers
- AlicenseBqualityFmaintenanceA TypeScript-based MCP server that enables LLM agents to interact with Gel databases through natural language, providing tools to learn database schemas, validate and execute EdgeQL queries.21312ISC
- FlicenseAqualityFmaintenanceA TypeScript MCP server that allows querying documents using LLMs with context from locally stored repositories and text files through a RAG (Retrieval-Augmented Generation) system.417
- AlicenseAqualityFmaintenanceA TypeScript-based MCP server that implements a simple notes system, allowing users to create, access, and generate summaries of text notes via URIs and tools.12188MIT
- -licenseNot gradedqualityNot gradedmaintenanceA TypeScript MCP server that enables AI assistants to create, manage, and manipulate 'crystals' - structured data containers for storing complex analysis, code, and knowledge that can be exported and reimported across different AI conversations.
Appeared in Searches
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/robertoamoreno/couchdb-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server