Cursor

Set up dkod with Cursor — the AI-first code editor.


Quick Setup

Paste the prompt below into Cursor's Composer (Cmd+I / Ctrl+I). It will automatically install and configure the dkod CLI.

Install MCP

Connect Cursor to dkod's MCP server for direct access to semantic code tools.

Cloud (dkod.io)

Add to your project's .cursor/mcp.json (or global Cursor MCP settings):

{
  "mcpServers": {
    "dkod": {
      "url": "https://api.dkod.io/mcp"
    }
  }
}

Cursor will prompt for authentication on first use. Once connected, dkod tools are available directly in Composer.

Self-Hosted

For self-hosted setups, see the Self-Hosted quickstart.

Point to your local dkod server:

{
  "mcpServers": {
    "dkod": {
      "url": "http://localhost:8080/mcp"
    }
  }
}

For self-hosted, set your auth token before use:

export DKOD_AUTH_TOKEN=your-secret-token

Install the CLI

# Install via Cargo (requires Rust)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source "$HOME/.cargo/env"
cargo install dk-cli

Initialize & Authenticate

# Authenticate via browser (cloud only)
dk login

# Open a session (auto-detects from git remote)
dk init

For self-hosted setups, skip dk login and set export DKOD_AUTH_TOKEN=your-secret-token and export DKOD_GRPC_ADDR=http://localhost:50051, then run dk init.

Usage with Composer

Once configured, you can use the dkod CLI in your workflow:

# Search code semantically
dk search "authentication middleware"

# Check project status
dk status

# View changes
dk diff

# Commit and push
dk commit -m "Fix token refresh logic"
dk push