home / mcp / ditto mcp server

Ditto MCP Server

A Model Context Protocol server to connect to Ditto Big Peer Database Applications and make DQL queries

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "evtapps-ditto-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "ditto-mcp-server@latest"
      ],
      "env": {
        "DITTO_API_KEY": "YOUR_API_KEY",
        "DITTO_BASE_URL": "https://MY_APP.cloud.ditto.live",
        "DITTO_TIMEOUT_MS": "30000",
        "DITTO_API_KEY_ENV": "DITTO_API_KEY",
        "MCP_DITTO_ALLOWED": "READ",
        "MCP_DITTO_QUERY_ALLOW_PATTERNS": "^SELECT "
      }
    }
  }
}

You run the Ditto MCP Server to securely execute Ditto DQL over HTTPS with capability gating and safety checks. This server lets you connect your MCP-enabled clients to Ditto, enforce allowed operations, and query your Ditto app safely from tools and editors that support MCP integrations.

How to use

Set up your MCP client to point at the Ditto MCP Server and provide your Ditto app base URL and API key. You can enable different access levels (for example READ or ALL) depending on what you need for your integration. Use the server to run parameterized DQL statements against Ditto, inspect results, and leverage the built‑in guards that restrict statements to a single operation and to allowed patterns.

How to install

Prerequisites: ensure you have Node.js version 18.17 or newer installed on your machine.

Install and start the MCP server locally using the standard npm/npx workflow shown below. This runs the MCP server as a stdio transport so you can connect via your MCP clients.

Step by step install and run

# Install and run the Ditto MCP Server locally
npx -y ditto-mcp-server@latest

Configure required environment variables

export DITTO_BASE_URL="https://MY_APP.cloud.ditto.live"
export DITTO_API_KEY="YOUR_API_KEY"
export MCP_DITTO_ALLOWED="READ"   # or ALL / SELECT,INSERT,...

Run the server with environment variables

After setting the required environment variables, run the MCP server so your clients can connect to it.

npx -y ditto-mcp-server@latest

Available tools

ping

Connectivity check that returns a pong response to verify the MCP connection is alive.

execute_dql

Run a parameterized Ditto DQL statement against your configured Ditto app, returning a JSON envelope with results, warnings, and errors if any.

ditto_config_resource

Expose a redacted runtime config via ditto://config to clients when needed for debugging or inspection.