Context7
ส่งคู่มือการใช้ไลบรารีและเฟรมเวิร์กรุ่นล่าสุดให้ AI อ่านก่อนตอบ ช่วยให้โค้ดที่ AI เขียนไม่ใช้คำสั่งเก่าที่เลิกใช้แล้ว
คำอธิบายจากผู้ทำ (ภาษาอังกฤษตามต้นฉบับ)
Semantic code retrieval engine with hybrid search, context expansion, and 40+ language support.
สามเรื่องนี้ไม่รวมเป็นคะแนนเดียว เพราะความเห็น การวัด และความนิยม เป็นคนละเรื่องกัน
ตัวนี้ยังไม่ได้เรียบเรียงเป็นภาษาไทย ด้านล่างคือข้อเท็จจริงที่เราอ่านจาก registry
เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง
ต้องเตรียมก่อน
คุณใช้แอปไหน
เลือกแอปด้านบน เราจำไว้ให้ ครั้งหน้าปุ่มจะขึ้นว่า “ติดตั้งลง …”
เปิด Claude Desktop → Settings → Developer → Edit Config แล้ววางค่านี้ในไฟล์ claude_desktop_config.json
{
"mcpServers": {
"contextweaver": {
"command": "npx",
"args": [
"-y",
"@chiway/contextweaver"
]
}
}
}พิมพ์คำสั่งนี้ใน Terminal
claude mcp add contextweaver -- npx -y @chiway/contextweaverวางในไฟล์ .cursor/mcp.json ของโปรเจกต์ หรือ ~/.cursor/mcp.json
{
"mcpServers": {
"contextweaver": {
"command": "npx",
"args": [
"-y",
"@chiway/contextweaver"
]
}
}
}เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง
วางในไฟล์ .vscode/mcp.json ของโปรเจกต์
{
"servers": {
"contextweaver": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@chiway/contextweaver"
]
}
}
}เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง
ตัวนี้รันในเครื่องคุณ แต่ ChatGPT ต่อได้เฉพาะ server บนอินเทอร์เน็ต ลองเลือกแอปอื่น
ตัวเลือกเก็บในคุกกี้บนเครื่องนี้ ไม่ต้องมีบัญชี
ค่าตั้งนี้สร้างจากข้อมูลใน registry ของผู้ทำ ถ้าไม่ตรงกับ README ให้เชื่อ README
รันในเครื่องคุณ รายการเครื่องมือจะขึ้นในแอป AI หลังติดตั้ง
เราตรวจจากข้อมูลที่ใครก็เปิดดูได้ ยังไม่ได้อ่านโค้ด ข้อที่ไม่เกี่ยวกับตัวนี้ไม่นับในตัวหาร · ตรวจเมื่อ 6 พ.ย. 2569
ชื่อใน registry ยืนยันด้วยบัญชี GitHub wchiway ซึ่งเป็นเจ้าของ repo
ยังไม่ได้อ่านข้อมูล repo จาก GitHub
ยังไม่ได้อ่านข้อมูล repo จาก GitHub
ตัวนี้รันบนเครื่องคุณ ไม่มี endpoint บนอินเทอร์เน็ต
ตัวนี้รันบนเครื่อง ใช้ค่าที่ตั้งในเครื่องแทน
รันในเครื่องคุณ เราอ่านรายการเครื่องมือได้เฉพาะตัวที่มี endpoint บนอินเทอร์เน็ต
เทียบกับทุก server ที่ยังใช้งานในหมวดนี้ทั้งทะเบียน ดาวนับเฉพาะเมื่อผู้ลงทะเบียนเป็นเจ้าของ repo
จากการตรวจเบื้องต้นของเรา ผ่าน 1 จาก 1 ข้อที่ตรวจได้ เรายังไม่ได้อ่านโค้ด ก่อนใส่กุญแจหรือ token ให้ดูว่า server ขอสิทธิ์อะไร และเลือกกุญแจที่ทำได้เท่าที่จำเป็น
registry ไม่ได้ระบุว่าต้องใช้กุญแจ แต่บางตัวจะขอให้ล็อกอินตอนใช้ครั้งแรก
รันบนเครื่องของคุณ โปรแกรม AI จะเปิด server ขึ้นมาเองเมื่อใช้ ข้อมูลไม่ต้องผ่านเซิร์ฟเวอร์ของผู้ทำ (ยกเว้นตัวที่ไปเรียกบริการออนไลน์ต่อ)
repo บน GitHub มีการแก้โค้ดล่าสุด – และส่งรุ่นล่าสุด (1.5.4) เข้า registry 5 เดือนที่ผ่านมา
โปรแกรมที่รองรับ MCP เช่น Claude Desktop, Claude Code, Cursor และ VS Code ตัวนี้ต้องมี Node.js ในเครื่องด้วย
ในหมวดเดียวกันมี Context7, Codebase Memory, Exa
server หมวดเดียวกันจากผู้ทำคนอื่น เรียงตามดาว
อ่านการ์ด:★ ดาว GitHubiสามเสา: รีวิว · ผลตรวจ · การใช้งานiอัปเดต = วันที่ส่งรุ่นล่าสุดเข้า registryi
ส่งคู่มือการใช้ไลบรารีและเฟรมเวิร์กรุ่นล่าสุดให้ AI อ่านก่อนตอบ ช่วยให้โค้ดที่ AI เขียนไม่ใช้คำสั่งเก่าที่เลิกใช้แล้ว
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.
ส่วนนี้คัดจาก repo ของผู้ทำตามต้นฉบับ 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
ตัดมาแค่ช่วงต้น อ่านต่อใน repo