CodeDBのロゴ

CodeDB

コミュニティ人気
justrach

Zig code intelligence server and MCP toolset for AI agents. Fast tree, outline, symbol, search, read, edit, deps, snapshot, and remote GitHub repo queries.

公開者justrach
リポジトリcodedb
言語Zig
フォーク
87
スター
1.4K
利用可能なツール
0
通信方式stdio
カテゴリ
ライセンスBSD-3-Clause
リンク
  • ツールをAIワークフローに接続

    CodeDBは、対応するAIクライアントやAIエージェントから利用できるMCP機能を提供します。

  • 0個の利用可能なツール

    呼び出し可能なアクションを以下で確認できます。サーバーから提供されている場合は、名前や説明も表示されます。

  • コピーして使える設定

    セットアップ用の設定例を使って、お好みのMCPクライアントにこのサーバーを設定できます。

  • オープンソースの注目度

    リンク先のリポジトリには1.4K件のスターと87件のフォークがあります。

Your agent has a task. Somewhere in your repository are the definition it needs, the caller that explains it, and the test that keeps it honest. codedb draws the map: focused source context, symbols, callers, outlines, and dependencies. Your coding client uses its own native tools to make the edit.

A context engine, not an editor. codedb has no edit capability. Use it with Graff, Claude Code, Codex, Gemini CLI, Cursor, Windsurf, Devin, or another MCP client.

🧭 Give your agent a compass

Ask your agent…codedb helps it…
“Where does session refresh happen?”Find relevant files and source excerpts with codedb_context
“Explain this function and who uses it.”Read the definition and callers with codedb_explain
“How does this request reach the database?”Trace a chain between symbols with codedb_callpath
“What's in this part of the repo?”Browse with codedb_list_dir and inspect file outlines

Structural search runs locally. Default hybrid retrieval also uses hosted embeddings; choose semantic=local for local-only retrieval. See Data & Privacy for what each mode sends and stores.

⚡ Install

macOS and Linux

bash
curl -fsSL https://codedb.codegraff.com/install.sh | bash

Downloads the binary for your platform and auto-registers codedb as an MCP server in Claude Code, Codex, Gemini CLI, Cursor, Windsurf, and Devin — each written directly and additively into that tool's config (only when the tool is present). The installer prints the exact codedb mcp command it registered plus hook setup pointers for Codex and Claude Code.

On Windows, run this command inside WSL only if you want the Linux binary inside WSL. For the native Windows binary, use PowerShell below.

Windows

Run in PowerShell:

powershell
irm https://raw.githubusercontent.com/justrach/codedb/v0.2.5841/install/install.ps1 | iex

Run the same command again to update codedb.

npm/npx on macOS and Linux

bash
npx -y codedeebee mcp

Or install globally:

bash
npm install -g codedeebee
codedb mcp

The npm package is named codedeebee (the bare codedb name is restricted on npm); it ships a thin launcher that downloads the matching native binary from GitHub Releases on postinstall and verifies the SHA256 checksum. The installed CLI is still called codedb.

The launcher already knows how to fetch codedb-windows-x86_64.exe, but the currently published codedeebee predates that release asset, so npx -y codedeebee mcp does not work on Windows yet — it becomes available with the next published release. Use the PowerShell installer above until then.

Useful for MCP clients (Claude Code, Cursor, opencode, Claude Desktop) that already use npx:

json
{
  "codedb": {
    "type": "local",
    "command": ["npx", "-y", "codedeebee"],
    "args": ["mcp"],
    "enabled": true
  }
}

Updating or repairing an older install

On macOS or Linux, if codedb update fails on an older release, rerun the installer:

bash
curl -fsSL https://codedb.codegraff.com/install.sh | bash

This replaces the codedb binary with the latest GitHub Release and keeps your existing MCP registrations, config, caches, and snapshots. Use this path for any release whose built-in updater cannot fetch release checksums.

Self-update works on native Windows from 0.2.5833 onward (codedb update). On older builds, rerun the PowerShell installer above to update or repair the binary.

