mcp-context-card
mcp-context-card gives an MCP client project context, persistent memory, identity, and a rendered context card.
Read the project's
AGENTS.mdwhole or by section.List
AGENTS.mdheadings to pull only the needed section.Draft an
AGENTS.mdfrom repo facts, upgraded withproject.fafwhen present.Persist facts across sessions with
remember,recall, andforget.Report the server's identity with
whoami.Show what context sources the project publishes and where.
Render the context card in MCP Apps hosts or as Markdown.
Save the card as
context-card.htmland optionally open it in a browser.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-context-card remember that the production endpoint is https://api.faf.one"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-context-card
Get one. Or add it to yours. The essential MCP server for a project's context, memory, and identity — discoverable to any MCP client, and rendered as one card you can read.
Light | Dark |
|
|
See your own project's business card — run this in its folder. It writes
context-card.html and opens it in your browser. The front is the card: name,
title, one-liner. Flip it for the back: About, Context, Memory, Discovery.
npx mcp-context-card cardIn your AI client, once the server is added (Add it to your setup), say
show context card. The AI picks where it appears: drawn in the chat by
hosts that support MCP Apps, as Markdown elsewhere. Name a place to choose:
show context card as markdown, show context card in the browser. Clients
that list MCP prompts also offer it as the prompt show; in Claude Code type
/contextcard:show.
context — the project's AGENTS.md, served whole or one section at a time.

memory — facts that persist across sessions, in a file.

identity — what this server is, from its own .fafa (agent.fafa, else .well-known/fafa).

Discovery goes through two surfaces already in the ecosystem: the Server Card
_meta block and ai-catalog.json sibling entries.
Pick one
You want to… | |
Add an |
|
Improve an | the same tool, automatically — drop in a |
Get a new MCP server base — context, memory, identity, wired | stand this up as-is; a host has all three before you write a tool of your own |
Improve your MCP with context, memory, ID — you already run one | run it alongside your existing server; nothing to migrate, it composes |
Related MCP server: terminal-mcp
A base MCP — or an extension for any other
Context, memory, and identity are essential — every MCP host needs an agent
that knows a project's instructions, remembers facts across sessions, and can
say what it is. mcp-context-card is those three, done once:
Stand it up as your base MCP. Point a host at it and an agent already has
AGENTS.mdserved section‑by‑section,remember/recall/forgetmemory that survives a restart, and awhoamiidentity — before a single tool of your own is written.Or extend any existing MCP with it. Run it alongside a server you already have — filesystem, git, a database, your own — and that agent gains context, memory, and identity discovery it didn't have. Nothing to migrate; it composes.
Ten tools, one prompt (show), two discovery surfaces already in the ecosystem (Server Card
_meta, ai-catalog.json), and a rendered card. MIT, on npm.
It composes:
serve · discover · render — this server
author BETTER, keep true —
agents-md-facts(author_agents_mdwraps it for the facts layer; adds a BEST layer of its own fromproject.fafwhen one exists)files · shell · git —
server-filesystem,server-git/ github‑mcp‑server, your test runner's MCP
Vendor-free — context is plain Markdown (AGENTS.md); the memory and
identity formats are swappable examples. It reads and writes only its own
three files (AGENTS.md, project.fafm, and agent.fafa or .well-known/fafa), plus the
context-card.html it saves on request — no general file access, no shell,
no search.
The card
The screenshot at the top of this page is exactly this: the same sources rendered as a business card in one self‑contained HTML page. The view for people: read it, screenshot it, drop it in a PR, put it on a status page.
Front: the name, a title (what it is and its version: "MCP server", "A2A agent", from where the project's
.fafasays it runs) and a one-liner (the start of its description).Back (Flip): tabs for About (the identity in full), Skills (when the
.fafalists capabilities), Context (AGENTS.md), Memory and Discovery. Long content scrolls inside the card.Landscape or portrait: the ▭ ▯ button switches the view;
--portrait/?layout=portraitsets it.Light or dark card: the card's colour is its own, like a printed card.
--theme/?theme=sets it (default: follow your OS), and ◐ switches it. The page around it always follows your OS.
Flip, tabs and the view switch are plain CSS, so they work with scripts off.
The one small inline script adds Expand all, opens a #section link on the
back, and opens every section for printing. Hosts that support MCP Apps read
ui://mcp-context-card/card.html: this same page, plus a hidden inline view
and the helper bundled in (scripts/bundle-card-app.mjs), so the host can
fit its frame. Nothing is loaded from the network. The saved
context-card.html, GET /card, and the CLI are the plain page, without
that helper and without the inline view.
In a host, the inline view is a mini card for the panel: monogram, name,
kind · version, one line, and a strip of counts (sections · facts ·
identity), with one action, "Open full card". It shows when the host's
display mode is inline (or picture-in-picture). Fullscreen, and any page
with no host, is the full card. "Open full card" asks the host for
fullscreen; a host that stays smaller points to save_context_card, which
writes the full card to context-card.html.
--expanded / ?expand=all renders both faces flat, every section open,
for a screenshot or print.
npx mcp-context-card card # at a terminal: writes context-card.html and opens it
npx mcp-context-card card --portrait # the tall view
npx mcp-context-card card --expanded # both faces flat, every section open
npx mcp-context-card card > x.html # piped/redirected: raw HTML to stdout
GET /card # live, on the HTTP transport
GET /card?layout=portrait&theme=light&accent=%230066ccrender_context_card is the one command, with three outcomes. In a chat
whose host supports MCP Apps,
the host draws the card (the mini card in a panel) and the model gets a short
line. Anywhere else, a terminal for one, the reply is the text card: the card
as Markdown. Ask for it as text and format: "markdown" gives the text card in
any chat (an MCP Apps host still draws the card too). HTML goes only to a browser: save_context_card writes
context-card.html into the project, opens it in your browser when the
server runs locally, and replies with the card as Markdown (identity, the
AGENTS.md sections, memory, discovery), a link to the full card, and its
address to copy. The Markdown is a tl;dr by default: five facts, each cut to
its first sentence as stored, so it stays small however much a project
remembers. detail: "full" lists every fact whole. The server's
instructions send show context card to render_context_card, and use
save_context_card only when the user asks for the browser or a file.
Light, dark, or auto. The colour is the owner's: set it in the project's
.fafa (metadata.cards.accent: "#0066cc"), or pass any hex with --accent
or ?accent. With none, the card is drawn in ink, black or white; no colour
is guessed.
This repo's own card, live: auto ·
light ·
dark
(in the AAIF orange its .fafa declares).
Add it to your setup
No AGENTS.md yet?
The author_agents_md tool authors one — BETTER from your repo's real
facts (build/test commands, entry points, toolchain conventions, via
agents-md-facts), or
BEST when a project.faf exists: the same facts, plus its structured
goal, who it's for, and why, as a section ahead of them. Nothing to
configure — the tier follows what's actually there.
(The ladder this follows.)
To author or keep the facts layer true outside a session:
npx agents-md-facts # author / refresh AGENTS.md
npx agents-md-facts --check # fail if missing or stale (CI, pre-commit)See the card
One command, no host, no config — from your project directory:
npx mcp-context-card cardAt a terminal it writes context-card.html and opens it in your browser. Piped
or redirected (> card.html, a script, CI) it writes raw HTML to stdout instead;
--stdout forces that from a terminal too. --expanded opens every section.
Wire it into a host
goose, Claude Desktop, Cursor, or any stdio host:
{
"mcpServers": {
"contextcard": {
"command": "npx",
"args": ["-y", "mcp-context-card"]
}
}
}No path to configure: the server asks the host which project you're in (MCP
roots — goose sends its session's working directory, the Cursor editor its open
folder), then falls back to the directory it was started in if that has an
AGENTS.md. list_context_sources
reports which project it picked and how. To pin one project instead, set
"env": { "MCP_CONTEXT_CARD_ROOT": "/abs/path/to/your/project" }; that always
wins. Identity is optional. Over HTTP instead:
PORT=8080 npx mcp-context-card. Requires Node ≥22.
HTTP mode is local by default, as the MCP transports spec asks: it binds
127.0.0.1, refuses foreign browser origins with 403, and refuses DNS names
rebound to this machine. HOST=0.0.0.0 exposes it (a container or hosted
deploy). There is no authentication or rate limiting, so put an exposed server
behind your own.
Memory is session data: an exposed server shows only its count on /card, and
never serves or lists project.fafm, unless you set
MCP_CONTEXT_CARD_PUBLISH_MEMORY=1. Details:
docs/TRANSPORT.md.
In a host that shows MCP Apps (goose, for one), the card comes with the
official MCP Apps helper, so it reports its size and fits its frame (about
700 KB, loaded by the host, not the model). For the plain card instead
(about 30 KB, the host's default frame), set
"env": { "MCP_CONTEXT_CARD_APP": "plain" }. Everywhere else the card is
plain either way.
In goose, the first start downloads the package, and goose can stop waiting
before it's ready ("process quit before initialization"). Restart goose once it
has downloaded, or install it once (npm i -g mcp-context-card) and set the
command to mcp-context-card.
If command: "npx" fails to spawn (spawn npx ENOENT — seen on Cursor, whose
host process doesn't inherit a shell PATH), point command at node and
the installed dist/bin.js instead — see
docs/WIRING.md. Transport choice is
in docs/TRANSPORT.md.
Extending an MCP you already run: most hosts accept more than one
mcpServers entry — add contextcard alongside server-filesystem,
server-git, or your own, and every agent in that host gains context,
memory, and identity discovery without anything else changing.
Your identifiers
The AI Catalog names each entry urn:air:{domain}:{namespace}:{name}, and
the domain is yours. It comes from your project's .fafa: run
npx faf-cli card init (or --domain example.com), and it writes
agent.id: urn:air:example.com:agent:<short-name>. Your catalog then publishes
urn:air:example.com:context:<short-name> and so on, with no code to change.
This repo's own .fafa says faf.one; that's our example, and yours says yours.
With no .fafa, no domain is invented: the served catalog uses the host it's
served from (localhost when you run it locally), and the static
.well-known/ai-catalog.json uses plain <short-name>:<namespace> IDs.
Why
AGENTS.md is the de-facto standard for telling a coding agent how to work in a
repo. But a client has to know the file exists and read the whole thing into
context. There is no standard way for a server to say "here is my AGENTS.md,
here is what I remember, here is who I am" — so every server that wants this
grows its own shape.
mcp-context-card answers all three through mechanisms that already exist:
Server Card
_meta(SEP‑2127) — one reverse‑DNS‑namespaced key per concern, readable in‑band as an MCP resource and atGET /mcp/server-card(the 1.x/.well-known/mcp/server-cardstill answers).ai-catalog.json— the Server Card plus sibling entries keyed by media type, atGET /.well-known/ai-catalog.json.
The context concern points at AGENTS.md (text/markdown). Memory and identity
have no de‑facto standard yet, so the examples here use
.fafm and
.fafa — one instantiation each,
swap in your own.
The wire‑level detail is in docs/MECHANISMS.md.
Tools
Tool | What it's for |
| draft an |
| return the project's |
| the headings and their levels, so a client pulls one section instead of the whole file (level 1 is the title, which the card doesn't count) |
| write a fact that will still be there next session |
| read a fact stored in a previous session |
| drop or correct a stale fact |
| this server's name, vendor, version, status, license |
| what this project publishes, in what media types, via which surface |
| shows the card: drawn in the chat by hosts that support MCP Apps, the card as Markdown everywhere else; |
| write the card to |
Seven tools only read. remember and forget write the memory file, and
save_context_card writes context-card.html, so those three are marked
destructive and a host can ask before running them. Every tool carries a
title and MCP tool annotations.
One prompt, show, asks the model to show the context card. Clients that
list MCP prompts offer it as a command.
The demo
npm run demo walks through context, memory, identity and discovery, live,
over both transports:
Context — list the
AGENTS.mdsections, then pull just## Test.Memory —
remember()a fact, stop the server process, start a new one,recall()the same fact. Only the file carries it across.Identity —
whoami(), and the Server Card_metablock read back from a live client.Discovery —
list_context_sources(), then the same server over stateless HTTP with its.well-knownroutes andGET /card.
259 tests on Linux, macOS, and Windows, coverage‑gated in CI.
npm run wjttc runs the WJTTC certification suite (seven tiers, from protocol
and Server Card conformance to stdio/HTTP parity and the shipped package). Two spawn a real
child process and check a remembered fact survives the restart — one against
an existing project.fafm, one starting from a project that has never had
one; another checks the stdio and HTTP tool surfaces match, and another checks
every tool's title and behaviour hints against what it actually does.
src/conformance/discovery.ts checks any server's Server Card, AI Catalog and
transport security against the specs, one MUST or SHOULD at a time.
Layout
Path | What |
| the ten tools + the Server Card and card resources |
| reads and section‑splits |
|
|
| a minimal dependency‑free Markdown → HTML renderer |
| the card — reads identity + |
| the card's MCP Apps script, bundled into the |
| file‑backed |
|
|
| the MCP Server Card (SEP-2127, schema v1) |
| writes |
| the stateless Streamable HTTP app (Hono) |
| Origin and Host checks (DNS-rebinding protection) |
| a portable Server Card / AI Catalog / transport checker |
| the entry point — |
Related
mcp-project-context— an earlier take on the context concern alonetext/markdown(AGENTS.md) ·application/vnd.fafm+yaml·application/vnd.fafa+yaml
License
MIT.
This repo dogfoods what it serves — its AGENTS.md is a real, current file, and
it ships a project.faf as the structured source behind it.
Available Tools
10 toolsauthor_agents_mdDraft an AGENTS.mdARead-onlyIdempotent
Author an AGENTS.md for this project and return the draft — BETTER from repo facts alone (via agents-md-facts: real build/test commands, entry points, toolchain conventions, nothing invented), or BEST when a project.faf exists (facts plus its structured goal/who/why as a second managed block ahead of them). Does not write a file.
Inputs: no named parameters.
forgetForget a FactADestructiveIdempotent
Remove a fact by id — to correct or drop something stale. A missing id is reported, not an error.
Inputs: id (required).
list_agents_md_sectionsList AGENTS.md SectionsARead-onlyIdempotent
List the headings in this project's AGENTS.md, with their levels, so a client can pull one section instead of spending context on the whole file. Level 1 is the file's title; the context card counts level 2 and below as its sections, so this list can be one longer than the card's count.
Inputs: no named parameters.
list_context_sourcesList Context SourcesARead-onlyIdempotent
What context does this project publish (AGENTS.md, memory, identity), in what media types, and through which discovery surface. For a client connecting cold.
Inputs: no named parameters.
read_agents_mdRead AGENTS.mdARead-onlyIdempotent
Return this project's AGENTS.md — the whole file, or one section by heading. The instructions a client would otherwise have to know to look for and read wholesale.
Inputs: section.
recallRecall a FactARead-onlyIdempotent
Retrieve a fact stored in a previous session by id. Exact lookup — not fuzzy or substring.
Inputs: id (required).
rememberRemember a FactADestructiveIdempotent
Persist a fact past the session boundary — written to a .fafm file, not held in memory. Reusing an existing id replaces that fact's text in place (no duplicate); a new id appends. Facts are written verification_status: unverified.
Inputs: id (required), text (required).
render_context_cardRender Context CardARead-onlyIdempotent
Show the project's context card. In a client that displays MCP Apps, the host draws it in the chat (a mini card in a chat panel). Anywhere else the reply is the card as Markdown: identity, AGENTS.md sections, memory, discovery. format: "markdown" returns the Markdown card in any client, for a user who asks for the card as text. For the original card in a browser, use save_context_card (also GET /card over HTTP).
Inputs: detail, format.
save_context_cardSave Context CardADestructiveIdempotent
Write the context card to context-card.html in the project and, when this server runs locally, open it in the person's browser. Returns the card as Markdown (identity, AGENTS.md sections, memory, discovery) plus a clickable link to the saved file. Use this when the user wants the full card in a browser. Replaces any earlier context-card.html.
Inputs: open, theme, accent, detail, +2 more.
whoamiWho Am IARead-onlyIdempotent
This server's own identity — name, vendor, version, status, license — from its .fafa card.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Most tools target clearly distinct resources/actions: AGENTS.md reading (read/list sections), memory ops (remember/recall/forget), and card publishing (render/save). The main overlap is render_context_card vs save_context_card, which both return the card as Markdown and differ only by side effect; the descriptions disambiguate this explicitly, but it still invites misselection when a user just asks for 'the card'. list_context_sources versus render_context_card is a secondary soft overlap.
The dominant pattern is verb_noun (read_agents_md, list_context_sources, render_context_card, author_agents_md), followed across the majority of tools. The deviations are the memory trio (remember/recall/forget) and whoami, which are bare verbs — internally consistent as a group and readable, so only a minor deviation from the pattern.
Ten tools is well-scoped for a context-card server, with each tool mapping to a distinct surface: AGENTS.md access, memory persistence, card rendering, and self-identity. Nothing appears redundant or padded.
Memory has remember/recall/forget but no enumeration tool, so an agent cannot discover ids to recall or forget — recall is exact-match only, creating a real dead end. AGENTS.md coverage also stops at authoring a draft with no write/save path, though that may be intentional given the server's read-oriented scope.
Maintenance
Related MCP Connectors
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Hosted MCP server and Agent Skills for specs, engineering threads, and project memory.
Persistent memory, knowledge graph, task management and more for AI agents via MCP.
Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.
Related MCP Servers
- AlicenseAqualityBmaintenance.FAF (Foundational AI-context Format) with 50+ tools - Only Persistent project context that integrates seamlessly with Claude Desktop workflows. Officially merged (#2759) Anthropic MCP server.141,046 npm23MIT
- AlicenseNot gradedqualityDmaintenanceAn agent-capable MCP server with terminal access, filesystem control, and persistent memory. It includes sandboxing, access control, activity logging, and a file-backed memory store for context across conversations.MIT
- AlicenseNot gradedqualityCmaintenanceAn MCP server that provides controlled read/write tools for managing local-first research memory in an Obsidian vault, enabling AI agents to maintain project context across sessions.4 npm1MIT
- AlicenseAqualityBmaintenanceMCP server for managing project memory in AGENTS.md. Allows agents to record and remove durable facts using save/forget tools.311 npm1MIT

