grok-faf-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| FAF_SHOW_ADVANCED | No | If set to 'true', enables 34 advanced MCP tools in addition to the 21 core tools (totaling 55 tools). |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Two jobs: the project's context (project.faf) and its memory (.fafm). For questions about the project (stack, goal, commands), read project.faf first and answer from it. Context: faf_score shows what is missing; faf_trust checks it is well-formed; faf_init creates one; faf_sync writes the context files from it, one way: the ones that exist (CLAUDE.md, .cursorrules, .windsurfrules, .clinerules), or CLAUDE.md when there are none. Memory: refresh_faf re-reads project.faf and reports drift since the last load; refresh_fafm reloads named souls; refresh_blend does both. faf_get_orchestration_policy shows the policy without running faf_orchestrate_recommendation. rag_query needs an xAI Collection: XAI_API_KEY set (XAI_COLLECTION_ID picks the collection). Without the key, use the faf_ tools.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| resources | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| faf_scoreA | Score a project's AI-readiness 0–100% against the fixed 33-slot context model — how much project DNA an agent has before it has to guess. Deterministic: the same .faf always scores the same. Returns the score, tier, and per-slot breakdown. |
| refresh_fafB | Re-ground on the live .faf — re-read + re-score the current project DNA, report drift vs your last-known score, and return the fresh context. The explicit re-grounding primitive for long sessions: drift → refresh → re-grounded. Built for Grok, by request. |
| refresh_fafmA | Reload the latest structured memory ( |
| faf_orchestrate_recommendationA | Heavy orchestrator — given current substrate state, returns a structured recommendation about drift: which refresh to call (or |
| faf_get_orchestration_policyA | Introspect the effective orchestration policy WITHOUT running the orchestrator. Returns |
| refresh_blendA | Baked-in two-intensity refresh (Cmd+R / Cmd+Shift+R analog). Fires BOTH |
| faf_initA | Create a project.faf — the IANA-registered context file (application/vnd.faf+yaml) that gives Grok persistent project DNA (stack, structure, intent) in one portable file, so an agent reads the whole project cold each session instead of re-discovering it. Writes project.faf to the target directory (created if missing) and refuses to overwrite an existing context file unless |
| faf_trustA | Validate a project.faf with faf-cli — confirm the context file is well-formed and parses cleanly before an agent grounds on it, and report its always-33 score. The pre-flight trust check: never build on a broken context layer. |
| faf_syncA | Sync project.faf into your AI context files: the ones that exist (CLAUDE.md, .cursorrules, .windsurfrules, .clinerules), or CLAUDE.md when there are none (target: all writes every one). Non-destructive: puts a structured .faf block at the top and keeps your own text; a file faf cannot safely write (not UTF-8, a link out of the project) is left unchanged and named in the reply. One way: never writes project.faf. |
| rag_queryB | Ask a question with RAG-enhanced context from xAI Collections. Uses LAZY-RAG cache for 100,000x speedup on repeated queries. |
| rag_cache_statsA | Get LAZY-RAG cache statistics - hits, misses, hit rate, cache size |
| rag_cache_clearA | Clear the LAZY-RAG cache — drop all cached retrievals so the next rag_query rebuilds from source. Use when the underlying context has changed and you want fresh results instead of cached ones. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| Current FAF Context | Current project FAF context and metadata |
| FAF Status Summary | Project health and AI readiness status |
| FAF Working Directory | File system access for FAF operations |
TDQS
Scored across 12 tools
The refresh/score cluster has genuinely unclear boundaries: refresh_faf, refresh_fafm, and refresh_blend overlap, with refresh_blend literally composing the other two, and faf_orchestrate_recommendation exists mainly to advise which of them to call. Similarly, faf_score and faf_trust both report scores (0-100% vs always-33), and refresh_faf also re-scores, so an agent has several plausible entry points for the same outcome. The RAG tools are cleanly separated, but the core FAF family is muddy.
Two competing paradigms coexist: noun-prefixed actions (faf_sync, faf_trust, faf_score, faf_init) and verb-first actions (refresh_faf, refresh_fafm, refresh_blend), plus an outlier like faf_get_orchestration_policy that breaks the faf_<verb> pattern. The rag_ namespace is consistent, but the overall set mixes verb placement and prefixes, making it hard to predict a tool name from its action.
Twelve tools sit comfortably in the well-scoped 3-15 range for a context-management server, and the RAG trio plus the core FAF lifecycle each justify their existence. However, the refresh family (refresh_faf, refresh_fafm, refresh_blend, plus an orchestrator) could arguably be consolidated, so it is slightly over-provisioned rather than perfectly tight.
The surface covers create (faf_init), read/score (faf_score, refresh_faf), validate (faf_trust), sync (faf_sync), and RAG, but there is no direct edit/update or delete operation for project.faf. The .fafm memory lifecycle is also partial here — refresh_fafm explicitly defers to external recall/load_soul/etch tools that are not in this server, leaving gaps an agent must work around.