Gemini FAF

one.faf由 faf.one 发布v3.1.2更新于 Nov 6, 2026

Persistent project context for Google Gemini. Python/FastMCP. IANA-registered .faf format.

已验证STDIO仅桌面知识与记忆开发者工具

概览

AI 生成的概览

读取、校验、评分并生成 .faf 项目上下文文件,让 Gemini 会话一开始就了解项目的技术栈、目标与约定。

可以做什么
  • 查找、读取并概括 .faf 项目文件,包括面向 Gemini 优化的上下文视图
  • 校验并评分 .faf 文件,返回等级、槽位数量、错误与警告
  • 创建初始 .faf,从清单文件、compose 文件、Makefile 与 CI 配置自动识别技术栈,或获取满分示例
  • 将解析后的 FAF 数据重新序列化为整洁 YAML,并把文件迁移到 3.0 格式
  • 从 .faf 导出 GEMINI.md 与 AGENTS.md,保留托管区块之外的手写内容
  • 查询 FAF 格式元数据与生态信息
适用场景
适合在 Gemini CLI 或 Google Antigravity 中开发项目、不想每次会话都重复说明技术栈与约定的场景。也适合希望以单一结构化项目文件作为 GEMINI.md 与 AGENTS.md 来源,并想了解该文件完整度的团队。
运行要求
以 PyPI 包形式通过 stdio 在本机运行,通常用 uvx 启动或 pip3 安装,需要 Python。未声明任何账号、API 密钥或环境变量。README 另提到托管于 Cloud Run 的端点以及 Gemini CLI 扩展安装方式。
安装前请注意
多个工具会写入项目:faf_init、faf_auto、faf_gemini 与 faf_agents 会创建或更新文件,faf_migrate 会重写 .faf 文件。文档称写入为非破坏性且限制在项目根目录内,但仍建议确认改动。README 提到独立的 Python SDK 客户端可能发送启动 ping,除非设置 FAF_TELEMETRY=1;远程模式会把请求发送到 Cloud Run 端点。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Gemini FAF,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

gemini-faf-mcp v3.1 — The New Era Edition

Persistent Project Context for Google Gemini. Define once. Sync everywhere.

⭐ Star it on GitHub: bookmarks it for you, helps other devs find it too.

FAF defines. AGENTS.md instructs. AI codes.

☆ Bookmark the gemini-faf-mcp page for later.

Stop re-explaining your project to every new Gemini session. Every Gemini conversation starts cold — you re-state your stack, your goals, your conventions every single time. .faf is one structured file that captures all of it. This package is the MCP server that lets Gemini read it.

[PyPI] [FAF Trophy 100%] [Tests] [IANA: vnd.faf+yaml] [IANA: vnd.fafm+yaml] [DOI: Context paper] [DOI: Memory paper] [DOI: Agents paper] [Business card · Get yours →]

Before and after

Without FAF                           With FAF (project.faf filled in) ─────────────────────────             ─────────────────────────You: "I'm using FastAPI with...       You: "Add a /users/me endpoint"      PostgreSQL, pytest, and..."     Gemini: [writes correct code,Gemini: "Got it. What's the              uses your auth pattern,        codebase like?"                  matches your test style]You: "It's a REST API for..."[5 minutes of re-explaining]Gemini: [now ready to help]

.faf is read once at session start. Every tool call lands on a Gemini that already knows your project.

What's New in v3.1.2

faf_gemini and faf_agents keep your hand-written GEMINI.md and AGENTS.md, and tell you what they couldn't write.

  • GEMINI.md and AGENTS.md are now written by faf-cli's rules: only faf's own block changes, your text stays, and a file faf can't safely write (not UTF-8, a link out of the project, read-only) is left as it is and named in the reply.
v3.1.1

gemini-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.
v3.1.0 — The New Era Edition

