Skip to main content
Glama

Delia

MCP server that adds persistent learning and semantic code intelligence to AI coding assistants.

What It Does

  • Playbooks - Per-project patterns learned over time, indexed in ChromaDB for semantic retrieval

  • Memories - Persistent knowledge (markdown), searchable via embeddings

  • Profiles - Framework-specific guidance, semantically matched to your task

  • Code Index - Codebase summaries and symbols indexed for intelligent navigation

  • LSP Tools - Semantic code navigation: find references, go to definition, rename symbols

  • Learning Loop - Extracts insights from completed tasks and updates playbooks

All knowledge is stored in .delia/chroma/ for fast semantic search.

Full Documentation | Quick Start | Tool Reference

Quick Start

# 1. Clone and install
git clone https://github.com/zbrdc/delia.git
cd delia
uv sync

# 2. Start HTTP server (recommended for multi-project)
uv run delia run -t http --port 8765

# 3. Initialize your project (from project directory)
cd ~/your-project
uv run --directory ~/git/delia delia init-project

Complete Setup Guide

Step 1: Install Delia

git clone https://github.com/zbrdc/delia.git
cd delia
uv sync

Step 2: Configure MCP Clients

Auto-detect and configure all supported AI clients:

uv run delia install

Or install to a specific client:

uv run delia install claude    # Claude Code
uv run delia install cursor    # Cursor
uv run delia install vscode    # VS Code

List available clients:

uv run delia install --list

Step 3: Start the Server

Option A: HTTP Transport (Recommended)

Best for multi-project setups. One server handles all projects.

uv run delia run -t http --port 8765

Add to each project's .mcp.json:

{
  "mcpServers": {
    "delia": {
      "type": "http",
      "url": "http://localhost:8765/mcp"
    }
  }
}

Note: HTTP servers won't appear in Claude Code's /mcp list, but tools work normally.

Option B: stdio Transport

Per-project server, managed by the AI client. Shows in /mcp list.

{
  "mcpServers": {
    "delia": {
      "command": "uv",
      "args": ["--directory", "/path/to/delia", "run", "delia", "serve"]
    }
  }
}

Step 4: Initialize Your Project

Option A: Via MCP (Recommended)

Let the AI agent initialize the project - it handles summarization:

# In Claude Code or Cursor, just ask:
"Initialize this project with Delia"
# Or use the MCP tool directly:
project(action="init", path="/path/to/your-project")

Option B: Via CLI (requires Ollama)

If you have Ollama running locally with a model:

cd ~/your-project
uv run --directory /path/to/delia delia init-project

This creates .delia/ with playbooks tailored to your tech stack.

Step 5: Verify Setup

uv run delia doctor

Usage

The AI assistant calls these tools:

auto_context("implement user auth")  # Load relevant patterns
[work on the task]
complete_task(success=True, bullets_applied=["id1"])  # Record feedback

Project Structure

your-project/
├── .delia/
│   ├── chroma/         # Vector database (primary storage)
│   ├── playbooks/      # Learned patterns (JSON, indexed to ChromaDB)
│   ├── memories/       # Persistent knowledge (Markdown, indexed to ChromaDB)
│   └── profiles/       # Framework guides (Markdown, indexed to ChromaDB)
└── CLAUDE.md           # Instructions for AI assistants

CLI Commands

delia run -t http        # Start HTTP server (MCP)
delia serve              # Start stdio server (MCP)
delia doctor             # Health check
delia init-project       # Initialize project (requires Ollama)
delia chat               # Interactive chat (requires Ollama)
delia agent "task"       # Single-shot task (requires Ollama)

Configuration

Create ~/.delia/.env:

DELIA_VOYAGE_API_KEY=your-key-here

Fallback options (no API key needed):

  • Ollama - Run ollama pull mxbai-embed-large

  • Sentence Transformers - CPU fallback, works offline

LLM Backends (for CLI features)

For init-project, chat, agent commands, configure backends in ~/.delia/settings.json:

{
  "backends": [{
    "name": "ollama-local",
    "url": "http://localhost:11434",
    "model": "llama3.2"
  }]
}