🌱 Project status

Alpha: APIs and snapshot formats can change. The core speaks JSON-RPC 2.0 over stdio, with an optional localhost HTTP server.

  • Parsers: Zig, C/C++, Python, TypeScript/JavaScript, Rust, Go, PHP, Ruby, HCL, R, Dart/Flutter, and OCaml; more languages have lightweight outlines.
  • Navigation: task context, symbol definitions, callers, dependency graphs, trigram search, and portable snapshots.
  • Live updates: bounded OS watches with periodic content verification for overflow. Each MCP process owns its watcher; multiple clients can multiply background work.
  • Distribution: macOS, Linux, and Windows binaries; SHA256-verified downloads. macOS releases are signed and notarized.

Documentation

  • MCP setup — per-client configurations (Claude Desktop, Cursor, VS Code, Claude Code, Codex CLI, Gemini CLI), root resolution, troubleshooting
  • Skill base & context files — agents.md / CLAUDE.md / GEMINI.md, .codedbrc, per-developer memory
  • CLI reference — every command, every flag
  • Architecture — engine internals, index layout
  • Benchmarks — micro-benchmarks + agentic-eval results vs codegraph, FTS5, lean-ctx
  • Raspberry Pi 4 — full-performance ARM64 setup, Cortex-A72 build, and on-device benchmark
  • Zig 0.17.0-dev migration guide — repeatable zigup workflow and API change recipes
PlatformBinarySigned
macOS ARM64 (Apple Silicon)codedb-darwin-arm64✅ codesigned + notarized
macOS x86_64 (Intel)codedb-darwin-x86_64codesigned + notarized (0.2.5833+)
Linux ARM64codedb-linux-arm64—
Linux x86_64codedb-linux-x86_64—
Windows x86_64codedb-windows-x86_64.exeSHA256 verified automatically

Or install manually from GitHub Releases. Always verify the binary against the attached checksums.sha256 before running it.


⚡ Quick Start

As an MCP server (recommended)

The macOS/Linux shell installer registers codedb automatically. For npm/npx installs on macOS/Linux and manual Windows installs, use the MCP configuration above or the client-specific examples in docs/mcp.md. Then open a project and codedb’s tools are available to your AI agent.

bash
# Manual MCP start (auto-configured by install script)
codedb mcp /path/to/your/project

For clients that open many unused MCP sessions (for example, one per worktree), try experimental lazy MCP startup with CODEDB_LAZY_MCP=1. Indexing starts on the first code request; eager startup remains the default.

As an HTTP server

bash
codedb serve /path/to/your/project
# listening on localhost:7719

CLI

bash
codedb tree /path/to/project          # file tree with symbol counts
codedb outline src/main.zig           # symbols in a file
codedb find AgentRegistry             # find symbol definitions
codedb search "handleAuth"            # full-text search (trigram-accelerated)
codedb word Store                     # exact word lookup (inverted index, O(1))
codedb hot                            # recently modified files

🔧 MCP Tools

Tools over the Model Context Protocol (JSON-RPC 2.0 over stdio). Agents see five one-shots by default (context, explain, callpath, list_dir, status). codedb's job is to give agents context — not to be your editor. codedb has no edit tool; use your client's native edit tools.

