Skip to main content
Glama

claude-faf-mcp

告诉 AI 你正在构建什么、它是为谁构建的以及为什么它很重要。只需 30 秒。🐘 它永不遗忘。

Anthropic MCP CI npm version NPM Downloads License: MIT

FAF 定义。MD 指导。AI 编码。

🐘 三向同步现已对所有开发者免费 — 一条命令实现 .faf ↔ CLAUDE.md ↔ MEMORY.md 同步。原为专业功能,现已免费。

33 个 MCP 工具。IANA 注册格式 (application/vnd.faf+yaml)。每次推送执行 2,346 次测试。


3W 原则 — 3 个答案。仅此而已。

每一个伟大的产品都始于对 3W 的 3 个回答 — Who (谁), What (什么), Why (为什么):

WHO (目标用户)

WHAT (核心功能)

WHY (构建原因)

Uber

需要乘车的人

点击按钮,车辆到达

出租车行业效率低下

Airbnb

住不起酒店的旅行者

住在别人的空余房间

存在数百万间空置房间

Slack

被电子邮件淹没的团队

有组织的群组消息

决策被埋没在邮件线程中

Venmo

分摊账单的朋友

即时转账

总有人忘记还钱

同样的模式。每一个成功的产品都始于此。.faf 捕捉到了这一点:

human_context:
  who: "people who need a ride across town"
  what: "tap a button, car arrives in minutes"
  why: "taxis are slow, expensive, and hard to find"

30 秒。Claude 会据此构建你的 project.faf。之后的每一次会话,AI 都会以智能状态启动。

6W 原则 — 优化 AI

3W 让你入门。为了获得完全优化的 AI,请补全剩余部分 — Where (哪里), When (何时), How (如何):

  where: "mobile app, iOS and Android"    # where does it live?
  when: "launch in 3 months"              # when is it shipping?
  how: "GPS matching, real-time pricing"  # how does it work?

3W 启动 AI 项目。6W 将 AI 优化至 100%。相同的 YAML,相同的文件。更多示例 → faf.one/ideas


Related MCP server: gemini-faf-mcp

快速入门

复制并粘贴此内容到 Claude:

安装 FAF MCP 服务器:npm install -g claude-faf-mcp,然后将其添加到我的 claude_desktop_config.json 中:{"mcpServers": {"faf": {"command": "npx", "args": ["-y", "claude-faf-mcp"]}}} 并重启 Claude Desktop。

然后告诉 Claude 你的 3W:“我正在为 [谁] 构建 [什么],因为 [为什么]”


工作原理

You → 3 answers → project.faf → AI reads it → every session → forever

project.faf  ←── 8ms ──→  CLAUDE.md     (bi-sync, free)
project.faf  ←── 8ms ──→  MEMORY.md     (tri-sync, Pro 🐘)

Claude 完成其余工作。零投入,一次做对,快速、准确、完成。语言、框架、包管理器、构建工具 — 全部从你现有的文件中自动检测。人类上下文是你唯一能提供的部分。


评分:从盲目到优化

等级

分数

含义

🏆 奖杯

100%

黄金代码 — AI 已优化

🥇 黄金

99%+

近乎完美的上下文

🥈 白银

95%+

优秀

🥉 青铜

85%+

可投入生产

🟢 绿色

70%+

坚实的基础

🟡 黄色

55%+

AI 在掷硬币

🔴 红色

<55%

AI 在盲目工作

🤍 白色

0%

完全没有上下文

在 55% 时,AI 有一半时间在猜测。在 100% 时,AI 完全了解你的项目。与 faf-cli 使用相同的编译器 — 到处都是相同的分数。


33 个 MCP 工具

所有工具均独立运行 — 零 CLI 依赖,平均执行时间 19ms。

创建与检测

工具

用途

faf_init

初始化项目 DNA

faf_auto

自动检测技术栈并填充上下文

faf_quick

闪电般快速创建 (3ms)

faf_readme

从 README 提取上下文 (+25-35% 提升)

faf_formats

发现项目中所有格式

faf_git

从任何 GitHub 仓库 URL 提取上下文

