tc39-mcp 0.1.0 → 0.1.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/README.md CHANGED
@@ -1,11 +1,10 @@
1
1
  # tc39-mcp
2
2
 
3
3
  [![Test](https://github.com/xyzzylabs/tc39-mcp/actions/workflows/test.yml/badge.svg)](https://github.com/xyzzylabs/tc39-mcp/actions/workflows/test.yml)
4
- [![CodeQL](https://github.com/xyzzylabs/tc39-mcp/actions/workflows/codeql.yml/badge.svg)](https://github.com/xyzzylabs/tc39-mcp/actions/workflows/codeql.yml)
5
4
  [![npm version](https://img.shields.io/npm/v/tc39-mcp.svg)](https://www.npmjs.com/package/tc39-mcp)
6
5
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
6
 
8
- 📖 **Docs:** the hosted Cloudflare Worker serves both the JSON-RPC MCP endpoint and the docs site at the same origin. Pages: `/` (overview) · `/tools` · `/snapshots` · `/architecture` · `/deployment`. URL is set per-deployment see [`docs/deployment.md`](docs/deployment.md) for the path.
7
+ 📖 **Docs site** (same origin as the API): [tc39-mcp.chicoxyzzy.workers.dev](https://tc39-mcp.chicoxyzzy.workers.dev) [Tools](https://tc39-mcp.chicoxyzzy.workers.dev/tools) · [Snapshots](https://tc39-mcp.chicoxyzzy.workers.dev/snapshots) · [Architecture](https://tc39-mcp.chicoxyzzy.workers.dev/architecture) · [Deployment](https://tc39-mcp.chicoxyzzy.workers.dev/deployment) · [Changelog](https://tc39-mcp.chicoxyzzy.workers.dev/changelog)
9
8
 
10
9
  Structured MCP server for the TC39 specs (ECMA-262 + ECMA-402) —
11
10
  SHA-pinned clauses, AOID-aware search, in+out cross-references,
@@ -19,6 +18,55 @@ Internationalization API, `Intl`) to AI agents and tooling. Returns
19
18
  cross-refs) rather than raw HTML, and pins every response to a
20
19
  specific spec SHA so anything cited is reproducible.
21
20
 
21
+ ## Quick start
22
+
23
+ ### Option 1: stdio via npx (Claude Code, etc.)
24
+
25
+ Add to your project's `.mcp.json`:
26
+
27
+ ```json
28
+ {
29
+ "mcpServers": {
30
+ "tc39": { "command": "npx", "args": ["tc39-mcp"] }
31
+ }
32
+ }
33
+ ```
34
+
35
+ The first run downloads ~50 MB (the parsed snapshots ship in the
36
+ tarball — no separate fetch step needed).
37
+
38
+ ### Option 2: hosted HTTP Worker
39
+
40
+ For MCP clients that prefer HTTP transport, or for `curl` testing:
41
+
42
+ ```json
43
+ {
44
+ "mcpServers": {
45
+ "tc39": {
46
+ "type": "http",
47
+ "url": "https://tc39-mcp.chicoxyzzy.workers.dev/mcp"
48
+ }
49
+ }
50
+ }
51
+ ```
52
+
53
+ Smoke-test it from anywhere:
54
+
55
+ ```sh
56
+ curl -s -X POST https://tc39-mcp.chicoxyzzy.workers.dev/mcp \
57
+ -H "content-type: application/json" \
58
+ -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"spec.about","arguments":{}}}' \
59
+ | jq '.result.content[0].text | fromjson | .server'
60
+ # → {"name": "tc39-mcp", "version": "0.1.0"}
61
+ ```
62
+
63
+ ### Option 3: global CLI
64
+
65
+ ```sh
66
+ npm i -g tc39-mcp
67
+ tc39-mcp # reads stdio
68
+ ```
69
+
22
70
  ## What it's for
23
71
 
24
72
  - **Agents and tooling that need to consult the JS spec** —
@@ -128,9 +176,16 @@ no annual release tagging.
128
176
  Every tool accepts `spec` and `edition` arguments and resolves aliases
129
177
  at load time, so responses are deterministic against a specific spec SHA.
130
178
 
131
- ## Use it locally (stdio MCP)
179
+ ## Build from source (contributors)
180
+
181
+ End users don't need this — the published package and the hosted
182
+ Worker are the supported surfaces above. This is for working on the
183
+ server itself.
132
184
 
133
185
  ```sh
186
+ git clone https://github.com/xyzzylabs/tc39-mcp
187
+ cd tc39-mcp
188
+
134
189
  # 1. install deps
135
190
  npm install
136
191
 
@@ -151,19 +206,20 @@ npm run build-test262-index
151
206
  npm run fetch-proposals
152
207
  npm run build-proposals-index
153
208
 
154
- # 6. start the stdio MCP server (point Claude Code at it via .mcp.json)
209
+ # 6. start the stdio MCP server against your source tree
155
210
  npm run mcp
156
211
  ```
157
212
 
158
- Wire into Claude Code by adding to your project's `.mcp.json`:
213
+ To wire Claude Code at your local source instead of the published bin:
159
214
 
160
215
  ```json
161
216
  {
162
217
  "mcpServers": {
163
218
  "tc39": {
164
219
  "type": "stdio",
165
- "command": "npx",
166
- "args": ["tc39-mcp"]
220
+ "command": "npm",
221
+ "args": ["run", "mcp"],
222
+ "cwd": "/abs/path/to/tc39-mcp"
167
223
  }
168
224
  }
169
225
  }
@@ -190,12 +246,9 @@ without sandboxing concerns.
190
246
 
191
247
  ## Docs
192
248
 
193
- **Hosted**: served from the same Cloudflare Worker that exposes
194
- `/mcp` — visit the root of the hosted URL for the landing page;
195
- `/tools`, `/snapshots`, `/architecture`, `/deployment`, `/editions`,
196
- `/changelog` are all routable. Searchable, dark-mode-friendly.
249
+ Hosted at [tc39-mcp.chicoxyzzy.workers.dev](https://tc39-mcp.chicoxyzzy.workers.dev) searchable, dark-mode-friendly, auto-rebuilt on every refresh so `/snapshots` always shows the live SHAs.
197
250
 
198
- In-repo (source for the hosted site):
251
+ In-repo (source for the hosted site + GitHub-rendered fallback):
199
252
 
200
253
  - [`docs/architecture.md`](docs/architecture.md) — data pipeline, parser, cache, alias resolution, memory model.
201
254
  - [`docs/tools.md`](docs/tools.md) — full reference for every tool: inputs, outputs, ranking rules.
@@ -203,7 +256,7 @@ In-repo (source for the hosted site):
203
256
  - [`docs/deployment.md`](docs/deployment.md) — local stdio, npm CLI, hosted Cloudflare Worker, refresh model, observability.
204
257
  - [`CONTRIBUTING.md`](CONTRIBUTING.md) — what kinds of changes land easily, what won't.
205
258
  - [`SECURITY.md`](SECURITY.md) — threat model + how to report issues.
206
- - [`CHANGELOG.md`](CHANGELOG.md) — version history.
259
+ - [`CHANGELOG.md`](CHANGELOG.md) — version history + auto-refresh convention.
207
260
 
208
261
  ## License
209
262
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 1,
3
3
  "proposals_sha": "7510bde4071c3251114d1e7a244187c7c54da214",
4
- "generated_at": "2026-05-30T23:10:30.499Z",
4
+ "generated_at": "2026-05-30T23:39:08.537Z",
5
5
  "proposals": [
6
6
  {
7
7
  "slug": "regexp-legacy",
@@ -3,7 +3,7 @@
3
3
  "spec": "262",
4
4
  "edition": "es2016",
5
5
  "sha": "0b458053c44299f204632312821a3083c479294b",
6
- "fetched_at": "2026-05-30T23:08:31.133Z",
6
+ "fetched_at": "2026-05-30T23:37:10.589Z",
7
7
  "biblio_commit": "6dcb70f914e67908abc548b3285dc0583a194910"
8
8
  },
9
9
  "clauses": {
@@ -3,7 +3,7 @@
3
3
  "spec": "262",
4
4
  "edition": "es2017",
5
5
  "sha": "101dfd3bc6ea0fe96b9bc801c42c7903799dd99d",
6
- "fetched_at": "2026-05-30T23:08:39.405Z",
6
+ "fetched_at": "2026-05-30T23:37:18.698Z",
7
7
  "biblio_commit": "6dcb70f914e67908abc548b3285dc0583a194910"
8
8
  },
9
9
  "clauses": {
@@ -3,7 +3,7 @@
3
3
  "spec": "262",
4
4
  "edition": "es2018",
5
5
  "sha": "fd98c97252f28f6a2ab1a8e754dd6ef4b3ecca52",
6
- "fetched_at": "2026-05-30T23:08:48.765Z",
6
+ "fetched_at": "2026-05-30T23:37:28.049Z",
7
7
  "biblio_commit": "6dcb70f914e67908abc548b3285dc0583a194910"
8
8
  },
9
9
  "clauses": {
@@ -3,7 +3,7 @@
3
3
  "spec": "262",
4
4
  "edition": "es2019",
5
5
  "sha": "a8a59dd002ee40507e93f2b169abdcc2d6cc4426",
6
- "fetched_at": "2026-05-30T23:08:59.476Z",
6
+ "fetched_at": "2026-05-30T23:37:36.940Z",
7
7
  "biblio_commit": "6dcb70f914e67908abc548b3285dc0583a194910"
8
8
  },
9
9
  "clauses": {
@@ -3,7 +3,7 @@
3
3
  "spec": "262",
4
4
  "edition": "es2020",
5
5
  "sha": "156c59d958ae71fb141604211e6f15a9cd5de491",
6
- "fetched_at": "2026-05-30T23:09:09.141Z",
6
+ "fetched_at": "2026-05-30T23:37:45.892Z",
7
7
  "biblio_commit": "6dcb70f914e67908abc548b3285dc0583a194910"
8
8
  },
9
9
  "clauses": {
@@ -3,7 +3,7 @@
3
3
  "spec": "262",
4
4
  "edition": "es2021",
5
5
  "sha": "41ddcc284ba20945658b96f4c89cc549ab11da30",
6
- "fetched_at": "2026-05-30T23:09:18.782Z",
6
+ "fetched_at": "2026-05-30T23:37:55.609Z",
7
7
  "biblio_commit": "6dcb70f914e67908abc548b3285dc0583a194910"
8
8
  },
9
9
  "clauses": {
@@ -3,7 +3,7 @@
3
3
  "spec": "262",
4
4
  "edition": "es2022",
5
5
  "sha": "d711ba960cd12b7658d6bb26d7556e690290190c",
6
- "fetched_at": "2026-05-30T23:09:28.309Z",
6
+ "fetched_at": "2026-05-30T23:38:08.643Z",
7
7
  "biblio_commit": "6dcb70f914e67908abc548b3285dc0583a194910"
8
8
  },
9
9
  "clauses": {
@@ -3,7 +3,7 @@
3
3
  "spec": "262",
4
4
  "edition": "es2023",
5
5
  "sha": "d048f32e861c2ed4a26f59a50d392918f26da3ba",
6
- "fetched_at": "2026-05-30T23:09:38.736Z",
6
+ "fetched_at": "2026-05-30T23:38:19.986Z",
7
7
  "biblio_commit": "6dcb70f914e67908abc548b3285dc0583a194910"
8
8
  },
9
9
  "clauses": {
@@ -3,7 +3,7 @@
3
3
  "spec": "262",
4
4
  "edition": "es2024",
5
5
  "sha": "0b24a049c11fe0604b1c929772e7cbd671b78492",
6
- "fetched_at": "2026-05-30T23:09:49.280Z",
6
+ "fetched_at": "2026-05-30T23:38:30.783Z",
7
7
  "biblio_commit": "6dcb70f914e67908abc548b3285dc0583a194910"
8
8
  },
9
9
  "clauses": {
@@ -3,7 +3,7 @@
3
3
  "spec": "262",
4
4
  "edition": "es2025",
5
5
  "sha": "84b38ad852ff426795fa29cebc06949027336c64",
6
- "fetched_at": "2026-05-30T23:10:00.172Z",
6
+ "fetched_at": "2026-05-30T23:38:41.564Z",
7
7
  "biblio_commit": "6dcb70f914e67908abc548b3285dc0583a194910"
8
8
  },
9
9
  "clauses": {
@@ -3,7 +3,7 @@
3
3
  "spec": "262",
4
4
  "edition": "main",
5
5
  "sha": "6dcb70f914e67908abc548b3285dc0583a194910",
6
- "fetched_at": "2026-05-30T23:10:11.693Z",
6
+ "fetched_at": "2026-05-30T23:38:53.357Z",
7
7
  "biblio_commit": "6dcb70f914e67908abc548b3285dc0583a194910"
8
8
  },
9
9
  "clauses": {
@@ -3,7 +3,7 @@
3
3
  "spec": "402",
4
4
  "edition": "es2025-candidate",
5
5
  "sha": "4a2dae4c04e7fdc9e9de5946fbcdb31b073e4040",
6
- "fetched_at": "2026-05-30T23:10:27.263Z",
6
+ "fetched_at": "2026-05-30T23:39:05.343Z",
7
7
  "biblio_commit": "6dcb70f914e67908abc548b3285dc0583a194910"
8
8
  },
9
9
  "clauses": {
@@ -3,7 +3,7 @@
3
3
  "spec": "402",
4
4
  "edition": "main",
5
5
  "sha": "2c336bf108651208c8ef4972d0dda6fc9d26dff1",
6
- "fetched_at": "2026-05-30T23:10:27.700Z",
6
+ "fetched_at": "2026-05-30T23:39:05.775Z",
7
7
  "biblio_commit": "6dcb70f914e67908abc548b3285dc0583a194910"
8
8
  },
9
9
  "clauses": {