Home/Documentation

MCP / AI Agent Support

Connect AI agents (Claude, ChatGPT, custom agents) to jsondb.cloud via the Model Context Protocol.

info
The MCP server lets AI assistants discover and use your jsondb.cloud database through a standardized tool interface. Compatible with Claude Desktop, Claude Code, and any MCP-compliant AI agent.

Installation

npm install -g @jsondb-cloud/mcp-server

Claude Desktop Setup

Add the following to your Claude Desktop configuration file (claude_desktop_config.json):

{
  "mcpServers": {
    "jsondb": {
      "command": "npx",
      "args": ["-y", "@jsondb-cloud/mcp-server"],
      "env": {
        "JSONDB_API_KEY": "jdb_sk_live_xxxx",
        "JSONDB_NAMESPACE": "default"
      }
    }
  }
}

Environment Variables

VariableRequiredDescription
JSONDB_API_KEYYesYour jsondb.cloud API key
JSONDB_NAMESPACENoNamespace to use (default: "default")
JSONDB_BASE_URLNoCustom API URL (default: https://api.jsondb.cloud)

Available Tools

AI agents can use the following tools through the MCP server:

create_documentCreate a new document in a collection
get_documentGet a document by ID
list_documentsList and query documents with filters
update_documentReplace a document entirely
patch_documentPartially update a document
delete_documentDelete a document by ID
search_documentsFull-text search across a collection
list_collectionsList all collections in the namespace
get_schemaGet the JSON Schema for a collection
set_schemaSet or update a collection's schema

Example Conversation

Once configured, you can interact with your database through natural language:

You:"Store a new user with name Alice and email [email protected] in the users collection"
AI:I've created a new document in the users collection with ID usr_a1b2c3.
You:"Show me all users with role admin"
AI:Found 3 admin users: Alice, Bob, and Charlie. Would you like to see the details?