Skip to content

Commit e001e35

Browse files
acn-ericlawclaude
andcommitted
feat(mcp-binding): pin GitHub's hosted server in the recipes - 39 digests, the read-only subset, two token-gated live tests
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
1 parent 95754bc commit e001e35

7 files changed

Lines changed: 121 additions & 13 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,11 @@
6969
environment-specific value a `${NAME:default}` reference and every credential a reference without a default. The
7070
binding does not load the file; an entry is copied into `mcp-servers.yml` and its tools declared with `bind` as
7171
before. `test/vectors/mcp-recipes.json`, shared byte for byte with the Python pack, pins the input-schema digests of
72-
the six servers that list their tools without a credential (56 tools, read 2026-11-18 through both packs' `describe`,
73-
identical), and `test/mcp-recipes.test.mjs` loads the recipes file on every run and, with `MCP_RECIPES_LIVE=1`,
74-
starts each server through the binding's own client and compares the digests, so a recipe that rots fails by name.
72+
all seven servers (95 tools, read 2026-11-18 through both packs' `describe`, identical; GitHub's hosted server with a
73+
maintainer's token - 39 tools of its three default toolsets, 22 of them under the read-only header), and
74+
`test/mcp-recipes.test.mjs` loads the recipes file on every run and, with `MCP_RECIPES_LIVE=1`, starts each server
75+
through the binding's own client and compares the digests (GitHub's when `GITHUB_MCP_TOKEN` is set, in both modes),
76+
so a recipe that rots fails by name.
7577

7678
### Changed
7779

