.faf - Universal Project Context

AI 与智能体

by wolfe-jam

适用于各类 MCP 平台的通用项目上下文方案,可自动检测 CLI,并兼容 50 个 MCP tools。

什么是 .faf - Universal Project Context

适用于各类 MCP 平台的通用项目上下文方案,可自动检测 CLI,并兼容 50 个 MCP tools。

README

<!-- faf: faf-mcp | TypeScript | mcp | The Interop MCP for Context — the Cursor / IDE Edition. Persistent context for Cursor, VS Code, and every MCP-compatible IDE. IANA-registered application/vnd.faf+yaml. Start with "Use FAF". --> <!-- faf: doc=readme | canonical=project.faf | score=100 | family=FAF --> <div style="display: flex; align-items: center; gap: 12px;"> <img src="https://www.faf.one/orange-smiley.svg" alt="FAF" width="40" /> <div> <h1 style="margin: 0; color: #FF8C00;">.FAF Context</h1> <p style="margin: 4px 0 0 0;"><strong>Persistent Project Context for Cursor, IDEs and VS Code. Define once. Sync everywhere.</strong> <sub>npm: <code>faf-mcp</code></sub></p> </div> </div>

npmdownloads FAF Trophy 100% IANA: vnd.faf+yaml DOI: Context paper DOI: Agents paper

Home: wolfe-jam.github.io/faf-mcp

.FAF Context is the MCP server for the IDE side of FAF. One project.faf in your repo, and every AI tool's context file is authored from it — AGENTS.md, .cursorrules, GEMINI.md, CLAUDE.md — and scored, so you know exactly where to focus. It runs locally over stdio on the same faf-cli the terminal uses. The FAF ecosystem it belongs to has comfortably passed 100k downloads across npm and PyPI (live count).

⭐ Bookmarks it for you, helps other devs find it too.

CI License: MIT project.faf


What's New in 3.0.2 — The Compose Edition

Tools that say what they do: faf_git scores with faf-cli and asks before overwriting, faf_sync previews each change, and imports say when nothing was written.

  • faf_git has one scorer. It reports faf-cli's score of the file it authored, writes the slots faf-cli scores, and asks before replacing an existing project.faf.
  • faf_sync previews each change. The dry run lists every field it would update and names apply: true.
  • Imports say when nothing was written, and merge: true with no project.faf fails clearly.
  • Descriptions, annotations and errors match the code. No CLI commands or terminal colour codes in tool output.

3.0.1 renamed faf_bi_sync to faf_claude and made faf_init write what faf init writes. The full history is in the CHANGELOG.

The Compose Edition (3.0)

Compose, don't port: faf-mcp 3.0 runs on faf-cli 7.12 in-process — one scorer, one set of renderers, one injector — and every number, file and claim this package makes is true. Local stdio, 29 tools, Node 22+.

  • Composes faf-cli 7.12. AGENTS.md, GEMINI.md, .cursorrules and CLAUDE.md are written by faf-cli's own renderers, repo enrichment and block injector — the same bytes faf export and faf sync write. faf_auto runs faf-cli's own update chain. The hand-ported renderers, the pre-v3 CLAUDE.md template and the local injector are gone.
  • One score function. faf_auto, faf_go, faf_dna, faf_doctor and faf_claude all report faf-cli's scorer on the bytes on disk — no local heuristics, no frozen birth score, no "0%".
  • Nothing shells out. The which faf detector, the exec fallback and the "install faf-cli first" banner are gone; nothing under src/ imports child_process. A machine with an unrelated faf on PATH is no longer a problem.
  • Every tool contract matches its handler. Descriptions say what the tools do, schemas declare only flags that are read, failures carry their reason.
  • The Mk3 engine is deleted. 44 unreachable modules, ~15,900 lines; the tarball halves. prebuild clears dist/ so nothing deleted ever ships again.
  • Resource URIs are faf://context and faf://status; claude-faf:// remains readable as an alias for this release.
  • Node 22 or newer. 18 and 20 are end of life; the CI matrix runs 22 and 24 and a guard keeps the floor honest.

Define once. Sync everywhere.

You maintain .cursorrules. Your teammate uses AGENTS.md. Someone on the team just switched to Gemini. Every AI tool wants its own context file — and they all say the same thing in different formats.

faf-mcp is the dedicated MCP server for Cursor, Windsurf, Cline, VS Code, and every non-Claude platform. One .faf file in your repo, synced to every format your team needs.

Context for Cursor & IDE agents: faf-cli (v7.12) authors the files this server syncs — bunx faf export --agents, zero-install and git-native. See FAF-CLI for Cursor & IDE agents 👀.