ToolDescription
codedb_treeFull file tree with language, line counts, symbol counts
codedb_outlineSymbols in a file: functions, structs, imports, with line numbers
codedb_symbolFind where a symbol is defined across the codebase
codedb_searchTrigram-accelerated full-text search (supports regex, scoped results)
codedb_wordO(1) inverted index word lookup
codedb_callersEvery call site of a symbol — word index ∩ outline scope, in one round-trip
codedb_explainDefinition body + callers in one call (CLI aliases: explain, around)
codedb_callpathShortest resolved call chain A→B (CLI alias: path); duplicate names list candidates—pass from_path / to_path (or CLI --from-path / --to-path) to select a file
codedb_contextTask-shaped composer — Pareto-frontier hybrid retrieval by default: local BM25/symbol retrieval first, then local ANN search using a remote task embedding plus a fixed public calibration string when an explicit sidecar exists, or a bounded transient semantic rerank otherwise. Pass semantic=local for an on-device-only call. format=json adds typed provenance and retrieval-privacy metadata; document_hops=1..2 expands linked Markdown
codedb_hotMost recently modified files
codedb_depsTyped dependency graph: imports by default, or Markdown links with edge_type=documents; document traversal is capped at 2 hops / 64 files
codedb_readRead file content (line ranges, if_hash skip-unchanged, compact mode)
codedb_changesChanged files since a sequence number
codedb_statusIndex status (file count, current sequence, scan phase)
codedb_snapshotFull pre-rendered JSON snapshot of the codebase
codedb_projectsList all locally indexed projects on this machine
codedb_indexIndex a local folder and write codedb.snapshot
codedb_findFuzzy file-name search (typo-tolerant subsequence match against indexed paths — not a content/symbol search)
codedb_globMatch indexed paths against a glob pattern (src/**/*.zig, *.md, …)
codedb_lsList immediate children of a directory — dirs first, then files with language + counts
codedb_list_dirLive BFS folder listing (gitignore, 10k cap) — works without an index
codedb_queryComposable pipeline — chain find, search, filter, deps, outline, read, sort, limit in one request

codedb_context accepts max_tokens as a conservative approximate response budget. Compact evidence is admitted progressively; when the remaining evidence does not fit, the response reports the omission once instead of overflowing the request with lower-priority sections.

MCP responses are plain text by default, without ANSI styling. Set CODEDB_MCP_ANSI=1 in the MCP server environment to opt into ANSI-colored summary and guidance blocks for clients that render terminal colors.

Tool profile: agent harnesses default to mini — five one-shot tools (context, explain, callpath, list_dir, status). Hop tools stay callable; they are not advertised. CODEDB_TOOLS_PROFILE=core is the older 10-tool navigation set; slim is the terse hop six; full advertises everything. GUI clients that emit rich blocks still get full unless the env var is set.

Public repos — DeepWiki (remote MCP)