Glass-box tools: every Gemini tool now says what it does — reads, writes or rewrites — so your client knows when to ask first. In Gemini CLI and Google Antigravity.

  • Every tool is labelled. All 13 tools carry MCP tool annotations, matched to what each one does: 8 read only, 4 write without losing anything (faf_init never overwrites, faf_auto fills empty slots only, faf_gemini and faf_agents keep your own text), and faf_migrate rewrites the file. None reaches the network. Clients that read the labels can let reads run and ask before writes.
  • Its own card. A refreshed FAF passport (agent.fafa, written with faf-cli 8.2's card init) and MCP Server Card, both 3.1.0 with all 13 tools and FAF's context.
  • Works in Google Antigravity, local (uvx) or hosted (serverUrl). See Google Antigravity below.
  • A new look: the gemini-faf-mcp page, redesigned to feel at home for Google developers.
  • The hosted function scores always-33, the same engine as everything else.

Earlier: v3.0.0 — The Always33 Edition — one engine, one number: the same score as faf-cli 8, claude-faf-mcp 7, faf-mcp 4 and grok-faf-mcp 2.

v2.8.2 — The Full-Facts Edition

Privacy patch — FAFClient's start-up ping is now opt-in (FAF_TELEMETRY=1).

FAFClient (the Python SDK client — the MCP server never used it) sent a start-up ping, package name and version, by default, and the opt-out wasn't documented. It now sends only when you set FAF_TELEMETRY=1; FAF_TELEMETRY_OFF still turns it off. See faf.one/privacy.

v2.8.1 was a dependency patch — faf-python-sdk floor >=1.4.0, where the interop functions are now named author_agents_md / author_gemini_md. Authored AGENTS.md / GEMINI.md output is byte-identical.

v2.8.0 — faf_auto now grounds its detection in the repo's own files, and every faf_model reference template scores 100% Trophy.

faf_auto used to read only the root manifest (pyproject.toml, package.json, …). It now also reads the files that carry the real stack: docker-compose service images map onto database / cache / search / storage (a running Postgres service is the database — it beats a dependency guess), Makefile / justfile targets map onto the commands block (test / build / check-all, root file or a nested backend/Makefile), and .github/workflows/ sets cicd. A polyglot repo that reported library / JavaScript now reports its real Postgres + Redis + FastAPI stack. In parity with faf-cli 7.10.

Separately: the 15 faf_model reference templates were scoring 48–57% — they filled 4 stack slots and used null. All rewritten to the full 21-slot schema; every one is 100% Trophy now, and a test keeps it that way. 13 tools · 265 tests.

v2.7.1 / v2.7.0 — The Interop Edition — faf_agents / faf_gemini rewritten as faf-python-sdk authoring-tool wrappers (were 4-field stubs); new faf_migrate brings a .faf up to the current format. v2.6.0 — The Agent Card Edition added a real agent.fafa passport, an MCP Server Card (SEP-2127), and an AI Catalog entry. v2.5.0 — The Dart Edition detects Dart/Flutter from pubspec.yaml. v2.4.2 — The Confinement Edition confined every caller path argument. v2.4.0 — The Chameleon Edition auto-selects its transport: stdio locally, Streamable HTTP on Cloud Run.


One-Minute Setup

1. Install

bash
uvx gemini-faf-mcp          # zero-install run via uvx (fetched from PyPI)# or: pip3 install gemini-faf-mcp

2. Add to Gemini CLI

bash
gemini extensions install https://github.com/Wolfe-Jam/gemini-faf-mcp

3. Author your project context

In your Gemini CLI:

> /faf:setup

That writes a starter project.faf and scores it. Then ask Gemini to fill it in from your repo (it calls faf_auto), and run /faf:score to see what's left. From then on, every Gemini session in this project reads it automatically.

Tip: Trophy ✪ = 100%: AI is optimized to code. /faf:score shows exactly which slots are still empty.


The "One-File" Advantage

A .faf file is structured YAML that captures your project DNA. Every AI agent reads it once and knows exactly what you're building.

yaml
# project.faf — your project, machine-readablefaf_version: "3.0"project:  name: my-api  goal: REST API for user management  main_language: Pythonstack:  backend: FastAPI  database: PostgreSQL  testing: pytesthuman_context:  who: Backend developers  what: User CRUD with auth  why: Replace legacy PHP service

Result: Gemini reads this once and knows your project. No 20-minute onboarding. No wrong assumptions. Every session starts aligned.

FAF defines. MD instructs. AI codes.

What about my GEMINI.md?

You don't replace it. .faf authors it. Run faf_gemini and you get a fresh GEMINI.md in Gemini CLI's own hierarchical, @file-importable convention — setup, verify, key files, stack, confirm-first actions — authored from a single source of truth instead of hand-maintained. Your hand-written content outside the faf-managed block is preserved.

bash
> /faf:export# Authors GEMINI.md from project.faf

.faf is the source. GEMINI.md is one of its outputs. Same logic for AGENTS.md (OpenAI Codex), .cursorrules, CLAUDE.md, and others — write once, render everywhere.


Auto-Detect Your Stack

faf_auto scans your project's manifest files and its docker-compose services, Makefile targets, and CI config, then authors a .faf with accurate slot values. No manual entry needed.

> Auto-detect my project stack
json
{  "detected": {    "main_language": "Python",    "package_manager": "uv",    "framework": "FastAPI",    "api_type": "REST",    "database": "PostgreSQL",    "cache": "Redis",    "hosting": "Docker Compose",    "cicd": "GitHub Actions",    "commands": { "test": "make test", "build": "make build", "lint": "make check-all" }  },  "score": 79,  "tier": "GREEN"}

database and cache came from docker-compose.yml, commands from the Makefile, cicd from .github/workflows/ — none of which the manifest scan sees. Fill in the six W's and you are at Trophy.

What it scans:

FileDetects
pyproject.tomlPython + build system + frameworks (FastAPI, Django, Flask, FastMCP)
package.jsonJavaScript/TypeScript + frameworks (React, Vue, Next.js, Express)
Cargo.tomlRust + cargo + frameworks (Axum, Actix)
go.modGo + go modules + frameworks (Gin, Echo)
requirements.txt / Gemfile / composer.jsonPython (fallback) / Ruby / PHP
docker-compose.ymldatabase / cache / search / storage from service images (Postgres, Redis, Elasticsearch, MinIO, ClickHouse, Qdrant, …)
Makefile / justfiletest / build / lint commands from targets (root, or a nested backend/ dir)
.github/workflows/cicd: GitHub Actions (also GitLab CI, CircleCI)

Priority rule: pyproject.toml / Cargo.toml / go.mod take priority over package.json. File-facts (a real compose service, a Makefile target) win over dependency guesses. Only sets values that are actually detected — no hardcoded defaults.


Google Antigravity

Antigravity reads one MCP config file, ~/.gemini/config/mcp_config.json, and takes both modes.

Local (stdio):

json
{ "mcpServers": { "gemini-faf": { "command": "uvx", "args": ["gemini-faf-mcp"] } } }

Hosted:

json
{ "mcpServers": { "gemini-faf": { "serverUrl": "https://mcpaas.live/gemini/mcp/v1" } } }

Antigravity expects serverUrl, not url or httpUrl.

All 13 Tools

Every tool carries MCP tool annotations: read only (faf_read, faf_validate, faf_score, faf_discover, faf_stringify, faf_context, faf_about, faf_model), writes without losing anything (faf_init, faf_auto, faf_gemini, faf_agents), rewrites the file (faf_migrate).

Create & Detect

ToolWhat it does
faf_initCreate a starter .faf file with project name, goal, and language
faf_autoAuto-detect stack from manifest files and author/update .faf
faf_discoverFind .faf files in the project tree

Validate & Score

ToolWhat it does
faf_validateFull Mk4 validation — score, tier, slot counts, errors, warnings
faf_scoreQuick Mk4 score — score, tier, populated/active/total slot counts

Read & Transform

ToolWhat it does
faf_readParse a .faf file into structured data
faf_stringifyConvert parsed FAF data back to clean YAML
faf_contextGet Gemini-optimized context (project + stack + score)

Export & Interop

ToolWhat it does
faf_geminiExport GEMINI.md in Gemini CLI's hierarchical convention (non-destructive)
faf_agentsExport a BETTER-shaped AGENTS.md for OpenAI Codex, Cursor, and other AI tools (non-destructive)

Migrate

ToolWhat it does
faf_migrateBring a .faf up to the current format version (3.0); dry_run to preview

Reference

ToolWhat it does
faf_aboutFAF format info — IANA registration, version, ecosystem
faf_modelGet a 100% Trophy-scored example .faf for any of 15 project types

Score and Tier System

Your .faf file is scored on completeness — how many slots are filled with real values.

ScoreTierMeaning
100%TROPHYAI has full context for your project
99%GOLDExceptional
95%SILVERTop tier
85%BRONZEMinimum recommended — AI can build from here
70%GREENSolid foundation
55%YELLOWNeeds improvement
<55%REDMajor gaps — AI will guess
0%WHITEEmpty

Aim for Bronze (85%+). That's where AI stops guessing and starts knowing.


Using with Gemini CLI

> Create a .faf file for my Python FastAPI project> Auto-detect my project and fill in the stack> Score my .faf and show what's missing> Export GEMINI.md for this project> Show me a 100% example for an MCP server> What is FAF and how does it work?> Read my project.faf and summarize the stack> Validate my .faf and fix the warnings> Migrate my project.faf to the current format

Architecture

gemini-faf-mcp v3.1.2├── server.py              → FastMCP MCP server (13 tools, dual-transport, Mk4 scoring)├── safe_path.py           → path confinement for caller-supplied `path` args├── inject.py              → non-destructive faf-managed-block injection├── interrogate.py         → Full-Facts grounding (docker-compose + Makefile signals)├── main.py                → Cloud Run REST API (GET/POST/PUT)├── models.py              → 15 project type examples└── src/gemini_faf_mcp/    → Python SDK (FAFClient, parser)

The MCP server delegates to faf-python-sdk for parsing, validation, Mk4 scoring, and AGENTS.md / GEMINI.md authoring. Stack detection in faf_auto — including the Full-Facts grounding — is Python-native, no external CLI dependencies.


Testing

bash
pip3 install -e ".[dev]"python -m pytest tests/ -v

308 tests passing across the FastMCP server, CLI flags, Cloud Function, Mk4 WJTTC championship, Full-Facts grounding, path-confinement, write-guard, model-parity, Dart detection, and client-telemetry suites. Championship-grade test coverage — WJTTC certified.


FAF Ecosystem

One format, every AI platform.

PackagePlatformRegistry
claude-faf-mcpAnthropicnpm + MCP #2759
gemini-faf-mcpGooglePyPI
grok-faf-mcpxAInpm
rust-faf-mcpRustcrates.io
faf-cliUniversalnpm

Python SDK

Use FAF directly in Python without MCP:

python
from gemini_faf_mcp import FAFClient, parse_faf, validate_faf, find_faf_file
# Parse and validate locallydata = parse_faf("project.faf")result = validate_faf(data)print(f"Score: {result['score']}%, Tier: {result['tier']}")
# Find .faf files automaticallyfaf_path = find_faf_file(".")
# Or use the Cloud Run endpointclient = FAFClient()dna = client.get_project_dna()

FAFClient sends no telemetry unless you set FAF_TELEMETRY=1, which adds one start-up ping (package name and version). FAF_TELEMETRY_OFF always turns it off. Remote mode sends your requests to the Cloud Run endpoint. Privacy: faf.one/privacy.


Cloud Run REST API

Live endpoint for badges, multi-agent context brokering, and voice-to-FAF mutations.

https://faf-source-of-truth-631316210911.us-east1.run.app

Supports agent-optimized responses (Gemini, Claude, Grok, Jules, Codex/Copilot/Cursor) via X-FAF-Agent header. Voice mutations via Gemini Live through PUT endpoint. Auto-deploys via Cloud Build on push to main.


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


Links

Citation

If you use gemini-faf-mcp or the .faf / .fafm / .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). Permanent Memory and Instant Recall: The .fafm Standard for Multi-Profile AI Agent Memory. Zenodo. https://doi.org/10.5281/zenodo.20348942

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{wolfe2026fafm,  title     = {Permanent Memory and Instant Recall: The .fafm Standard for Multi-Profile AI Agent Memory},  author    = {Wolfe, James},  year      = {2026},  month     = {may},  publisher = {Zenodo},  doi       = {10.5281/zenodo.20348942},  url       = {https://doi.org/10.5281/zenodo.20348942}}
@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


Built by @wolfe_jam | wolfejam.dev


Get the CLI

faf-cli — The original AI-Context CLI. A must-have for every builder.

bash
npx faf-cli auto

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

来源:README.md,提交 10e3747

工具

13

faf_read

Faf Read

Read project DNA from a .faf file. Returns the full parsed structure including project info, stack, preferences, and scoring data. Use this as the first step to understand any FAF-enabled project.

输入参数path

faf_validate

Faf Validate

Validate a .faf file and return score, tier, and issues. Returns errors (must fix) and warnings (should fix) with specific messages. Use after faf_init or when checking if a .faf file meets quality standards.

输入参数path

faf_score

Faf Score

Quick Mk4 score check — returns score (0-100%), tier, and slot counts. Uses the Mk4 always-33 scoring engine (faf-kernel parity) for universal parity. Use this for status checks; use faf_validate when you need error details.

输入参数path

faf_discover

Faf Discover

Find .faf files in the project tree by walking up from start_dir. Searches the current directory and parent directories for project.faf. Use this before faf_read to locate the file automatically.

输入参数start_dir

faf_init

Faf Init

Create a starter .faf file with project name, goal, and language. Writes a valid FAF YAML file with all required sections. Will not overwrite an existing file — use faf_discover first to check. The path is confined to the project root (cwd / FAF_ALLOWED_ROOTS).

输入参数goalnamepathlanguage

faf_stringify

Faf Stringify

Convert parsed FAF data back to YAML string. Useful for displaying the raw .faf content or preparing it for editing. Reads the file, parses it, then re-serializes to clean YAML.

输入参数path

faf_context

Faf Context

Get Gemini-optimized context from a .faf file. Returns the key sections an AI needs: project info, stack, instructions, and score. Use this to quickly understand a project without reading the full .faf structure.

输入参数path

faf_gemini

Faf Gemini

Export and write GEMINI.md from a .faf file (non-destructive). Authors GEMINI.md in Gemini CLI's own convention (hierarchical, @file-importable — setup · verify · key files · stack · confirm-first actions) via faf-python-sdk's authoring tool, in parity with faf-cli's `faf export --gemini`. Injects it as a faf-managed block, preserving any hand content. Re-running updates the block in place.

输入参数path

faf_agents

Faf Agents

Export and write AGENTS.md from a .faf file (non-destructive). Authors a BETTER-shaped AGENTS.md (setup · tests · layout · conventions · three-tier guardrails · definition of done · security · commit) via faf-python-sdk's authoring tool — in parity with faf-cli's `faf export --agents`. Injects it into AGENTS.md as a faf-managed block, preserving any hand content. Re-running updates the block in place — it never overwrites your file.

输入参数path

faf_migrate

Faf Migrate

Migrate a .faf file to the current format version (3.0). Bumps `faf_version`, ensures the section roots exist (`project`, `stack`, `human_context`, `monorepo`), and re-serializes. Legacy slot names (`frontend`/`database`/…) still score via the registry's aliases — this only touches the version and structure, never your values. The file is re-serialized, so YAML comments and formatting are not kept. Parity with faf-cli's `faf migrate`. Pass dry_run=true to preview.

输入参数pathdry_run

faf_about

Faf About

FAF format info — IANA registration, version, ecosystem. Returns metadata about the FAF format, server version, and available MCP bridges. Use this when users ask what FAF is or how it connects to other AI platforms.

无需输入参数。

faf_model

Faf Model

Get a 100% Trophy-scored example .faf file for a specific project type. Returns a complete, realistic project.faf that fills all 33 scored slots (populated, or slotignored where a slot does not apply). Use this as a reference when building or improving a .faf file — shows exactly what 100% looks like. Call without arguments to list all 15 available project types.

输入参数project_type

faf_auto

Faf Auto

Auto-detect project stack and author/update a .faf file. Scans package.json, pyproject.toml, Cargo.toml, go.mod, and other manifest files for language, framework, database, API type, and build tools — then grounds the result in the repo's own files: docker-compose service images (Postgres, Redis, Elasticsearch...) map onto stack slots, and Makefile / justfile targets map onto test / build / lint commands. Facts from files, no hardcoded defaults. Creates a new .faf if none exists, or fills empty slots in an existing one.

输入参数pathdirectory

版本历史

5
  1. v3.1.2最新Nov 6, 2026
  2. v3.1.1Oct 16, 2026
  3. v3.1.0Oct 6, 2026
  4. v3.0.0Sep 29, 2026
  5. v2.8.2Sep 16, 2026

评分

已满足适用检查项的 90%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分
  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分