MCP Hub
Back to servers

rust-faf-mcp

RMCP-powered FAF server. 8 tools. Rust-native. IANA-registered .faf format.

Registry
Stars
1
Updated
Mar 12, 2026
Validated
Apr 22, 2026

rust-faf-mcp

MCP 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.

Install

# From crates.io
cargo install rust-faf-mcp

# Or via Homebrew (macOS, pre-built)
brew install Wolfe-Jam/faf/rust-faf-mcp

Configure

Claude Code

claude mcp add faf rust-faf-mcp

WARP / Cursor / Zed / Claude Desktop

Any MCP client that supports stdio:

{
  "mcpServers": {
    "faf": {
      "command": "rust-faf-mcp"
    }
  }
}

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

Tools

ToolWhat it does
faf_initCreate or enhance project.faf from Cargo.toml, package.json, pyproject.toml, or go.mod
faf_readParse and display project.faf contents
faf_scoreScore AI-readiness 0–100% with field-level breakdown
faf_syncSync project.fafCLAUDE.md (preserves existing content)
faf_gitGenerate project.faf from a GitHub repo URL via API
faf_compressCompress .faf for token-limited contexts (minimal / standard / full)
faf_discoverWalk up the directory tree to find the nearest project.faf
faf_tokensEstimate token count at each compression level

faf_init is iterative — run it again and it fills in what's missing. Score goes up each time.

Resources

URIContent
faf://scoring/weightsScoring weight breakdown as JSON

Architecture

src/
├── main.rs      # ~20 lines — tokio entry, rmcp stdio transport
├── server.rs    # FafServer: #[tool_router], ServerHandler, resources
└── tools.rs     # Business logic — all 8 tools, 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 1.3 for parsing, validation, compression, discovery
  • Server: rmcp 1.1 with #[tool_router] macro — handles JSON-RPC, schema generation, transport

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

Testing

91 tests across 5 files:

cargo test    # runs all 91
FileTestsCoverage
mcp_protocol.rs9Init handshake, tools/list, resources, schema validation, ID preservation
tools_functional.rs25All 8 tools — happy path, error paths, language detection
tier1_security.rs12Path traversal, null bytes, shell injection, oversized input, malformed JSON
tier2_engine.rs35Corrupt YAML, sync replacement, pipelines, dual manifests, legacy filenames, direct paths
tier3_edge_cases.rs10Unicode, CJK, score boundaries, unknown fields, GitHub URL parsing

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

Build from source

git clone https://github.com/Wolfe-Jam/rust-faf-mcp
cd rust-faf-mcp
cargo build --release
# Binary at target/release/rust-faf-mcp (4.3 MB)

Edition: 2021 | LTO: enabled | Strip: symbols

Links

License

MIT

Reviews

No reviews yet

Sign in to write a review