codedb indexes your checked-out code. For questions about public GitHub repos, the installer registers DeepWiki (https://mcp.deepwiki.com/mcp — free, no auth) as a separate remote MCP server in each detected client, with tools read_wiki_structure, read_wiki_contents, and ask_question. Opt out at install time with CODEDB_INSTALL_DEEPWIKI=0. (The old codedb_remote tool backed by api.wiki.codes was removed; DeepWiki replaces that role.)

CLI Commands

CommandDescription
codedb treeShow file tree with language and symbol counts
codedb outline <path>List all symbols in a file
codedb find <name>Find where a symbol is defined
codedb search <query>Full-text search (trigram, case-insensitive)
codedb search --regex <pattern>Regex search
codedb word <identifier>Exact word lookup via inverted index
codedb read <path>Read file contents (supports -L FROM-TO, --compact)
codedb hotRecently modified files
codedb reindexForce a fresh filesystem scan, rebuild all local indexes, and refresh the live daemon
codedb snapshotWrite codedb.snapshot to project root
codedb serveHTTP daemon on :7719
codedb mcp [path]JSON-RPC/MCP server over stdio
codedb updateSelf-update to the latest release; older builds can be repaired with the installer
codedb nukeUninstall codedb, remove caches/snapshots, and deregister MCP integrations
codedb --versionPrint version

Options: --no-telemetry (or set CODEDB_NO_TELEMETRY env var)

Claude Code hook opt-out: the installer registers a PreToolUse hook that nudges agents from grep/cat to codedb inside indexed repos. CODEDB_NO_HOOKS=1 skips it for that run only (it is never persisted from the environment, so a transient export can't be promoted to a permanent opt-out by the background auto-updater). To make it permanent, run the installer with CODEDB_PERSIST_NO_HOOKS=1 or touch ~/.codedb/no-hooks; rm ~/.codedb/no-hooks re-enables it. Deleting the hook entry from ~/.claude/settings.json is also permanent — the installer records its registrations and treats a missing entry as a deliberate removal (it writes ~/.codedb/no-hooks for you, so rm that file to undo).

Example: agent explores a codebase

bash
# 1. Get the file tree
curl localhost:7719/tree
# → src/main.zig      (zig, 55L, 4 symbols)
#   src/store.zig     (zig, 156L, 12 symbols)
#   src/agent.zig     (zig, 135L, 8 symbols)

# 2. Drill into a file
curl "localhost:7719/outline?path=src/store.zig"
# → L20: struct_def Store
#   L30: function init
#   L55: function recordSnapshot

# 3. Find a symbol across the codebase
curl "localhost:7719/symbol?name=AgentRegistry"
# → {"path":"src/agent.zig","line":30,"kind":"struct_def"}

# 4. Full-text search
curl "localhost:7719/search?q=handleAuth&max=10"

# 5. Check what changed
curl "localhost:7719/changes?since=42"

📊 Benchmarks

Measured on Apple M4 Pro, 48GB RAM. MCP = pre-indexed warm queries (20 iterations avg). CLI/external tools include process startup (3 iterations avg). Ground truth verified against Python reference implementation.

Latency — codedb MCP vs codedb CLI vs ast-grep vs ripgrep vs grep

codedb repo (20 files, 12.6k lines):

Querycodedb MCPcodedb CLIast-grepripgrepgrepMCP speedup
File tree0.04 ms52.9 ms———1,253x vs CLI
Symbol search (init)0.10 ms54.1 ms3.2 ms6.3 ms6.5 ms549x vs CLI
Full-text search (allocator)0.05 ms60.7 ms3.2 ms5.3 ms6.6 ms1,340x vs CLI
Word index (self)0.04 ms59.7 msn/a7.2 ms6.5 ms1,404x vs CLI
Structural outline0.05 ms53.5 ms3.1 ms—2.4 ms1,143x vs CLI
Dependency graph0.05 ms2.2 msn/an/an/a45x vs CLI

merjs repo (100 files, 17.3k lines):

Querycodedb MCPcodedb CLIast-grepripgrepgrepMCP speedup
File tree0.05 ms54.0 ms———1,173x vs CLI
Symbol search (init)0.07 ms54.4 ms3.4 ms6.3 ms3.6 ms758x vs CLI
Full-text search (allocator)0.03 ms54.1 ms2.9 ms5.1 ms3.7 ms1,554x vs CLI
Word index (self)0.04 ms54.7 msn/a6.3 ms4.2 ms1,518x vs CLI
Structural outline0.04 ms54.9 ms3.4 ms—2.5 ms1,243x vs CLI

rtk-ai/rtk repo (329 files) — codedb vs rtk vs ripgrep vs grep:

ToolSearch "agent"Speedup
codedb (pre-indexed)0.065 msbaseline
rtk37 ms569x slower
ripgrep45 ms692x slower
grep80 ms1,231x slower

Token Efficiency

codedb returns structured, relevant results — not raw line dumps. For AI agents, this means dramatically fewer tokens per query:

Repocodedb MCPripgrep / grepReduction
codedb (search allocator)~20 tokens~32,564 tokens1,628x fewer
merjs (search allocator)~20 tokens~4,007 tokens200x fewer

Indexing Speed

codedb v0.2.57 uses worker-local parallel scan with deterministic merge — each worker builds its own partial index, then results are merged on the main thread:

RepoFilesCold startPer filevs v0.2.56
codedb2017 ms0.85 ms—
merjs10016 ms0.16 ms—
5,200 mixed files5,200310 ms0.06 ms—
openclaw/openclaw6,315346 ms0.05 ms10× faster

Indexes are built on startup and the watcher keeps them updated. The historical single-file indexing time above excludes event coalescing, polling delay, and queueing. Indexed queries reuse the index; live listing and fallback reads may access the filesystem. For repos >1000 files, file contents are released after indexing to save ~300-500MB.

Historical background measurements (openclaw, 6,315 files, Apple M4 Pro)

Metricv0.2.56v0.2.57Delta
Steady-state RSS1,867 MB1,706 MB−161 MB
git subprocesses / min (idle)~30~0mtime-gated

The watcher stats .git/HEAD mtime before forking git rev-parse HEAD. These historical measurements do not bound watcher CPU under filesystem churn; see the issue #748 reproduction.

Why codedb is fast

  • MCP server indexes once on startup → all queries hit in-memory data structures (O(1) hash lookups)
  • CLI pays ~55ms process startup + full filesystem scan on every invocation
  • ast-grep re-parses all files through tree-sitter on every call (~3ms)
  • ripgrep/grep brute-force scan every file on every call (~5-7ms)
  • The MCP advantage: index once, query thousands of times at sub-millisecond latency

Feature Matrix

Featurecodedb MCPcodedb CLIast-grepripgrepgrepctags
Structural parsing✅✅✅❌❌✅
Trigram search index✅✅❌❌❌❌
Inverted word index✅✅❌❌❌❌
Dependency graph✅✅❌❌❌❌
Version tracking✅✅❌❌❌❌
Pre-indexed (warm)✅❌❌❌❌❌
No process startup✅❌❌❌❌❌
MCP protocol✅❌❌❌❌❌
Full-text search✅✅✅✅✅❌
File watcher✅✅❌❌❌❌

A map for the next step: structural parsers, search indexes, and a dependency graph in one Zig binary.


🏗️ Architecture

┌─────────────┐     ┌─────────────┐
│  HTTP :7719 │     │  MCP stdio  │
│  server.zig │     │  mcp.zig    │
└──────┬──────┘     └──────┬──────┘
       │                   │
       └───────┬───────────┘
               │
    ┌──────────▼──────────┐
    │     Explorer        │
    │   explore.zig       │
    │  ┌───────────────┐  │
    │  │ WordIndex      │  │
    │  │ TrigramIndex   │  │
    │  │ Outlines       │  │
    │  │ Contents       │  │
    │  │ DepGraph       │  │
    │  └───────────────┘  │
    └──────────┬──────────┘
               │
    ┌──────────▼──────────┐
    │      Store          │──── data.log
    │    store.zig        │
    └──────────┬──────────┘
               │
    ┌──────────▼──────────┐
    │     Watcher         │ ← OS events + overflow polling
    │   watcher.zig       │
    │  (FilteredWalker)   │
    └─────────────────────┘

No SQLite. No dependencies. Purpose-built data model:

  • Explorer — structural index engine. Parses Zig, Python, TypeScript/JavaScript, Rust, Go, PHP, Ruby, HCL, R, and Dart. Maintains outlines, trigram index, inverted word index, content cache, and dependency graph behind a single mutex.
  • Store — append-only version log. Every recorded file change (snapshot, modification, deletion) gets a monotonically increasing sequence number. Version history capped at 100 per file.
  • Watcher — bounded OS watches, 100ms event coalescing, and content verification for overflow about every 2s. FilteredWalker prunes .git, node_modules, zig-cache, __pycache__, etc. before descending.
  • Agents — first-class structs with cursors, heartbeats, and exclusive file locks. Stale agents reaped after 30s.

Threading Model

ThreadRole
MainHTTP accept loop or MCP read loop
WatcherReconciles OS events; verifies overflow contents via FilteredWalker
ISRRebuilds snapshot when stale flag is set
ReapCleans up stale agents every 5s
Per-connectionHTTP server spawns a thread per connection

All threads share a shutdown: atomic.Value(bool) for graceful termination.


🔒 Data & Privacy

codedb collects anonymous usage telemetry to improve the tool. Telemetry is on by default — written to ~/.codedb/telemetry.ndjson and periodically synced to the codedb analytics endpoint. No source code, file contents, file paths, or search queries are collected — only aggregate tool call counts, latency, and startup stats.

codedb_context uses Pareto-frontier hybrid retrieval by default. Local BM25, trigram, symbol, and graph retrieval always runs first. Pass semantic=local for an entirely on-device call that sends no query or source text to an embedding service. In the default hybrid mode:

  • local BM25/symbol retrieval still runs first and remains the failure-safe result;
  • when a fresh local OpenPuffer sidecar exists, codedb sends the task plus a fixed public calibration string in one embedding request, verifies that the provider still represents the same vector space, and searches the stored code chunks locally through a validated mmap-backed graph;
  • without a sidecar, codedb sends the task plus at most 24 locally selected relative paths and bounded snippets, capped at 2 KiB per path+snippet item / 8 KiB candidate text total, in one exact-rerank batch;
  • the hosted codedb embedding service performs transient inference and does not retain request bodies, candidate paths, source snippets, or vectors;
  • no repository archive or server-side repository/vector index is created;
  • provider/network failure keeps the local result and never invokes a CPU embedding fallback.

Build a new local ANN explicitly with:

bash
codedb /path/to/repo semantic-index

CodeDB 0.2.5851 staged the managed embedding migration without breaking older clients. Versions through 0.2.5850 continue to request Qwen/Qwen3-Embedding-0.6B; 0.2.5851 and later request jinaai/jina-embeddings-v2-base-code. The service keeps both routes live. An existing Qwen ANN sidecar is rejected by the new client's model/vector-space check. Starting in 0.2.5852, the first hybrid MCP query still returns through the bounded exact Jina reranker, then schedules one background rebuild of that exact legacy hosted-Qwen sidecar. The old OpenPuffer generation remains intact until the Jina replacement passes source, Git, metadata, and vector-space validation and commits atomically. Custom endpoints/model overrides and new repositories are never auto-built; set CODEDB_NO_AUTO_SEMANTIC_MIGRATION=1 to disable even this legacy migration. CodeDB never mixes vectors from the two models.

It splits already-indexable files into bounded 832-byte source chunks, uses four concurrent 25-item requests by default (explicitly configurable from one to eight), and writes a small semantic-chunks-v3.meta mapping plus a generation-named .hmls mmap slab only in codedb's per-project local data directory. The directory and files use private permissions (0700/0600 on POSIX). On lookup, codedb checks model/vector-space identity, Git/content freshness, and the bounded metadata before opening the slab. Metadata heap use is capped at 64 MiB and graph-validation reads at 128 MiB; vector slabs remain demand-paged rather than being copied into the query process. It never scans or uploads .env, .env.*, .envrc, credentials, private keys, or other paths on the sensitive-file denylist. Ordinary lexical indexing does not build this sidecar.

The default managed semantic lane is free to call and requires no API token or manual setup. On first use, CodeDB creates a local Ed25519 installation key, enrolls its public key, and receives a short-lived server-signed certificate. Every request proves possession of the installation key; renewal is automatic. The private seed stays in a global ~/.codedb/credentials.json file written atomically with mode 0600 on POSIX and is never part of an embedding request. The public route exposes only the managed CodeDB lane and enforces enrollment, installation, and aggregate network limits. General provider APIs remain authenticated.

format=json exposes this boundary in the retrieval object, including vector dimensions, bounded byte/document counts, retention policy, and failure policy. If CODEDB_EMBEDDINGS_URL points to a custom provider, codedb labels its retention as custom_endpoint_unverified because the client cannot prove another operator's storage policy.

LocationContentsPurpose
~/.codedb/projects/<hash>/Trigram index, frequency table, data log; optional semantic-chunks-v3.meta plus .hmls slabPersistent local indexes
~/.codedb/credentials.jsonPrivate Ed25519 seed and public installation certificate (0600 on POSIX)Automatic hosted-lane authentication
~/.codedb/telemetry.ndjsonAggregate tool calls and startup statsLocal telemetry log
./codedb.snapshotFile tree, outlines, content, frequency tablePortable snapshot for instant MCP startup

Not stored: In explicit semantic=local mode, no source code is sent anywhere. In the default hybrid and explicit index-build modes, only the bounded transient batches above leave the machine; the hosted service does not store them and never creates a repository index. The optional ANN vectors and graph remain in the local codedb data directory. No file contents, file paths, or search queries are collected in telemetry. Sensitive files are auto-excluded from indexing and therefore cannot become hybrid candidates (.env, .env.*, .envrc, credentials.json, secrets.*, .pem, .key, SSH keys, AWS configs). The hybrid request builder repeats the canonical safe-path check immediately before serialization, so those paths remain blocked even if a stale or hand-built in-memory index contains one. Structured provenance reports only the aggregate sensitive_paths_blocked count, never the rejected path.

Optional custom-provider overrides (the managed lane needs none):

bash
CODEDB_EMBEDDINGS_URL=https://provider.example/v1/embeddings
CODEDB_EMBEDDINGS_MODEL=your-deployment-id
CODEDB_EMBEDDINGS_DIMENSIONS=512
CODEDB_EMBEDDINGS_TOKEN='optional bearer token for a protected/custom endpoint'
CODEDB_EMBEDDINGS_TIMEOUT_MS=15000
CODEDB_SEMANTIC_INDEX_CONCURRENCY=4

To disable telemetry: set CODEDB_NO_TELEMETRY=1 or pass --no-telemetry.

To sync the local NDJSON file into Postgres for analysis or dashboards, use scripts/sync-telemetry.py with the schema in docs/telemetry/postgres-schema.sql. The data flow is documented in docs/telemetry.md.

bash
codedb nuke                # uninstall binary, clear caches/snapshots, remove MCP registrations
rm -rf ~/.codedb/          # cache-only cleanup if you want to keep the binary installed
rm -f codedb.snapshot      # remove snapshot from current project only

🔨 Building from Source

Requirements: Zig 0.17.0-dev.813+2153f8143 (the exact tested development snapshot). See the migration guide for reproducible zigup setup.

bash
git clone https://github.com/justrach/codedb.git
cd codedb
zig build                              # debug build
zig build -Doptimize=ReleaseFast       # release build
zig build test                         # run tests
zig build bench                        # run benchmarks

Binary: zig-out/bin/codedb

Cross-compilation

bash
zig build -Doptimize=ReleaseFast -Dtarget=x86_64-linux
zig build -Doptimize=ReleaseFast -Dtarget=aarch64-linux
zig build -Doptimize=ReleaseFast -Dtarget=x86_64-macos
zig build -Doptimize=ReleaseFast -Dtarget=x86_64-windows

Releasing

bash
./release.sh 0.2.0              # build, codesign, notarize, upload to GitHub Releases
./release.sh 0.2.0 --dry-run    # preview without executing

License

See LICENSE for details.

インストール

TypingMind
前提条件:

Node.js 18+

{
  "mcpServers": {
    "justrach-codedb": {
      "command": "",
      "args": []
    }
  }
}

CodeDBのMCPを複数のAIモデルで活用

TypingMindはワークスペース単位でMCPツールに接続します。そのため、一度CodeDBに接続すれば、モデルごとに個別に設定することなく、TypingMind内のさまざまなAIモデルで利用できます。 このMCPは、デバイス上のTypingMind MCPコネクタを通じてローカルで動作します。

ローカルコネクタのセットアップガイド

MCPサーバーが、お使いのコンピューター上のローカルファイル、アプリ、非公開リソースにアクセスする必要がある場合は、この方法を使います。

1

MCP設定を開く

TypingMindで「設定」、「詳細設定」、「MCP」の順に進み、「コネクタを設定」を選択してください。

  1. ブラウザでTypingMindを開いてください。
  2. 設定アイコンをクリックしてください。
  3. 「詳細設定」に移動してください。
  4. 「MCP」セクションを開いてください。
  5. 「コネクタを設定」をクリックし、「このデバイス」を選択してください。
「このデバイス」が選択されたTypingMindのMCPコネクタ設定画面
2

コネクタのコマンドを実行

「このデバイス」を選択し、TypingMindからコマンドをコピーしてターミナルで実行してください。MCPの使用中は、プロセスを実行したままにしてください。

  1. TypingMindに表示されるセットアップコマンドをコピーしてください。
  2. macOSではターミナルを、WindowsではWindows Terminalを開いてください。
  3. コマンドを貼り付けて実行してください。
  4. ターミナルで続行の確認を求められた場合は、パッケージのインストールを承認してください。
  5. MCPツールの使用中は、ターミナルウィンドウを開いたまま、プロセスの実行を継続してください。
3

CodeDBをサーバーとして追加

コネクタのステータスが「準備完了」になったら、「サーバーを編集」をクリックし、MCPサーバーの設定を貼り付けてください。

  1. コネクタのステータスが「準備完了」になるまでお待ちください。
  2. 「サーバーを編集」をクリックしてください。
  3. CodeDBのMCPサーバー設定を貼り付けてください。
  4. サーバー一覧を保存してください。
  5. コネクタが引き続き使用可能か確認するには、更新してください。
稼働中のサーバーと「サーバーを編集」ボタンが表示されたTypingMindのMCP設定画面
{
  "mcpServers": {
    "justrach-codedb": {
      "command": "npx",
      "args": [
        "-y",
        "codedb"
      ]
    }
  }
}
4

複数のモデルで同じ接続を使用

サーバー一覧を保存し、「プラグイン」を開いてCodeDBのMCPツールを有効にしてください。その後、TypingMindで対応するAIモデルを選択し、チャットでツールを使うか、AIエージェントに割り当ててください。

  1. TypingMindの「プラグイン」ページを開いてください。
  2. CodeDBのMCPツールを有効にしてください。
  3. チャットを開始し、使用するAIモデルを選択してください。
  4. MCPツールをチャットで使うか、AIエージェントに割り当ててください。
  5. MCPに再接続することなく、必要に応じて別のAIモデルに切り替えられます。
選択したAIモデルと有効なMCPツールを使用したTypingMindのチャット
CodeDBを使ってこのタスクを手伝ってもらえますか?
CodeDB
はい、読みました。
CodeDBで調べた結果をお伝えします。

よくある質問

CodeDB MCPサーバーは何に使いますか?

CodeDBは、対応するAIクライアントを外部ツールやコンテキストに接続するためのMCPサーバーです。TypingMindでは、このMCPサーバーを一度追加するだけで、AIワークスペース内でそのツールを利用できるようになります。

TypingMindでCodeDB MCPを複数のAIモデルと併用できますか?

はい。TypingMindはワークスペース単位でMCPツールに接続するため、モデルごとにMCPサーバーを設定する必要はありません。Claude、ChatGPT、Geminiや、TypingMindで設定したその他のAIモデルでCodeDBを利用できます。

TypingMindでCodeDB MCPを使うメリットは何ですか?

TypingMindは、複数のAIモデル、プロンプト、プラグイン、AIエージェント、APIキー、MCPツールを1つのワークスペースにまとめられる、LLMチャット向けの優れたフロントエンドです。CodeDBを接続すると、TypingMindでチャットのワークフローを整理しながら、お好みのモデルでそのMCPツールを利用できます。

CodeDB MCPをTypingMindに接続するにはどうすればよいですか?

CodeDBはTypingMindのローカルMCPコネクタ経由で動作します。MCPサーバーがコンピューター上のローカルファイル、デスクトップアプリ、コマンドラインツール、プライベートリソースにアクセスする必要がある場合に最適です。

TypingMindでCodeDB MCPのどのようなツールを利用できますか?

CodeDBはMCP機能を提供しています。TypingMindのプラグインページで有効にすると、チャットで使用したり、AIエージェントに割り当てたりできます。

CodeDB MCPを使うには、APIキーをTypingMindと共有する必要がありますか?

いいえ。TypingMindはローカルファーストの設計で、モデルプロバイダー、APIキー、プロンプト、MCP設定をご自身で管理できます。CodeDBで認証が必要な場合は、接続の作成時に、そのMCPサーバーに必要なヘッダー、OAuth設定、またはローカル設定を追加してください。

関連するMCPサーバー

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