faf_human_add

添加人类上下文 (6W)

验证与评分

工具

用途

faf_score

AI 就绪度评分 (0-100%) 及详细分析

faf_check

验证 .faf 结构

faf_doctor

诊断并修复常见问题

faf_go

引导式访谈以生成黄金代码

同步与持久化

工具

用途

faf_sync

同步 .faf → CLAUDE.md

faf_bi_sync

双向同步 .faf ↔ CLAUDE.md

faf_tri_sync

三向同步 .faf ↔ CLAUDE.md ↔ MEMORY.md — 专业功能,对开发者免费 🐘

faf_enhance

智能增强

导出与互操作

工具

用途

faf_agents

导入/导出 AGENTS.md (OpenAI Codex)

faf_cursor

导入/导出 .cursorrules (Cursor IDE)

faf_gemini

导入/导出 GEMINI.md (Google Gemini)

faf_conductor

导入/导出 Conductor 目录

读写

工具

用途

faf_read

读取任何文件

faf_write

写入任何文件

faf_status

项目状态概览

faf_debug

环境检查

faf_about

什么是 .faf?

完整工具参考 →


🐘 Nelly 永不遗忘

双向同步保持 .faf ↔ CLAUDE.md 一致。

三向同步添加 MEMORY.md — 让你的 AI 在每次会话中都能记住你的项目。

bi-sync  = .faf ↔ CLAUDE.md              ← always in sync
tri-sync = .faf ↔ CLAUDE.md ↔ MEMORY.md  ← Nelly never forgets 🐘

专业功能,对开发者免费。团队与企业版:faf.one/pro (计划)


.FAF 的定位

Model        Context          Protocol
─────        ───────          ────────
Claude    →   .faf        →    MCP
Gemini    →   .faf        →    MCP
Codex     →   .faf        →    MCP
Any LLM   →   .faf        →    MCP

IANA 注册 (application/vnd.faf+yaml)。适用于任何 AI。定义一次,随处使用。


生态系统

包

平台

注册表

claude-faf-mcp (此项目)

Claude

npm

faf-cli

通用 CLI

npm + Homebrew

gemini-faf-mcp

Google Gemini

PyPI

grok-faf-mcp

xAI Grok

npm

rust-faf-mcp

Rust

crates.io

faf-wasm

浏览器/Edge

npm

Chrome 扩展

浏览器

Chrome Web Store

相同的 project.faf。相同的评分。相同的结果。不同的执行层。


质量

391 个测试 · 12 个套件 · 6 个平台 (ubuntu/macos/windows × Node 18/20)

CI 仪表板 →


隐私

一切都在本地运行。没有数据离开你的机器。没有分析,没有遥测,没有跟踪,没有账户。隐私政策 →


如果 claude-faf-mcp 对你有帮助,请考虑给仓库加星 — 这有助于其他人发现它。


许可证

MIT — 免费且开源


FAF 家族

faf-cli

npx faf-cli init — 为任何项目创建 .faf

claude-faf-mcp

Claude Desktop 的 MCP 服务器

gemini-faf-mcp

Gemini CLI 的 MCP 服务器

grok-faf-mcp

Grok 的 MCP 服务器

faf-mcp

Cursor, Windsurf, Cline, VS Code 的 MCP 服务器

rust-faf-mcp

Rust 编写的 MCP 服务器

faf-skills

17 个 Claude Code 技能

faf.one

博客,下载,文档

IANA 注册

application/vnd.faf+yaml

格式 | 驱动 🏎️⚡️ wolfejam.dev


获取 CLI

faf-cli — 最初的 AI 上下文 CLI。每个开发者的必备工具。

npx faf-cli auto

Anthropic MCP #2759 · IANA 注册: application/vnd.faf+yaml · faf.one · npm

Available Tools

14 tools
faf_aboutAbout .fafA
Read-onlyIdempotent
Inspect

Explain what the .faf format is — project context for AI, IANA-registered as application/vnd.faf+yaml — and how this server uses it. Returns a short plain-text overview with this server's version. Reads nothing and writes nothing. Use it when someone asks what FAF is.

