io.github.Wolfe-Jam/gemini-faf-mcp

编码与调试

by wolfe-jam

为 Gemini 提供 FAF 单一事实源,可从 .faf 文件读取项目 DNA,并纳入 Ecosystem #2759 的上下文。

什么是 io.github.Wolfe-Jam/gemini-faf-mcp

为 Gemini 提供 FAF 单一事实源,可从 .faf 文件读取项目 DNA,并纳入 Ecosystem #2759 的上下文。

README

gemini-faf-mcp 🧬

Unify your AI project context. One file to define them all. Bridges CLAUDE.md, GEMINI.md, AGENTS.md, and GROK.md into a single, IANA-registered source of truth.

<!-- mcp-name: io.github.Wolfe-Jam/gemini-faf-mcp -->

PyPI Downloads Tests IANA

What's New in v2.2.0

Mk4 Championship Scoring Engine — all 12 tools now use the same scoring algorithm as the Rust compiler and TypeScript CLI. faf_score and faf_validate return slot-level detail (populated, active, total). Scores match across every FAF tool in every language. 221 tests, 41 new WJTTC championship tests. Dead code removed (sync_faf.py).

Stop re-explaining your project to every new AI session.

Gemini, Claude, and OpenAI all have different ways of "learning" your project. FAF (Foundational AI-context Format) unifies them into one machine-readable .faf file.

Result: Zero context drift. Zero-minute onboarding. 100% project alignment.

FeatureCLAUDE.mdGEMINI.mdAGENTS.mdGROK.mdproject.faf
FormatMarkdownMarkdownMarkdownMarkdownStructured YAML
SchemaCustomCustomCustomCustomIANA Standard
ScoringNoNoNoNoYes (0-100%)
Auto-DetectNoNoNoNoYes (153+ files)
Vendor NeutralNoNoNoNoYes

🚀 One-Minute Setup

1. Install

bash
pip install gemini-faf-mcp

2. Auto-Detect & Initialize

Scan your existing project and create your DNA in seconds (Zero install):

bash
# Detects Python, JS/TS, Rust, Go, Ruby, and PHP manifests
bunx faf-cli auto

3. Add to Gemini CLI

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

💎 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-readable
faf_version: '2.5.0'
project:
  name: my-api
  goal: REST API for user management
  main_language: Python
stack:
  backend: FastAPI
  database: PostgreSQL
  testing: pytest
human_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.


Auto-Detect Your Stack

faf_auto scans your project's manifest files and generates a .faf with accurate slot values. No manual entry needed.

code
> Auto-detect my project stack
json
{
  "detected": {
    "main_language": "Python",
    "package_manager": "pip",
    "build_tool": "setuptools",
    "framework": "FastMCP",
    "api_type": "MCP",
    "database": "BigQuery"
  },
  "score": 100,
  "tier": "TROPHY"
}

What it scans:

FileDetects
pyproject.tomlPython + build system + frameworks (FastAPI, Django, Flask, FastMCP) + databases
package.jsonJavaScript/TypeScript + frameworks (React, Vue, Next.js, Express)
Cargo.tomlRust + cargo + frameworks (Axum, Actix)
go.modGo + go modules + frameworks (Gin, Echo)
requirements.txtPython (fallback)
GemfileRuby
composer.jsonPHP

Priority rule: pyproject.toml / Cargo.toml / go.mod take priority over package.json. Only sets values that are actually detected — no hardcoded defaults.


All 12 Tools

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 generate/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 with YAML frontmatter for Gemini CLI
faf_agentsExport AGENTS.md for OpenAI Codex, Cursor, and other AI tools

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

code
> 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

Architecture

code
gemini-faf-mcp v2.2.0
├── server.py              → FastMCP MCP server (12 tools, Mk4 scoring)
├── 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, and Mk4 scoring. Stack detection in faf_auto is Python-native — no external CLI dependencies.


Testing

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

221 tests passing across 9 WJTTC tiers (125 MCP server + 55 Cloud Function + 41 Mk4 WJTTC championship). 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 locally
data = parse_faf("project.faf")
result = validate_faf(data)
print(f"Score: {result['score']}%, Tier: {result['tier']}")

# Find .faf files automatically
faf_path = find_faf_file(".")

# Or use the Cloud Run endpoint
client = FAFClient()
dna = client.get_project_dna()

Cloud Run REST API

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

code
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

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

常见问题

io.github.Wolfe-Jam/gemini-faf-mcp 是什么?

为 Gemini 提供 FAF 单一事实源,可从 .faf 文件读取项目 DNA,并纳入 Ecosystem #2759 的上下文。

相关 Skills

网页构建器

by anthropics

Universal
热门

面向复杂 claude.ai HTML artifact 开发,快速初始化 React + Tailwind CSS + shadcn/ui 项目并打包为单文件 HTML,适合需要状态管理、路由或多组件交互的页面。

在 claude.ai 里做复杂网页 Artifact 很省心,多组件、状态和路由都能顺手搭起来,React、Tailwind 与 shadcn/ui 组合效率高、成品也更精致。

编码与调试
未扫描114.1k

前端设计

by anthropics

Universal
热门

面向组件、页面、海报和 Web 应用开发,按鲜明视觉方向生成可直接落地的前端代码与高质感 UI,适合做 landing page、Dashboard 或美化现有界面,避开千篇一律的 AI 审美。

想把页面做得既能上线又有设计感,就用前端设计:组件到整站都能产出,难得的是能避开千篇一律的 AI 味。

编码与调试
未扫描114.1k

网页应用测试

by anthropics

Universal
热门

用 Playwright 为本地 Web 应用编写自动化测试,支持启动开发服务器、校验前端交互、排查 UI 异常、抓取截图与浏览器日志,适合调试动态页面和回归验证。

借助 Playwright 一站式验证本地 Web 应用前端功能,调 UI 时还能同步查看日志和截图,定位问题更快。

编码与调试
未扫描114.1k

相关 MCP Server

GitHub

编辑精选

by GitHub

热门

GitHub 是 MCP 官方参考服务器,让 Claude 直接读写你的代码仓库和 Issues。

这个参考服务器解决了开发者想让 AI 安全访问 GitHub 数据的问题,适合需要自动化代码审查或 Issue 管理的团队。但注意它只是参考实现,生产环境得自己加固安全。

编码与调试
83.4k

by Context7

热门

Context7 是实时拉取最新文档和代码示例的智能助手,让你告别过时资料。

它能解决开发者查找文档时信息滞后的问题,特别适合快速上手新库或跟进更新。不过,依赖外部源可能导致偶尔的数据延迟,建议结合官方文档使用。

编码与调试
52.2k

by tldraw

热门

tldraw 是让 AI 助手直接在无限画布上绘图和协作的 MCP 服务器。

这解决了 AI 只能输出文本、无法视觉化协作的痛点——想象让 Claude 帮你画流程图或白板讨论。最适合需要快速原型设计或头脑风暴的开发者。不过,目前它只是个基础连接器,你得自己搭建画布应用才能发挥全部潜力。

编码与调试
46.3k

评论