Skip to main content
Glama

faf-trinity

faf-trinity — the chassis for context, memory & agent in MCP

This reference implementation shows an MCP server exposing all three IANA-registered FAF formats — .faf (context), .fafm (memory), .fafa (agent identity) — through two mechanisms already proven live in production, not invented for this repo.

⭐ Bookmarks it for you, helps other devs find it too.

Problem

MCP servers today have no standard way to answer "who am I, what do I remember, what's my project." Every server that wants this invents its own ad-hoc shape.

Related MCP server: A-Modular-Kingdom

Solution

The same three files back both exposure mechanisms:

project.faf ──┐
project.fafm ─┼──►  Server Card _meta   (one.faf/context, one.faf/memory, one.faf/agent)
.fafa ────────┘  └► ai-catalog.json     (3 sibling entries, same 3 files)

Neither mechanism is new protocol surface — both are already running in production at faf.one and context.faf.one, months before this repo existed. This extracts the minimal, forkable pattern from a full production app down to something you can read in one sitting.

What's actually proven, not just described

npm run demo runs all three, live:

  1. Context — the same BEFORE/AFTER pattern as mcp-project-context: a plain callTool() hits a "required, none supplied" wall, then the same call routed through callToolWithContext() gets filled from project.faf.

  2. Memoryremember() a fact on one server process, kill that process entirely, spawn a fresh one, recall() the same fact. No in-memory state survives that — only the file does. That's the actual claim .fafm makes ("memory that survives across sessions"), proven by genuinely crossing a process boundary, not simulated.

  3. Identitywhoami() reads this server's own .well-known/fafa, and the same three files are shown as a Server Card _meta block — the second proven exposure mechanism.

Render project.faf

npx faf-cli show

Renders project.faf as an HTML card. This is what faf show does today — .faf only. .fafm/.fafa rendering isn't part of faf-cli yet; if that ever ships, it's a bonus, not something this repo is waiting on.

Demo

npm install && npm run demo

Generate the catalog

npm run catalog

Writes .well-known/ai-catalog.json from the same three source files (project.faf, project.fafm, .well-known/fafa). Generated, gitignored — run it yourself rather than trust a committed copy that could go stale.

Core logic

  • src/context.ts — the param-fill mechanism, generalized from mcp-project-context (no domain stub this time)

  • src/memory.ts — real, file-backed remember/recall against project.fafm itself

  • src/identity.tswhoami() + the Server Card _meta trinity block

  • src/catalog-gen.ts — generates the ai-catalog.json sibling entries

  • src/server.ts — wires all three into one MCP server

What this is

A reference implementation of context + memory + agent identity, together, for discussion.

What this is not

  • Not a library or package intended for installation

  • Not an npm package — GitHub template distribution, fork it and own it

  • Not a framework — no plugin system, no API-stability promise

  • Not a full project-context system

Citation

faf-trinity is the chassis for the agentic era. Cite the Agents paper for .fafa; Context and Memory sit beside it.

Wolfe, J. (2026). Why Agents Need a Passport: .fafa — Portable Identity for the Agentic Era. Zenodo. https://doi.org/10.5281/zenodo.21951641

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). Permanent Memory and Instant Recall: The .fafm Standard for Multi-Profile AI Agent Memory. Zenodo. https://doi.org/10.5281/zenodo.20348942

MIT

Maintenance

ActivityMaintained
ResponsivenessSyncing

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    C
    maintenance
    A local-first MCP server that provides AI agents with safe codebase access through file discovery, hybrid lexical-semantic search, and project introspection. It features durable local memory and semantic indexing while keeping all data and processing entirely on your local machine.
    74
    29
    6
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Wolfe-Jam/faf-trinity'

If you have feedback or need assistance with the MCP directory API, please join our Discord server