Inputs: no named parameters.

faf_autoFill from the RepoA
DestructiveIdempotent
Inspect

Create /project.faf, or fill the empty slots of the one there, with faf-cli's detection over the repo's own files (package.json, Cargo.toml, pyproject.toml, go.mod…) — no hardcoded defaults. A value already there is kept. A typed None or placeholder word is an empty slot: in a tech slot the app-type uses, only a repo fact replaces it (with no fact it stays as typed); in a tech slot the app-type leaves out, faf_auto writes slotignored; in a 6W it stays as typed (faf_go asks). Every value it changes is listed. Then writes CLAUDE.md's faf-managed block. Returns what was filled and faf-cli's score before and after. faf_go does the human 6Ws.

Inputs: path.

faf_benchGrounding BenchmarkA
Read-onlyIdempotent
Inspect

Prove the .faf earns its place — measure how much the context is worth, on THIS repo, falsifiably. Questions derive from the project.faf's own populated slots (the .faf is the answer key), so grading is mechanical — no judge, no rubric. action=questions returns the answer-key-safe question set; action=grade takes your answers WITHOUT the .faf (cold) and WITH it (faf), grades both, and returns the cold→with-faf lift with a receipt hash. The delta is the product; the cold number belongs to the absence of context, never to FAF. Reads only.

