Context7
ส่งคู่มือการใช้ไลบรารีและเฟรมเวิร์กรุ่นล่าสุดให้ AI อ่านก่อนตอบ ช่วยให้โค้ดที่ AI เขียนไม่ใช้คำสั่งเก่าที่เลิกใช้แล้ว
คำอธิบายจากผู้ทำ (ภาษาอังกฤษตามต้นฉบับ)
Validate, search, graph, and safely author local Open Knowledge Format bundles.
สามเรื่องนี้ไม่รวมเป็นคะแนนเดียว เพราะความเห็น การวัด และความนิยม เป็นคนละเรื่องกัน
ตัวนี้ยังไม่ได้เรียบเรียงเป็นภาษาไทย ด้านล่างคือข้อเท็จจริงที่เราอ่านจาก registry
เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง
ต้องเตรียมก่อน
คุณใช้แอปไหน
เลือกแอปด้านบน เราจำไว้ให้ ครั้งหน้าปุ่มจะขึ้นว่า “ติดตั้งลง …”
เปิด Claude Desktop → Settings → Developer → Edit Config แล้ววางค่านี้ในไฟล์ claude_desktop_config.json
{
"mcpServers": {
"okf": {
"command": "npx",
"args": [
"-y",
"@mfdaves/okf-mcp",
"--project",
"ใส่ค่าของคุณ",
"mcp"
]
}
}
}พิมพ์คำสั่งนี้ใน Terminal
claude mcp add okf -- npx -y @mfdaves/okf-mcp --project 'ใส่ค่าของคุณ' mcpตัวนี้ต้องใส่ค่าในคำสั่งเปิดเอง ให้คัดลอกค่าตั้งแล้วเติมค่า
วางในไฟล์ .cursor/mcp.json ของโปรเจกต์ หรือ ~/.cursor/mcp.json
{
"mcpServers": {
"okf": {
"command": "npx",
"args": [
"-y",
"@mfdaves/okf-mcp",
"--project",
"ใส่ค่าของคุณ",
"mcp"
]
}
}
}เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง
ตัวนี้ต้องใส่ค่าในคำสั่งเปิดเอง ให้คัดลอกค่าตั้งแล้วเติมค่า
วางในไฟล์ .vscode/mcp.json ของโปรเจกต์
{
"servers": {
"okf": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@mfdaves/okf-mcp",
"--project",
"ใส่ค่าของคุณ",
"mcp"
]
}
}
}เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง
ตัวนี้รันในเครื่องคุณ แต่ ChatGPT ต่อได้เฉพาะ server บนอินเทอร์เน็ต ลองเลือกแอปอื่น
ตัวเลือกเก็บในคุกกี้บนเครื่องนี้ ไม่ต้องมีบัญชี
ค่าตั้งนี้สร้างจากข้อมูลใน registry ของผู้ทำ ถ้าไม่ตรงกับ README ให้เชื่อ README
รันในเครื่องคุณ รายการเครื่องมือจะขึ้นในแอป AI หลังติดตั้ง
เราตรวจจากข้อมูลที่ใครก็เปิดดูได้ ยังไม่ได้อ่านโค้ด ข้อที่ไม่เกี่ยวกับตัวนี้ไม่นับในตัวหาร · ตรวจเมื่อ 7 พ.ย. 2569
ชื่อใน registry ยืนยันด้วยบัญชี GitHub mfdaves ซึ่งเป็นเจ้าของ repo
ยังไม่ได้อ่านข้อมูล repo จาก GitHub
ยังไม่ได้อ่านข้อมูล repo จาก GitHub
ตัวนี้รันบนเครื่องคุณ ไม่มี endpoint บนอินเทอร์เน็ต
ตัวนี้รันบนเครื่อง ใช้ค่าที่ตั้งในเครื่องแทน
รันในเครื่องคุณ เราอ่านรายการเครื่องมือได้เฉพาะตัวที่มี endpoint บนอินเทอร์เน็ต
เทียบกับทุก server ที่ยังใช้งานในหมวดนี้ทั้งทะเบียน ดาวนับเฉพาะเมื่อผู้ลงทะเบียนเป็นเจ้าของ repo
จากการตรวจเบื้องต้นของเรา ผ่าน 1 จาก 1 ข้อที่ตรวจได้ เรายังไม่ได้อ่านโค้ด ก่อนใส่กุญแจหรือ token ให้ดูว่า server ขอสิทธิ์อะไร และเลือกกุญแจที่ทำได้เท่าที่จำเป็น
registry ไม่ได้ระบุว่าต้องใช้กุญแจ แต่บางตัวจะขอให้ล็อกอินตอนใช้ครั้งแรก
รันบนเครื่องของคุณ โปรแกรม AI จะเปิด server ขึ้นมาเองเมื่อใช้ ข้อมูลไม่ต้องผ่านเซิร์ฟเวอร์ของผู้ทำ (ยกเว้นตัวที่ไปเรียกบริการออนไลน์ต่อ)
repo บน GitHub มีการแก้โค้ดล่าสุด – และส่งรุ่นล่าสุด (0.3.3) เข้า registry 4 เดือนที่ผ่านมา
โปรแกรมที่รองรับ 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 รูปภาพ และสคริปต์ออกแล้ว ลิงก์จะพาออกนอกเว็บ
okf-mcp publishes Open Knowledge Format v0.2 from the systems that already hold the knowledge, and serves the result to agents. It is a local-first consumer, validator, graph index, CLI, and MCP server.
The part that is hard is writing to a catalog safely. A configured producer reads an external source and returns a candidate bundle; okf-mcp validates it, then publishes it under an ownership manifest that records exactly which files it owns. Hand-authored content is never adopted, a source that did not change rewrites nothing, and no producer output escapes its bundle. @mfdaves/okf-postgres reads PostgreSQL catalogs this way without reading a single table row.
Reading is the ordinary half. It consumes an OKF bundle directory of Markdown files with YAML frontmatter. An optional workspace mode can federate several bundles. Concepts are exposed through CLI commands and MCP resources and tools for validation, structured search, graph navigation, provenance inspection, and proposal-based authoring.
The core intentionally has no database, embeddings, build step, or hosted-service dependency. It uses js-yaml for safe YAML, CommonMark for Markdown structure, MiniSearch for in-memory BM25+ text retrieval, and the official Model Context Protocol TypeScript SDK v2 for stdio MCP. Local root mode makes no network calls. Optional remote loading fetches public Markdown concepts and only their explicitly referenced inert assets from GitHub. Nothing in the v0.2 computation support executes code or attests a receipt.
OKF v0.2 intentionally specifies a portable file format, not a serving or query runtime. okf-mcp keeps that boundary explicit:
| Area | Official OKF v0.2 | okf-mcp behavior |
|---|---|---|
| Bundle and identity | A directory tree of Markdown files; a Concept ID is its bundle-relative path without .md | --root maps directly to one bundle; okf:// is an optional workspace locator, not the portable Concept ID |
| Concept metadata | Required type; recommended title, description, resource, and tags; unknown keys are allowed | Preserves extension fields and unknown types while reporting normative conformance separately from workspace policy |
| Provenance and lifecycle | sources, usage_window, generated, verified, status, and stale_after | Normalizes these fields for search, provenance traversal, trust tiers, and deterministic freshness checks |
| References | Markdown links and path-valued resource, sources[].resource, computation, executor.resource, and attester.resource fields | Builds graph edges and bounded inert asset snapshots without executing or implicitly fetching referenced code |
| Attested Computation | Defines contract fields and an informative consumer flow while deferring runtime wire protocols and attester packaging | Statically inspects contracts and digests, checks declared parameter and receipt field names, and never executes or claims attestation |
| v0.1 compatibility | Allows timestamp fallback when the whole generated mapping is absent and # Citations fallback when the sources key is absent | Consumes both forms and adds review-only migration checks and proposals |
The following are okf-mcp extensions rather than requirements of the format:
okf.project.yaml workspaces and typed relationsid, aliases, and okf:// locatorsstrictLinksNode 22 or newer is required.
Install from the GitHub release:
git clone --branch v0.12.0-rc.1 https://github.com/mfdaves/okf-mcp.git
cd okf-mcp npm ci node bin/okf-mcp.js --root ./path/to/okf validate
Pin the published version for reproducible use:
npx -y @mfdaves/okf-mcp@0.12.0-rc.1 --version
npx -y @mfdaves/okf-mcp@0.12.0-rc.1 --root ./path/to/okf validate
For a persistent installation:
npm install --global @mfdaves/okf-mcp@0.12.0-rc.1
okf --version okf --root ./path/to/okf validate okf-mcp --root ./path/to/okf mcp
To work from the current source branch:
git clone https://github.com/mfdaves/okf-mcp.git
cd okf-mcp npm ci npm test node bin/okf-mcp.js --version
--root accepts one local OKF bundle directory and is the recommended okf-mcp interface for a single bundle. The portable identity of each concept is its extensionless path inside that root.
--bundle accepts either a path or id=path. Multiple flags remain supported for compatibility. --project and its bundles: list are an optional okf-mcp federation/authoring extension, not part of OKF v0.2.
--remote-bundle accepts id=https://github.com/ / /tree/ / . It fetches public Markdown first, then only bundle-local files explicitly named by standard v0.2 resource fields. Remote content remains read-only and inert.
--inspect prints a compact graph summary and exits. Without --inspect and without an explicit command, the process starts a stdio MCP server.
The package exposes both okf and okf-mcp binaries when installed. Without an explicit source, the CLI first discovers the nearest root index.md declaring okf_version; nearest-project discovery remains a compatibility fallback.
CLI exit statuses are 0 for success, 1 for validation or operational failure, and 2 for invalid usage. Unknown options are rejected.
This repository publishes a self-describing OKF bundle for the product, its runtime boundaries, interfaces, authoring workflows, and safety policy. Its portable entry Concept ID is overview/okf-mcp; okf://okf-mcp/overview/okf-mcp remains the workspace/MCP resource locator.
Validate and query the bundled reference from a checkout or installed package:
okf --root okf/okf-mcp validate
okf --root okf/okf-mcp search "proposal" okf --root okf/okf-mcp concept overview/okf-mcp
Load the reference bundle directly from the current source branch:
okf --remote-bundle okf-mcp=https://github.com/mfdaves/okf-mcp/tree/main/okf/okf-mcp --inspect
The published v0.8.0 tag retains its original okf/bundles/okf-mcp path. The shorter okf/okf-mcp path was prepared in the unpublished 0.8.1 maintenance checkpoint and ships with v0.9.0; the immutable v0.8.0 release remains unchanged.
The @mfdaves/okf-mcp npm package includes both okf.project.yaml and the complete reference bundle.
Use okf.project.yaml only when one process must federate multiple roots, configure generators or external metadata producers, or enforce a project-wide relation vocabulary:
project: Example
strictLinks: false bundles:
relationTypes:
remoteBundles:
plugins:
producers:
Run project commands:
okf --project okf.project.yaml validate
okf --project okf.project.yaml search "orders" okf --project okf.project.yaml graph mermaid okf --project okf.project.yaml generate okf --project okf.project.yaml producer list okf --project okf.project.yaml producer preview main-database okf --project okf.project.yaml producer run main-database --write --actor process:nightly-refresh okf --project okf.project.yaml mcp okf --project okf.project.yaml mcp --authoring okf --project okf.project.yaml mcp --allow-remote-tool OKF_WRITE_TOKEN=change-me okf --project okf.project.yaml serve okf --remote-bundle shared=https://github.com/example/okf-atlas/tree/main/bundles/shared --inspect
Commands:
mcpvalidategraph [json|dot|mermaid]search concept neighbors paths provenance edge-kindscomputation inspect|prepare|check-receiptasset source migrate check|previewgenerateproducer list|preview|runserveProducers are separate from the built-in plugins: generators. A producer reads metadata from an external source and returns an in-memory candidate OKF bundle; okf-mcp validates and publishes that candidate. Install each producer package alongside the project, then allowlist its exact bare package name in the trusted project configuration. MCP callers can select a configured producer but cannot replace its package, configuration, credentials, queries, bundle, or output paths.
The package must be installed under a node_modules directory belonging to the project, resolved by its exact bare name. Ordinary registry installs, npm workspaces, npm link, and store-backed layouts such as pnpm all satisfy this; a path in configuration never does.
The package must export the versioned okfProducer API. Producer API v1 targets OKF v0.2 and separates validateConfig() from side-effect-free destination generation. Candidate concepts require native generated and non-empty sources provenance. The host rejects unsafe paths, malformed concepts, unresolved links or typed relations, unowned file collisions, locally modified managed files, secret values in output, and any candidate that would leave the complete project invalid.
Both interfaces run the same host. Use the CLI for scheduled refreshes:
okf --project okf.project.yaml producer preview main-database
okf --project okf.project.yaml producer run main-database --write --actor process:nightly-refresh
producer preview exits 1 when the candidate is invalid; producer run exits 1 when nothing was published. Both print the same receipt the MCP tools return.
For a configured project, MCP exposes:
okf_list_producers: list configuration without loading package code or reading the sourceokf_preview_producer: read source metadata and return a validated, non-writing diffokf_run_producer: regenerate under the shared writer queue and publish with revision checks and rollback; available only with --write plus a truthful --actor using human: , process: , or provider/model syntaxPreview and run accept only the configured producer name plus optional receipt detail. Receipts include bounded numeric source-object summaries and publication-diff counts. Publication records owned relative paths and SHA-256 digests in the bundle-local .okf-producer.json. Only unchanged paths owned by the prior manifest can be updated or removed; hand-authored content is never adopted implicitly. The manifest contains no producer configuration, credentials, or connection details.
Two rules keep a managed bundle stable across repeated runs:
generated.at on every run. The host compares each candidate against the published file ignoring that stamp, so a source that did not change reports unchanged and leaves the bytes, the timestamps, and the manifest untouched. Publication-diff counts therefore describe the source, not the run.ตัดมาแค่ช่วงต้น อ่านต่อใน repo