Rust Faf Mcp

io.github.Wolfe-Jam由 GitHub 帳號 Wolfe-Jam 發布v0.3.1更新於 Oct 24, 2026

Persistent project context — Rust-native MCP server. IANA-registered .faf format.

發布方自己的服務:rust.wiki

已驗證Streamable HTTP可網頁執行知識與記憶開發者工具

概覽

AI 產生的概覽

Rust 原生的 MCP 伺服器,用於 FAF 專案脈絡檔案:驗證、評分並解析 .faf 檔,讓助理了解專案內容。

可以做什麼
  • 驗證 .faf 檔,回傳完整度分數以及錯誤與警告
  • 為 .faf 檔打出 0 到 100 的分數,並提供欄位層級的明細
  • 解析 .faf 檔並回傳其正規化結構
  • README 另列出更多工具:建立與尋找 project.faf、同步到 CLAUDE.md 或 AGENTS.md、壓縮脈絡並估算 token 數
適用情境
適合維護 .faf 專案脈絡檔、希望助理直接檢查、評分或讀取該檔,而不必每次重新說明專案的情況。目前提供的三個工具只做讀取與驗證,較適合檢視而非撰寫。
執行需求
需要本機執行環境:以 cargo 安裝(需 Rust 工具鏈),或透過 npx 執行 npm 套件以下載預先編譯的執行檔;README 另提到 macOS 可用 Homebrew。不需參數、設定檔或網路監聽,使用 stdio 傳輸。也可改用 mcpaas.live 遠端端點。
安裝前請注意
README 描述的工具遠多於此處提供的三個,其中包含會建立或同步 project.faf、CLAUDE.md 與 AGENTS.md 的寫入類工具,請確認用戶端實際可見的工具。只有 faf_git 會連上網路,使用公開的 GitHub API。PATH 上的裸執行檔可能是過舊的 Homebrew 版本,建議固定版本。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Rust Faf Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.Wolfe-Jam%2Frust-faf-mcp/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "rust-faf": {
      "type": "http",
      "url": "https://mcpaas.live/rust/mcp/v1"
    }
  }
}

README

rust-faf-mcp

Persistent Project Context for Rust MCP clients. Native. Fast. cargo install

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

The Lineage Edition (v0.8.3) — one.faf/rust-faf-mcp · rmcp 3.0.1 (MCP Tier 1 foundation) · faf-rust-sdk 3.1.1 (the same always-33 kernel faf-wasm-sdk uses) · solid cargo-native Rust MCP for Rust devs

v0.8.3 — --version and --help answer instead of starting the server. See CHANGELOG.

FAF defines. AGENTS.md instructs. AI codes.

Stop re-explaining your project to every AI session. One .faf file holds your persistent project context. Every AI reads it once and knows what you're building.

[Crates.io] [FAF Trophy 100%] [Tests] [IANA] [License] [Business card · Get yours →]

Rust-native MCP (Model Context Protocol) server for FAF — structured AI project context in YAML (application/vnd.faf+yaml). Single binary, stdio transport, 4.3 MB stripped. Built on rmcp and faf-rust-sdk.

Quickstart

bash
# Rust toolchain (install):cargo install rust-faf-mcp --version 0.8.3
# No Rust (try — downloads GH Release binary for darwin/linux):npx --yes [email protected]

Point an MCP client at the pin. A bare rust-faf-mcp on PATH may be an old Homebrew binary.

bash
# Claude Codeclaude mcp add faf -- npx --yes [email protected]
jsonc
// Cursor, Claude Desktop, Windsurf — any client that reads mcpServers{  "mcpServers": {    "faf": {      "command": "npx",      "args": ["--yes", "[email protected]"]    }  }}

After cargo install rust-faf-mcp --version 0.8.3, "command": "rust-faf-mcp" is the install. Until you have proven that binary, use the npx pin.

No flags, no config files, no network listener. Pure stdio JSON-RPC.

Or via Homebrew (macOS, pre-built). If you already have it, upgrade — an old keg can sit on PATH as rust-faf-mcp:

bash
brew updatebrew install Wolfe-Jam/faf/rust-faf-mcp# already installed:brew upgrade Wolfe-Jam/faf/rust-faf-mcp

One command, done forever

faf_auto runs setup if project.faf is missing (tree detection writes mechanical facts), then syncs CLAUDE.md. It does not rewrite an existing file. Confirm setup (sweeps) lists what setup occupied — walk it; not a second write-gate. Empty human slots stay empty until you state them.

faf_auto complete━━━━━━━━━━━━━━━━━Score: 0% → 42% (+42) ● GREENSteps:  1. Setup — created project.faf  2. Created CLAUDE.md
Path: /home/user/my-project
Confirm setup (sweeps)Walk these. Detection is already a fact. Not a second write-gate.  project.name           my-api  project.main_language  Rust  stack.backend          Rust

What it produces:

yaml
# project.faf — your project, machine-readablefaf_version: "3.3"project:  name: my-api  goal: REST API for user management  main_language: Rust  version: "0.1.0"  license: MITinstant_context:  what_building: REST API for user management  tech_stack: Rust 2024  key_files:    - Cargo.toml    - src/main.rs    - README.md  commands:    build: cargo build    test: cargo teststack:  backend: Rust  build: cargo

Every AI agent reads this once and knows exactly what you're building. No 20-minute onboarding. No wrong assumptions.

Tools

Create & Detect

ToolWhat it does
faf_autoSetup if missing, sync CLAUDE.md, score — Confirm setup (sweeps); does not invent 6Ws
faf_initSetup: first write from the tree. Refuses if the file exists. Confirm setup (sweeps). 6Ws stay empty
faf_goTable-of-8 + Confirm setup (sweeps). 6Ws score after ☑. Below 100: add Human Context. After 100: courtesy check every 30 days (90 max)
faf_gitAuthor project.faf from any GitHub repo URL — no clone needed. Uses the public GitHub API; returns the text, writes nothing
faf_discoverWalk up the directory tree to find the nearest project.faf

Score & Validate

ToolWhat it does
faf_scoreScore AI-readiness 0-100% with field-level breakdown
faf_syncSync project.faf → CLAUDE.md (preserves existing content)
faf_agentsAuthor AGENTS.md from project.faf (non-destructive, preserves hand-written content)

Optimize

ToolWhat it does
faf_readParse and display project.faf contents
faf_compressCompress .faf for token-limited contexts (minimal / standard / full)
faf_tokensEstimate token count at each compression level

Lineage

ToolWhat it does
faf_dnaYour FAF DNA journey from .faf-dna: Birth DNA to now, with history. faf_init births it, faf_auto records growth — the same file as faf-cli

Every tool declares MCP annotations: faf_read, faf_score, faf_compress, faf_discover, faf_tokens, faf_dna and faf_git are read-only; the writers are non-destructive; only faf_git reaches the network.

faf_init will not overwrite an existing file. Setup occupies mechanical facts; Confirm setup (sweeps) is the walk. Empty human slots stay empty until faf_go.

Architecture

src/├── main.rs      # ~20 lines — tokio entry, rmcp stdio transport├── server.rs    # FafServer: #[tool_router], ServerHandler, resources└── tools.rs     # Business logic — tools as pure functions returning Value
  • Runtime: tokio single-threaded (current_thread)
  • HTTP: reqwest async (only used by faf_git for GitHub API)
  • SDK: faf-rust-sdk 3.1 (Cargo pin — the facade over faf-kernel/faf-fafb in faf-rust; score() for the always-33 number, validate() for structural checks only)
  • Server: rmcp 3.0.1 with #[tool_router] / #[tool_handler] — JSON-RPC, JSON Schema from the param types, stdio transport (Tier-1 assessed SDK cut)

Tools return serde_json::Value. The server adapts them to Result<String, String> for rmcp's IntoCallToolResult.

Testing

193 tests (146 integration + 47 unit):

bash
cargo test    # runs all 193
# Full ship bar (same gates as GitHub CI — run before push)bash scripts/ci.sh# Optional: block push on red CI twinbash scripts/install-hooks.sh
FileTestsCoverage
mcp_protocol.rs10Init handshake, tools/list, tool annotations, resources, schema validation, ID preservation
tools_functional.rs31Tools — happy path, error paths, language detection, faf_go
tier1_security.rs12Path traversal, null bytes, shell injection, oversized input, malformed JSON
tier2_engine.rs36Corrupt YAML, sync replacement, pipelines, dual manifests, legacy filenames, direct paths
tier3_edge_cases.rs10Unicode, CJK, score boundaries, unknown fields, GitHub URL parsing
tier4_aero.rs22Manifest structure, version sync, server.json, context block, manifest-server cross-validation
wjttc_setup.rs16Setup / Confirm setup (sweeps) — BRAKE · ENGINE · AERO · TYRE · PIT
wjttc_faf_dna.rs7.faf-dna lineage — faf_init birth, faf_auto growth, faf_dna, faf-cli's lines
src unit47setup sweep, skills digest, agents::, inject::, intent, app-type, dna:: lineage + faf-cli fixtures

Tests spawn the compiled binary as a subprocess and communicate via stdin/stdout JSON-RPC — true integration tests against the real server.

FAF Ecosystem

One format, every AI platform.

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

Build from source

bash
git clone https://github.com/Wolfe-Jam/rust-faf-mcpcd rust-faf-mcpcargo build --release# Binary at target/release/rust-faf-mcp (about 5 MB)

Edition: 2024 | LTO: enabled | Strip: symbols

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

Links

Citation

If you use rust-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

License

MIT


Built by @wolfe_jam | wolfejam.dev

來源:README.md,提交 de1b8a5

工具

3

faf_validate

Validate a .faf and return completeness score + errors/warnings (Rust→WASM, at the edge).

輸入參數content必填

faf_score

Score a .faf — 0-100 completeness (Rust→WASM, at the edge).

輸入參數content必填

faf_read

Parse a .faf and return its normalized structure (Rust→WASM, at the edge).

輸入參數content必填

版本歷史

1
  1. v0.3.1最新Sep 16, 2026

評分

已滿足適用檢查項的 100%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

其他 Rust 整合