rust-faf-mcp RMCP
Persistent project context in Rust. 8 MCP tools via rmcp SDK — parse, validate, score, compress, discover, and token analysis. Single binary, zero config. IANA-registered format (application/vnd.faf+yaml). One file, every AI platform.
README
rust-faf-mcp
Stop re-explaining your project to every AI session. One
.faffile captures your project DNA. Every AI reads it once and knows what you're building.
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
cargo install rust-faf-mcp
Then point any MCP client at it:
# Claude Code
claude mcp add faf rust-faf-mcp
// WARP / Cursor / Zed / Claude Desktop — any stdio MCP client
{
"mcpServers": {
"faf": {
"command": "rust-faf-mcp"
}
}
}
No flags, no config files, no network listener. Pure stdio JSON-RPC.
Or via Homebrew (macOS, pre-built):
brew install Wolfe-Jam/faf/rust-faf-mcp
One command, done forever
faf_auto detects your project, creates a .faf, enhances it to max score, and syncs CLAUDE.md — in one shot:
faf_auto complete
━━━━━━━━━━━━━━━━━
Score: 0% → 85% (+85) 🥈 Silver
Steps:
1. Created project.faf
2. Second enhancement pass
3. Created CLAUDE.md
Path: /home/user/my-project
What it produces:
# project.faf — your project, machine-readable
faf_version: "3.3"
project:
name: my-api
goal: REST API for user management
main_language: Rust
version: "0.1.0"
license: MIT
instant_context:
what_building: REST API for user management
tech_stack: Rust 2021
key_files:
- Cargo.toml
- src/main.rs
- README.md
commands:
build: cargo build
test: cargo test
stack:
backend: Rust
build_tool: cargo
Every AI agent reads this once and knows exactly what you're building. No 20-minute onboarding. No wrong assumptions.
Tools
Create & Detect
| Tool | What it does |
|---|---|
faf_auto |
Zero to AI context in one command — init, enhance, sync, score, done |
faf_init |
Create or enhance project.faf from Cargo.toml, package.json, pyproject.toml, or go.mod |
faf_git |
Generate project.faf from any GitHub repo URL — no clone needed |
faf_discover |
Walk up the directory tree to find the nearest project.faf |
Score & Validate
| Tool | What it does |
|---|---|
faf_score |
Score AI-readiness 0-100% with field-level breakdown |
faf_sync |
Sync project.faf → CLAUDE.md (preserves existing content) |
Optimize
| Tool | What it does |
|---|---|
faf_read |
Parse and display project.faf contents |
faf_compress |
Compress .faf for token-limited contexts (minimal / standard / full) |
faf_tokens |
Estimate 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.
Architecture
src/
├── main.rs # ~20 lines — tokio entry, rmcp stdio transport
├── server.rs # FafServer: #[tool_router], ServerHandler, resources
└── tools.rs # Business logic — all 9 tools, pure functions returning Value
- Runtime:
tokiosingle-threaded (current_thread) - HTTP:
reqwestasync (only used byfaf_gitfor GitHub API) - SDK:
faf-rust-sdk1.3 for parsing, validation, compression, discovery - Server:
rmcp1.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
112 tests across 6 files:
cargo test # runs all 112
| File | Tests | Coverage |
|---|---|---|
mcp_protocol.rs |
9 | Init handshake, tools/list, resources, schema validation, ID preservation |
tools_functional.rs |
25 | All 9 tools — happy path, error paths, language detection |
tier1_security.rs |
12 | Path traversal, null bytes, shell injection, oversized input, malformed JSON |
tier2_engine.rs |
35 | Corrupt YAML, sync replacement, pipelines, dual manifests, legacy filenames, direct paths |
tier3_edge_cases.rs |
10 | Unicode, CJK, score boundaries, unknown fields, GitHub URL parsing |
tier4_aero.rs |
21 | Manifest structure, version sync, server.json, manifest-server cross-validation |
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.
| Package | Platform | Registry |
|---|---|---|
| rust-faf-mcp | Rust | crates.io |
| claude-faf-mcp | Anthropic | npm + MCP #2759 |
| gemini-faf-mcp | PyPI | |
| grok-faf-mcp | xAI | npm |
| faf-cli | Universal | npm |
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
- crates.io/crates/rust-faf-mcp
- faf-rust-sdk — the parser this depends on
- faf.one — FAF home
- IANA registration —
application/vnd.faf+yaml - CHANGELOG
License
MIT
Built by @wolfe_jam | wolfejam.dev
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。