code
                      project.faf
                           │
          ┌────────┬───────┴───────┬────────────┐
          ▼        ▼               ▼            ▼
      CLAUDE.md  AGENTS.md  .cursorrules  GEMINI.md
      (Claude)   (Codex)      (Cursor)    (Gemini)

Quick Start

Cursor — one click: Add .FAF Context to Cursor

Everywhere else:

bash
bunx faf-mcp

Add to your MCP config:

json
{"mcpServers": {"faf": {"command": "bunx", "args": ["faf-mcp"]}}}
PlatformConfig File
Cursor~/.cursor/mcp.json
Windsurf~/.codeium/windsurf/mcp_config.json
ClineCline MCP settings
VS CodeMCP extension config
Claude DesktopUse claude-faf-mcp

Run It

faf-mcp runs locally over stdio. Point your IDE at one of these commands.

MethodCommand
npmnpx faf-mcp
Bunbunx faf-mcp

Interop Tools

ToolPlatformAction
faf_agentsOpenAI CodexImport/export/sync AGENTS.md
faf_cursorCursor IDEImport/export/sync .cursorrules
faf_geminiGoogle GeminiImport/export/sync GEMINI.md
faf_conductorConductorImport/export directory structure
faf_gitGitHubAuthor .faf from any repo URL
text
# MCP tool calls — ask your IDE's AI
# Write all four formats from project.faf
faf_claude { all: true }

# Author .faf from any GitHub repo
faf_git { url: "https://github.com/facebook/react" }

Core tier: 15 essential tools shown by default; set FAF_TOOLS=all for the full 29 (every tool stays callable by name either way) · 25 test suites · 7 bundled parsers


Eternal Sync

project.faf is the source. faf-mcp writes every tool's context file from it in milliseconds.

code
project.faf  ──── 8ms ───→  CLAUDE.md / AGENTS.md / .cursorrules / GEMINI.md
                    Single source of truth
  • faf_claude { all: true } writes all four formats at once
  • faf_agents, faf_cursor and faf_gemini can also import an existing file: merge: true merges it into project.faf
  • Content outside the faf-managed block is preserved, byte for byte
  • Works across teams, branches, sessions

AI assistants forget. They drift. Every new session, AI starts guessing again. One source means context never goes stale.


Tier System: From Blind to Optimized

TierScoreStatus
TROPHY100%AI never has to guess
GOLD99%+1 slot from Trophy
SILVER95%+Close — keep going
BRONZE85%+Interim — keep going
GREEN70%+Interim — keep going
YELLOW55%+AI flipping coins
RED<55%AI working blind
WHITE0%No context at all

At 55%, AI is guessing half the time. At 100%, AI is optimized.


use>faf | Prompt Pattern

Start every prompt with "Use FAF" to invoke MCP tools:

code
Use FAF to initialize my project
Use FAF to score my AI-readiness
Use FAF to sync my context
Use FAF to enhance my project

Works on all platforms — stops web search, forces tool usage.


29 MCP Tools

The 15 Core tools, shown by default:

ToolPurpose
faf_initCreate a new project.faf (use faf_auto to enhance an existing one)
faf_autoOne-call setup: init or merge, stack detection, CLAUDE.md, score
faf_goGuided interview that fills the missing human-context and goal fields toward 100%
faf_scoreAI-readiness score (0-100%) and tier; details:true adds a slot-by-slot breakdown
faf_doctorDiagnose a low score: missing files, slot counts, config issues, each with a fix
faf_checkRate each human_context field empty / generic / good
faf_trustValidate the required fields and about.* block with faf-cli's validator
faf_syncReconcile project.faf with package.json (dry-run; apply:true writes)
faf_contextSet or show the active project path
faf_aboutWhat the IANA-registered .faf format is, in plain language
Interop Tools
faf_claudeWrite CLAUDE.md from project.faf (all:true also writes AGENTS.md, .cursorrules, GEMINI.md)
faf_agentsImport AGENTS.md into project.faf, or write it from project.faf
faf_cursorImport .cursorrules into project.faf, or write it from project.faf
faf_geminiImport GEMINI.md into project.faf, or write it from project.faf
faf_gitAuthor a project.faf from a public GitHub repo URL

+14 more with FAF_TOOLS=all: faf_status · faf_what · faf_guide · faf_debug · faf_clear · faf_list · faf_read (read a file within the allowed roots: cwd, the OS temp dir, or FAF_ALLOWED_ROOTS) · faf_write (write a file within the same roots) · faf_readme · faf_human_add · faf_quick · faf_formats · faf_dna · faf_conductor

Built on faf-cli. Every tool composes the bundled faf-cli in-process — the same scorer, the same renderers, the same block injector the CLI uses. Nothing shells out to a faf on your PATH.


Ecosystem

  • claude-faf-mcp — Claude Desktop
  • faf-cli — Terminal CLI
  • faf-wasm — WASM SDK (<5ms scoring)
  • faf-wasm-gen — Rust→WASM project.faf authoring engine, browser/edge (faf-wasm's authoring sibling)
  • faf-trinity — reference MCP server exposing all three IANA FAF formats (context/memory/agent) together
  • faf.one — Official website
  • docs/SKILLS-OVER-MCP.md — J1 Agent Skill faf-ide (stdio · skills/list · digests)

If faf-mcp has been useful, consider starring the repo — it helps others find it.

Citation

If you use faf-mcp or the .faf / .fafa formats in research or production, please cite the format papers:

Wolfe, J. (2025). Format-Driven AI Context Architecture: The .faf Standard for Persistent Project Understanding. Zenodo. https://doi.org/10.5281/zenodo.18251362

Wolfe, J. (2026). Why Agents Need a Passport: .fafa — Portable Identity for the Agentic Era. Zenodo. https://doi.org/10.5281/zenodo.21951641

BibTeX

bibtex
@article{wolfe2025faf,
  title     = {Format-Driven AI Context Architecture: The .faf Standard for Persistent Project Understanding},
  author    = {Wolfe, James},
  year      = {2025},
  month     = {nov},
  publisher = {Zenodo},
  doi       = {10.5281/zenodo.18251362},
  url       = {https://doi.org/10.5281/zenodo.18251362}
}

@article{wolfe2026fafa,
  title     = {Why Agents Need a Passport: .fafa — Portable Identity for the Agentic Era},
  author    = {Wolfe, James},
  year      = {2026},
  month     = {aug},
  publisher = {Zenodo},
  doi       = {10.5281/zenodo.21951641},
  url       = {https://doi.org/10.5281/zenodo.21951641}
}

License

MIT License — Free and open source


Zero drift. Eternal sync. AI optimized.

"It's so logical if it didn't exist, AI would have built it itself" — Claude

常见问题

.faf - Universal Project Context 是什么?

适用于各类 MCP 平台的通用项目上下文方案,可自动检测 CLI,并兼容 50 个 MCP tools。

相关 Skills

Claude接口

by anthropics

Universal
热门

面向接入 Claude API、Anthropic SDK 或 Agent SDK 的开发场景,自动识别项目语言并给出对应示例与默认配置,快速搭建 LLM 应用。

想把Claude能力接进应用或智能体,用claude-api上手快、兼容Anthropic与Agent SDK,集成路径清晰又省心

AI 与智能体
未扫描176.4k

多智能体架构

by alirezarezvani

Universal
热门

聚焦多智能体系统架构设计,梳理 Supervisor、Swarm、分层和 Pipeline 等模式,覆盖角色定义、通信协作与性能评估,适合规划稳健可扩展的 AI agent 编排方案。

帮你系统解决多智能体应用的架构设计与协同编排难题,适合构建复杂 AI 工作流,成熟度高、社区认可也很亮眼。

AI 与智能体
未扫描26.0k

RAG架构师

by alirezarezvani

Universal
热门

聚焦生产级RAG系统设计与优化,覆盖文档切块、检索链路、索引构建、召回评估等关键环节,适合搭建可扩展、高准确率的知识库问答与检索增强应用。

面向RAG落地,把知识库、向量检索和生成链路系统串联起来,做架构设计时更清晰,也更少踩坑。

AI 与智能体
未扫描26.0k

相关 MCP Server

知识图谱记忆

编辑精选

by Anthropic

热门

Memory 是一个基于本地知识图谱的持久化记忆系统,让 AI 记住长期上下文。

帮 AI 和智能体补上“记不住”的短板,用本地知识图谱沉淀长期上下文,连续对话更聪明,数据也更可控。

AI 与智能体
89.7k

顺序思维

编辑精选

by Anthropic

热门

Sequential Thinking 是让 AI 通过动态思维链解决复杂问题的参考服务器。

这个服务器展示了如何让 Claude 像人类一样逐步推理,适合开发者学习 MCP 的思维链实现。但注意它只是个参考示例,别指望直接用在生产环境里。

AI 与智能体
89.2k

by deusdata

热门

持久化的代码库知识图谱,可跨会话保留上下文,在 session 重启或上下文压缩后仍能继续使用。

专治 AI 编程助手“会话失忆”,把代码库沉淀为持久知识图谱,重启或压缩上下文后也能无缝续上开发状态。

AI 与智能体
37.3k

评论