convez.ai
MCP ServerProdutividadeIntermediário
Wolfe-Jam

rust-faf-mcp

Wolfe-Jam/rust-faf-mcp

Contexto persistente de projeto em YAML para clientes MCP Rust

Ver no GitHub
BomPluginScore · de 0 a 100

Servidor MCP nativo em Rust que persiste contexto de projeto via formato FAF (YAML). Elimina a necessidade de re-explicar seu projeto a cada sessão de IA — um arquivo .faf contém toda a estrutura, dependências e comandos que agentes precisam saber. Instalável via cargo, sem configuração.

Instalação

$npx convez-ai Wolfe-Jam/rust-faf-mcp

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
5
Forks
1
Acompanhando
0
Saúde
71%
Último commit
há 2 dias
Versão
v0.9.0
Issues abertas
0
Contribuidores
1

Casos de uso

  • Manter contexto de projeto entre múltiplas sessões com Claude e outros LLMs
  • Documentar arquitetura de Rust em formato machine-readable para agentes IA
  • Automatizar onboarding de novos agentes IA no projeto com faf_auto

Veredito

Ferramenta sólida para engenheiros Rust que trabalham com agentes IA — resolve um problema real (contexto esquecido entre sessões) com formato padronizado IANA. A instalação é trivial e a integração com Claude Desktop funciona direto via stdio.

README

A tradução para o português deste README ainda está na fila.

rust-faf-mcp

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

FAF defines. 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 Tests IANA License

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) ◇ BRONZE
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 2024
  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

ToolWhat it does
faf_autoZero to AI context in one command — init, enhance, sync, score, done
faf_initCreate or enhance project.faf from Cargo.toml, package.json, pyproject.toml, or go.mod
faf_gitGenerate project.faf from any GitHub repo URL — no clone needed
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)

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

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

112 tests across 6 files:

cargo test    # runs all 112
FileTestsCoverage
mcp_protocol.rs9Init handshake, tools/list, resources, schema validation, ID preservation
tools_functional.rs25All 9 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
tier4_aero.rs21Manifest 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.

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

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: 2024 | LTO: enabled | Strip: symbols

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

Links

License

MIT


Built by @wolfe_jam | wolfejam.dev

Ver o original no GitHub

Bom para

Relacionados