Doclea MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
git clone https://github.com/your-org/doclea.git
cd doclea/packages/doclea-mcp
bun install
./scripts/setup-models.sh
bun run build
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add doclea-mcp -- bun run "<FULL_PATH_TO_DOCLEA_MCP>/dist/index.js"

Replace <FULL_PATH_TO_DOCLEA_MCP>/dist/index.js with the actual folder you prepared in step 1.

README.md

Persistent memory for AI coding assistants

@doclea/mcp

Local MCP server for Doclea - persistent memory for AI coding assistants.

Installation

Prerequisites

  • Bun v1.0+ (curl -fsSL https://bun.sh/install | bash)
  • Docker & Docker Compose
  • Git

Step 1: Clone and Build

git clone https://github.com/your-org/doclea.git
cd doclea/packages/doclea-mcp

# Install dependencies
bun install

# Download embedding model (first time only, ~130MB)
./scripts/setup-models.sh

# Build
bun run build

Step 2: Start Services

# Start Qdrant + Embeddings
bun run docker:up

# Verify services
curl http://localhost:6333/readyz   # Should return "ok"
curl http://localhost:8080/health   # Should return "ok"

Step 3: Add to Claude Code

Option A: Claude Code CLI (~/.claude.json or project .claude.json):

{
  "mcpServers": {
    "doclea": {
      "command": "bun",
      "args": ["run", "/absolute/path/to/doclea/packages/doclea-mcp/dist/index.js"]
    }
  }
}

Option B: Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
  "mcpServers": {
    "doclea": {
      "command": "bun",
      "args": ["run", "/absolute/path/to/doclea/packages/doclea-mcp/dist/index.js"]
    }
  }
}

Option C: For development (uses source directly):

{
  "mcpServers": {
    "doclea": {
      "command": "bun",
      "args": ["run", "/absolute/path/to/doclea/packages/doclea-mcp/src/index.ts"]
    }
  }
}

Step 4: Restart Claude Code

After updating config, restart Claude Code to load the MCP server.

Step 5: Initialize Your Project

In Claude Code, navigate to your project and ask:

Initialize doclea for this project

This scans your codebase, git history, and documentation to bootstrap memories.

Usage

Once installed, Claude Code automatically has access to these tools:

Store a Decision

Store this as a decision: We're using PostgreSQL because we need ACID
compliance for financial transactions. Tag it with "database" and "infrastructure".

Search for Context

Search memories for authentication patterns

Generate Commit Message

Generate a commit message for my staged changes

Generate PR Description

Create a PR description for this branch

Find Code Experts

Who should review changes to src/auth/?

Generate Changelog

Generate a changelog from v1.0.0 to HEAD for users

Configuration

Create .doclea/config.json in your project root (optional - uses defaults):

{
  "embedding": {
    "provider": "local",
    "endpoint": "http://localhost:8080"
  },
  "qdrant": {
    "url": "http://localhost:6333",
    "collectionName": "doclea_memories"
  },
  "storage": {
    "dbPath": ".doclea/local.db"
  }
}

Embedding Providers

Provider Config
local (default) { "provider": "local", "endpoint": "http://localhost:8080" }
openai { "provider": "openai", "apiKey": "sk-...", "model": "text-embedding-3-small" }
nomic { "provider": "nomic", "apiKey": "...", "model": "nomic-embed-text-v1.5" }
voyage { "provider": "voyage", "apiKey": "...", "model": "voyage-3" }
ollama { "provider": "ollama", "endpoint": "http://localhost:11434", "model": "nomic-embed-text" }

MCP Tools Reference

Memory Tools

Tool Description
doclea_store Store a memory (decision, solution, pattern, architecture, note)
doclea_search Semantic search across memories
doclea_get Get memory by ID
doclea_update Update existing memory
doclea_delete Delete memory

Git Tools

Tool Description
doclea_commit_message Generate conventional commit from staged changes
doclea_pr_description Generate PR description with context
doclea_changelog Generate changelog between refs (markdown/json, developers/users)

Expertise Tools

Tool Description
doclea_expertise Map codebase expertise, identify bus factor risks
doclea_suggest_reviewers Suggest PR reviewers based on file ownership

Bootstrap Tools

Tool Description
doclea_init Initialize project, scan git history, docs, and code
doclea_import Import from markdown files or ADRs

Memory Types

  • decision - Architectural decisions, technology choices
  • solution - Bug fixes, problem resolutions
  • pattern - Code patterns, conventions
  • architecture - System design notes
  • note - General documentation

Troubleshooting

Docker services not starting

# Check logs
docker compose -f docker-compose.test.yml logs

# Restart
bun run docker:down
bun run docker:up

First startup is slow

The embeddings service downloads the model (~130MB) on first run. After that, it's cache

Tools (12)

doclea_storeStore a memory (decision, solution, pattern, architecture, note)
doclea_searchSemantic search across memories
doclea_getGet memory by ID
doclea_updateUpdate existing memory
doclea_deleteDelete memory
doclea_commit_messageGenerate conventional commit from staged changes
doclea_pr_descriptionGenerate PR description with context
doclea_changelogGenerate changelog between refs
doclea_expertiseMap codebase expertise, identify bus factor risks
doclea_suggest_reviewersSuggest PR reviewers based on file ownership
doclea_initInitialize project, scan git history, docs, and code
doclea_importImport from markdown files or ADRs

Environment Variables

OPENAI_API_KEYAPI key for OpenAI embedding provider

Configuration

claude_desktop_config.json
{"mcpServers": {"doclea": {"command": "bun", "args": ["run", "/absolute/path/to/doclea/packages/doclea-mcp/dist/index.js"]}}}

Try it

Initialize doclea for this project
Store this as a decision: We're using PostgreSQL because we need ACID compliance for financial transactions.
Search memories for authentication patterns
Generate a commit message for my staged changes
Who should review changes to src/auth/?

Frequently Asked Questions

What are the key features of Doclea MCP?

Persistent memory storage for architectural decisions and code patterns. Semantic search capabilities across project documentation and history. Automated git commit message and PR description generation. Codebase expertise mapping and reviewer suggestions. Project initialization via git history and documentation scanning.

What can I use Doclea MCP for?

Maintaining a searchable history of architectural decisions for long-term projects. Automating the generation of conventional commit messages and PR descriptions. Identifying team members with the most expertise in specific codebase modules. Onboarding new developers by providing context on past technical solutions. Generating project changelogs automatically from git history.

How do I install Doclea MCP?

Install Doclea MCP by running: git clone https://github.com/your-org/doclea.git && cd doclea/packages/doclea-mcp && bun install && ./scripts/setup-models.sh && bun run build

What MCP clients work with Doclea MCP?

Doclea MCP works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Doclea MCP docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare