.FAF Context
<!-- 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>
[](https://www.npmjs.com/package/faf-mcp)[](https://www.npmjs.com/package/faf-mcp)
[](https://faf.one)
[](https://www.iana.org/assignments/media-types/application/vnd.faf+yaml)
[](https://doi.org/10.5281/zenodo.18251362)
[](https://doi.org/10.5281/zenodo.21951641)
**Home:** [wolfe-jam.github.io/faf-mcp](https://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](https://faf.one/downloads)).
⭐ [Star it on GitHub](https://github.com/Wolfe-Jam/faf-mcp): bookmarks it for you, helps other devs find it too.
[](https://github.com/Wolfe-Jam/faf-mcp/actions/workflows/ci.yml)
[](https://opensource.org/licenses/MIT)
[](https://github.com/Wolfe-Jam/faf)
[](https://wolfe-jam.github.io/agent-business-card/?repo=Wolfe-Jam/faf-mcp)
---
## What's New in 4.3.0 — The Same Bytes Edition
**faf-mcp as faf-cli's twin: same finder, reader, names and writers.**
faf-mcp writes what faf export and faf sync write.
AGENTS.md carries the release gate and CI, CLAUDE.md imports AGENTS.md, and every file names the facts file as found.
- **faf-cli 8.13.2 inside.** Every context file goes through faf-cli's own reader and writers; a test runs `faf export` and `faf sync` in a twin repo and compares the bytes.
- **AGENTS.md: Before a release and CI**, read from `package.json` and `.github/workflows/`.
- **The facts file named as found:** `.faf`, `../project.faf` or `project.faf`, in the files and the replies; numbers as written.
- **CLAUDE.md imports AGENTS.md**, and `faf_claude { all }` writes AGENTS.md first.
- **Fixed:** `faf_auto` never rewrites a project.faf one folder up or a legacy `.faf`; `faf_claude` with a missing folder writes nothing.
## 4.2.0 — The Human Slots Edition
**AI suggests, you confirm. faf-mcp no longer writes your project's goal or six W's: faf_go shows each suggestion with its source, and only what you confirm is written.**
- **`faf_go` offers the suggestions.** Each empty goal or W comes with faf-cli's suggestion and where it came from (`README.md § Why`, `package.json description`). Your editor's AI asks you; only the answers you confirm are written.
- **`faf_init` and `faf_auto` leave them empty** and say how many suggestions are waiting, so a new project.faf scores lower, honestly. Files you already have are not changed.
- **`faf_readme` suggests and never writes; `faf_sync` never writes the goal.** `faf_sync` still updates the name and stack from package.json.
- **`faf_go` answers are real slots, as text.** Any other key refuses the call and nothing is written.
- **faf-cli 8.10.0 inside.** Not changed yet: `faf_git` still writes the goal from the GitHub description; it moves to faf-cli's pipeline in a later release.
## 4.1.3 — The Instructions Edition
**faf-mcp now says what faf-cli's writer did: the note when faf's block goes above older faf text, and each file it could not write.** When a context file starts with older faf text, the reply carries faf-cli's note that the old text is left as you had it; `faf_claude` names any chained file it could not write, with the reason.
## 4.1.2
**faf_write can no longer overwrite the birth certificate or your context files, and faf_dna never issues a second one.** `.faf-dna` is refused in every spelling and route, existing context files need `overwrite: true`, and `faf_dna` refuses rather than reissue when git shows a certificate existed.
## 4.1.1
**One rule for project questions: read project.faf first.**
- **Server instructions, line 2.** "For questions about the project (stack, goal, commands), read project.faf first and answer from it. faf_score shows what is missing; faf_doctor says why." It replaces "start with `faf_doctor` or `faf_score`", which agents read as a hint. In a 3-run pilot on a repo where project.faf and package.json disagree, Claude Code read project.faf first 3 of 3 and Grok Build 2 of 3 with the new line, against 0 of 3 for both with the old one. 712 characters.
## 4.1.0 — The Instructions Edition
**faf-mcp now tells the model how its tools fit together: server instructions in initialize (642 characters), plus faf-cli 8.5.0, which knows a skills repo when it sees one.**
- **Server instructions.** When your editor's AI connects, the server says how its tools fit together: one project at a time, start with `faf_doctor` or `faf_score`, ask the user for the human answers, and project.faf is the source for CLAUDE.md, AGENTS.md, .cursorrules and GEMINI.md.
- **faf-cli 8.5.0 inside.** `faf_init` and `faf_auto` detect a skills repo: `SKILL.md` folders make it `skills` (10 slots), and a Claude Code plugin manifest makes it `skills-plugin` (14).
- **hono advisory cleared** (serveStatic double-decode).
## 4.0.1
**`faf-mcp --version` and `--help` answer and exit. Before, both started the server.**
- `--version` (`-v`) prints the version; `--help` (`-h`) prints usage and a client config. Anything else starts the server as before, so your client config doesn't change.
## 4.0.0 — The Always33 Edition
**One engine, one number: faf-mcp 4 scores with faf-cli 8's always-33 kernel — the same score faf-cli, claude-faf-mcp 7 and faf-kernel give.**
- **The always-33 engine.** Every tool scores with faf-cli 8.0.0 — all 33 Mk4 slots, one Rust kernel, one copy of it. Checked live: faf-python-sdk 56, mcp-context-card 56, faf-cli ✪ 100.
- **Your 21 slots, and the 12 enterprise slots in view.** The enterprise slots (infra, app, ops) are marked `slotignored` unless your app-type uses them. `faf_score` scores against all 33; `slotignored` slots drop out of the denominator.
- **Upgrading from 3.x:** a `.faf` without the 12 markers now scores against 33. **Run `faf_auto`** — it writes them and your score returns.
## 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](CHANGELOG.md).
## 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 authors the files this server syncs — `bunx faf export --agents`, zero-install and git-native. See [FAF-CLI for Cursor & IDE agents 👀](https://github.com/Wolfe-Jam/faf-cli/blob/main/docs/faf-cli-for-agents.md).
```
project.faf
│
┌────────┬───────┴───────┬────────────┐
▼ ▼ ▼ ▼
CLAUDE.md AGENTS.md .cursorrules GEMINI.md
(Claude) (Codex) (Cursor) (Gemini)
```
### Quick Start
**Cursor — one click:** [](cursor://anysphere.cursor-deeplink/mcp/install?name=faf-mcp&config=eyJjb21tYW5kIjoiYnVueCIsImFyZ3MiOlsiZmFmLW1jcCJdfQ==)
**Everywhere else:**
```bash
bunx faf-mcp
```
Add to your MCP config:
```json
{"mcpServers": {"faf": {"command": "bunx", "args": ["faf-mcp"]}}}
```
| Platform | Config File |
|----------|-------------|
| **Cursor** | `~/.cursor/mcp.json` |
| **Windsurf** | `~/.codeium/windsurf/mcp_config.json` |
| **Cline** | Cline MCP settings |
| **VS Code** | MCP extension config |
| **Claude Desktop** | Use [claude-faf-mcp](https://github.com/Wolfe-Jam/claude-faf-mcp) |
---
## Run It
faf-mcp runs locally over stdio. Point your IDE at one of these commands.
| Method | Command |
|--------|---------|
| **npm** | `npx faf-mcp` |
| **Bun** | `bunx faf-mcp` |
---
## How to
Each recipe is one tool call your IDE's AI makes for you. Ask in plain words ("Use FAF to score my project") or name the tool. The output shown is real, from a small Express app.
### Create project.faf for an existing repo
```text
faf_auto
```
It detects the stack from `package.json` and the repo, writes `project.faf` and `CLAUDE.md`, and scores the result:
```text
✅ Created project.faf
✅ Created CLAUDE.md
📊 Before: 0% | After: 24% (+24%)
1 suggestion for the goal and the six W's (README.md) — confirm it in faf_go
```
`faf_init` creates an empty `project.faf` instead, with no detection.
### See what's missing
```text
faf_score # the score and tier
faf_score { details: true } # slot by slot, with what to fill
faf_doctor # a low score explained: missing files, config issues, each with a fix
```
```text
FAF SCORE: 24/100 (24%) ○ RED
4/17 slots populated · next: ● YELLOW (55%)
```
### Fill in the goal and the six W's
Detection can't know why a project exists or who it's for. `faf_go` asks, one field at a time, with a suggestion and where it came from. Nothing is written until you answer.
```text
faf_go
→ { "field": "project.goal", "suggested": "A small web API for orders.", "source": "README.md § first paragraph", … }
faf_go { answers: { "project.goal": "A small web API for orders." } }
→ ✅ Updated 1 field(s) in project.faf · 📊 New Score: 29%
```
Run `faf_go` again until no questions are left.
### Write every agent's context file
```text
faf_claude { all: true }
→ Files written: CLAUDE.md · AGENTS.md · .cursorrules · GEMINI.md
```
Each file gets a faf-managed block (`# faf:start` … `# faf:end` in `.cursorrules`). Anything you wrote outside the block stays as it was.
### Bring an existing .cursorrules or AGENTS.md in
```text
faf_cursor { action: "import", merge: true }
faf_agents { action: "import", merge: true }
```
The file's content goes into `project.faf` (a `.cursorrules` rule list lands in `project.guidelines`), so the next `faf_claude { all: true }` writes it into every format.
### Keep it current after a change
```text
faf_sync # dry run: what changed in package.json
faf_sync { apply: true } # write name and stack changes into project.faf (never the goal)
faf_claude { all: true } # rewrite the context files
```
---
## Interop Tools
| Tool | Platform | Action |
|------|----------|--------|
| `faf_agents` | OpenAI Codex | Import/export/sync AGENTS.md |
| `faf_cursor` | Cursor IDE | Import/export/sync .cursorrules |
| `faf_gemini` | Google Gemini | Import/export/sync GEMINI.md |
| `faf_conductor` | Conductor | Import/export directory structure |
| `faf_git` | GitHub | Author .faf from a public GitHub 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) · **7 bundled parsers**
---
## Eternal Sync
`project.faf` is the source. faf-mcp writes every tool's context file from it.
```
project.faf ──────────→ 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
| Tier | Score | Status |
|------|-------|--------|
| ✪ **TROPHY** | 100% | AI never has to guess |
| ★ **GOLD** | 99%+ | 1 slot from Trophy |
| ◆ **SILVER** | 95%+ | Close — keep going |
| ◇ **BRONZE** | 85%+ | Interim — keep going |
| ● **GREEN** | 70%+ | Interim — keep going |
| ● **YELLOW** | 55%+ | AI flipping coins |
| ○ **RED** | <55% | AI working blind |
| ♡ **WHITE** | 0% | 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:
```
Use FAF to initialize my project
Use FAF to score my AI-readiness
Use FAF to sync my context
Use FAF to ask me for my goal
```
Works on all platforms — stops web search, forces tool usage.
---
## 29 MCP Tools
The 15 Core tools, shown by default:
| Tool | Purpose |
|------|---------|
| `faf_init` | Create a new `project.faf` (use `faf_auto` to fill an existing one) |
| `faf_auto` | One-call setup: init or merge, stack detection, CLAUDE.md, score |
| `faf_go` | The goal and six W's: each empty one with faf-cli's suggestion and its source, for you to confirm; only what you confirm is written |
| `faf_score` | AI-readiness score (0-100%) and tier; `details:true` adds a slot-by-slot breakdown |
| `faf_doctor` | Diagnose a low score: missing files, slot counts, config issues, each with a fix |
| `faf_check` | Rate each `human_context` field empty / generic / good |
| `faf_trust` | Validate the required fields and `about.*` block with faf-cli's validator |
| `faf_sync` | Reconcile `project.faf` with package.json: name and stack, never the goal (dry-run; `apply:true` writes) |
| `faf_context` | Set or show the active project path |
| `faf_about` | What the IANA-registered `.faf` format is, in plain language |
| **Interop Tools** | |
| `faf_claude` | Write CLAUDE.md from `project.faf` (`all:true` also writes AGENTS.md, .cursorrules, GEMINI.md) |
| `faf_agents` | Import AGENTS.md into `project.faf`, or write it from `project.faf` |
| `faf_cursor` | Import .cursorrules into `project.faf`, or write it from `project.faf` |
| `faf_gemini` | Import GEMINI.md into `project.faf`, or write it from `project.faf` |
| `faf_git` | Author 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 cwd or `FAF_ALLOWED_ROOTS`; never `.faf-dna` or `.git/`; an existing `*.faf`, `CLAUDE.md` or `AGENTS.md` needs `overwrite: true`) · `faf_readme` · `faf_human_add` · `faf_quick` · `faf_formats` · `faf_dna` · `faf_conductor`
**Built on faf-cli.** Every tool composes the bundled [faf-cli](https://www.npmjs.com/package/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](https://npmjs.com/package/claude-faf-mcp)** — Claude Desktop
- **[faf-cli](https://npmjs.com/package/faf-cli)** — Terminal CLI
- **[faf-wasm](https://www.npmjs.com/package/faf-wasm)** — WASM SDK
- **[faf-wasm-gen](https://www.npmjs.com/package/faf-wasm-gen)** — Rust→WASM `project.faf` authoring engine, browser/edge (faf-wasm's authoring sibling)
- **[faf-trinity](https://github.com/Wolfe-Jam/faf-trinity)** — reference MCP server exposing all three IANA FAF formats (context/memory/agent) together
- **[faf.one](https://faf.one)** — Official website
- **[docs/SKILLS-OVER-MCP.md](./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*
TDQS
Scored across 15 tools
Several clusters overlap: faf_score, faf_doctor, faf_check and faf_trust all report scores/validation and it takes careful reading to pick the right one, while faf_init, faf_auto and faf_go all build or complete a project.faf. The four convention-specific sync tools (faf_agents, faf_cursor, faf_gemini, faf_claude) are distinguishable only by target file, though descriptions do explicitly disambiguate them.
Every tool uses the same faf_ prefix plus a short lowercase token (faf_init, faf_score, faf_sync, faf_doctor), giving a single predictable convention across the whole set. There is no mixing of camelCase, verb-first or noun-first styles.
15 tools is within a reasonable range for a full context-file lifecycle, and each has a stated role. However, the four per-IDE sync tools are near-duplicates that could be one parameterized tool, making the surface slightly heavier than necessary.
Creation, sync, scoring, validation, interview and multi-format export are covered, so the core lifecycle is present. But faf_context's description references faf_read and faf_write tools that are not exposed, and there is no general read/inspect or remove/delete operation, leaving dead ends.