mcp-context-card 0.6.2 → 1.0.1

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 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.2"
12
+ version: "1.0.1"
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/CHANGELOG.md CHANGED
@@ -2,6 +2,66 @@
2
2
 
3
3
  All notable changes to this project. Adheres to [Semantic Versioning](https://semver.org).
4
4
 
5
+ ## 1.0.1
6
+
7
+ `npx mcp-context-card` now runs — it silently no-op'd when launched through
8
+ `npx` or a global install. Plus: `card` opens your context in a browser at a
9
+ terminal, and Node 20 is supported.
10
+
11
+ Once `npx` works, `npx mcp-context-card card` from a project directory is the
12
+ fastest way to see what an agent actually gets: at a terminal it writes
13
+ `context-card.html` and opens it in your browser — no MCP host, no redirect.
14
+ Piped or redirected output is unchanged (`> card.html`, scripts, CI);
15
+ `--stdout` forces raw HTML from a terminal too.
16
+
17
+ - **Node 20 supported.** `engines` was `>=22` with nothing in the code that
18
+ needed it — it runs identically on Node 20 (verified against the published
19
+ package). No more `npm warn EBADENGINE` on the current LTS. CI now runs the
20
+ full suite on Node 20, 22, and 24 across all three OSes.
21
+ - **`card` at a terminal.** A bare `npx mcp-context-card card` used to dump
22
+ raw HTML at the prompt — noise for anyone who just wanted to look. Now it
23
+ writes a file and opens it; the pipe/redirect path is untouched.
24
+ - **`npx` / global-install entry fixed.** The bin's "am I the entry point?"
25
+ guard compared `import.meta.url` (always resolved) against an unresolved
26
+ `process.argv[1]` — so when `npx`, a global install, or `./node_modules/.bin`
27
+ routed through the bin **symlink**, the check failed and the CLI **silently
28
+ did nothing** (exit 0, no output). `process.argv[1]` is now realpath'd first.
29
+ Direct `node dist/bin.js` was never affected, which is why CI and the client
30
+ conformance passes (which spawn `node <path>`) stayed green. CI now also
31
+ exercises the packaged `npx` entry.
32
+
33
+ No API change. Nine tools, three concerns, two transports, two discovery
34
+ mechanisms — all as 1.0.0.
35
+
36
+ ## 1.0.0
37
+
38
+ Stable surface. No functional change from 0.6.2 — this release declares
39
+ the API settled and is the reference point everything downstream pins to.
40
+
41
+ The shape that's now stable: **nine tools** (`read_agents_md`,
42
+ `list_agents_md_sections`, `author_agents_md`, `remember`, `recall`,
43
+ `forget`, `whoami`, `list_context_sources`, `render_context_card`),
44
+ **three concerns** (context / memory / identity), **two discovery
45
+ mechanisms** (the Server Card `_meta` block, a self-published
46
+ `ai-catalog.json`), **two transports** (stdio, stateless Streamable HTTP).
47
+
48
+ Verified against three independent clients before the cut:
49
+
50
+ - **Cursor** (3.18.25 / Grok 4.6) — the full behavioural matrix, **10/10**.
51
+ - **Claude Code protocol pass** — the 10-item matrix run through the
52
+ MCP SDK `Client` + `StdioClientTransport` (the client stack Claude
53
+ Code uses), over stdio. **`CLAUDE CODE PROTOCOL PASS: 10/10`** —
54
+ every check, and `resources/templates/list` issued directly on the
55
+ wire (`[]`, not `-32601`).
56
+ - **`@modelcontextprotocol/inspector`** (2.5.0, the canonical
57
+ conformance tool) — every method answers correctly; `tools/list
58
+ --strict` reports zero schema-portability problems across all nine.
59
+
60
+ - `docs/WIRING.md` gains one host-gotcha note: `@modelcontextprotocol/inspector`
61
+ 2.x reports `prompts/list` as `{ "prompts": [] }` — the server declares
62
+ only `tools` + `resources` and returns `-32601` for `prompts/list` on
63
+ the wire; the current Inspector CLI masks that as an empty list.
64
+
5
65
  ## 0.6.2
