Doclea MCP

Doclea MCP

Provides persistent memory for AI coding assistants, storing and retrieving architectural decisions, patterns, and solutions across sessions using semantic search, while also offering git integration for commit messages and code expertise mapping.

Category
访问服务器

README

@doclea/mcp

npm version License: MIT Node.js Bun

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

Doclea gives your AI coding assistant (Claude Code, etc.) persistent memory across sessions. It remembers architectural decisions, patterns, solutions, and codebase context so you don't have to repeat yourself.

Features

  • Persistent Memory — Store decisions, patterns, solutions, and notes that persist across sessions
  • Semantic Search — Find relevant context using vector similarity search
  • Git Integration — Generate commit messages, PR descriptions, and changelogs from your history
  • Code Expertise Mapping — Identify code owners and suggest reviewers based on git blame analysis
  • Zero-Config Mode — Works immediately with no Docker or external services required
  • Auto-Detection — Automatically uses optimized Docker backends when available

Quick Start

Add to your Claude Code config (~/.claude.json or project .claude.json):

{
  "mcpServers": {
    "doclea": {
      "command": "npx",
      "args": ["@doclea/mcp"]
    }
  }
}

Restart Claude Code, navigate to your project, and ask:

Initialize doclea for this project

That's it! Doclea scans your codebase, git history, and documentation to bootstrap memories.

Installation Options

Method Command Setup Time Best For
Zero-Config npx @doclea/mcp <30 seconds Quick start, small projects
Optimized curl install.sh 3-5 minutes Production, large codebases
Manual Clone & build 5-10 minutes Development, customization

Zero-Config (Recommended)

Works immediately with no Docker required. Uses embedded sqlite-vec for vectors and Transformers.js for embeddings.

First run downloads the embedding model (~90MB) which is cached for future use.

Optimized Installation (Docker)

For larger codebases with better performance:

curl -fsSL https://raw.githubusercontent.com/docleaai/doclea-mcp/main/scripts/install.sh | bash

This script:

  • Detects your OS and architecture
  • Installs prerequisites (Bun, Docker if needed)
  • Sets up Qdrant vector database and TEI embeddings service
  • Configures Claude Code automatically

Manual Installation

git clone https://github.com/docleaai/doclea-mcp.git
cd doclea-mcp
bun install
bun run build

Add to Claude Code (~/.claude.json):

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

For detailed setup instructions, see docs/INSTALLATION.md.

Usage Examples

Store Memories

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

Search Context

Search memories for authentication patterns

Git Operations

Generate a commit message for my staged changes
Create a PR description for this branch
Generate a changelog from v1.0.0 to HEAD

Code Expertise

Who should review changes to src/auth/?

MCP Tools

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

Expertise Tools

Tool Description
doclea_expertise Map codebase expertise and 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

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

Configuration

Doclea works out of the box with zero configuration. It auto-detects available backends:

  1. If Docker services (Qdrant/TEI) are running → uses them for better performance
  2. Otherwise → uses embedded sqlite-vec + Transformers.js

Custom Configuration

Create .doclea/config.json in your project root:

{
  "embedding": {
    "provider": "transformers",
    "model": "Xenova/all-MiniLM-L6-v2"
  },
  "vector": {
    "provider": "sqlite-vec",
    "dbPath": ".doclea/vectors.db"
  },
  "storage": {
    "dbPath": ".doclea/local.db"
  }
}

Embedding Providers

Provider Config Notes
transformers { "provider": "transformers" } Default, no Docker
local { "provider": "local", "endpoint": "http://localhost:8080" } TEI Docker
openai { "provider": "openai", "apiKey": "..." } API key required
ollama { "provider": "ollama", "model": "nomic-embed-text" } Local Ollama

Vector Store Providers

Provider Config Notes
sqlite-vec { "provider": "sqlite-vec" } Default, no Docker
qdrant { "provider": "qdrant", "url": "http://localhost:6333" } Docker service

Architecture

┌─────────────────────────────────────────────────────────┐
│                     Claude Code                         │
│                         ↓ MCP                           │
├─────────────────────────────────────────────────────────┤
│                   Doclea MCP Server                     │
│  ┌─────────┐ ┌─────────┐ ┌──────────┐ ┌───────────┐   │
│  │ Memory  │ │   Git   │ │Expertise │ │ Bootstrap │   │
│  │  Tools  │ │  Tools  │ │  Tools   │ │   Tools   │   │
│  └────┬────┘ └────┬────┘ └────┬─────┘ └─────┬─────┘   │
│       └───────────┴───────────┴─────────────┘          │
│                         ↓                              │
│  ┌──────────────┐ ┌──────────────┐ ┌──────────────┐   │
│  │   SQLite     │ │  Vector DB   │ │  Embeddings  │   │
│  │  (metadata)  │ │(sqlite-vec/  │ │(transformers/│   │
│  │              │ │   qdrant)    │ │    TEI)      │   │
│  └──────────────┘ └──────────────┘ └──────────────┘   │
└─────────────────────────────────────────────────────────┘

Development

# Install dependencies
bun install

# Run in development mode (hot reload)
bun run dev

# Run tests
bun test              # All tests
bun run test:unit     # Unit tests only
bun run test:integration  # Integration tests (requires Docker)

# Type check
bun run typecheck

# Lint
bun run lint          # Check
bun run lint:fix      # Auto-fix

# Build
bun run build

Troubleshooting

First startup is slow

The embedding model (~90MB) downloads on first run. Cached at:

  • Linux/macOS: ~/.cache/doclea/transformers
  • Windows: %LOCALAPPDATA%\doclea\transformers

macOS SQLite extension error

macOS ships with Apple's SQLite which doesn't support extensions:

brew install sqlite

The server auto-detects Homebrew SQLite.

MCP server not appearing in Claude

  1. Verify the path in config is absolute (manual installs)
  2. Check that bun run build completed successfully
  3. Restart Claude Code completely

See docs/INSTALLATION.md for more troubleshooting.

Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

# Fork and clone
git clone https://github.com/YOUR_USERNAME/doclea-mcp.git

# Create feature branch
git checkout -b feature/amazing-feature

# Make changes, test, and lint
bun test && bun run lint

# Commit and push
git commit -m 'feat: add amazing feature'
git push origin feature/amazing-feature

Roadmap

  • [ ] Cloud sync for team collaboration
  • [ ] VS Code extension
  • [ ] Additional embedding providers
  • [ ] Memory analytics dashboard

License

MIT © Quantic Studios


<p align="center"> <a href="https://doclea.ai">Website</a> • <a href="https://github.com/docleaai/doclea-mcp/issues">Issues</a> • <a href="https://github.com/docleaai/doclea-mcp/discussions">Discussions</a> </p>

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选