npm grok-faf-mcpstdioMITupdated 14d ago
Grok asked for MCP on a URL. This is it.
What can you do with Grok FAF?
grok-faf-mcp β FASTβ‘οΈAF Edition
Home: faf.one/grok Live demo: grok.faf.one

FAF defines. MD instructs. AI codes.
v1.10.0 β The No-Fluff Edition
No fluff in a project.faf. faf_enhance is gone. RAG default is grok-4.6.
A .faf is facts. Two writers only: the repo (faf_auto) and the human (faf_go). Empty is honest. There is no enhance.
β Bookmarks it for you, helps other devs find it too.
First v0.2-conformant reader of the FAF Context Ingestion Contract β the open standard co-authored in public with @grok.
Install β one line
Add to ~/.grok/config.toml:
[mcp_servers.grok-faf-mcp]
url = "https://mcpaas.live/grok/mcp/v1"
Restart Grok TUI (or /mcps r) to refresh. Tools: faf_score, faf_validate, faf_get_tier, faf_estimate_tokens, faf_analyze (plus soul/memory ops).
Smithery: wolfe-jam/grok-faf-mcp β gateway at https://grok-faf-mcp--wolfe-jam.run.tools
Homebrew (local stdio):
brew install wolfe-jam/faf/grok-faf-mcp
Hosted on Cloudflare Workers β sub-ms cold start, no subprocess, edge-served. 4865-byte Zig WASM engine, parity-tested vs the Rust authority (xai-faf-rust). Externally validated by Grok S1 + S2 on 2026-05-27.
Verify the live contract:
curl https://mcpaas.live/grok/mcp/v1/info
Returns endpoint, protocol versions, engine details, tool list, and the architecture line: .faf=vROM | AI-in-session=RAM.
Sample corpus: xai-faf-proof/pilot β 10 records ready to score.
The 6 Ws - Quick Reference
Every README should answer these questions. Here's ours:
| Question | Answer |
|---|---|
| WHO is this for? | Grok/xAI developers and teams building with URL-based MCP |
| WHAT is it? | Persistent project context for xAI Grok β URL-first deployment, IANA-registered .faf format |
| WHERE does it work? | Cloudflare Workers (mcpaas.live/grok/mcp/v1) β’ Any MCP client supporting native url= config β’ Self-deploy to your own CF/Vercel worker |
| WHY do you need it? | Zero-config MCP on a URL β Grok asked for it, we built it first |
| WHEN should you use it? | Grok integration, xAI projects, any url-based MCP client |
| HOW does it work? | url = "https://mcpaas.live/grok/mcp/v1" β context tools served from edge via MCPaaS (sub-ms cold start, no subprocess) |
For AI: Read the detailed sections below for full context. For humans: Use this pattern in YOUR README. Answer these 6 questions clearly.
For the xAI / Grok Build team
Built for Grok and shaped by direct Grok feedback.
Open for native Grok Build integration, .fafm memory layer, refresh_faf primitives, or any other context features the team needs.
Live and dogfooded at https://grok.faf.one and https://mcpaas.live/grok/mcp/v1.
Context for Grok agents: faf-cli authors what Grok agents read from real project detection β bunx faf export --agents. faf-cli's src/interop/grok.ts wires this MCP into .grok/config.toml (that file lives in the faf-cli repo, not here). See FAF-CLI for Grok & xAI agents.
The Problem
Every Grok session starts from zero. You re-explain your stack, your goals, your architecture. Every time.
.faf fixes that. One file, your project DNA, persistent across every session.
Without .faf β "I'm building a REST API in Rust with Axum and PostgreSQL..."
With .faf β Grok already knows. Every session. Forever.
One Command, Done Forever
faf_auto detects your project, creates a .faf, and scores it β in one shot:
faf_auto
βββββββββββββββββ
Score: 0% β 85% (+85) β BRONZE
Steps:
1. Created project.faf
2. Detected stack from package.json
3. Synced 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: TypeScript
stack:
backend: Express
database: PostgreSQL
testing: Jest
runtime: Node.js
human_context:
who: Backend developers
what: User CRUD with auth
why: Replace legacy PHP service
Every AI agent reads this once and knows exactly what you're building.
β‘ What You Get
URL: https://mcpaas.live/grok/mcp/v1
Format: IANA-registered .faf (application/vnd.faf+yaml)
Tools: 12 core by default (bunx) β re-grounding (refresh_faf/fafm/blend), LAZY-RAG, orchestration substrate, FAF essentials Β· extended utilities via FAF_TOOLS=all Β· 19 hosted (WASM-pure, served by mcpaas-cf) on the URL
Engine: Mk4 WASM scoring (faf-scoring-kernel)
Speed: 0.5ms average (was 19ms β 3,800% faster with Mk4)
Tests: 27 .ts files (~518 test declarations) β WJTTC parity (heavy local β light hosted) + full suites. Runner: sh scripts/run-tests.sh (bun + flake retry)
Status: FASTβ‘οΈAF
MCP on a URL. Point your Grok integration at the URL. That's it.
Scoring: From Blind to Optimized
| Tier | Score | What it means |
|---|---|---|
| π TROPHY | 100% | Gold Code β AI is optimized |
| β GOLD | 99%+ | Near-perfect context |
| β SILVER | 95%+ | Excellent |
| β BRONZE | 85%+ | Strong baseline |
| β GREEN | 70%+ | Solid foundation |
| β YELLOW | 55%+ | AI flipping coins |
| β RED | <55% | AI working blind |
| β‘ WHITE | 0% | Start β good luck |
At 55%, Grok guesses half the time. At 100%, Grok knows your project.
Two Ways to Deploy
1. Hosted (zero install β recommended)
Point your MCP client at the production URL β edge-served on Cloudflare Workers, no subprocess, sub-ms cold start. WASM-pure tools only on this path (scoring, validation, refresh_faf).
{
"mcpServers": {
"grok-faf": {
"url": "https://mcpaas.live/grok/mcp/v1"
}
}
}
2. Local (stdio β for FS-touching workflows)
Use the local stdio path when you need filesystem access (faf_init, faf_sync, file-mutating tools):
brew install wolfe-jam/faf/grok-faf-mcp # macOS tap
# or
bunx grok-faf-mcp
Or via MCP config:
{
"mcpServers": {
"grok-faf": {
"command": "bunx",
"args": ["grok-faf-mcp"]
}
}
}
MCP Tools
Create & Detect
| Tool | Purpose |
|---|---|
faf_init |
Create project.faf from your project |
faf_auto |
Auto-detect stack and populate context |
faf_score |
AI-readiness score (0-100%) with breakdown |
faf_status |
Check current AI-readability |
refresh_faf |
Re-ground on the live .faf β re-read + re-score, report drift, return fresh DNA (drift β refresh β re-grounded). Requested by Grok. |
Drift & Orchestration (1.5 β the prestige release)
| Tool | Purpose |
|---|---|
refresh_fafm |
Re-ground on the live .fafm memory layer for one or more souls. Returns a stamped delta (added/updated facts) by default; verbatim: true for full content. Read-only Β· always stamped. Sister to refresh_faf for the RAM/memory layer in the vROM/RAM model. Built for Grok, by request. |
refresh_blend |
The baked-in two-intensity refresh (Cmd+R / Cmd+Shift+R analog). mode: "blend" (default) fires refresh_faf (light) + refresh_fafm (delta); mode: "nuke" fires both at hard intensity. Blend is BAKED IN, NOT a dial β both layers always fire; mode only affects fafm intensity. |
faf_orchestrate_recommendation |
The heavy orchestrator. Reads current substrate state, composes the full 1.5 library substrate (drift detection Β· CheckID Β· repeat-offender Β· take-a-hint Β· refresh history), returns a structured Recommendation with recommend, severity, summary, reason, and a rich hints object including effective_policy (the tier in force). Advisory only β never auto-fires (subordinate-not-daemon). Writes a recommendation receipt on every call (no silent decisions). Spec source: Grok-1 FAF-DRIFT-DETECTION-SPEC Β§9.5 + Appendix C. |
faf_get_orchestration_policy |
Pure introspection of the effective policy WITHOUT running the orchestrator. Returns { tier, thresholds, source, overrides_applied } β what aggressiveness tier the next orchestration call would use, and whether it came from defaults or a .faf:orchestration: override. No drift detection Β· no signals Β· no receipt write β the quietest tool in the 1.5 substrate. Useful for debugging unexpected orchestrator behavior, pre-flight checks before bulk operations, and override-took-effect verification. |
Sync & Persist
| Tool | Purpose |
|---|---|
faf_sync |
Sync .faf β CLAUDE.md |
faf_bi_sync |
Bi-directional .faf β platform context |
faf_trust |
Validate .faf integrity |
Read & Write
| Tool | Purpose |
|---|---|
faf_read |
Read any file |
faf_write |
Write any file |
faf_list |
Discover projects with .faf files |
RAG & Grok-Exclusive
| Tool | Purpose |
|---|---|
rag_query |
RAG-powered context retrieval |
rag_cache_stats |
RAG cache statistics |
rag_cache_clear |
Clear RAG cache |
grok_go_fast_af |
Auto-load .faf context for Grok |
Plus 34 advanced tools available with FAF_SHOW_ADVANCED=true.
Performance
Execution: 0.5ms average (97% faster than v1.1)
Fastest: 3,360ns (version β nanosecond territory)
Slowest: 1.3ms (score β Mk4 WASM)
Improvement: 19ms β 0.5ms (3,800% faster)
Engine: Mk4 WASM via faf-scoring-kernel
Memory: Zero leaks
Transport: stdio (local, bunx) Β· Streamable HTTP (hosted, Cloudflare Workers)
Benchmarked 10x per tool, warmed up, on local stdio execution. Hosted edge adds sub-ms cold start on top.
Orchestrator (faf_orchestrate_recommendation) characteristics: composition call β reads up to 6 files (.faf, .fafm, package.json, CHANGELOG.md, README.md, plus all 3 receipt logs), runs 2 analyzers (detectFafmDrift + checkId), evaluates the decision table, writes 1 receipt. Expected latency: tens of ms on warm cache; higher under cold-disk or very large .fafm corpora. Designed for occasional agent-initiated calls, not per-turn polling. detectFafmDrift is O(nΒ²) in fact count (cross-fact n-gram recurrence) β comfortable up to ~hundreds of facts.
Architecture
grok-faf-mcp
βββ src/
β βββ server.ts β MCP server (GrokFafMcpServer)
β βββ handlers/
β β βββ championship-tools.ts β 55+ tool definitions
β β βββ tool-registry.ts β Visibility filtering (core/advanced)
β β βββ engine-adapter.ts β FAF engine bridge
β βββ faf-core/compiler/faf-compiler.ts β Mk4 WASM scoring + Mk3.1 fallback
β βββ types/ β Canonical type substrate (1.5)
β β βββ drift-signals.ts β DriftSignal Β· Contradiction Β· RepeatOffender
β β βββ refresh.ts β RefreshMode
β β βββ escalation.ts β EscalationLevel
β β βββ recommendation.ts β RecommendationAction
β β βββ receipts.ts β ReceiptMetadata
β βββ detection/fafm-drift.ts β detectFafmDrift() β repetition-rate gauge
β βββ integrity/check-id.ts β checkId() β cross-stamp contradiction check
β βββ orchestrator/
β β βββ repeat-offender.ts β RepeatOffenderTracker
β β βββ take-a-hint.ts β evaluateTakeAHint() β escalation ladder
β β βββ refresh-blend.ts β runRefreshBlend()
β β βββ recommendation.ts β analyzeAndRecommend() + orchestrate()
β βββ telemetry/
β βββ refresh-receipts.ts β RefreshReceiptsLog
β βββ recommendation-receipts.ts β RecommendationReceiptsLog
βββ smithery.yaml β Smithery listing config
βββ api/index.ts β Vercel catch-site (legacy showcase surface; kept alive)
βββ vercel.json β Vercel routing for the catch-site
Production deployment: Cloudflare Workers via mcpaas-cf (serving mcpaas.live/grok/mcp/v1). The api/index.ts + vercel.json paths above stay alive as a catch-site for legacy/bookmarked links β they are no longer the production path.
Scoring pipeline: TypeScript compiler parses .faf β detects project type β The Bouncer injects slotignored for inapplicable slots β faf-scoring-kernel (WASM) scores β falls back to Mk3.1 if kernel unavailable.
Testing
27 test files (~518 test declarations) β WJTTC parity (heavy local β light hosted) + full suites (recent runs green on CI):
sh scripts/run-tests.sh
| Suite | Coverage |
|---|---|
desktop-native-validation |
Core native functions, security, performance |
mcp-conformance |
MCP protocol conformance β tools, transport, errors |
wjttc-mcp |
WJTTC MCP certification |
wjttc-bun |
WJTTC bun-migration + integrity |
wjttc-compiler-scoring |
Compiler scoring β engine, type detection, slots |
rag-system |
RAG query, caching, context retrieval |
security |
Input validation + security guards |
visibility |
Tool visibility (core/advanced filtering) |
Status & known limitations (v1.10)
v1.10.0 β The No-Fluff Edition β no fluff in a project.faf. faf_enhance is gone. RAG default is grok-4.6. Fill stays on faf_auto / faf_go. Everything below still applies; operating it honestly means surfacing what's NOT in here alongside what is.
Earlier: v1.9.0 β The ZEPH Default Edition β the proven-fast ZigβWASM scoring path behind
refresh_fafis now default-ON (same score, cheaper to compute; parity proven byte-identical β CI gate + 91/91 live). Kill switchUSE_ZEPH=0forces the canonical scorer. FRC tools stay opt-in behindUSE_FRC.
Earlier: v1.8.0 β The Closed-Loop Edition β observability writes, token math is honest, FRC contract locked. The driftβrefreshβre-ground loop can finally be measured. Earlier: v1.7.0 β The Grounded Memory Edition β ZEPH + the FRC layer over Grok Collections (
faf_gate/faf_section/faf_memory), opt-in viaUSE_FRC/USE_ZEPH; 12-tool core unchanged. Earlier: v1.6.0 β The ZEPH Edition β the ZEPH fast path for re-grounding (refresh_faf/refresh_blendvia ZigβWASMcascade.wasm, ~12Β΅s,USE_ZEPH=1;faf-clistays canonical, parity locked in CI).
What is fully supported:
- WASM-pure tools on the hosted endpoint (
https://mcpaas.live/grok/mcp/v1and client-specific routes) β scoring Β· validation Β·refresh_faf. refresh_fafandrefresh_fafmas explicit, callable re-grounding primitives.refresh_blendas the baked-in two-intensity refresh (Cmd+R / Cmd+Shift+R analog).faf_orchestrate_recommendationβ the heavy orchestrator that composes drift signals, recurrence, receipts, and take-a-hint into an advisory recommendation.faf_get_orchestration_policyβ pure introspection of the effective policy without running the orchestrator (no drift detection, no receipt write β the quietest tool in the substrate).- Full policy visibility (
effective_policy) returned on every orchestration call AND surfaced standalone viafaf_get_orchestration_policy.
Current limitations:
faf_orchestrate_recommendation,faf_get_orchestration_policy,refresh_fafm, andrefresh_blendrequire filesystem access and are only available via the local stdio path (bunx grok-faf-mcp/npx grok-faf-mcp). They are not exposed on the hosted WASM-pure endpoint. The hosted path serves the existing WASM-pure subset only (refresh_faf+ scoring + validation).- Receipt storage β cwd-relative JSON, pull-discoverable. Three append-only JSON files live at the repo root with stable schemas:
Pull-discoverable by external tools (TAF, custom indexers, observability dashboards) β read on your own schedule, no callback/push API required. Promotion to a dedicated orphan branch (mirroring the TAF pattern) is documented but deferred per ship discipline; the cwd-relative JSON is the v1 bootstrap..faf-drift-index.json β RepeatOffenderTracker β per-slot recurrence counts .faf-refresh-receipts.json β RefreshReceiptsLog β every refresh fire .faf-recommendation-receipts.json β RecommendationReceiptsLog β every orchestrator call - No multi-process file lock on the receipt logs. Within a process, the JS event loop serializes writes. Multi-agent concurrent writes can race; future task.
- Aggressiveness tier hook β
.faf:orchestration:tierreads'conservative'(default β quietest, no noisy first-impression) Β·'balanced'Β·'aggressive'.active_tieralways surfaced inhints.effective_policyfor observability, and standalone viafaf_get_orchestration_policy. The policy WRITER (faf_set_orchestration_policy) and scheduling (faf_schedule_heavy_re_ground) are not included in v1.5 β edit.faf:orchestration:tier:directly to override. - No ack mechanism yet for recommendation receipts.
acknowledged: falseby default, never auto-flipped. Take-a-hint's ladder-reset semantics fire only on explicit ack β conservative by intent. Future task: explicitacktool OR derived-from-subsequent-refresh-receipt timing. - Outcome tracking ("did this recommendation actually help?") β needs a learning layer beyond 1.5 scope.
The honest split is intentional: hosted = fast, auditable, WASM-pure; local = full capability including filesystem. We will expand the hosted surface only where it can be done safely and without compromising the model.
Subordinate-not-daemon throughout. The orchestrator NEVER auto-fires the recommended tool. Agents surface the recommendation; the user (or higher agent) decides whether to act. Even severity: 'block' is advisory.
See the public verifier and curl https://mcpaas.live/grok/mcp/v1/info for the current contract.
Ecosystem
One format, every AI platform.
| Package | Platform | Registry |
|---|---|---|
| grok-faf-mcp (this) | xAI Grok | npm + Homebrew |
| claude-faf-mcp | Anthropic | npm + MCP #2759 |
| gemini-faf-mcp | PyPI | |
| rust-faf-mcp | Rust | crates.io |
| faf-mcp | Cursor, IDE's, VS Code | npm |
| faf-cli | Terminal CLI | bunx, npm + Homebrew |
Same project.faf. Same scoring. Same result. Different execution layer.
Voice variant β grok-faf-voice (VML)
.fafm πποΈ β the voice variant of the .faf π family.
grok-faf-voice is the reference implementation of the Voice Memory Layer (VML) β what your voice agent remembers across sessions, devices, and model switches. Companion to grok-faf-mcp:
grok-faf-mcp(this) β.fafFoundational Context Layer for Grok via MCP-on-a-URL.grok-faf-voiceβ.fafmVoice Memory Layer (VML) for Grok Voice via LiveKit + xAI realtime.
Same family. Different surface. Voice swappable; memory permanent.
PyPI Β· GitHub Β· Onboarding
For the xAI / Grok Build team
This MCP server was built for Grok and continues to be shaped by direct feedback from Grok itself.
Open for deeper collaboration on:
- Native Grok Build integration
- .fafm memory layer
- refresh_faf primitives inside the Grok TUI / CLI
- Any other context or orchestration features the team needs
I ship fast, test rigorously, and dogfood everything live on https://grok.faf.one and https://mcpaas.live/grok/mcp/v1.
Happy to:
- Open PRs
- Run private dogfood sessions
- Jump on a call
- Or just ship whatever moves the needle
Real software only. Just say the word.
Contributing
PR conventions, code style, CI doctrine, MCP-tool contribution path, npm publish discipline, architecture decisions: CONTRIBUTING.md.
xAI / Grok devs welcome β TL;DR setup at the top, F1-inspired tone throughout.
For xAI / Grok Build team
Open for deeper native integration, .fafm memory layer, or Grok Build CLI collaboration.
Happy to ship PRs, dogfood, or jump on a call. Just say the word.
Citation
If you use grok-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
BibTeX
@article{wolfe2025faf,
title = {Format-Driven AI Context Architecture: The .faf Standard for Persistent Project Understanding},
author = {Wolfe, James},
year = {2025},
month = {nov},
publisher = {Zenodo},
doi = {10.5281/zenodo.18251362},
url = {https://doi.org/10.5281/zenodo.18251362}
}
@article{wolfe2026fafa,
title = {Why Agents Need a Passport: .fafa β Portable Identity for the Agentic Era},
author = {Wolfe, James},
year = {2026},
month = {aug},
publisher = {Zenodo},
doi = {10.5281/zenodo.21951641},
url = {https://doi.org/10.5281/zenodo.21951641}
}
License
MIT β Free and open source
Get the CLI
faf-cli β The original AI-Context CLI. A must-have for every builder.
npx faf-cli auto
Anthropic MCP #2759 Β· IANA Registered: application/vnd.faf+yaml Β· faf.one Β· npm Β· Talk to my Agent β
Install
Add Grok FAF to your client. Pick the one you use.
claude mcp add grok-faf-mcp -- npx -y grok-faf-mcpcodex mcp add grok-faf-mcp -- npx -y grok-faf-mcpamp mcp add grok-faf-mcp -- npx -y grok-faf-mcp{
"mcpServers": {
"grok-faf-mcp": {
"command": "npx",
"args": [
"-y",
"grok-faf-mcp"
]
}
}
}Add to `claude_desktop_config.json`, then restart Claude Desktop.
{
"mcpServers": {
"grok-faf-mcp": {
"command": "npx",
"args": [
"-y",
"grok-faf-mcp"
]
}
}
}Add to `~/.cursor/mcp.json`, or `.cursor/mcp.json` for a single project.
code --add-mcp '{"name":"grok-faf-mcp","command":"npx","args":["-y","grok-faf-mcp"]}'Or add the block manually to `.vscode/mcp.json` under `servers`.
{
"mcpServers": {
"grok-faf-mcp": {
"command": "npx",
"args": [
"-y",
"grok-faf-mcp"
]
}
}
}Add to `~/.codeium/windsurf/mcp_config.json`.
{
"mcpServers": {
"grok-faf-mcp": {
"command": "npx",
"args": [
"-y",
"grok-faf-mcp"
]
}
}
}Add to `cline_mcp_settings.json` via the MCP Servers panel.
{
"mcpServers": {
"grok-faf-mcp": {
"command": "npx",
"args": [
"-y",
"grok-faf-mcp"
]
}
}
}Add to `~/.gemini/settings.json`.
{
"mcpServers": {
"grok-faf-mcp": {
"type": "local",
"command": "npx",
"args": [
"-y",
"grok-faf-mcp"
],
"tools": [
"*"
]
}
}
}Add to `~/.copilot/mcp-config.json`, or run `/mcp add` inside the CLI.
{
"context_servers": {
"grok-faf-mcp": {
"command": {
"path": "npx",
"args": [
"-y",
"grok-faf-mcp"
]
}
}
}
}Add to your Zed `settings.json`.
npx -y grok-faf-mcpRun `goose configure`, choose **Add Extension β Command-line Extension**, and paste this command.
Score
39 / 100
Incomplete
- Documentation25/25
- Maintenance25/25
- Trust13/20
- Capability0/15
- Install experience12/15
- Documents what it does and how to connect
- Has a resolvable package or endpoint
- Exposes at least one tool, prompt or resource
- README has substantive content
- Includes a code example
- Documents its configuration
- Mentions credentials or security posture
- Last commit 7 days ago
- Has a release history
- Repository is not archived
- Licensed MIT
- Namespace verified in the official MCP registry
- Claimed by its owner
- Published under an organisation
- 0 tool(s) documented
- Provides prompt templates
- Provides resources
- 12 documented install method(s)
- Published to a package registry
- Offers a hosted endpoint β no local install
Version history
| Versions | Published |
|---|---|
| 1.10.0Latest | Aug 20, 2026 |
| 1.9.1 | Jul 1, 2026 |
| 1.9.0 | Jun 29, 2026 |