mcp-context-card 0.6.1 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.well-known/fafa +1 -1
- package/AGENTS.md +14 -3
- package/CHANGELOG.md +45 -0
- package/README.md +1 -1
- package/dist/bin.d.ts +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +1 -1
- package/dist/server.js +33 -7
- package/docs/MECHANISMS.md +1 -1
- package/docs/card-dark.html +6 -4
- package/docs/card-light.html +6 -4
- package/docs/card.html +6 -4
- package/docs/img/card-dark.png +0 -0
- package/docs/img/card-identity.png +0 -0
- package/docs/img/card-light.png +0 -0
- package/docs/index.html +6 -4
- package/package.json +5 -2
- package/project.faf +1 -1
- package/project.fafm +5 -4
- package/server.json +2 -2
package/.well-known/fafa
CHANGED
|
@@ -9,7 +9,7 @@ agent:
|
|
|
9
9
|
name: "mcp-context-card"
|
|
10
10
|
displayName: "mcp-context-card"
|
|
11
11
|
vendor: "io.github.Wolfe-Jam"
|
|
12
|
-
version: "0.6.
|
|
12
|
+
version: "0.6.2"
|
|
13
13
|
description: >-
|
|
14
14
|
The essential MCP components for a project's context (AGENTS.md),
|
|
15
15
|
cross-session memory, and identity — a base MCP on its own, or a
|
package/AGENTS.md
CHANGED
|
@@ -30,10 +30,16 @@ npm run typecheck # tsc --noEmit over src/ + test/
|
|
|
30
30
|
npm test # node:test — every test/*.test.ts
|
|
31
31
|
npm run test:coverage # + the coverage gate (lines 90 / funcs 85 / branches 80, src/ only)
|
|
32
32
|
npm run demo # end to end: all tools over stdio, then over stateless HTTP
|
|
33
|
+
npm run version:check # every version-bearing spot agrees with package.json
|
|
34
|
+
npm run faf:check # project.faf / project.fafm / .well-known/fafa still describe the project
|
|
33
35
|
```
|
|
34
36
|
|
|
35
|
-
CI runs `typecheck → build → test:coverage → demo`
|
|
36
|
-
Windows for every push and PR to `main`
|
|
37
|
+
CI runs `version:check → faf:check → typecheck → build → test:coverage → demo`
|
|
38
|
+
on Linux, macOS, and Windows for every push and PR to `main`
|
|
39
|
+
(`.github/workflows/ci.yml`), plus `catalog:check` / `card:check`,
|
|
40
|
+
`faf-cli check project.faf --strict` (the repo dogfoods a `project.faf` —
|
|
41
|
+
this keeps it Trophy), and `faf:nudge` (PR-only, non-blocking — warns if the
|
|
42
|
+
code's shape moved without `project.faf`) on Linux.
|
|
37
43
|
|
|
38
44
|
## Layout
|
|
39
45
|
|
|
@@ -77,7 +83,12 @@ fails on any diff.
|
|
|
77
83
|
|
|
78
84
|
`npm run typecheck && npm run build && npm test && npm run demo` all green,
|
|
79
85
|
plus `npm run catalog:check` and `npm run card:check` clean if you touched
|
|
80
|
-
`AGENTS.md`, `project.fafm`, or `.well-known/fafa
|
|
86
|
+
`AGENTS.md`, `project.fafm`, or `.well-known/fafa`, and `npm run faf:check`
|
|
87
|
+
green if you changed the layout, a dependency, or the identity. On a version
|
|
88
|
+
bump, `npm run version:check` green (it lists every spot that must move
|
|
89
|
+
together) and `project.faf` still Trophy (`faf-cli check project.faf --strict`).
|
|
90
|
+
If CI's `faf:nudge` warns on your PR, reconcile `project.faf` (and re-check
|
|
91
|
+
`project.fafm` facts if `AGENTS.md` moved) or say why it's fine.
|
|
81
92
|
|
|
82
93
|
## Authoring this file
|
|
83
94
|
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,51 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project. Adheres to [Semantic Versioning](https://semver.org).
|
|
4
4
|
|
|
5
|
+
## 0.6.2
|
|
6
|
+
|
|
7
|
+
Tool-description quality and anti-drift. Nothing here changes what the
|
|
8
|
+
server does — it makes the tool surface read better to a fresh client
|
|
9
|
+
(and to Glama's automated scorer), silences a spurious `-32601`, and
|
|
10
|
+
adds CI gates so the release-hygiene mistakes of 0.5.x/0.6.x can't recur.
|
|
11
|
+
|
|
12
|
+
- **Every tool parameter now carries a real description.** Glama's
|
|
13
|
+
automated tool scoring flagged `remember` at 2/5 on parameters —
|
|
14
|
+
`id` and `text` were bare `{ type: "string" }`, and the non-obvious
|
|
15
|
+
bit (reusing an `id` replaces that fact in place, it doesn't add a
|
|
16
|
+
second) was left entirely to inference. `remember` / `recall` /
|
|
17
|
+
`forget` params now spell out the id semantics, the exact-match
|
|
18
|
+
lookup, and the update-vs-append behavior. A new test asserts every
|
|
19
|
+
tool and every tool parameter carries a description over a minimum
|
|
20
|
+
length — a bare param can't regress back in.
|
|
21
|
+
- **`resources/templates/list` now answers with an empty list instead of
|
|
22
|
+
`-32601`.** The server declares the `resources` capability, which
|
|
23
|
+
covers that method; a client calling it (Glama's MCP Inspector does,
|
|
24
|
+
on connect) was getting method-not-found. There are no templated
|
|
25
|
+
resources — the Server Card URI is fixed — so it answers `[]`.
|
|
26
|
+
Regression-tested.
|
|
27
|
+
- **Quality gates added to CI** — all on content already in the repo, no
|
|
28
|
+
dependency added:
|
|
29
|
+
- `version:check` (`scripts/check-versions.mjs`) fails on drift between
|
|
30
|
+
the ~10 version-bearing spots; rides in `prepublishOnly` too.
|
|
31
|
+
- `faf-cli check project.faf --strict` (pinned) keeps the dogfooded
|
|
32
|
+
`project.faf` at Trophy — the repo shipped one and never verified it.
|
|
33
|
+
- `faf:check` (`scripts/check-faf-consistency.mjs`) verifies the
|
|
34
|
+
mechanically checkable parts of "do the FAF files still describe
|
|
35
|
+
reality": every `project.faf` `key_files` path exists, every
|
|
36
|
+
`project.fafm` fact `source:` exists, every `package.json` dependency
|
|
37
|
+
is named in `tech_stack`, and `.well-known/fafa`'s name/vendor/license
|
|
38
|
+
agree with `package.json` + `server.json`. Already caught one drift —
|
|
39
|
+
`@hono/node-server` was a dependency missing from `tech_stack`.
|
|
40
|
+
- `faf:nudge` (`scripts/faf-drift-nudge.mjs`, PR-only, **non-blocking**)
|
|
41
|
+
warns when a change moves the code's shape (a `src/` file added,
|
|
42
|
+
removed, or renamed; a dependency changed) without touching
|
|
43
|
+
`project.faf` — a prompt to the author, in the PR, while the context
|
|
44
|
+
is fresh.
|
|
45
|
+
- `project.fafm`'s header no longer claims to be continuously dogfooded —
|
|
46
|
+
it's a curated snapshot, reviewed at releases. The file is still one of
|
|
47
|
+
the three real sources the server reads and writes; the comment just
|
|
48
|
+
stopped overstating how often it's re-etched.
|
|
49
|
+
|
|
5
50
|
## 0.6.1
|
|
6
51
|
|
|
7
52
|
Two real bugs, both caught by the actual `/pubaaif` publish run against
|
package/README.md
CHANGED
|
@@ -191,7 +191,7 @@ The wire‑level detail is in [docs/MECHANISMS.md](./docs/MECHANISMS.md).
|
|
|
191
191
|
4. **Discovery** — `list_context_sources()`, then the same server over stateless
|
|
192
192
|
HTTP with its `.well-known` routes and `GET /card`.
|
|
193
193
|
|
|
194
|
-
|
|
194
|
+
104 tests on Linux, macOS, and Windows, coverage‑gated in CI. Two spawn a real
|
|
195
195
|
child process and check a remembered fact survives the restart — one against
|
|
196
196
|
an existing `project.fafm`, one starting from a project that has never had
|
|
197
197
|
one; another checks the stdio and HTTP tool surfaces match.
|
package/dist/bin.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export interface Launch {
|
|
|
8
8
|
root: string;
|
|
9
9
|
}
|
|
10
10
|
/** what a bare `--help` / `help` prints. */
|
|
11
|
-
export declare const HELP = "mcp-context-card 0.6.
|
|
11
|
+
export declare const HELP = "mcp-context-card 0.6.2\nServe a project's context (AGENTS.md), memory, and identity over MCP.\n\nUSAGE\n mcp-context-card stdio MCP server \u2014 what an MCP host spawns (default)\n mcp-context-card --http stateless Streamable HTTP on PORT (default 3000)\n mcp-context-card --stdio force stdio even when PORT is set\n mcp-context-card card [> f.html] render this directory's context card to stdout\n --theme light|dark --accent #hex\n mcp-context-card --help this text\n mcp-context-card --version print version\n\nENV\n MCP_CONTEXT_CARD_ROOT read AGENTS.md / project.fafm / .well-known/ from here\n PORT if set, run HTTP instead of stdio\n\nA bare run is an stdio server: it waits for a host to speak JSON-RPC on stdin,\nso it looks idle at a terminal. Try `card` or `--http` to see output directly.\nhttps://github.com/Wolfe-Jam/mcp-context-card\n";
|
|
12
12
|
/**
|
|
13
13
|
* Decide how to launch, from argv + env. Pure — so the mode matrix is unit
|
|
14
14
|
* tested without spawning a process.
|
package/dist/constants.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Server identity constants, in their own module so any file can import
|
|
2
2
|
* them without pulling in the whole server. */
|
|
3
3
|
export declare const NAME = "mcp-context-card";
|
|
4
|
-
export declare const VERSION = "0.6.
|
|
4
|
+
export declare const VERSION = "0.6.2";
|
|
5
5
|
export declare const SERVER_CARD_URI = "mcp-context-card://server-card";
|
package/dist/constants.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Server identity constants, in their own module so any file can import
|
|
2
2
|
* them without pulling in the whole server. */
|
|
3
3
|
export const NAME = "mcp-context-card";
|
|
4
|
-
export const VERSION = "0.6.
|
|
4
|
+
export const VERSION = "0.6.2";
|
|
5
5
|
export const SERVER_CARD_URI = "mcp-context-card://server-card";
|
package/dist/server.js
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
*/
|
|
17
17
|
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
18
18
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
19
|
-
import { CallToolRequestSchema, ListResourcesRequestSchema, ListToolsRequestSchema, ReadResourceRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
|
|
19
|
+
import { CallToolRequestSchema, ListResourcesRequestSchema, ListResourceTemplatesRequestSchema, ListToolsRequestSchema, ReadResourceRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
|
|
20
20
|
import { dirname, join } from "node:path";
|
|
21
21
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
22
22
|
import { findSection, parseAgentsMd } from "./agents-md.js";
|
|
@@ -70,6 +70,13 @@ export function createServer(root = ROOT) {
|
|
|
70
70
|
],
|
|
71
71
|
};
|
|
72
72
|
});
|
|
73
|
+
// The `resources` capability implies resources/templates/list. There are no
|
|
74
|
+
// templated resources here (the Server Card URI is fixed), but answer with an
|
|
75
|
+
// empty list rather than -32601 — a client shouldn't get method-not-found for
|
|
76
|
+
// something the declared capability covers.
|
|
77
|
+
server.setRequestHandler(ListResourceTemplatesRequestSchema, async () => ({
|
|
78
|
+
resourceTemplates: [],
|
|
79
|
+
}));
|
|
73
80
|
// ── Tools ───────────────────────────────────────────────────────────
|
|
74
81
|
server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
75
82
|
tools: [
|
|
@@ -98,28 +105,47 @@ export function createServer(root = ROOT) {
|
|
|
98
105
|
},
|
|
99
106
|
{
|
|
100
107
|
name: "remember",
|
|
101
|
-
description: "Persist a fact past the session boundary — written to a .fafm file, not held in memory.",
|
|
108
|
+
description: "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.",
|
|
102
109
|
inputSchema: {
|
|
103
110
|
type: "object",
|
|
104
|
-
properties: {
|
|
111
|
+
properties: {
|
|
112
|
+
id: {
|
|
113
|
+
type: "string",
|
|
114
|
+
description: "A stable key you choose for this fact — pass the same id later to recall or forget it. Exact match, case-sensitive, any string; keep it short and meaningful (e.g. \"deploy-target\", \"db-url\"). Reusing an id updates that fact rather than adding a second one.",
|
|
115
|
+
},
|
|
116
|
+
text: {
|
|
117
|
+
type: "string",
|
|
118
|
+
description: "The fact itself, as plain prose. Stored verbatim and returned as-is by recall.",
|
|
119
|
+
},
|
|
120
|
+
},
|
|
105
121
|
required: ["id", "text"],
|
|
106
122
|
},
|
|
107
123
|
},
|
|
108
124
|
{
|
|
109
125
|
name: "recall",
|
|
110
|
-
description: "Retrieve a fact stored in a previous session by id.",
|
|
126
|
+
description: "Retrieve a fact stored in a previous session by id. Exact lookup — not fuzzy or substring.",
|
|
111
127
|
inputSchema: {
|
|
112
128
|
type: "object",
|
|
113
|
-
properties: {
|
|
129
|
+
properties: {
|
|
130
|
+
id: {
|
|
131
|
+
type: "string",
|
|
132
|
+
description: "The exact id a previous remember call used. Returns the stored text, or a \"no memory for <id>\" message if nothing matches.",
|
|
133
|
+
},
|
|
134
|
+
},
|
|
114
135
|
required: ["id"],
|
|
115
136
|
},
|
|
116
137
|
},
|
|
117
138
|
{
|
|
118
139
|
name: "forget",
|
|
119
|
-
description: "Remove a fact by id — to correct or drop something stale.",
|
|
140
|
+
description: "Remove a fact by id — to correct or drop something stale. A missing id is reported, not an error.",
|
|
120
141
|
inputSchema: {
|
|
121
142
|
type: "object",
|
|
122
|
-
properties: {
|
|
143
|
+
properties: {
|
|
144
|
+
id: {
|
|
145
|
+
type: "string",
|
|
146
|
+
description: "The exact id of the fact to remove. Reports whether a fact was actually removed.",
|
|
147
|
+
},
|
|
148
|
+
},
|
|
123
149
|
required: ["id"],
|
|
124
150
|
},
|
|
125
151
|
},
|
package/docs/MECHANISMS.md
CHANGED
package/docs/card-dark.html
CHANGED
|
@@ -78,7 +78,7 @@ section:last-child{border-bottom:0}
|
|
|
78
78
|
<main class="card">
|
|
79
79
|
<div class="top">
|
|
80
80
|
<h1>mcp-context-card</h1>
|
|
81
|
-
<div class="pills"><span class="pill">io.github.Wolfe-Jam</span><span class="pill">v0.6.
|
|
81
|
+
<div class="pills"><span class="pill">io.github.Wolfe-Jam</span><span class="pill">v0.6.2</span><span class="pill accent">published</span><span class="pill">MIT</span></div>
|
|
82
82
|
</div>
|
|
83
83
|
<section>
|
|
84
84
|
<p class="label">Context — AGENTS.md</p>
|
|
@@ -93,8 +93,10 @@ npm run typecheck # tsc --noEmit over src/ + test/</code></pre>
|
|
|
93
93
|
<h2 id="test">Test</h2>
|
|
94
94
|
<pre><code class="language-bash">npm test # node:test — every test/*.test.ts
|
|
95
95
|
npm run test:coverage # + the coverage gate (lines 90 / funcs 85 / branches 80, src/ only)
|
|
96
|
-
npm run demo # end to end: all tools over stdio, then over stateless HTTP
|
|
97
|
-
|
|
96
|
+
npm run demo # end to end: all tools over stdio, then over stateless HTTP
|
|
97
|
+
npm run version:check # every version-bearing spot agrees with package.json
|
|
98
|
+
npm run faf:check # project.faf / project.fafm / .well-known/fafa still describe the project</code></pre>
|
|
99
|
+
<p>CI runs <code>version:check → faf:check → typecheck → build → test:coverage → demo</code> on Linux, macOS, and Windows for every push and PR to <code>main</code> (<code>.github/workflows/ci.yml</code>), plus <code>catalog:check</code> / <code>card:check</code>, <code>faf-cli check project.faf --strict</code> (the repo dogfoods a <code>project.faf</code> — this keeps it Trophy), and <code>faf:nudge</code> (PR-only, non-blocking — warns if the code's shape moved without <code>project.faf</code>) on Linux.</p>
|
|
98
100
|
<h2 id="layout">Layout</h2>
|
|
99
101
|
<table><thead><tr><th>Path</th><th>What</th></tr></thead><tbody><tr><td><code>src/server.ts</code></td><td>the MCP server — the nine tools + the Server Card resource</td></tr><tr><td><code>src/agents-md.ts</code></td><td>reads and section-splits this file</td></tr><tr><td><code>src/author.ts</code></td><td><code>author_agents_md</code> — BETTER via <code>agents-md-facts</code>, BEST when <code>project.faf</code> exists</td></tr><tr><td><code>src/md.ts</code></td><td>a minimal dependency-free Markdown → HTML renderer</td></tr><tr><td><code>src/render-card.ts</code></td><td>the card — identity + this file + memory + discovery, as one HTML page</td></tr><tr><td><code>src/memory.ts</code> → <code>src/faf/parse-fafm.ts</code></td><td>file-backed <code>remember</code> / <code>recall</code> / <code>forget</code></td></tr><tr><td><code>src/identity.ts</code></td><td><code>whoami</code> (<code>.fafa</code> → <code>package.json</code> fallback) + the <code>_meta</code> context block</td></tr><tr><td><code>src/catalog-gen.ts</code></td><td>writes <code>.well-known/ai-catalog.json</code> from the same three sources</td></tr><tr><td><code>src/transport/http.ts</code></td><td>the stateless Streamable HTTP app (Hono)</td></tr><tr><td><code>src/bin.ts</code></td><td>the entry point (<code>resolveLaunch</code>) — <code>stdio</code> · <code>--http</code> · <code>card</code> · <code>--help</code> · <code>--version</code></td></tr><tr><td><code>src/faf/parse-fafm.ts</code> · <code>parse-fafa.ts</code></td><td>the <code>.fafm</code> / <code>.fafa</code> parsers</td></tr></tbody></table>
|
|
100
102
|
<h2 id="conventions">Conventions</h2>
|
|
@@ -104,7 +106,7 @@ npm run demo # end to end: all tools over stdio, then over stateless HT
|
|
|
104
106
|
<h2 id="safety">Safety</h2>
|
|
105
107
|
<ul><li>Branch off <code>main</code>; CI must be green before merge.</li><li><code>npm run demo</code> writes a fact to <code>project.fafm</code> and restores the file on exit — don't kill it mid-run.</li><li>No secrets live in this repo; never add any.</li></ul>
|
|
106
108
|
<h2 id="definition-of-done">Definition of done</h2>
|
|
107
|
-
<p><code>npm run typecheck && npm run build && npm test && npm run demo</code> all green, plus <code>npm run catalog:check</code> and <code>npm run card:check</code> clean if you touched <code>AGENTS.md</code>, <code>project.fafm</code>, or <code>.well-known/fafa</code
|
|
109
|
+
<p><code>npm run typecheck && npm run build && npm test && npm run demo</code> all green, plus <code>npm run catalog:check</code> and <code>npm run card:check</code> clean if you touched <code>AGENTS.md</code>, <code>project.fafm</code>, or <code>.well-known/fafa</code>, and <code>npm run faf:check</code> green if you changed the layout, a dependency, or the identity. On a version bump, <code>npm run version:check</code> green (it lists every spot that must move together) and <code>project.faf</code> still Trophy (<code>faf-cli check project.faf --strict</code>). If CI's <code>faf:nudge</code> warns on your PR, reconcile <code>project.faf</code> (and re-check <code>project.fafm</code> facts if <code>AGENTS.md</code> moved) or say why it's fine.</p>
|
|
108
110
|
<h2 id="authoring-this-file">Authoring this file</h2>
|
|
109
111
|
<p><code>AGENTS.md</code> here is maintained by hand. The <code>author_agents_md</code> tool (or <code>faf export --agents</code>) would draft a BEST version straight from this repo's own <code>project.faf</code> plus its detected facts — the server doesn't care how the file was authored, only that it's valid Markdown.</p></div>
|
|
110
112
|
</section>
|
package/docs/card-light.html
CHANGED
|
@@ -78,7 +78,7 @@ section:last-child{border-bottom:0}
|
|
|
78
78
|
<main class="card">
|
|
79
79
|
<div class="top">
|
|
80
80
|
<h1>mcp-context-card</h1>
|
|
81
|
-
<div class="pills"><span class="pill">io.github.Wolfe-Jam</span><span class="pill">v0.6.
|
|
81
|
+
<div class="pills"><span class="pill">io.github.Wolfe-Jam</span><span class="pill">v0.6.2</span><span class="pill accent">published</span><span class="pill">MIT</span></div>
|
|
82
82
|
</div>
|
|
83
83
|
<section>
|
|
84
84
|
<p class="label">Context — AGENTS.md</p>
|
|
@@ -93,8 +93,10 @@ npm run typecheck # tsc --noEmit over src/ + test/</code></pre>
|
|
|
93
93
|
<h2 id="test">Test</h2>
|
|
94
94
|
<pre><code class="language-bash">npm test # node:test — every test/*.test.ts
|
|
95
95
|
npm run test:coverage # + the coverage gate (lines 90 / funcs 85 / branches 80, src/ only)
|
|
96
|
-
npm run demo # end to end: all tools over stdio, then over stateless HTTP
|
|
97
|
-
|
|
96
|
+
npm run demo # end to end: all tools over stdio, then over stateless HTTP
|
|
97
|
+
npm run version:check # every version-bearing spot agrees with package.json
|
|
98
|
+
npm run faf:check # project.faf / project.fafm / .well-known/fafa still describe the project</code></pre>
|
|
99
|
+
<p>CI runs <code>version:check → faf:check → typecheck → build → test:coverage → demo</code> on Linux, macOS, and Windows for every push and PR to <code>main</code> (<code>.github/workflows/ci.yml</code>), plus <code>catalog:check</code> / <code>card:check</code>, <code>faf-cli check project.faf --strict</code> (the repo dogfoods a <code>project.faf</code> — this keeps it Trophy), and <code>faf:nudge</code> (PR-only, non-blocking — warns if the code's shape moved without <code>project.faf</code>) on Linux.</p>
|
|
98
100
|
<h2 id="layout">Layout</h2>
|
|
99
101
|
<table><thead><tr><th>Path</th><th>What</th></tr></thead><tbody><tr><td><code>src/server.ts</code></td><td>the MCP server — the nine tools + the Server Card resource</td></tr><tr><td><code>src/agents-md.ts</code></td><td>reads and section-splits this file</td></tr><tr><td><code>src/author.ts</code></td><td><code>author_agents_md</code> — BETTER via <code>agents-md-facts</code>, BEST when <code>project.faf</code> exists</td></tr><tr><td><code>src/md.ts</code></td><td>a minimal dependency-free Markdown → HTML renderer</td></tr><tr><td><code>src/render-card.ts</code></td><td>the card — identity + this file + memory + discovery, as one HTML page</td></tr><tr><td><code>src/memory.ts</code> → <code>src/faf/parse-fafm.ts</code></td><td>file-backed <code>remember</code> / <code>recall</code> / <code>forget</code></td></tr><tr><td><code>src/identity.ts</code></td><td><code>whoami</code> (<code>.fafa</code> → <code>package.json</code> fallback) + the <code>_meta</code> context block</td></tr><tr><td><code>src/catalog-gen.ts</code></td><td>writes <code>.well-known/ai-catalog.json</code> from the same three sources</td></tr><tr><td><code>src/transport/http.ts</code></td><td>the stateless Streamable HTTP app (Hono)</td></tr><tr><td><code>src/bin.ts</code></td><td>the entry point (<code>resolveLaunch</code>) — <code>stdio</code> · <code>--http</code> · <code>card</code> · <code>--help</code> · <code>--version</code></td></tr><tr><td><code>src/faf/parse-fafm.ts</code> · <code>parse-fafa.ts</code></td><td>the <code>.fafm</code> / <code>.fafa</code> parsers</td></tr></tbody></table>
|
|
100
102
|
<h2 id="conventions">Conventions</h2>
|
|
@@ -104,7 +106,7 @@ npm run demo # end to end: all tools over stdio, then over stateless HT
|
|
|
104
106
|
<h2 id="safety">Safety</h2>
|
|
105
107
|
<ul><li>Branch off <code>main</code>; CI must be green before merge.</li><li><code>npm run demo</code> writes a fact to <code>project.fafm</code> and restores the file on exit — don't kill it mid-run.</li><li>No secrets live in this repo; never add any.</li></ul>
|
|
106
108
|
<h2 id="definition-of-done">Definition of done</h2>
|
|
107
|
-
<p><code>npm run typecheck && npm run build && npm test && npm run demo</code> all green, plus <code>npm run catalog:check</code> and <code>npm run card:check</code> clean if you touched <code>AGENTS.md</code>, <code>project.fafm</code>, or <code>.well-known/fafa</code
|
|
109
|
+
<p><code>npm run typecheck && npm run build && npm test && npm run demo</code> all green, plus <code>npm run catalog:check</code> and <code>npm run card:check</code> clean if you touched <code>AGENTS.md</code>, <code>project.fafm</code>, or <code>.well-known/fafa</code>, and <code>npm run faf:check</code> green if you changed the layout, a dependency, or the identity. On a version bump, <code>npm run version:check</code> green (it lists every spot that must move together) and <code>project.faf</code> still Trophy (<code>faf-cli check project.faf --strict</code>). If CI's <code>faf:nudge</code> warns on your PR, reconcile <code>project.faf</code> (and re-check <code>project.fafm</code> facts if <code>AGENTS.md</code> moved) or say why it's fine.</p>
|
|
108
110
|
<h2 id="authoring-this-file">Authoring this file</h2>
|
|
109
111
|
<p><code>AGENTS.md</code> here is maintained by hand. The <code>author_agents_md</code> tool (or <code>faf export --agents</code>) would draft a BEST version straight from this repo's own <code>project.faf</code> plus its detected facts — the server doesn't care how the file was authored, only that it's valid Markdown.</p></div>
|
|
110
112
|
</section>
|
package/docs/card.html
CHANGED
|
@@ -78,7 +78,7 @@ section:last-child{border-bottom:0}
|
|
|
78
78
|
<main class="card">
|
|
79
79
|
<div class="top">
|
|
80
80
|
<h1>mcp-context-card</h1>
|
|
81
|
-
<div class="pills"><span class="pill">io.github.Wolfe-Jam</span><span class="pill">v0.6.
|
|
81
|
+
<div class="pills"><span class="pill">io.github.Wolfe-Jam</span><span class="pill">v0.6.2</span><span class="pill accent">published</span><span class="pill">MIT</span></div>
|
|
82
82
|
</div>
|
|
83
83
|
<section>
|
|
84
84
|
<p class="label">Context — AGENTS.md</p>
|
|
@@ -93,8 +93,10 @@ npm run typecheck # tsc --noEmit over src/ + test/</code></pre>
|
|
|
93
93
|
<h2 id="test">Test</h2>
|
|
94
94
|
<pre><code class="language-bash">npm test # node:test — every test/*.test.ts
|
|
95
95
|
npm run test:coverage # + the coverage gate (lines 90 / funcs 85 / branches 80, src/ only)
|
|
96
|
-
npm run demo # end to end: all tools over stdio, then over stateless HTTP
|
|
97
|
-
|
|
96
|
+
npm run demo # end to end: all tools over stdio, then over stateless HTTP
|
|
97
|
+
npm run version:check # every version-bearing spot agrees with package.json
|
|
98
|
+
npm run faf:check # project.faf / project.fafm / .well-known/fafa still describe the project</code></pre>
|
|
99
|
+
<p>CI runs <code>version:check → faf:check → typecheck → build → test:coverage → demo</code> on Linux, macOS, and Windows for every push and PR to <code>main</code> (<code>.github/workflows/ci.yml</code>), plus <code>catalog:check</code> / <code>card:check</code>, <code>faf-cli check project.faf --strict</code> (the repo dogfoods a <code>project.faf</code> — this keeps it Trophy), and <code>faf:nudge</code> (PR-only, non-blocking — warns if the code's shape moved without <code>project.faf</code>) on Linux.</p>
|
|
98
100
|
<h2 id="layout">Layout</h2>
|
|
99
101
|
<table><thead><tr><th>Path</th><th>What</th></tr></thead><tbody><tr><td><code>src/server.ts</code></td><td>the MCP server — the nine tools + the Server Card resource</td></tr><tr><td><code>src/agents-md.ts</code></td><td>reads and section-splits this file</td></tr><tr><td><code>src/author.ts</code></td><td><code>author_agents_md</code> — BETTER via <code>agents-md-facts</code>, BEST when <code>project.faf</code> exists</td></tr><tr><td><code>src/md.ts</code></td><td>a minimal dependency-free Markdown → HTML renderer</td></tr><tr><td><code>src/render-card.ts</code></td><td>the card — identity + this file + memory + discovery, as one HTML page</td></tr><tr><td><code>src/memory.ts</code> → <code>src/faf/parse-fafm.ts</code></td><td>file-backed <code>remember</code> / <code>recall</code> / <code>forget</code></td></tr><tr><td><code>src/identity.ts</code></td><td><code>whoami</code> (<code>.fafa</code> → <code>package.json</code> fallback) + the <code>_meta</code> context block</td></tr><tr><td><code>src/catalog-gen.ts</code></td><td>writes <code>.well-known/ai-catalog.json</code> from the same three sources</td></tr><tr><td><code>src/transport/http.ts</code></td><td>the stateless Streamable HTTP app (Hono)</td></tr><tr><td><code>src/bin.ts</code></td><td>the entry point (<code>resolveLaunch</code>) — <code>stdio</code> · <code>--http</code> · <code>card</code> · <code>--help</code> · <code>--version</code></td></tr><tr><td><code>src/faf/parse-fafm.ts</code> · <code>parse-fafa.ts</code></td><td>the <code>.fafm</code> / <code>.fafa</code> parsers</td></tr></tbody></table>
|
|
100
102
|
<h2 id="conventions">Conventions</h2>
|
|
@@ -104,7 +106,7 @@ npm run demo # end to end: all tools over stdio, then over stateless HT
|
|
|
104
106
|
<h2 id="safety">Safety</h2>
|
|
105
107
|
<ul><li>Branch off <code>main</code>; CI must be green before merge.</li><li><code>npm run demo</code> writes a fact to <code>project.fafm</code> and restores the file on exit — don't kill it mid-run.</li><li>No secrets live in this repo; never add any.</li></ul>
|
|
106
108
|
<h2 id="definition-of-done">Definition of done</h2>
|
|
107
|
-
<p><code>npm run typecheck && npm run build && npm test && npm run demo</code> all green, plus <code>npm run catalog:check</code> and <code>npm run card:check</code> clean if you touched <code>AGENTS.md</code>, <code>project.fafm</code>, or <code>.well-known/fafa</code
|
|
109
|
+
<p><code>npm run typecheck && npm run build && npm test && npm run demo</code> all green, plus <code>npm run catalog:check</code> and <code>npm run card:check</code> clean if you touched <code>AGENTS.md</code>, <code>project.fafm</code>, or <code>.well-known/fafa</code>, and <code>npm run faf:check</code> green if you changed the layout, a dependency, or the identity. On a version bump, <code>npm run version:check</code> green (it lists every spot that must move together) and <code>project.faf</code> still Trophy (<code>faf-cli check project.faf --strict</code>). If CI's <code>faf:nudge</code> warns on your PR, reconcile <code>project.faf</code> (and re-check <code>project.fafm</code> facts if <code>AGENTS.md</code> moved) or say why it's fine.</p>
|
|
108
110
|
<h2 id="authoring-this-file">Authoring this file</h2>
|
|
109
111
|
<p><code>AGENTS.md</code> here is maintained by hand. The <code>author_agents_md</code> tool (or <code>faf export --agents</code>) would draft a BEST version straight from this repo's own <code>project.faf</code> plus its detected facts — the server doesn't care how the file was authored, only that it's valid Markdown.</p></div>
|
|
110
112
|
</section>
|
package/docs/img/card-dark.png
CHANGED
|
Binary file
|
|
Binary file
|
package/docs/img/card-light.png
CHANGED
|
Binary file
|
package/docs/index.html
CHANGED
|
@@ -78,7 +78,7 @@ section:last-child{border-bottom:0}
|
|
|
78
78
|
<main class="card">
|
|
79
79
|
<div class="top">
|
|
80
80
|
<h1>mcp-context-card</h1>
|
|
81
|
-
<div class="pills"><span class="pill">io.github.Wolfe-Jam</span><span class="pill">v0.6.
|
|
81
|
+
<div class="pills"><span class="pill">io.github.Wolfe-Jam</span><span class="pill">v0.6.2</span><span class="pill accent">published</span><span class="pill">MIT</span></div>
|
|
82
82
|
</div>
|
|
83
83
|
<section>
|
|
84
84
|
<p class="label">Context — AGENTS.md</p>
|
|
@@ -93,8 +93,10 @@ npm run typecheck # tsc --noEmit over src/ + test/</code></pre>
|
|
|
93
93
|
<h2 id="test">Test</h2>
|
|
94
94
|
<pre><code class="language-bash">npm test # node:test — every test/*.test.ts
|
|
95
95
|
npm run test:coverage # + the coverage gate (lines 90 / funcs 85 / branches 80, src/ only)
|
|
96
|
-
npm run demo # end to end: all tools over stdio, then over stateless HTTP
|
|
97
|
-
|
|
96
|
+
npm run demo # end to end: all tools over stdio, then over stateless HTTP
|
|
97
|
+
npm run version:check # every version-bearing spot agrees with package.json
|
|
98
|
+
npm run faf:check # project.faf / project.fafm / .well-known/fafa still describe the project</code></pre>
|
|
99
|
+
<p>CI runs <code>version:check → faf:check → typecheck → build → test:coverage → demo</code> on Linux, macOS, and Windows for every push and PR to <code>main</code> (<code>.github/workflows/ci.yml</code>), plus <code>catalog:check</code> / <code>card:check</code>, <code>faf-cli check project.faf --strict</code> (the repo dogfoods a <code>project.faf</code> — this keeps it Trophy), and <code>faf:nudge</code> (PR-only, non-blocking — warns if the code's shape moved without <code>project.faf</code>) on Linux.</p>
|
|
98
100
|
<h2 id="layout">Layout</h2>
|
|
99
101
|
<table><thead><tr><th>Path</th><th>What</th></tr></thead><tbody><tr><td><code>src/server.ts</code></td><td>the MCP server — the nine tools + the Server Card resource</td></tr><tr><td><code>src/agents-md.ts</code></td><td>reads and section-splits this file</td></tr><tr><td><code>src/author.ts</code></td><td><code>author_agents_md</code> — BETTER via <code>agents-md-facts</code>, BEST when <code>project.faf</code> exists</td></tr><tr><td><code>src/md.ts</code></td><td>a minimal dependency-free Markdown → HTML renderer</td></tr><tr><td><code>src/render-card.ts</code></td><td>the card — identity + this file + memory + discovery, as one HTML page</td></tr><tr><td><code>src/memory.ts</code> → <code>src/faf/parse-fafm.ts</code></td><td>file-backed <code>remember</code> / <code>recall</code> / <code>forget</code></td></tr><tr><td><code>src/identity.ts</code></td><td><code>whoami</code> (<code>.fafa</code> → <code>package.json</code> fallback) + the <code>_meta</code> context block</td></tr><tr><td><code>src/catalog-gen.ts</code></td><td>writes <code>.well-known/ai-catalog.json</code> from the same three sources</td></tr><tr><td><code>src/transport/http.ts</code></td><td>the stateless Streamable HTTP app (Hono)</td></tr><tr><td><code>src/bin.ts</code></td><td>the entry point (<code>resolveLaunch</code>) — <code>stdio</code> · <code>--http</code> · <code>card</code> · <code>--help</code> · <code>--version</code></td></tr><tr><td><code>src/faf/parse-fafm.ts</code> · <code>parse-fafa.ts</code></td><td>the <code>.fafm</code> / <code>.fafa</code> parsers</td></tr></tbody></table>
|
|
100
102
|
<h2 id="conventions">Conventions</h2>
|
|
@@ -104,7 +106,7 @@ npm run demo # end to end: all tools over stdio, then over stateless HT
|
|
|
104
106
|
<h2 id="safety">Safety</h2>
|
|
105
107
|
<ul><li>Branch off <code>main</code>; CI must be green before merge.</li><li><code>npm run demo</code> writes a fact to <code>project.fafm</code> and restores the file on exit — don't kill it mid-run.</li><li>No secrets live in this repo; never add any.</li></ul>
|
|
106
108
|
<h2 id="definition-of-done">Definition of done</h2>
|
|
107
|
-
<p><code>npm run typecheck && npm run build && npm test && npm run demo</code> all green, plus <code>npm run catalog:check</code> and <code>npm run card:check</code> clean if you touched <code>AGENTS.md</code>, <code>project.fafm</code>, or <code>.well-known/fafa</code
|
|
109
|
+
<p><code>npm run typecheck && npm run build && npm test && npm run demo</code> all green, plus <code>npm run catalog:check</code> and <code>npm run card:check</code> clean if you touched <code>AGENTS.md</code>, <code>project.fafm</code>, or <code>.well-known/fafa</code>, and <code>npm run faf:check</code> green if you changed the layout, a dependency, or the identity. On a version bump, <code>npm run version:check</code> green (it lists every spot that must move together) and <code>project.faf</code> still Trophy (<code>faf-cli check project.faf --strict</code>). If CI's <code>faf:nudge</code> warns on your PR, reconcile <code>project.faf</code> (and re-check <code>project.fafm</code> facts if <code>AGENTS.md</code> moved) or say why it's fine.</p>
|
|
108
110
|
<h2 id="authoring-this-file">Authoring this file</h2>
|
|
109
111
|
<p><code>AGENTS.md</code> here is maintained by hand. The <code>author_agents_md</code> tool (or <code>faf export --agents</code>) would draft a BEST version straight from this repo's own <code>project.faf</code> plus its detected facts — the server doesn't care how the file was authored, only that it's valid Markdown.</p></div>
|
|
110
112
|
</section>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcp-context-card",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"mcpName": "io.github.Wolfe-Jam/mcp-context-card",
|
|
5
5
|
"description": "The essential MCP components for a project's context (AGENTS.md), cross-session memory, and identity — a base MCP on its own, or a drop-in extension for any existing MCP server. Discoverable through the Server Card _meta block and ai-catalog.json sibling entries.",
|
|
6
6
|
"keywords": [
|
|
@@ -45,7 +45,10 @@
|
|
|
45
45
|
"scripts": {
|
|
46
46
|
"build": "tsc -p tsconfig.build.json",
|
|
47
47
|
"clean": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\"",
|
|
48
|
-
"
|
|
48
|
+
"version:check": "node scripts/check-versions.mjs",
|
|
49
|
+
"faf:check": "node scripts/check-faf-consistency.mjs",
|
|
50
|
+
"faf:nudge": "node scripts/faf-drift-nudge.mjs",
|
|
51
|
+
"prepublishOnly": "npm run clean && npm run version:check && npm run faf:check && npm run build && npm run typecheck && npm test",
|
|
49
52
|
"start": "node dist/bin.js",
|
|
50
53
|
"start:http": "node dist/bin.js --http",
|
|
51
54
|
"dev": "tsx src/bin.ts",
|
package/project.faf
CHANGED
|
@@ -17,7 +17,7 @@ stack:
|
|
|
17
17
|
connection: slotignored # no database
|
|
18
18
|
hosting: Docker / any Node host — stdio for local, stateless Streamable HTTP for remote
|
|
19
19
|
cicd: GitHub Actions — typecheck + build + test:coverage + demo on 3 OSes; catalog:check + card:check on Linux
|
|
20
|
-
tech_stack: [TypeScript, "@modelcontextprotocol/sdk", "agents-md-facts", hono, yaml]
|
|
20
|
+
tech_stack: [TypeScript, "@modelcontextprotocol/sdk", "agents-md-facts", hono, "@hono/node-server", yaml]
|
|
21
21
|
human_context:
|
|
22
22
|
who: MCP host and server implementers who want a project's AGENTS.md, memory, and identity available over MCP without inventing an ad-hoc shape for each.
|
|
23
23
|
what: The essential context, memory, and identity components for MCP — usable as a base MCP on its own, or dropped into any existing MCP server as an extension. Nine tools — read_agents_md / list_agents_md_sections / author_agents_md (context), remember / recall / forget (memory), whoami (identity), list_context_sources / render_context_card (discovery) — exposed through the Server Card _meta block and a self-published ai-catalog.json. Dual transport (stdio + stateless Streamable HTTP).
|
package/project.fafm
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
# application/vnd.fafm+yaml — mcp-context-card project memory
|
|
2
|
-
#
|
|
3
|
-
#
|
|
4
|
-
#
|
|
5
|
-
#
|
|
2
|
+
# A curated snapshot of what this repo knows about itself: real facts with
|
|
3
|
+
# real sources, reviewed at releases rather than continuously re-etched.
|
|
4
|
+
# This exact file is one of the three sources the server exposes — `remember`
|
|
5
|
+
# / `recall` read and write it, and the demo proves a fact survives a full
|
|
6
|
+
# server-process restart (then restores this file exactly).
|
|
6
7
|
version: "1.1"
|
|
7
8
|
profile: "knowledge"
|
|
8
9
|
namepoint: "@mcp-context-card:public"
|
package/server.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"name": "io.github.Wolfe-Jam/mcp-context-card",
|
|
4
4
|
"title": "mcp-context-card",
|
|
5
5
|
"description": "MCP server for a project's context (AGENTS.md), memory, and identity — base or drop-in extension.",
|
|
6
|
-
"version": "0.6.
|
|
6
|
+
"version": "0.6.2",
|
|
7
7
|
"repository": {
|
|
8
8
|
"url": "https://github.com/Wolfe-Jam/mcp-context-card",
|
|
9
9
|
"source": "github"
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"registryType": "npm",
|
|
14
14
|
"registryBaseUrl": "https://registry.npmjs.org",
|
|
15
15
|
"identifier": "mcp-context-card",
|
|
16
|
-
"version": "0.6.
|
|
16
|
+
"version": "0.6.2",
|
|
17
17
|
"runtimeHint": "npx",
|
|
18
18
|
"transport": {
|
|
19
19
|
"type": "stdio"
|