a couchdb map server that support Stdio, SSE and http-streaming
1.2K
A Model Context Protocol (MCP) server that provides comprehensive CouchDB management capabilities. This server offers both high-level workflows and low-level operations for managing CouchDB databases, documents, users, security, replications, and design documents.
The image supports STDIO, SSE, and Streamable HTTP transports and is configured via a mounted config.json (and optional environment variables).
MCP_TRANSPORT)Set MCP_TRANSPORT in the container (default if unset: sse):
| Value | Description |
|---|---|
stdio | STDIO transport (for MCP clients that run the container and use stdin/stdout) |
sse | SSE transport; endpoint GET /sse for the stream, POST /sse for messages |
streamable-http | Streamable HTTP; single /mcp endpoint (GET for SSE, POST for JSON-RPC) |
Example:
environment:
MCP_TRANSPORT: "streamable-http"
For STDIO, keep the container attached (e.g. no -d) and use stdin_open: true in Compose if your client needs it for tunneling.
With HTTP/SSE transport:
services:
couchdb-mcp:
image: "deviljackni/couchdb-mcp-server:latest"
container_name: "couchdb-mcp"
environment:
MCP_TRANSPORT: "sse"
volumes:
- ./config.json/:/app/config.json
ports:
- 3008:3008
Content of config.json
{
"couchdb": {
"url": "https://your-couchdb-url",
"adminUsername": "your-admin-username",
"adminPassword": "your-admin-password"
},
"server": {
"port": 3008,
"host": "0.0.0.0",
"logLevel": "info"
},
"security": {
"credentialPrefix": "U-",
"passwordLength": 32,
"rolePrefix": "role-"
}
}
{
"mcpServers": {
"couchdb-mcp-server": {
"type": "sse",
"url": "http://localhost:3008/sse",
"args": [],
"env": {}
}
}
}
"mcpServers": {
"my-couchdb-mcp-server": {
"command": "docker",
"args": [
"exec", "-i",
"couchdb-mcp",
"node", "/app/index.js"
]
}
},
GET / - API documentation and usage examplesGET /health - Health check endpointGET /info - Server info and available toolsGET /sse - Server-Sent Events endpoint for MCP protocolPOST /tools - Direct tool execution for testingcreate-database: Create a new databasedelete-database: Delete a databaseget-database-info: Get database informationlist-databases: List all databases on a clustercreate-document: Create a documentget-document: Retrieve a documentupdate-document: Update a documentdelete-document: Delete a documentcreate-user: Create a new userdelete-user: Delete a userset-database-security: Configure database access permissionscreate-replication: Set up database replicationdelete-replication: Remove a replicationdeploy-design-document: Deploy views, filters, and indexesget-design-document: Retrieve design documentsmango-query-database: Query documents using MongoDB-style Mango query syntaxcreate-database-index: Create a Mango index for efficient queryinglist-database-indexes: List all indexes in a databasedelete-database-index: Delete a Mango index# Create a database
curl -X POST http://localhost:3008/tools \
-H "Content-Type: application/json" \
-d '{"tool": "create-database", "arguments": {"databaseName": "my-app-db"}}'
# List all databases
curl -X POST http://localhost:3008/tools \
-H "Content-Type: application/json" \
-d '{"tool": "list-databases"}'
# Get server info
curl http://localhost:3008/info
{
"tool": "create-database",
"arguments": {
"databaseName": "my-app-db"
}
}
{
"tool": "create-replication",
"arguments": {
"replicationDoc": {
"_id": "my-replication",
"source": "source-db",
"target": "target-db",
"continuous": true
}
}
}
{
"tool": "create-user",
"arguments": {
"username": "appuser",
"password": "secure-password",
"roles": ["app-role"]
}
}
{
"tool": "set-database-security",
"arguments": {
"databaseName": "my-app-db",
"security": {
"members": {
"roles": ["app-role"]
}
}
}
}
{
"tool": "mango-query-database",
"arguments": {
"databaseName": "my-app-db",
"selector": {
"name": "John",
"age": {"$gt": 25}
},
"limit": 10
}
}
{
"tool": "create-database-index",
"arguments": {
"databaseName": "my-app-db",
"fields": ["name", "age"]
}
}
{
"tool": "list-database-indexes",
"arguments": {
"databaseName": "my-app-db"
}
}
{
"tool": "delete-database-index",
"arguments": {
"databaseName": "my-app-db",
"designDoc": "_design/my-index-design",
"name": "my-index"
}
}
MIT
Content type
Image
Digest
sha256:c85c9cff6…
Size
66.9 MB
Last updated
6 months ago
docker pull deviljackni/couchdb-mcp-server