Context7
ส่งคู่มือการใช้ไลบรารีและเฟรมเวิร์กรุ่นล่าสุดให้ AI อ่านก่อนตอบ ช่วยให้โค้ดที่ AI เขียนไม่ใช้คำสั่งเก่าที่เลิกใช้แล้ว
คำอธิบายจากผู้ทำ (ภาษาอังกฤษตามต้นฉบับ)
Persistent memory for AI agents: one brain shared across Claude, Cursor, Codex and more.
สามเรื่องนี้ไม่รวมเป็นคะแนนเดียว เพราะความเห็น การวัด และความนิยม เป็นคนละเรื่องกัน
ตัวนี้ยังไม่ได้เรียบเรียงเป็นภาษาไทย ด้านล่างคือข้อเท็จจริงที่เราอ่านจาก registry
เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง
ต้องเตรียมก่อน
คุณใช้แอปไหน
เลือกแอปด้านบน เราจำไว้ให้ ครั้งหน้าปุ่มจะขึ้นว่า “ติดตั้งลง …”
ใช้ได้ทั้ง Claude บนเว็บ แอปคอมพิวเตอร์ และมือถือ:
https://mcp.brainmemory.ai/mcpพิมพ์คำสั่งนี้ใน Terminal
claude mcp add --transport http brain https://mcp.brainmemory.ai/mcpวางในไฟล์ .cursor/mcp.json ของโปรเจกต์ หรือ ~/.cursor/mcp.json
{
"mcpServers": {
"brain": {
"url": "https://mcp.brainmemory.ai/mcp"
}
}
}เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง
วางในไฟล์ .vscode/mcp.json ของโปรเจกต์
{
"servers": {
"brain": {
"type": "http",
"url": "https://mcp.brainmemory.ai/mcp"
}
}
}เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง
ChatGPT ต่อได้เฉพาะ server ที่อยู่บนอินเทอร์เน็ต:
https://mcp.brainmemory.ai/mcpชื่อเมนูอาจต่างกันเล็กน้อยตามแพ็กเกจและรุ่นของแอป
ตัวเลือกเก็บในคุกกี้บนเครื่องนี้ ไม่ต้องมีบัญชี
ค่าตั้งนี้สร้างจากข้อมูลใน registry ของผู้ทำ ถ้าไม่ตรงกับ README ให้เชื่อ README
server ให้ล็อกอินก่อนจึงจะแสดงรายการเครื่องมือ
เราตรวจจากข้อมูลที่ใครก็เปิดดูได้ ยังไม่ได้อ่านโค้ด ข้อที่ไม่เกี่ยวกับตัวนี้ไม่นับในตัวหาร · ตรวจเมื่อ 7 พ.ย. 2569
ผู้ลงทะเบียน (brainmemory.ai) ไม่ใช่เจ้าของ repo (omelas-tech) อาจเป็นคนอื่นที่นำมาลงต่อ
ยังไม่ได้อ่านข้อมูล repo จาก GitHub
ยังไม่ได้อ่านข้อมูล repo จาก GitHub
ตอบกลับใน 51 ms (HTTP 401)
ประกาศวิธีล็อกอินแบบ OAuth ให้โปรแกรม AI พาไปล็อกอินเอง
ยังไม่ได้ตรวจ เราอ่านรายการเครื่องมือตอนตรวจ endpoint
เทียบกับทุก server ที่ยังใช้งานในหมวดนี้ทั้งทะเบียน ดาวนับเฉพาะเมื่อผู้ลงทะเบียนเป็นเจ้าของ repo
จากการตรวจเบื้องต้นของเรา ผ่าน 2 จาก 3 ข้อที่ตรวจได้ เรายังไม่ได้อ่านโค้ด ก่อนใส่กุญแจหรือ token ให้ดูว่า server ขอสิทธิ์อะไร และเลือกกุญแจที่ทำได้เท่าที่จำเป็น
registry ไม่ได้ระบุว่าต้องใช้กุญแจ แต่บางตัวจะขอให้ล็อกอินตอนใช้ครั้งแรก
รันบนคลาวด์ของผู้ทำ ต่อผ่านอินเทอร์เน็ตได้เลย ไม่ต้องลงโปรแกรม แต่ข้อมูลที่ส่งให้จะผ่านเซิร์ฟเวอร์ของผู้ทำ
repo บน GitHub มีการแก้โค้ดล่าสุด – และส่งรุ่นล่าสุด (0.5.1) เข้า registry วันนี้
โปรแกรมที่รองรับ MCP เช่น Claude Desktop, Claude Code, Cursor และ VS Code ตัวนี้ต่อผ่าน URL จึงใช้กับโปรแกรมที่รับ remote MCP ได้ เช่น ChatGPT ที่เปิดโหมดนักพัฒนา
ในหมวดเดียวกันมี 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 รูปภาพ และสคริปต์ออกแล้ว ลิงก์จะพาออกนอกเว็บ
The Brain Memory Claude connector — a remote MCP server that exposes the brain's scored recall to Claude (web / desktop / iOS / Cowork). Built with the official @modelcontextprotocol/sdk per Anthropic's build-mcp-server guidance. Design rationale lives in brain-cloud/docs/connector-architecture.md.
It lives in this repo (not the npm package — excluded from package.json files, like website/) so it reuses the real recall engine in ../src directly. One brain, one engine, two faces.
Deployed at `https://mcp.brainmemory.ai/mcp` (Node service on the VPS beside brain-cloud; systemd + nginx + certbot — see deploy/). Added at claude.ai and verified on Claude web + iPhone. Tools: brain_recall, brain_status (read) + brain_memorize, brain_pin, brain_unpin, brain_forget, brain_verify (write — writes sync back to brain-cloud; hosts gate them behind confirmation) + brain_use (switch between the account's brains).
Two things to know in production:
CONNECTOR_REFRESH_TTL_MS), so an active user never sees the login page. Each refresh also renews the Firebase credential server-side (securetoken API, from the refresh token captured at login) — so sync-back and TTL re-pulls keep working far past the old ~1 h Firebase ID-token window. Grants + the DCR client registry persist under CONNECTOR_STATE_DIR (systemd StateDirectory; Firebase refresh tokens encrypted at rest via CONNECTOR_STATE_KEY, our tokens stored hashed), so deploys/restarts no longer log users out. Local CLI memories (brain cloud push) reach an active session automatically via a TTL re-pull (CONNECTOR_REPULL_TTL_MS, default 120s) — it re-pulls only when the cloud checksum changed and never over an unsynced local write.npm test typechecks and proves the whole path end-to-end in one server — the complete OAuth 2.1 handshake through to real scored recall (token request is form-urlencoded, matching real clients):
① unauthenticated MCP call → 401 + WWW-Authenticate (RFC 9728)
② discovery → AS metadata (RFC 8414), PKCE S256 ③ Dynamic Client Registration (RFC 7591) ④ authorize → code (iss + state validated, RFC 9207) ⑤ token → audience-bound Bearer (PKCE verified, RFC 8707) ⑥ MCP initialize + tools/list → [brain_recall, brain_status, brain_use, brain_memorize, brain_pin, brain_unpin, brain_forget, brain_verify] (official SDK) ⑦ brain_recall(query) → the brain's REAL scored results (relevance + decayed strength + spreading activation), identical to the CLI
The engine bridge (src/engine.ts) runs the repo's bin/recall.js with BRAIN_DIR pointed at the authenticated user's brain working copy — so the connector's scoring is byte-for-byte the CLI's, with zero reimplementation. (BRAIN_DIR is the same override the CLI ships.)
npm install
npm test # end-to-end Phase 1 proof npm start # serve MCP on http://localhost:8788
| Tool | Kind | Description |
|---|---|---|
brain_recall | read (readOnlyHint) | Ranked recall for a query, scored by the brain engine. |
brain_status | read (readOnlyHint) | Memory count + last-updated for the user's brain, and the account's brains with the one in use marked active. |
brain_use | write (idempotentHint) | Switch which of the account's brains the connector serves, by name or id. Remembered across sessions; copies nothing between brains. |
brain_memorize | write (destructiveHint) | Store the explicit content provided (never the conversation); immediately recallable. |
brain_pin / brain_unpin | write (destructiveHint, idempotentHint) | Move a memory into or out of the always-present tier. |
brain_forget | write (destructiveHint) | Archive a memory (recoverable — moved to _archived/, not hard-deleted). |
brain_verify | write (destructiveHint) | List memories pending verification; approve them, or reject them into the archive. |
Writes reuse the deterministic CLIs (memorize.js / pin.js / unpin.js / forget.js) and then syncBack() to brain-cloud.
One brain ↔ one Google account. The connector has no idea which laptop you're on — it serves the brain belonging to whatever Firebase (Google) identity completes the sign-in. The verified uid maps deterministically to a brain user (resolveBrainUserId), and that user's canonical brain is pulled from brain-cloud: the brain the user chose with brain_use, or else the account's oldest. So the rule is simple: connect with the same Google account your CLI's `brain cloud` syncs to, and use the same brain (brain cloud brains shows which one the CLI is linked to).
To keep that rule from failing silently, ensureUserBrain returns an identity signal that the tools surface to you:
| Situation | identity.status | What you see |
|---|---|---|
| Account has no brain in Brain Cloud | no-cloud-brain | A note (in brain_status, and in brain_recall when it finds nothing) telling you this account is empty — most likely you signed in with the wrong Google account, or you're brand new. |
| Account has exactly one brain | ok | Nothing — the common, unambiguous case. |
| Account has several brains | multiple-brains | A note naming the brain in use. brain_status lists them all; brain_use switches, and the choice (kept with the OAuth state, per user) holds for later sessions. A chosen brain that is later deleted falls back to the oldest. |
This is *guidance, not enforcement* — a genuinely new user with no brain yet still gets a usable empty brain. Account-linking (letting one Google identity span several brains at once) is deliberately deferred; choosing one brain at a time is brain_use.
Two layers — both real now:
src/oauth.ts): authorize / token / register / metadata, PKCE S256, RFC 8707 audience binding, RFC 9207 iss. Tokens mint into src/auth.ts's store; the /mcp guard validates them (incl. audience).src/firebase.ts): /authorize bounces the user through Firebase login (the same project brain-cloud uses). The connector verifies the ID token server-side and secret-free — RS256 against Google's public certs, checking aud/iss/ exp — so it needs only the public project config, no service-account key. The verified uid maps to the brain user, then the OAuth code is minted.If FIREBASE_* env is not set, /authorize falls back to a fixed dev user (STUB:FIREBASE) so the headless test runs without a browser.
cp .env.example .env # fill in FIREBASE_API_KEY / AUTH_DOMAIN / PROJECT_ID
npm start # http://localhost:8788
Signing in through /authorize shows the branded consent/login page and, on success, resolves your verified firebase_uid → brain_user_id → brain_dir — which is how the connector picks whose brain to serve. (localhost is an authorized Firebase domain by default, so popup sign-in works locally.)
src/store.ts)ensureUserBrain({ userId, brainDir, idToken }) populates the user's brain working copy from a pluggable provider, then the engine recalls over it. Providers (via CONNECTOR_STORE, else inferred):
{brainID}.tar.gz from BRAIN_CLOUD_API_URL (default https://api.brainmemory.ai) using their Firebase ID token (brain-cloud's middleware accepts it directly), then tar xzf into brainDir. Refreshed at each login.brainDir → $DEV_LOCAL_BRAIN (your live ~/.brain), so your machine serves your real brain through the connector.Always graceful: if the brain is still missing, it empty-inits a valid (recall-safe) brain.
The brain-cloud provider speaks the store contract, so it works against any store that implements it, including a self-hosted brain-store. Sync-back is conditional (If-Match): if another device pushed first, the connector discards its working copy, starts again from the store's brain, re-applies the write and pushes again, so nobody's memories are overwritten.
src/identity.ts)Who is logging in, and what the connector presents to the store for them, sits behind one interface. Select with CONNECTOR_IDP:
FIREBASE_* is set) — Google sign-in. The store credential is the Firebase ID token, renewed from the Firebase refresh token.brain-store user add); the store decides who the user is. Requires BRAIN_CLOUD_API_URL to be set explicitly, so a token can never be sent to the hosted default by accident. Rotating or removing the user at the store ends their sessions at the next silent renewal./authorize sends the browser to the issuer (authorization code + PKCE + nonce) and the issuer returns it to /oidc/callback. The ID token is the store credential, renewed from the issuer's refresh token. Needs OIDC_ISSUER, OIDC_CLIENT_ID and an explicit BRAIN_CLOUD_API_URL. Token verification is the store's own (store/lib/oidc.js), so the two can never disagree about what a valid token is. An issuer outage answers 503 and keeps the login; a revocation ends it.With no provider configured the connector refuses to start in production. When the reverse proxy is not on loopback (another container, say), name it with CONNECTOR_TRUST_PROXY, for example uniquelocal; true is refused.
brain-cloud/docs/connector-architecture.md §7.