‎extensions/mcp-binding/README.md‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,10 @@ servers Git, Time, Fetch and Filesystem (started with `uvx` and `npx`, versions
133133
hosted server and Playwright's browser. Every environment-specific value is a `${NAME:default}` reference and every
134134
credential a reference without a default. The binding does not read the file: copy an entry into `mcp-servers.yml`,
135135
set the references it names, run `describe` on it and declare the tools you want with `bind` and a function, as above.
136-
The page carries the digests of the six servers that list their tools without a credential, read on 2026-11-18 from
137-
the pinned versions, and `test/mcp-recipes.test.mjs` re-reads them live when `MCP_RECIPES_LIVE=1` is set (the Neo4j
138-
server also wants `NEO4J_PASSWORD` and a database): a recipe that rots fails at the digest, as the boot would.
136+
The page carries the digests of all seven servers, read on 2026-11-18 from the pinned versions (GitHub's with a
137+
maintainer's token), and `test/mcp-recipes.test.mjs` re-reads them live when `MCP_RECIPES_LIVE=1` is set (the Neo4j
138+
server also wants `NEO4J_PASSWORD` and a database, GitHub's `GITHUB_MCP_TOKEN`): a recipe that rots fails at the
139+
digest, as the boot would.
139140

140141
## The function contract
141142

‎extensions/mcp-binding/resources/mcp-recipes.yml‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,10 @@ servers:
6262
NEO4J_DATABASE: '${NEO4J_DATABASE:neo4j}'
6363
# GitHub's server (vendor server). The hosted endpoint over streamable HTTP with a fine-grained
6464
# personal access token of least privilege (or the deployment's GitHub App token); the toolsets
65-
# header selects the tool families, the read-only header hides every write. The listing needs the
66-
# credential, so its digests are not pinned on the page: run describe with the token and pin what it
67-
# prints. A self-hosted alternative is the vendor's container image over stdio.
65+
# header selects the tool families (the default lists 39 tools), the read-only header hides the
66+
# seventeen that write. The listing needs the credential: the page's digests were read with a
67+
# maintainer's token, and the gated test checks them when GITHUB_MCP_TOKEN is set. A self-hosted
68+
# alternative is the vendor's container image over stdio.
6869
github:
6970
transport: http
7071
url: 'https://api.githubcopilot.com/mcp/'

‎memory/open-threads/thread-bp-agent-tools-nodejs.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
versions, not loaded by default), the shared digest vector `test/vectors/mcp-recipes.json` (56 tools of six servers,
2323
read through `describe`, identical from both packs) and `test/mcp-recipes.test.mjs` (five tests on every run, six
2424
gated live on `MCP_RECIPES_LIVE=1`; 11 passed live; PR #132, merge `78a18fd`, MERGED 2026-11-18); the page is the engine's `docs/guides/tools-from-mcp-servers.md`.
25-
Next: nothing until Eric rules on RFC-0013's promotion.
25+
GitHub's digests pinned the same day with Eric's token (39 tools, 22 under the read-only header; two live tests gated
26+
on `GITHUB_MCP_TOKEN`; PR-PENDING). Next: nothing until Eric rules on RFC-0013's promotion.
2627
→ serves: vision-mercury-nodejs
2728
<!-- id: bp-agent-tools-nodejs | created: 2026-11-17 | last_used: 2026-11-17 | uses: 1 | tier: working | origin: 2026-11-17-111036 -->

‎memory/sessions/2026-11-18-090849.md‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,15 @@
2222

2323
Opened as PR #132; **MERGED 2026-11-18** (merge `78a18fd`).
2424

25+
## Later the same day - GitHub's digests pinned
26+
27+
- With Eric's fine-grained token in the shell (`GITHUB_MCP_TOKEN`), the hosted server listed 22 tools under the
28+
recipe's default read-only header and 39 without it, the same digests from this binding as from the Python one; no
29+
output carried the token. `test/vectors/mcp-recipes.json` gains `github` (95 tools in all, new pin in both packs) and
30+
`test/mcp-recipes.test.mjs` two live tests gated on the token - the read-only listing is exactly the pinned reads,
31+
the full listing carries every pinned digest - both passed live; `npm test` green. The recipe's comment, the README
32+
and the CHANGELOG item updated in lockstep with the Python pack.
33+
2534
## Memory References
2635

2736
- Referenced: bp-agent-tools-nodejs (edited: step 5's pack half), conv-compartment-downstream-secrets (the diff scanned)

‎test/mcp-recipes.test.mjs‎

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ const RECIPES = fileURLToPath(new URL('../extensions/mcp-binding/resources/mcp-r
2323
const REPOSITORY = fileURLToPath(new URL('..', import.meta.url));
2424
const DIGESTS_FILE = new URL('./vectors/mcp-recipes.json', import.meta.url);
2525
// the Python twin pins the same digest: change the file in both packs or in neither
26-
const DIGESTS_SHA256 = '10c70fe179d315cb0932d56cf0bc1e11290eb7c922ff439e5b9e7944df437d53';
26+
const DIGESTS_SHA256 = '844e729bc41e667892ecd5a6e864568b2c10d4785f0624864c91834074b47aac';
2727
const DIGESTS = JSON.parse(readFileSync(DIGESTS_FILE, 'utf8'));
2828
const LIVE = Boolean(process.env.MCP_RECIPES_LIVE);
2929
const RECIPE_SERVERS = ['fetch', 'filesystem', 'git', 'github', 'neo4j', 'playwright', 'time'];
30-
// the servers that list their tools without a credential - the ones the page pins
30+
// the servers that list their tools without a credential; GitHub's hosted server lists with a token
3131
const CREDENTIAL_FREE = ['git', 'time', 'fetch', 'filesystem', 'playwright'];
3232
// a credential the file references but these tests never send gets a placeholder, so the file
3333
// loads; a real value already in the environment (the Neo4j run) is kept
@@ -102,7 +102,8 @@ test('the references resolve from the environment', () => {
102102
test('every pinned server has a recipe and tools', () => {
103103
const specs = recipes();
104104
const pinned = DIGESTS.servers;
105-
assert.deepEqual(Object.keys(pinned).sort(), [...CREDENTIAL_FREE, 'neo4j'].sort());
105+
assert.deepEqual(Object.keys(pinned).sort(), RECIPE_SERVERS);
106+
for (const name of pinned.github.read_only_tools) assert.ok(name in pinned.github.tools, name);
106107
for (const [name, server] of Object.entries(pinned)) {
107108
assert.ok(specs.has(name), name);
108109
assert.ok(Object.keys(server.tools).length > 0, name);
@@ -139,3 +140,28 @@ test('live digests of the neo4j recipe', {
139140
assert.ok(missing.length === 0 && changed.length === 0,
140141
`the neo4j recipe rotted - missing ${JSON.stringify(missing)}, changed ${JSON.stringify(changed)}`);
141142
});
143+
144+
// --- GitHub's hosted server, live with a token (gated) -------------------------------------------
145+
146+
const GITHUB_SKIP = LIVE && process.env.GITHUB_MCP_TOKEN ? false
147+
: "set MCP_RECIPES_LIVE=1 and GITHUB_MCP_TOKEN (a fine-grained, read-only token) to list GitHub's hosted server";
148+
149+
test('live: the read-only header hides every write of the github recipe', { skip: GITHUB_SKIP }, async () => {
150+
// the recipe's default, X-MCP-Readonly true: exactly the pinned read tools, with their digests
151+
const actual = await offeredDigests(recipes().get('github'));
152+
const pinned = DIGESTS.servers.github;
153+
const expected = Object.fromEntries(pinned.read_only_tools.map((name) => [name, pinned.tools[name]]));
154+
assert.deepEqual(actual, expected, 'the read-only listing differs from the pinned read tools');
155+
});
156+
157+
test('live digests of the github recipe, writes included', { skip: GITHUB_SKIP }, async () => {
158+
process.env.GITHUB_MCP_READONLY = 'false';
159+
try {
160+
const actual = await offeredDigests(recipes().get('github'));
161+
const { missing, changed } = rot(actual, DIGESTS.servers.github.tools);
162+
assert.ok(missing.length === 0 && changed.length === 0,
163+
`the github recipe rotted - missing ${JSON.stringify(missing)}, changed ${JSON.stringify(changed)}`);
164+
} finally {
165+
delete process.env.GITHUB_MCP_READONLY;
166+
}
167+
});

‎test/vectors/mcp-recipes.json‎

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,74 @@
8888
"browser_type": "ed892740ebc14bb2a49467c08b8bb02717d50f1f3ef8ed06d51abf5ebb3249da",
8989
"browser_wait_for": "cee58694f677034e21fc68446200888eb28469696b4ca9259047e15084fb22ff"
9090
}
91+
},
92+
"github": {
93+
"started_with": "https://api.githubcopilot.com/mcp/ with X-MCP-Toolsets: repos,issues,pull_requests (X-MCP-Readonly: false for the whole list; read_only_tools is the list under X-MCP-Readonly: true)",
94+
"read_only_tools": [
95+
"get_commit",
96+
"get_file_contents",
97+
"get_label",
98+
"get_latest_release",
99+
"get_release_by_tag",
100+
"get_tag",
101+
"issue_read",
102+
"list_branches",
103+
"list_commits",
104+
"list_issue_fields",
105+
"list_issue_types",
106+
"list_issues",
107+
"list_pull_requests",
108+
"list_releases",
109+
"list_repository_collaborators",
110+
"list_tags",
111+
"pull_request_read",
112+
"search_code",
113+
"search_commits",
114+
"search_issues",
115+
"search_pull_requests",
116+
"search_repositories"
117+
],
118+
"tools": {
119+
"add_comment_to_pending_review": "4db72d6ccc6cbf6c5a5a60db2269bdb78076bf2150838c932c4756fa16bc4667",
120+
"add_issue_comment": "d93b8edaabd74e3c655651f4fcd84fcb30d30bbd9b648cf3194c410faed2f282",
121+
"add_reply_to_pull_request_comment": "b3e21f358fb25d6e1e9b60c6b4133d50823f3401cb28a742b461b7f37bdc7951",
122+
"create_branch": "e65b73ec25a45f23ce7371d5a18b7d2bb749388c330c01f592f1c288016fc385",
123+
"create_or_update_file": "4bbfd9f8df3736e4897c2a0466b2131764d414c3075e3691711282eae7dc209e",
124+
"create_pull_request": "e249ccd5a1f2364cbfc0a5d9e11bebdc298626351cc7e43fd59b851c3d520238",
125+
"create_repository": "eb38a6e274e4b762d210740cdec57eacc9ebf0b5b87c013e32ee80406036f76b",
126+
"delete_file": "af29cf413864c65dee4ac821b10d15f9bb0673e2977d2298918b1317d160d4ba",
127+
"fork_repository": "ac52a51d95996c5af97cac680c7bc1b7dcc423061174a84c727dfd4a1d06b210",
128+
"get_commit": "f084d5addb427982ea2cb3064e8c7faf23ef2117009b17707ca1f3dca2e08945",
129+
"get_file_contents": "3e8fd49a5ed6d35c07b9b3d712312ffe317391a11f7fdd185fe7c86ed8a241bd",
130+
"get_label": "cf89e3a5ff5d176d7be8375ae68fdde2bb90a85a524cb39037d0bf2d272fa474",
131+
"get_latest_release": "6bd7211e72d2921f609892e467a7b293cc3ed176557cc391f736361ea718e021",
132+
"get_release_by_tag": "9012396d62f53b04de455a466203e7c9ee6c56fa9f61063f28e08c147cb881f9",
133+
"get_tag": "8b13651d5e7162c741afd862aa15fa2a1419c539ebcba092bfd07ef1ee88a82a",
134+
"issue_read": "4129cf817f37afefbc65885a75ba37817ae95f46ab9658b0b9de8c37d6b26c2e",
135+
"issue_write": "083aa952baecd960494979902818962438474a84f1985252f3024597e9442f5f",
136+
"list_branches": "cc4d347261dd31b2df9f0a36d7bd49a5acb4dba8043c857f70a5dfb74c6b7804",
137+
"list_commits": "591090af37df44793d29ce44be3afe0ec122e3ac2db6edc4e5db62d330b0a35c",
138+
"list_issue_fields": "ae44b8d0eadc50902f62a7907ab1c45dfbf95a71ec87ec4aa836fece8477c002",
139+
"list_issue_types": "fa18815229ec77ba88b9a249313ed41dd9e62382729cb72bc472587f1c06fb37",
140+
"list_issues": "ae3a1945a49d3648618475385a0d3647f107f57e40720f1889e2360b40a98d37",
141+
"list_pull_requests": "e1e093b013497fae6ca27152cc7d2ffed822ab389a5983e68773466bf83dc38b",
142+
"list_releases": "4118d959bb3b13749813d74442a4d143f9a2a0fad7ac5e23880fc5d1f1aace03",
143+
"list_repository_collaborators": "ee69edd2a4af5094260553c303fbc28db0a701ef28a9e93016aed005d6bc89a9",
144+
"list_tags": "cc4d347261dd31b2df9f0a36d7bd49a5acb4dba8043c857f70a5dfb74c6b7804",
145+
"merge_pull_request": "d6b25b3006b7124dc4a1d775458febd3e802fe1dd9ff61347fc9bdb5e0176a02",
146+
"pull_request_read": "380c0d04d38cb7ae46ac5862485e29277e353f7f7d868b558125e27be06017c1",
147+
"pull_request_review_write": "250438d8197b381022f562f96943dfab18a397fafaada3fdca3d3f18696fdf0b",
148+
"push_files": "63d80fecd0ff8d6b927f02faa499f858e13f79a008a6dfedaf04d8783194d51e",
149+
"search_code": "4ad473c9570e3a825e6d60c9869b87324e0a5d371cf293ffb70fd2b840358cf7",
150+
"search_commits": "e477f9b9a99ce91db99e3380c7272485b0ee66cf06d9415674918bc6e8c159f7",
151+
"search_issues": "a055d2bd8d73374c84787996a5dae3934ef1570fda9c0aa1ad7061038bc0e12e",
152+
"search_pull_requests": "1d885a55314d8a1aff83ac5536600429ac3ae089d0f760335fa8ed559e99a9a1",
153+
"search_repositories": "7b4cad1aba3867b93477594b3054d4e6a3b2fb2fa09ba9b7e11cb42b034a7902",
154+
"sub_issue_write": "8b4d8c72ba5b500c5fed41a86b4720f0bbb58eac1f58abf576fbc00d9a90a88b",
155+
"update_issue_comment": "a4a9d37cda657866581bd1a8ca5eb7d6c1af6626d050361b1a3e4d1f63950441",
156+
"update_pull_request": "f9ef3dae6c8d529fa50f1ebd23b6fe351c0def794deb20787d4b55a9503fb9e1",
157+
"update_pull_request_branch": "48c3c0aa12992defea00c3727690442719367b1210187d5da589234bde3b62b6"
158+
}
91159
}
92160
}
93161
}

0 commit comments

Comments
 (0)