6
66
 
7
67
  Tool-description quality and anti-drift. Nothing here changes what the
package/README.md CHANGED
@@ -1,7 +1,9 @@
1
1
  # mcp-context-card
2
2
 
3
+ [![npm](https://img.shields.io/npm/v/mcp-context-card.svg)](https://www.npmjs.com/package/mcp-context-card)
3
4
  [![CI](https://github.com/Wolfe-Jam/mcp-context-card/actions/workflows/ci.yml/badge.svg)](https://github.com/Wolfe-Jam/mcp-context-card/actions/workflows/ci.yml)
4
5
  [![license: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)
6
+ [![mcp-context-card MCP server](https://glama.ai/mcp/servers/Wolfe-Jam/mcp-context-card/badges/score.svg)](https://glama.ai/mcp/servers/Wolfe-Jam/mcp-context-card)
5
7
 
6
8
  **Get one. Or add it to yours.** The essential MCP server for a project's
7
9
  context, memory, and identity — discoverable to any MCP client, and
@@ -72,9 +74,10 @@ memory, and how a machine fetches it. The view for people: screenshot it,
72
74
  drop it in a PR, put it on a status page.
73
75
 
74
76
  ```
75
- GET /card # live, on the HTTP transport
77
+ npx mcp-context-card card # at a terminal: writes context-card.html and opens it
78
+ npx mcp-context-card card > x.html # piped/redirected: raw HTML to stdout
79
+ GET /card # live, on the HTTP transport
76
80
  GET /card?theme=light&accent=%230066cc
77
- npx mcp-context-card card # or: npm run card → docs/card.html
78
81
  ```
79
82
 
80
83
  Light, dark, or auto; the accent defaults to the AAIF palette and takes any hex.
@@ -104,12 +107,16 @@ npx agents-md-facts --check # fail if missing or stale (CI, pre-commit)
104
107
 
105
108
  ### See the card
106
109
 
107
- One command, no host, no config:
110
+ One command, no host, no config — from your project directory:
108
111
 
109
112
  ```bash
110
- npx mcp-context-card card > card.html
113
+ npx mcp-context-card card
111
114
  ```
112
115
 
116
+ At a terminal it writes `context-card.html` and opens it in your browser. Piped
117
+ or redirected (`> card.html`, a script, CI) it writes raw HTML to stdout instead;
118
+ `--stdout` forces that from a terminal too.
119
+
113
120
  ### Wire it into a host
114
121
 
115
122
  Claude Desktop, Cursor, or any stdio host:
@@ -128,7 +135,7 @@ Claude Desktop, Cursor, or any stdio host:
128
135
 
129
136
  `MCP_CONTEXT_CARD_ROOT` points at the directory with your `AGENTS.md`. The
130
137
  memory tools work with or without it; identity is optional. Over HTTP instead:
131
- `PORT=8080 npx mcp-context-card`. Requires Node ≥22.
138
+ `PORT=8080 npx mcp-context-card`. Requires Node ≥20.
132
139
 
133
140
  If `command: "npx"` fails to spawn (`spawn npx ENOENT` — seen on Cursor, whose
134
141
  host process doesn't inherit a shell `PATH`), point `command` at `node` and
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.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";
11
+ export declare const HELP = "mcp-context-card 1.0.1\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 this dir's context card \u2014 opens it in your browser\n at a terminal; HTML to stdout when piped ( > f.html )\n --theme light|dark --accent #hex --stdout\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` (opens your context in a browser) or `--http`.\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/bin.js CHANGED
@@ -6,14 +6,17 @@
6
6
  * mcp-context-card --http → stateless Streamable HTTP on PORT (default 3000)
7
7
  * PORT=8080 mcp-context-card → HTTP too (a hosted deploy sets PORT)
8
8
  * mcp-context-card --stdio → force stdio even when PORT is set
9
- * mcp-context-card card → render THIS directory's context card to stdout
10
- * ( > card.html · --theme light|dark · --accent #hex )
9
+ * mcp-context-card card → this directory's context card. At a terminal:
10
+ * writes context-card.html and opens it. Piped
11
+ * or redirected: HTML to stdout ( > card.html ).
12
+ * --theme light|dark · --accent #hex · --stdout
11
13
  * mcp-context-card --help → usage
12
14
  * mcp-context-card --version → version
13
15
  *
14
16
  * MCP_CONTEXT_CARD_ROOT=/path/to/project → read AGENTS.md / project.fafm /
15
17
  * .well-known/ from there instead of the package's own bundled copies.
16
18
  */
19
+ import { realpathSync } from "node:fs";
17
20
  import { resolve } from "node:path";
18
21
  import { pathToFileURL } from "node:url";
19
22
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
@@ -27,8 +30,9 @@ USAGE
27
30
  mcp-context-card stdio MCP server — what an MCP host spawns (default)
28
31
  mcp-context-card --http stateless Streamable HTTP on PORT (default 3000)
29
32
  mcp-context-card --stdio force stdio even when PORT is set
30
- mcp-context-card card [> f.html] render this directory's context card to stdout
31
- --theme light|dark --accent #hex
33
+ mcp-context-card card this dir's context card — opens it in your browser
34
+ at a terminal; HTML to stdout when piped ( > f.html )
35
+ --theme light|dark --accent #hex --stdout
32
36
  mcp-context-card --help this text
33
37
  mcp-context-card --version print version
34
38
 
@@ -37,7 +41,7 @@ ENV
37
41
  PORT if set, run HTTP instead of stdio
38
42
 
39
43
  A bare run is an stdio server: it waits for a host to speak JSON-RPC on stdin,
40
- so it looks idle at a terminal. Try \`card\` or \`--http\` to see output directly.
44
+ so it looks idle at a terminal. Try \`card\` (opens your context in a browser) or \`--http\`.
41
45
  https://github.com/Wolfe-Jam/mcp-context-card
42
46
  `;
43
47
  /**
@@ -76,8 +80,21 @@ export function flagValue(argv, flag) {
76
80
  const i = argv.indexOf(flag);
77
81
  return i >= 0 && i + 1 < argv.length ? argv[i + 1] : undefined;
78
82
  }
79
- /** Direct run only — importing this module (e.g. from a test) must not launch. */
80
- if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) {
83
+ /**
84
+ * Direct run only — importing this module (e.g. from a test) must not launch.
85
+ * `process.argv[1]` can be a bin symlink (`npx`, a global install, `.bin/…`)
86
+ * while `import.meta.url` is always the resolved file, so realpath argv[1]
87
+ * before comparing — otherwise the CLI silently no-ops when run via npx.
88
+ */
89
+ const entryPath = (() => {
90
+ try {
91
+ return process.argv[1] ? realpathSync(process.argv[1]) : undefined;
92
+ }
93
+ catch {
94
+ return process.argv[1];
95
+ }
96
+ })();
97
+ if (entryPath && import.meta.url === pathToFileURL(entryPath).href) {
81
98
  const argv = process.argv.slice(2);
82
99
  const { mode, port, root } = resolveLaunch(argv);
83
100
  if (mode === "help") {
@@ -89,10 +106,31 @@ if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href)
89
106
  else if (mode === "card") {
90
107
  const { renderCard, safeAccent } = await import("./render-card.js");
91
108
  const theme = flagValue(argv, "--theme");
92
- process.stdout.write(renderCard(root, {
109
+ const html = renderCard(root, {
93
110
  theme: theme === "light" || theme === "dark" ? theme : "auto",
94
111
  accent: safeAccent(flagValue(argv, "--accent")),
95
- }));
112
+ });
113
+ // Piped / redirected (or --stdout) → raw HTML on stdout, unchanged.
114
+ // A bare run at a terminal → the HTML is noise; write a file and open it.
115
+ if (!process.stdout.isTTY || argv.includes("--stdout")) {
116
+ process.stdout.write(html);
117
+ }
118
+ else {
119
+ const { writeFileSync } = await import("node:fs");
120
+ const { join } = await import("node:path");
121
+ const { spawn } = await import("node:child_process");
122
+ const out = join(process.cwd(), "context-card.html");
123
+ writeFileSync(out, html);
124
+ const opener = process.platform === "darwin"
125
+ ? ["open", [out]]
126
+ : process.platform === "win32"
127
+ ? ["cmd", ["/c", "start", "", out]]
128
+ : ["xdg-open", [out]];
129
+ spawn(opener[0], opener[1], { stdio: "ignore", detached: true })
130
+ .on("error", () => { })
131
+ .unref();
132
+ process.stderr.write(`${NAME} · wrote ${out} — opening in your browser (--stdout for raw HTML)\n`);
133
+ }
96
134
  }
97
135
  else if (mode === "http") {
98
136
  const { httpApp } = await import("./transport/http.js");
@@ -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.2";
4
+ export declare const VERSION = "1.0.1";
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.2";
4
+ export const VERSION = "1.0.1";
5
5
  export const SERVER_CARD_URI = "mcp-context-card://server-card";
@@ -29,7 +29,7 @@ Both return:
29
29
  ```jsonc
30
30
  {
31
31
  "name": "mcp-context-card",
32
- "version": "0.6.2",
32
+ "version": "1.0.1",
33
33
  "_meta": {
34
34
  "io.github.Wolfe-Jam.mcp-context-card/context": {
35
35
  "source": "AGENTS.md",
package/docs/WIRING.md CHANGED
@@ -33,6 +33,10 @@
33
33
  the arg — e.g. `command: "node"`, `args: ["/path/to/node_modules/mcp-context-card/dist/bin.js"]`
34
34
  (or wherever `npm install -g` / your package manager put it; find it with
35
35
  `npm root -g` or `which mcp-context-card` after a global install).
36
+ - **`@modelcontextprotocol/inspector` 2.x reports `prompts/list` as `{ "prompts": [] }`** —
37
+ this server declares only `tools` + `resources`, so `prompts/list` returns
38
+ `-32601` on the wire; the current Inspector CLI masks that as an empty list
39
+ (raw JSON-RPC, or Inspector 0.21.x, shows the real `-32601`).
36
40
 
37
41
  ### Streamable HTTP (remote)
38
42
 
@@ -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.2</span><span class="pill accent">published</span><span class="pill">MIT</span></div>
81
+ <div class="pills"><span class="pill">io.github.Wolfe-Jam</span><span class="pill">v1.0.1</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>
@@ -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.2</span><span class="pill accent">published</span><span class="pill">MIT</span></div>
81
+ <div class="pills"><span class="pill">io.github.Wolfe-Jam</span><span class="pill">v1.0.1</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>
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.2</span><span class="pill accent">published</span><span class="pill">MIT</span></div>
81
+ <div class="pills"><span class="pill">io.github.Wolfe-Jam</span><span class="pill">v1.0.1</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>
Binary file
Binary file
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.2</span><span class="pill accent">published</span><span class="pill">MIT</span></div>
81
+ <div class="pills"><span class="pill">io.github.Wolfe-Jam</span><span class="pill">v1.0.1</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>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-context-card",
3
- "version": "0.6.2",
3
+ "version": "1.0.1",
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": [
@@ -28,7 +28,7 @@
28
28
  "./package.json": "./package.json"
29
29
  },
30
30
  "engines": {
31
- "node": ">=22"
31
+ "node": ">=20"
32
32
  },
33
33
  "files": [
34
34
  "dist",
@@ -46,9 +46,10 @@
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
+ "engines:check": "node scripts/check-engines.mjs",
49
50
  "faf:check": "node scripts/check-faf-consistency.mjs",
50
51
  "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",
52
+ "prepublishOnly": "npm run clean && npm run version:check && npm run engines:check && npm run faf:check && npm run build && npm run typecheck && npm test",
52
53
  "start": "node dist/bin.js",
53
54
  "start:http": "node dist/bin.js --http",
54
55
  "dev": "tsx src/bin.ts",
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.2",
6
+ "version": "1.0.1",
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.2",
16
+ "version": "1.0.1",
17
17
  "runtimeHint": "npx",
18
18
  "transport": {
19
19
  "type": "stdio"