Requirements

  • Python 3.11+

  • uv (package manager)

  • Ollama (optional, for CLI LLM features - not needed if using MCP only)

License

GPL-3.0

Available Tools

9 tools
batchA

Execute multiple tasks in PARALLEL across all available GPUs for maximum throughput. Distributes work across local and remote backends intelligently.

WHEN TO USE:

  • Processing multiple files/documents simultaneously

  • Bulk code review, summarization, or analysis

  • Any workload that can be parallelized

Args: tasks: JSON string containing an array of task objects. Each object can have: - task: "quick"|"summarize"|"generate"|"review"|"analyze"|"plan"|"critique" - content: The content to process (required) - file: Optional file path - model: Force tier - "quick"|"coder"|"moe" - language: Language hint for code tasks

ROUTING LOGIC:

  • Distributes tasks across ALL available GPUs (local + remote)

  • Large content (>32K tokens) → Routes to backend with sufficient context

  • Normal content → Round-robin for parallel execution

  • Respects backend health and circuit breakers

Returns: Combined results from all tasks with timing and routing info

Example: batch('[ {"task": "summarize", "content": "doc1..."}, {"task": "review", "content": "code2...", "language": "python"}, {"task": "analyze", "content": "log3..."} ]')

Inputs: tasks (required). Returns: result

delegateA

Execute a task on local/remote GPU with intelligent 3-tier model selection. Routes to optimal backend based on content size, task type, and GPU availability.

WHEN TO USE:

  • "locally", "on my GPU", "without API", "privately" → Use this tool

  • Code review, generation, analysis tasks → Use this tool

  • Any task you want processed on local hardware → Use this tool

Args: task: Task type determines model tier: - "quick" or "summarize" → quick tier (fast, 14B model) - "generate", "review", "analyze" → coder tier (code-optimized 14B) - "plan", "critique" → moe tier (deep reasoning 30B+) content: The prompt or content to process (required) file: Optional file path to include in context model: Force specific tier - "quick" | "coder" | "moe" | "thinking" OR natural language: "7b", "14b", "30b", "small", "large", "coder model", "fast", "complex", "thinking" language: Language hint for better prompts - python|typescript|react|nextjs|rust|go context: Serena memory names to include (comma-separated: "architecture,decisions") symbols: Code symbols to focus on (comma-separated: "Foo,Bar/calculate") include_references: True if content includes symbol usages from elsewhere backend_type: Force backend type - "local" | "remote" (default: auto-select)

ROUTING LOGIC:

  1. Content > 32K tokens → Uses backend with largest context window

  2. Prefer local GPUs (lower latency) unless unavailable

  3. Falls back to remote if local circuit breaker is open

  4. Load balances across available backends based on priority weights

Returns: LLM response with metadata footer showing model, tokens, time, backend

Examples: delegate(task="review", content="", language="python") delegate(task="generate", content="Write a REST API", backend_type="local") delegate(task="plan", content="Design caching strategy", model="moe") delegate(task="analyze", content="Debug this error", model="14b") delegate(task="quick", content="Summarize this article", model="fast")

Inputs: task (required), content (required), file, model, +5 more. Returns: result

get_model_info_toolA

Get detailed information about a specific model.

Returns VRAM requirements, context window size, and tier classification. For configured models, shows exact values. For unknown models, provides estimates.

Args: model_name: Name of the model to get info for (e.g., "qwen2.5:14b", "llama3.1:70b")

Returns: Formatted model information including VRAM, context, and tier

Inputs: model_name (required). Returns: result

healthA

Check health status of Delia and all configured GPU backends.

Only checks backends that are enabled in settings.json. Shows availability, loaded models, usage stats, and cost savings.

WHEN TO USE:

  • Verify backends are available before delegating

  • Check which models are currently loaded

  • Monitor usage statistics and cost savings

  • Diagnose connection issues

Returns: JSON with: - status: "healthy" | "degraded" | "unhealthy" - backends: Array of configured backend status - usage: Token counts and call statistics per tier - cost_savings: Estimated savings vs cloud API - routing: Current routing configuration