Inputs: faf, cold, path, model, +3 more. Returns: Question set (action=questions) or the cold→with-faf grading and its receipt (a…

faf_contextActive ProjectA
Read-onlyIdempotent
Inspect

Show the active project — the folder every faf_* call without a path uses — and the .faf there; pass path to make another folder the active project (your home folder and the filesystem root are refused). detail: true also returns the .faf's text. Writes no file. Call it once at the start of a session.

Inputs: path, detail. Returns: The active project context and whether a project.faf lives there.

faf_doctorDiagnose .fafA
Read-onlyIdempotent
Inspect

Diagnose the project's .faf: faf-cli's validateFaf errors, faf-cli's score with every empty slot and the tool that fills it (faf_auto from the repo, faf_go for the 6Ws), whether CLAUDE.md is there, and the formats faf-cli finds in the folder. Returns a checklist of findings, each with its fix. Reads only. Use it when faf_score is below 100%.

Inputs: path. Returns: Health check: an overall verdict plus per-check diagnostics with fixes.

faf_etchEtch MemoryA
Destructive
Inspect

Remember a decision, gotcha, or win across sessions by writing it to the project soul (soul.fafm) with faf-cli's Soul. Returns the stored memory and the soul's size. Re-etching an id updates that memory in place. Use it to persist something an AI should recall later; faf_recall reads them back.

Inputs: text (required), id, path, tags, +2 more. Returns: The etched fact + soul state.

faf_goGuided InterviewA
Destructive
Inspect

The human half of project.faf. Without answers it returns the Table-of-8 — project name, goal and the 6Ws (who, what, why, where, when, how) — each filled, seeded from the goal, or empty, with faf-cli's score and, for each slot still empty, whether it is a fact from repo (faf_auto writes it: its dry run, the one faf_formats shows) or needs an answer here. An empty goal or W carries faf-cli's suggestion from the repo with its source, for the user to confirm. With answers (slot path → the text the user confirmed, e.g. {"human_context.why": ""}) it writes them into /project.faf in place and returns the new score; a value already in a slot you answer is replaced. With no project.faf yet it runs faf_init and faf_auto first. faf_auto writes each fact from repo; a stack slot with no fact in repo is answered here.

Inputs: path, answers.

faf_initCreate project.fafA
Destructive
Inspect

Create a new project.faf for a folder: faf-cli detects its name, language and stack, and the reply gives the file path, faf-cli's starting score and the birth .faf-dna. An existing project.faf is left as it is — use faf_auto to fill its empty slots from your manifests, or faf_go for the human 6Ws. force: true replaces an existing project.faf with a fresh one, after copying the old file to a backup beside it.

Inputs: path, force.

faf_recallRecall MemoryA
Read-onlyIdempotent
Inspect

Recall memories from the project soul (soul.fafm), ranked by priority then recency, filtered by query/tags/type. Returns the matching entries. Reads only. Use it to surface past decisions; faf_etch adds new ones.

Inputs: path, tags, type, limit, +2 more. Returns: Ranked memories from the soul.

faf_scoreScore .fafA
Read-onlyIdempotent
Inspect

Score the project's .faf with faf-cli's scorer — the one score every faf tool reports: 0–100%, the tier, populated/active slots, and a faf-parity/v1 hash of the result. details: true lists every slot as populated, empty or slotignored. Reads only. Use faf_doctor for what to fix.

Inputs: path, details. Returns: Structured AI-readiness score, single-sourced from faf-cli.

faf_setupSession Hook SetupA
Idempotent
Inspect

Install the native SessionStart hook in the project settings (/.claude/settings.json) — every Claude Code session in this project starts with fresh .faf context. Shows the exact settings first (preview); writes only with confirm: true, install or remove. faf changes only its own hook entry; every other key and hook stays as written. remove: true takes out only the hook whose command is exactly the faf hook command. Never writes the user settings: the home folder is refused.

Inputs: path, remove, confirm. Returns: Setup result: what happened (or would happen) to .claude/settings.json.

faf_syncSync .faf to CLAUDE.mdA
Idempotent
Inspect

Write project.faf into CLAUDE.md as a faf-managed block (faf-cli's render and injector), and on request into AGENTS.md (agents), .cursorrules (cursor), GEMINI.md (gemini) and .github/copilot-instructions.md (copilot) — or all of them (all) — with faf-cli's writers. Each file keeps every line outside faf's block. Returns the files written and any requested file that could not be written, with the reason (then isError). Use it after editing project.faf.

Inputs: all, path, agents, cursor, +2 more. Returns: The files faf_sync wrote, and each requested file it could not write.

faf_tri_syncTri-Sync to MEMORY.mdA
Idempotent
Inspect

Write project.faf as a faf-managed block into the MEMORY.md Claude Code loads for this project (~/.claude/projects//memory/MEMORY.md, or under CLAUDE_CONFIG_DIR). Only the block changes; every note of Claude's is kept, and the reply says so only after reading the file back. action: status reads only. faf_sync writes CLAUDE.md.

Inputs: path, action.

faf_trustTrust ReceiptA
Read-onlyIdempotent
Inspect

Attest the project's .faf: faf-cli's validateFaf, faf-cli's score, and a faf-parity/v1 hash (claude-faf-mcp's own spec) of that score that anyone can check with sha256(projection) === parityHash. Returns a trust receipt whose subject is the project. An invalid .faf, or a score that is unknown, gets no receipt (isError). Reads only.

Inputs: path. Returns: Trust attestation: faf-cli's validity and score, and a faf-parity/v1 receipt.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.1/5.0

    Scored across 14 tools

    Disambiguation4/5

    Most tools have sharply distinct purposes (init=create, auto=fill from repo, go=human 6Ws, sync=CLAUDE.md, tri_sync=MEMORY.md, etch/recall=memory), and the descriptions explicitly cross-reference and disambiguate. The weak spot is the read-only score cluster — faf_score, faf_doctor, faf_trust, and faf_bench all report a score/hash, and an agent must parse dense prose to decide which to call.

    Naming Consistency5/5

    Every tool follows the same faf_<short_verb_or_noun> snake_case pattern with no casing or prefix deviations. The suffixes (init, auto, go, score, sync, tri_sync, etch, recall) are readable and predictable.

    Tool Count5/5

    14 tools sit comfortably in the ideal range for a CLI-backed project-context server. Each maps to a real, named step in the .faf lifecycle, and none look like filler.

    Completeness4/5

    The surface covers the full lifecycle: create, fill (machine and human), validate/score, attest, render to five target files, install a session hook, benchmark value, and persist/recall memory. Minor gaps: no way to delete a .faf or 'forget' an etched memory (etch updates but never removes), and no multi-project listing beyond faf_context.

    Maintenance

    ActivityActive
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers