Context7
ส่งคู่มือการใช้ไลบรารีและเฟรมเวิร์กรุ่นล่าสุดให้ AI อ่านก่อนตอบ ช่วยให้โค้ดที่ AI เขียนไม่ใช้คำสั่งเก่าที่เลิกใช้แล้ว
คำอธิบายจากผู้ทำ (ภาษาอังกฤษตามต้นฉบับ)
Token-lean memory for AI agents: a knowledge graph searched cheaply. Drop-in for server-memory.
สามเรื่องนี้ไม่รวมเป็นคะแนนเดียว เพราะความเห็น การวัด และความนิยม เป็นคนละเรื่องกัน
ตัวนี้ยังไม่ได้เรียบเรียงเป็นภาษาไทย ด้านล่างคือข้อเท็จจริงที่เราอ่านจาก registry
เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง
MEMORY_FILE_PATHต้องเตรียมก่อน
คุณใช้แอปไหน
เลือกแอปด้านบน เราจำไว้ให้ ครั้งหน้าปุ่มจะขึ้นว่า “ติดตั้งลง …”
เปิด Claude Desktop → Settings → Developer → Edit Config แล้ววางค่านี้ในไฟล์ claude_desktop_config.json
{
"mcpServers": {
"memory-lean": {
"command": "npx",
"args": [
"-y",
"memory-lean"
],
"env": {
"MEMORY_FILE_PATH": "ใส่ค่าของคุณ"
}
}
}
}พิมพ์คำสั่งนี้ใน Terminal
claude mcp add memory-lean --env MEMORY_FILE_PATH='ใส่ค่าของคุณ' -- npx -y memory-leanเติมค่าที่เว้นว่างไว้ก่อนรัน
วางในไฟล์ .cursor/mcp.json ของโปรเจกต์ หรือ ~/.cursor/mcp.json
{
"mcpServers": {
"memory-lean": {
"command": "npx",
"args": [
"-y",
"memory-lean"
],
"env": {
"MEMORY_FILE_PATH": "ใส่ค่าของคุณ"
}
}
}
}เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง
วางในไฟล์ .vscode/mcp.json ของโปรเจกต์
{
"servers": {
"memory-lean": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"memory-lean"
],
"env": {
"MEMORY_FILE_PATH": "ใส่ค่าของคุณ"
}
}
}
}เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง
ตัวนี้รันในเครื่องคุณ แต่ ChatGPT ต่อได้เฉพาะ server บนอินเทอร์เน็ต ลองเลือกแอปอื่น
ตัวเลือกเก็บในคุกกี้บนเครื่องนี้ ไม่ต้องมีบัญชี
MEMORY_FILE_PATH envค่าตั้งนี้สร้างจากข้อมูลใน registry ของผู้ทำ ถ้าไม่ตรงกับ README ให้เชื่อ README
รันในเครื่องคุณ รายการเครื่องมือจะขึ้นในแอป AI หลังติดตั้ง
เราตรวจจากข้อมูลที่ใครก็เปิดดูได้ ยังไม่ได้อ่านโค้ด ข้อที่ไม่เกี่ยวกับตัวนี้ไม่นับในตัวหาร · ตรวจเมื่อ 6 พ.ย. 2569
ชื่อใน registry ยืนยันด้วยบัญชี GitHub zamansheikh ซึ่งเป็นเจ้าของ repo
ยังไม่ได้อ่านข้อมูล repo จาก GitHub
ยังไม่ได้อ่านข้อมูล repo จาก GitHub
ตัวนี้รันบนเครื่องคุณ ไม่มี endpoint บนอินเทอร์เน็ต
ตัวนี้รันบนเครื่อง ใช้ค่าที่ตั้งในเครื่องแทน
รันในเครื่องคุณ เราอ่านรายการเครื่องมือได้เฉพาะตัวที่มี endpoint บนอินเทอร์เน็ต
เทียบกับทุก server ที่ยังใช้งานในหมวดนี้ทั้งทะเบียน ดาวนับเฉพาะเมื่อผู้ลงทะเบียนเป็นเจ้าของ repo
จากการตรวจเบื้องต้นของเรา ผ่าน 1 จาก 1 ข้อที่ตรวจได้ เรายังไม่ได้อ่านโค้ด ก่อนใส่กุญแจหรือ token ให้ดูว่า server ขอสิทธิ์อะไร และเลือกกุญแจที่ทำได้เท่าที่จำเป็น
registry ไม่ได้ระบุว่าต้องใช้กุญแจ แต่บางตัวจะขอให้ล็อกอินตอนใช้ครั้งแรก
รันบนเครื่องของคุณ โปรแกรม AI จะเปิด server ขึ้นมาเองเมื่อใช้ ข้อมูลไม่ต้องผ่านเซิร์ฟเวอร์ของผู้ทำ (ยกเว้นตัวที่ไปเรียกบริการออนไลน์ต่อ)
repo บน GitHub มีการแก้โค้ดล่าสุด – และส่งรุ่นล่าสุด (1.5.0) เข้า registry 21 วันที่ผ่านมา
โปรแกรมที่รองรับ 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 รูปภาพ และสคริปต์ออกแล้ว ลิงก์จะพาออกนอกเว็บ
memory-lean
Long-term memory for AI coding agents that doesn't burn the context window.
A knowledge graph your agent searches cheaply, and a web UI where you can see and edit all of it.
Quick start · Web UI · How it works · Tools · Setup for 12 agents · Contributing
memory-lean is an MCP server that gives Claude Code, Codex, Cursor, MiMo Code and any other MCP client a memory that lasts between sessions: which projects exist, what depends on what, which version shipped, what is still pending, and which rules were learned the hard way. It is a drop-in replacement for the reference memory server (@modelcontextprotocol/server-memory), with the same file and tool names, but its answers are about 40 times smaller.
About 40× smaller answers. Search returns a ranked list of names and the lines that matched, not every entity in full, so the agent can afford to check its memory before every task.
A web UI for people. See the whole graph grouped by type, follow relations, and add, edit or delete anything. Agent writes show up live.
Drop-in replacement. Same memory.jsonl file and the same nine tools as the reference server. Switch in, and switch back whenever you like.
Works with every agent. Copy-paste setup for Claude Code, MiMo Code, Codex, Cursor, Copilot, Gemini CLI, Zed, JetBrains and more, plus the instructions that teach the agent to use it.
Stays small by itself. Short facts, a cap per entity, and an archive for the overflow, so the graph never grows into a wall of text.
Private and safe. Plain local files, daily backups, a write lock for parallel sessions, and no network access. One server file, zero dependencies.
Measured on a real graph of 237 entities, 355 relations and 1,160 facts (tokens ≈ characters ÷ 4):
| Call | Reference server | memory-lean | |
|---|---|---|---|
read_graph | ~77,800 tokens | ~2,000 tokens | 40× smaller |
search_nodes, average of 5 common words | ~31,000 tokens | ~770 tokens | 40× smaller |
A narrow search that matches one or two entities saves less, because there is little to trim. To measure your own graph, run node tools/bench.mjs from a clone; it is read-only and prints sizes, never content.
Claude Code: install the plugin. It adds the server, the instructions as a skill, a short reminder at the start of each session, and /memory-ui.
/plugin marketplace add zamansheikh/memory-lean
/plugin install memory-lean@memory-lean
Any other agent: add the server to its MCP config, then give it the instructions.
{
"mcpServers": { "memory": { "command": "npx", "args": ["-y", "memory-lean"] } } }
npx -y memory-lean --protocol >> AGENTS.md # into the rules file your agent reads
Just looking? Open the web UI on a made-up example graph:
npx -y memory-lean --ui --demo
Setup for each agent
| Agent | Server config | Instructions |
|---|---|---|
| Claude Code | plugin | included in the plugin |
| Xiaomi MiMo Code | mimocode.jsonc | skill or AGENTS.md |
| opencode | opencode.json | AGENTS.md |
| OpenAI Codex CLI | codex mcp add | AGENTS.md |
| Cursor | .cursor/mcp.json | AGENTS.md or a rule |
| VS Code (Copilot) | .vscode/mcp.json | copilot-instructions.md |
| Gemini CLI | settings.json | GEMINI.md |
| Windsurf | mcp_config.json | a rule |
| Cline | cline_mcp_settings.json | .clinerules/ |
| Zed | settings.json | AGENTS.md or .rules |
| JetBrains IDEs | AI Assistant settings | a rule or guidelines |
| Claude Desktop | claude_desktop_config.json | project instructions |
The graph is created on the first write at ~/.claude/memory-graph/memory.jsonl, whichever agent writes it, so all your agents share one memory. Set MEMORY_FILE_PATH to keep it somewhere else.
npx -y memory-lean --ui
This opens your memory in the browser. Everything an agent can do, you can do here:
Follow the connections. Select an entity to see its facts and relations. Find anything. Search names, types and facts at once.
Edit in place. With the same 300-character limit the agents have. Light or dark. It follows your system, or pick one.
The page runs on your machine only (127.0.0.1) and needs the one-time key in the link it prints, so other websites cannot read or change your memory. Nothing is uploaded anywhere.
The reference server answers a search with every matching entity in full, as pretty-printed JSON. memory-lean answers with a ranked list of names and the lines that matched:
> search_nodes { "query": "deploy" }
57 match "deploy", top 10 shown (narrow the query or raise limit). open_nodes for full entities.
The agent then opens only what it needs:
> open_nodes { "names": ["shop-backend"] }
shop-app -talks_to-> shop-backend PENDING shop-backend 2.4.0 -blocks-> shop-app
| Limit | What it means |
|---|---|
| Small answers | search_nodes returns at most 10 names with snippets, read_graph returns an index of names, and only open_nodes returns full entities. |
| Short facts | An observation longer than 300 characters is rejected, with a message telling the agent to split it or put the detail in the repo. |
| A cap per entity | An entity keeps 15 observations. Past that, the oldest dated ones move to archive/ .md. Nothing is deleted: they can be listed and restored, and undated facts (the identity facts) always stay. |
| Search that narrows | Every word must match somewhere in the entity, so adding a word narrows the result. The reference server looks for the query as one exact phrase. |
| Safeguard | What it means |
|---|---|
| Safe to share | Writers take a lock file, so several agent sessions can use one graph without overwriting each other. Every write replaces the file atomically. |
| Daily backups | A copy goes to backups/ once a day; the last 7 are kept. |
| Damaged lines are kept | A line that cannot be read is moved to memory.jsonl.unreadable on the next write and reported, never silently dropped. |
| Plain files | The graph is JSON lines, archives are Markdown, backups are copies. You can read, grep and edit all of it by hand. |
| Tool | What it returns |
|---|---|
search_nodes | Ranked list of entity names with counts and up to two matching snippets each. Every word must match the name, type, an observation, or the type of a relation touching the entity. |
open_nodes | The full entities you name, as compact text, with every relation touching them and their archive count. Unknown names come back with "did you mean" suggestions. |
read_graph | An index: entity names grouped by type, with observation counts. Never the observations. |
create_entities | Creates entities; existing names are skipped. |
create_relations | Creates relations between existing entities; duplicates are skipped. |
add_observations | Adds facts to an entity, enforcing the length limit and the per-entity cap. |
delete_observations | Removes observations by exact text. |
delete_relations | Removes specific relations. |
delete_entities | Removes entities and every relation touching them. |
rename_entity | Renames an entity, keeping its observations, relations and archive. *Not in the reference server.* |
| archived_observations | Lists what was archived for an entity, optionally filtered, and restores chosen fa
ตัดมาแค่ช่วงต้น อ่านต่อใน repo