Inputs: no named parameters. Returns: result

modelsA

List all configured models across all GPU backends. Shows model tiers (quick/coder/moe) and which are currently loaded.

WHEN TO USE:

  • Check which models are available for tasks

  • Verify model configuration across backends

  • Understand task-to-model routing logic

Returns: JSON with: - backends: All configured backends with their models - currently_loaded: Models in GPU memory (no load time) - selection_logic: How tasks map to model tiers

Inputs: no named parameters. Returns: result

queue_statusA

Get current status of the model queue system.

Shows loaded models, queued requests, and GPU memory usage. Useful for monitoring queue performance and debugging loading issues.

Returns: JSON with queue status, loaded models, and pending requests

Inputs: no named parameters. Returns: result

switch_backendB

Switch the active LLM backend.

Args: backend_id: ID of the backend to switch to (from settings.json)

Returns: Confirmation message with current status

Inputs: backend_id (required). Returns: result

switch_modelA

Switch the model for a specific tier at runtime.

This allows dynamic model experimentation without restarting the server. Changes are persisted to settings.json for consistency across restarts.

Args: tier: Model tier to change - "quick", "coder", "moe", or "thinking" model_name: New model name (must be available in the current backend)

Returns: Confirmation with model change details and availability status

Inputs: tier (required), model_name (required). Returns: result

thinkA

Deep reasoning for complex problems using local GPU with extended thinking. Offloads complex analysis to local LLM - zero API costs.

WHEN TO USE:

  • Complex multi-step problems requiring careful reasoning

  • Architecture decisions, trade-off analysis

  • Debugging strategies, refactoring plans

  • Any situation requiring "thinking through" before acting

Args: problem: The problem or question to think through (required) context: Supporting information - code, docs, constraints (optional) depth: Reasoning depth level: - "quick" → Fast answer, no extended thinking (14B model) - "normal" → Balanced reasoning with thinking (14B coder) - "deep" → Thorough multi-step analysis (30B+ MoE model)

ROUTING:

  • Uses largest available GPU for deep thinking

  • Automatically enables thinking mode for normal/deep

  • Prefers local GPU, falls back to remote if needed

Returns: Structured analysis with step-by-step reasoning and conclusions

Examples: think(problem="How should we handle authentication?", depth="deep") think(problem="Debug this error", context="", depth="normal")

Inputs: problem (required), context, depth. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 9 tools

    Disambiguation3/5

    There is significant overlap between several tools, particularly 'delegate' and 'think', which both handle complex reasoning tasks with similar routing logic, and 'batch' which essentially parallelizes 'delegate' tasks. However, descriptions clarify distinctions: 'delegate' is for single tasks, 'think' emphasizes deep reasoning, and 'batch' is for parallel execution. Other tools like 'health', 'models', and 'queue_status' have distinct monitoring purposes.

    Naming Consistency4/5

    Most tools use clear, consistent snake_case naming (e.g., 'get_model_info_tool', 'switch_backend', 'queue_status'), with descriptive verbs like 'get', 'switch', and 'think'. The only minor deviation is 'get_model_info_tool', which includes 'tool' redundantly, but overall the naming is predictable and readable across the set.

    Tool Count5/5

    With 9 tools, the count is well-scoped for a GPU/LLM management server. Each tool serves a distinct role: execution ('delegate', 'batch', 'think'), configuration ('switch_backend', 'switch_model'), and monitoring ('health', 'models', 'queue_status', 'get_model_info_tool'). No tool feels unnecessary, and the set covers core operations without being overwhelming.

    Completeness5/5

    The tool surface comprehensively covers the domain of GPU/LLM task execution and management. It includes task execution ('delegate', 'batch', 'think'), model and backend configuration ('switch_backend', 'switch_model'), and full monitoring ('health', 'models', 'queue_status', 'get_model_info_tool'). There are no obvious gaps; agents can manage the entire lifecycle from setup to execution to oversight.

    Related MCP Connectors