Context7
Up-to-date docs for AI agents
作者による説明(英語の原文)
Semantic code retrieval engine with hybrid search, context expansion, and 40+ language support.
この3つを1つのスコアにまとめることはしません。意見、測定、人気はそれぞれ別のものだからです。
このサーバーのやさしい解説はまだ書いていません。以下はレジストリから読み取った事実です。
使っているAIアプリを選んで、設定をコピーしてください。
必要なもの
どのアプリを使っていますか?
上でアプリを選んでください。選んだアプリを覚えておくので、次からはボタンに「…にインストール」と表示されます。
Claude Desktop → Settings → Developer → Edit Config を開き、claude_desktop_config.json にこれを貼り付けます
{
"mcpServers": {
"contextweaver": {
"command": "npx",
"args": [
"-y",
"@chiway/contextweaver"
]
}
}
}ターミナルでこれを実行します
claude mcp add contextweaver -- npx -y @chiway/contextweaverプロジェクトの .cursor/mcp.json、または ~/.cursor/mcp.json に貼り付けます
{
"mcpServers": {
"contextweaver": {
"command": "npx",
"args": [
"-y",
"@chiway/contextweaver"
]
}
}
}ブラウザがアプリを開いてよいか確認し、そのあとアプリが設定を表示して確認を求めます。キーの値は空欄のままなので、自分で入力してください。
プロジェクトの .vscode/mcp.json に貼り付けます
{
"servers": {
"contextweaver": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@chiway/contextweaver"
]
}
}
}ブラウザがアプリを開いてよいか確認し、そのあとアプリが設定を表示して確認を求めます。キーの値は空欄のままなので、自分で入力してください。
これはパソコンで動くサーバーですが、ChatGPTがつなげるのはインターネット上のサーバーだけです。ほかのアプリを選んでください。
選んだアプリは、この端末のCookieに保存されます。アカウントは不要です。
この設定は、作者のレジストリ登録情報から作成しています。READMEと違う場合は、READMEに従ってください。
パソコンで動くサーバーです。インストールすると、ツール一覧がAIアプリに表示されます。
誰でも見られる情報をチェックしており、コードは読んでいません。当てはまらない項目は数に入れていません。 · 2026年11月6日にチェック
レジストリ名は、リポジトリを所有するGitHubアカウント wchiway で確認済みです
このリポジトリはまだGitHubから読み取っていません
このリポジトリはまだGitHubから読み取っていません
これはパソコンで動くため、インターネット上のエンドポイントはありません
パソコンで動き、代わりにローカルの設定を使います
パソコンで動くサーバーです。ツール一覧を読み取れるのは、インターネット上のエンドポイントがある場合だけです
レジストリでこのカテゴリにある有効なすべてのサーバーと比較しています。スターは、公開者がリポジトリの所有者である場合だけ数えます。
当てはまる基本チェック1項目のうち1項目に合格しました。コードは読んでいません。キーやトークンを追加する前に、サーバーがどんなアクセスを求めているかを確認し、必要な権限だけを持つキーを使ってください。
レジストリには必須のキーは載っていません。ただし、最初に使うときにサインインを求めるサーバーもあります。
あなたのパソコンで動きます。必要なときにAIアプリが起動し、データは作者のサーバーを通りません(サーバー自体がオンラインサービスを呼び出す場合を除きます)。
GitHubリポジトリの最終更新は–、最新バージョン(1.5.4)がレジストリに届いたのは5 か月前です。
Claude Desktop、Claude Code、Cursor、VS CodeなどのMCP対応アプリで使えます。パソコンにNode.jsも必要です。
同じカテゴリには:Context7, Codebase Memory, Exa
同じカテゴリで、ほかの作者が作ったサーバー。スターの多い順。
カードの見方:★ GitHubスターi3つの柱:レビュー · チェック · 利用状況i更新=最新バージョンをレジストリに公開した日i
Up-to-date docs for AI agents
Codebase knowledge graph for AI agents — 162 languages, sub-ms queries, 99% fewer tokens.
Connect AI agents to Exa for web search, content fetching, and multi-step research.
作者のリポジトリから書かれたとおりにコピーしたものです。PopNx MCPは内容を確認・推奨していません。HTML、画像、スクリプトは取り除いています。リンクはこのサイトの外へ移動します。
🧵 A codebase context engine woven for AI agents
Semantic Code Retrieval for AI Agents — Hybrid Search • Graph Expansion • Token-Aware Packing
English · 简体中文
ContextWeaver is a semantic retrieval engine purpose-built for AI coding assistants. It combines hybrid search (vector + lexical), intelligent context expansion, and token-aware packing to deliver precise, relevant, and context-complete code snippets to LLMs.
displayCode for presentation, vectorText for embeddingSourceAdapter.toCharOffset before writing metadata, preventing multi-byte character slicing errors (v1.4.0+)normalized query + projectId + index version + search-config fingerprint, so it invalidates automatically after an index update or config change — stale results are never returnedcontextweaver watch watches the filesystem and triggers incremental indexing automatically, with debouncing (500ms by default) and scan de-duplication (no concurrent scans)contextweaver stats CLI (with --json) plus the MCP stats toolpending_marks backlog, missing vector rows, and more — with suggested fixesfiles.content, reducing index size by 30–50%pending/done/aborted persisted, auto-rebuilt on crash recovery# Global install
npm install -g @chiway/contextweaver
pnpm add -g @chiway/contextweaver
# Create the config file (~/.contextweaver/.env)
contextweaver init
cw init
Edit ~/.contextweaver/.env and fill in your API keys:
# Embedding API config (required)
EMBEDDINGS_API_KEY=your-api-key-here EMBEDDINGS_BASE_URL=https://api.siliconflow.cn/v1/embeddings EMBEDDINGS_MODEL=BAAI/bge-m3 EMBEDDINGS_MAX_CONCURRENCY=10 EMBEDDINGS_DIMENSIONS=1024
RERANK_API_KEY=your-api-key-here RERANK_BASE_URL=https://api.siliconflow.cn/v1/rerank RERANK_MODEL=BAAI/bge-reranker-v2-m3 RERANK_TOP_N=20
CW_SEARCH_WVEC=0.6 CW_SEARCH_WLEX=0.4 CW_SEARCH_RERANK_TOP_N=10 CW_SEARCH_MAX_TOTAL_CHARS=48000 CW_SEARCH_VECTOR_TOP_K=80 CW_SEARCH_SMART_MAX_K=8 CW_SEARCH_IMPORT_FILES_PER_SEED=3
# Run from the codebase root
contextweaver index
contextweaver index /path/to/your/project
contextweaver index --force
# Watch for file changes and auto-index incrementally (Ctrl+C to stop)
contextweaver watch
contextweaver watch /path/to/project --debounce 800
watch runs one full incremental scan on startup, then listens to filesystem events; changes trigger a de-duplicated scan within the debounce window, and paths excluded by ignore rules never trigger a scan.
# Semantic search
cw search --information-request "How is the user authentication flow implemented?"
cw search --information-request "Database connection logic" --technical-terms "DatabasePool,Connection"
The following commands are CLI mirrors of MCP tools, with zero Embedding API cost:
# List indexed files (supports glob / language / count filters)
contextweaver list-files --glob "src/**/*.ts" --language typescript --max-results 100
contextweaver definition SearchService --hint-path src/search
contextweaver references handleStats --exclude-definition
# Human-readable stats report
contextweaver stats
contextweaver stats --json
contextweaver stats --path /path/to/project
# Launch the MCP server (for use by Claude and other AI assistants)
contextweaver mcp
# Show LanceDB migration state
contextweaver migrate
contextweaver migrate --reset
contextweaver migrate --path /path/to/project
Add the following to your Claude Desktop config file:
{
"mcpServers": { "contextweaver": { "command": "contextweaver", "args": ["mcp"] } } }
ContextWeaver exposes 5 MCP tools, following a layered design of "semantic retrieval first, structure browsing second":
| Tool | Purpose | Embedding cost |
|---|---|---|
codebase-retrieval | Primary tool: hybrid semantic + exact-match retrieval | Yes |
list-files | List indexed file structure (path/language/size) | No |
find-references | Find heuristic text references to a symbol | No |
get-symbol-definition | Find likely definition blocks for a symbol | No |
stats | Index/search/health statistics | No |
codebase-retrieval Parameters| Parameter | Type | Required | Description |
|---|---|---|---|
repo_path | string | ✅ | Absolute path to the repository root |
information_request | string | ✅ | The semantic intent in natural language |
technical_terms | string[] | ❌ | Exact technical terms (class/function names, etc.) |
mode | string | ❌ | Retrieval profile: quick, balanced, or deep |
include_globs | string[] | ❌ | File glob allowlist applied after retrieval |
exclude_globs | string[] | ❌ | File glob denylist applied after retrieval |
language | string[] | ❌ | Language allowlist applied after retrieval |
max_total_chars | number | ❌ | Per-call output budget in characters |
max_files | number | ❌ | Maximum number of files returned after packing |
max_segments_per_file | number | ❌ | Maximum non-contiguous segments per file |
return_debug | boolean | ❌ | Include debug metadata in structured output |
low_confidence_behavior | string | ❌ | Low-confidence handling: return_top1, return_empty, or return_with_warning |
output_format | string | ❌ | Response format: markdown, json, or both |
list-files Parameters| Parameter | Type | Required | Description |
|---|---|---|---|
repo_path | string | ✅ | Absolute path to the repository root |
glob | string | ❌ | Glob pattern to filter paths |
language | string | ❌ | Language filter (matched against files.language) |
max_results | number | ❌ | Max files to return (default 200) |
find-references Parameters| Parameter | Type | Required | Description |
|---|---|---|---|
repo_path | string | ✅ | Absolute path to the repository root |
symbol | string | ✅ | Exact symbol name |
exclude_definition | boolean | ❌ | Exclude chunks whose breadcrumb tail matches the symbol name |
max_results | number | ❌ | Max references to return (default 50) |
get-symbol-definition Parameters| Parameter | Type | Required | Description |
|---|---|---|---|
repo_path | string | ✅ | Absolute path to the repository root |
symbol | string | ✅ | Exact symbol name to resolve |
| hint_path | string | ❌ | Preferred
冒頭だけを表示しています。続きはリポジトリで読めます