@cyanheads/genealogy-mcp-server 0.1.1 → 0.2.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/AGENTS.md +54 -23
- package/CLAUDE.md +54 -23
- package/README.md +142 -94
- package/changelog/0.2.x/0.2.0.md +27 -0
- package/changelog/0.2.x/0.2.1.md +27 -0
- package/dist/config/server-config.d.ts +6 -1
- package/dist/config/server-config.d.ts.map +1 -1
- package/dist/config/server-config.js +17 -3
- package/dist/config/server-config.js.map +1 -1
- package/dist/index.js +5 -4
- package/dist/index.js.map +1 -1
- package/dist/mcp-server/tools/definitions/{genealogy_find_common_ancestors.tool.d.ts → find-common-ancestors.tool.d.ts} +14 -12
- package/dist/mcp-server/tools/definitions/find-common-ancestors.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/find-common-ancestors.tool.js +35 -0
- package/dist/mcp-server/tools/definitions/find-common-ancestors.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/find-person.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/find-person.tool.js +3 -2
- package/dist/mcp-server/tools/definitions/find-person.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/{genealogy_get_profiles.tool.d.ts → get-profiles.tool.d.ts} +2 -2
- package/dist/mcp-server/tools/definitions/get-profiles.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/{genealogy_get_profiles.tool.js → get-profiles.tool.js} +3 -3
- package/dist/mcp-server/tools/definitions/get-profiles.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/get-record.tool.d.ts +8 -1
- package/dist/mcp-server/tools/definitions/get-record.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/get-record.tool.js +13 -1
- package/dist/mcp-server/tools/definitions/get-record.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/{genealogy_get_relatives.tool.d.ts → get-relatives.tool.d.ts} +13 -12
- package/dist/mcp-server/tools/definitions/get-relatives.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/get-relatives.tool.js +35 -0
- package/dist/mcp-server/tools/definitions/get-relatives.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/get-transcription.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/get-transcription.tool.js +1 -0
- package/dist/mcp-server/tools/definitions/get-transcription.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/list-reference.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/list-reference.tool.js +14 -8
- package/dist/mcp-server/tools/definitions/list-reference.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/{genealogy_search_profiles.tool.d.ts → search-profiles.tool.d.ts} +12 -4
- package/dist/mcp-server/tools/definitions/search-profiles.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/search-profiles.tool.js +27 -0
- package/dist/mcp-server/tools/definitions/search-profiles.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/search-records.tool.d.ts +26 -0
- package/dist/mcp-server/tools/definitions/search-records.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/search-records.tool.js +34 -3
- package/dist/mcp-server/tools/definitions/search-records.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/search-transcriptions.tool.d.ts +6 -0
- package/dist/mcp-server/tools/definitions/search-transcriptions.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/search-transcriptions.tool.js +10 -1
- package/dist/mcp-server/tools/definitions/search-transcriptions.tool.js.map +1 -1
- package/dist/services/genealogy/discovery.d.ts +8 -20
- package/dist/services/genealogy/discovery.d.ts.map +1 -1
- package/dist/services/genealogy/discovery.js +44 -24
- package/dist/services/genealogy/discovery.js.map +1 -1
- package/dist/services/genealogy/records.d.ts +8 -2
- package/dist/services/genealogy/records.d.ts.map +1 -1
- package/dist/services/genealogy/search-records.d.ts +25 -2
- package/dist/services/genealogy/search-records.d.ts.map +1 -1
- package/dist/services/genealogy/search-records.js +67 -16
- package/dist/services/genealogy/search-records.js.map +1 -1
- package/dist/services/genealogy/upstream.d.ts.map +1 -1
- package/dist/services/genealogy/upstream.js +1 -1
- package/dist/services/genealogy/upstream.js.map +1 -1
- package/dist/services/mirror/mirror-build.d.ts.map +1 -1
- package/dist/services/mirror/mirror-build.js +11 -15
- package/dist/services/mirror/mirror-build.js.map +1 -1
- package/dist/services/mirror/mirror-service.d.ts +4 -4
- package/dist/services/mirror/mirror-service.d.ts.map +1 -1
- package/dist/services/mirror/mirror-service.js +4 -15
- package/dist/services/mirror/mirror-service.js.map +1 -1
- package/dist/services/mirror/mirror-snapshot.d.ts.map +1 -1
- package/dist/services/mirror/mirror-snapshot.js +2 -3
- package/dist/services/mirror/mirror-snapshot.js.map +1 -1
- package/dist/services/open-archives/client.d.ts +1 -0
- package/dist/services/open-archives/client.d.ts.map +1 -1
- package/dist/services/open-archives/client.js +17 -6
- package/dist/services/open-archives/client.js.map +1 -1
- package/dist/services/open-archives/read-record.d.ts +4 -7
- package/dist/services/open-archives/read-record.d.ts.map +1 -1
- package/dist/services/open-archives/read-record.js +19 -15
- package/dist/services/open-archives/read-record.js.map +1 -1
- package/dist/services/open-archives/reference.d.ts +9 -3
- package/dist/services/open-archives/reference.d.ts.map +1 -1
- package/dist/services/open-archives/reference.js +64 -8
- package/dist/services/open-archives/reference.js.map +1 -1
- package/dist/services/open-archives/search-records.d.ts +1 -0
- package/dist/services/open-archives/search-records.d.ts.map +1 -1
- package/dist/services/open-archives/search-records.js +18 -18
- package/dist/services/open-archives/search-records.js.map +1 -1
- package/dist/services/open-archives/source-labels.d.ts +4 -0
- package/dist/services/open-archives/source-labels.d.ts.map +1 -0
- package/dist/services/open-archives/source-labels.js +116 -0
- package/dist/services/open-archives/source-labels.js.map +1 -0
- package/dist/services/open-archives/transcriptions.d.ts +1 -1
- package/dist/services/open-archives/transcriptions.d.ts.map +1 -1
- package/dist/services/open-archives/transcriptions.js +14 -17
- package/dist/services/open-archives/transcriptions.js.map +1 -1
- package/dist/services/socrata/indexes.d.ts +6 -1
- package/dist/services/socrata/indexes.d.ts.map +1 -1
- package/dist/services/socrata/indexes.js +54 -28
- package/dist/services/socrata/indexes.js.map +1 -1
- package/dist/services/socrata/search-index.d.ts +2 -1
- package/dist/services/socrata/search-index.d.ts.map +1 -1
- package/dist/services/socrata/search-index.js +36 -19
- package/dist/services/socrata/search-index.js.map +1 -1
- package/dist/services/socrata/us-state-codes.d.ts +4 -0
- package/dist/services/socrata/us-state-codes.d.ts.map +1 -0
- package/dist/services/socrata/us-state-codes.js +55 -0
- package/dist/services/socrata/us-state-codes.js.map +1 -0
- package/dist/services/wikitree/find-common-ancestors.d.ts +1 -0
- package/dist/services/wikitree/find-common-ancestors.d.ts.map +1 -1
- package/dist/services/wikitree/find-common-ancestors.js +25 -12
- package/dist/services/wikitree/find-common-ancestors.js.map +1 -1
- package/dist/services/wikitree/profile.d.ts +4 -0
- package/dist/services/wikitree/profile.d.ts.map +1 -1
- package/dist/services/wikitree/profile.js +17 -16
- package/dist/services/wikitree/profile.js.map +1 -1
- package/dist/services/wikitree/read-family.d.ts.map +1 -1
- package/dist/services/wikitree/read-family.js +24 -5
- package/dist/services/wikitree/read-family.js.map +1 -1
- package/dist/services/wikitree/read-people.d.ts.map +1 -1
- package/dist/services/wikitree/read-people.js +19 -7
- package/dist/services/wikitree/read-people.js.map +1 -1
- package/dist/services/wikitree/search-profiles.d.ts +3 -3
- package/dist/services/wikitree/search-profiles.d.ts.map +1 -1
- package/dist/services/wikitree/search-profiles.js +27 -20
- package/dist/services/wikitree/search-profiles.js.map +1 -1
- package/dist/services/wikitree/wiki-request.d.ts +3 -1
- package/dist/services/wikitree/wiki-request.d.ts.map +1 -1
- package/dist/services/wikitree/wiki-request.js +5 -1
- package/dist/services/wikitree/wiki-request.js.map +1 -1
- package/package.json +7 -3
- package/server.json +12 -6
- package/skills/genealogy-guide/SKILL.md +47 -0
- package/dist/mcp-server/tools/definitions/genealogy_find_common_ancestors.tool.d.ts.map +0 -1
- package/dist/mcp-server/tools/definitions/genealogy_find_common_ancestors.tool.js +0 -17
- package/dist/mcp-server/tools/definitions/genealogy_find_common_ancestors.tool.js.map +0 -1
- package/dist/mcp-server/tools/definitions/genealogy_get_profiles.tool.d.ts.map +0 -1
- package/dist/mcp-server/tools/definitions/genealogy_get_profiles.tool.js.map +0 -1
- package/dist/mcp-server/tools/definitions/genealogy_get_relatives.tool.d.ts.map +0 -1
- package/dist/mcp-server/tools/definitions/genealogy_get_relatives.tool.js +0 -17
- package/dist/mcp-server/tools/definitions/genealogy_get_relatives.tool.js.map +0 -1
- package/dist/mcp-server/tools/definitions/genealogy_search_profiles.tool.d.ts.map +0 -1
- package/dist/mcp-server/tools/definitions/genealogy_search_profiles.tool.js +0 -16
- package/dist/mcp-server/tools/definitions/genealogy_search_profiles.tool.js.map +0 -1
- package/dist/services/wikitree/tool-output.d.ts +0 -21
- package/dist/services/wikitree/tool-output.d.ts.map +0 -1
- package/dist/services/wikitree/tool-output.js +0 -26
- package/dist/services/wikitree/tool-output.js.map +0 -1
package/AGENTS.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Developer Protocol
|
|
2
2
|
|
|
3
|
-
**Server:** genealogy-mcp-server
|
|
4
|
-
**Version:** 0.
|
|
5
|
-
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.
|
|
3
|
+
**Server:** @cyanheads/genealogy-mcp-server
|
|
4
|
+
**Version:** 0.2.1
|
|
5
|
+
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.26`
|
|
6
6
|
**Engines:** Bun ≥1.4.4, Node ≥24.0.0
|
|
7
7
|
**MCP SDK:** `@modelcontextprotocol/server` ^2.4.0
|
|
8
8
|
**Zod:** ^4.6.7
|
|
@@ -11,9 +11,22 @@
|
|
|
11
11
|
|
|
12
12
|
---
|
|
13
13
|
|
|
14
|
-
##
|
|
14
|
+
## What's Next?
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
When the user asks what's next or needs direction, suggest options based on the current project state. Common next steps:
|
|
17
|
+
|
|
18
|
+
1. **Re-run the `setup` skill** — ensures CLAUDE.md, skills, structure, and metadata are populated and up to date with the current codebase
|
|
19
|
+
2. **Run the `design-mcp-server` skill** — if the tool/resource surface hasn't been mapped yet, work through domain design
|
|
20
|
+
3. **Add tools/resources/prompts** — scaffold new definitions using the `add-tool`, `add-app-tool`, `add-resource`, `add-prompt` skills
|
|
21
|
+
4. **Add services** — scaffold domain service integrations using the `add-service` skill
|
|
22
|
+
5. **Add tests** — scaffold tests for existing definitions using the `add-test` skill
|
|
23
|
+
6. **Field-test definitions** — exercise tools/resources/prompts with real inputs using the `field-test` skill, get a report of issues and pain points
|
|
24
|
+
7. **Run `devcheck`** — lint, format, typecheck, and security audit
|
|
25
|
+
8. **Run the `security-pass` skill** — audit handlers for MCP-specific security gaps: output injection, scope blast radius, input sinks, tenant isolation
|
|
26
|
+
9. **Run the `polish-docs-meta` skill** — finalize README, CHANGELOG, metadata, and agent protocol for shipping
|
|
27
|
+
10. **Run the `maintenance` skill** — investigate changelogs, adopt upstream changes, and sync skills after `bun update --latest`
|
|
28
|
+
|
|
29
|
+
Tailor suggestions to what's actually missing or stale — don't recite the full list every time.
|
|
17
30
|
|
|
18
31
|
---
|
|
19
32
|
|
|
@@ -42,7 +55,7 @@
|
|
|
42
55
|
|
|
43
56
|
### Tool
|
|
44
57
|
|
|
45
|
-
Use `src/mcp-server/tools/definitions/
|
|
58
|
+
Use `src/mcp-server/tools/definitions/get-profiles.tool.ts` as a read-only definition pattern. It reuses the provider's input and output schemas, passes the caller's cancellation signal into a provider deadline, and renders the same data in `content[]` and `structuredContent` through `formatData`.
|
|
46
59
|
|
|
47
60
|
### Server config
|
|
48
61
|
|
|
@@ -64,9 +77,9 @@ await createApp({
|
|
|
64
77
|
});
|
|
65
78
|
```
|
|
66
79
|
|
|
67
|
-
`sessionMode` declares the HTTP session posture in `src/` instead of leaving it to a deployment's `MCP_SESSION_MODE`, which still wins whenever it carries a meaningful value (an empty string and an unsubstituted `${…}` placeholder read as unset and fall through to the option). Add `require: 'stateful'` when a tool asks the caller for input mid-handler via `ctx.requestInput`: startup then fails with a `ConfigurationError` rather than serving a mode in which a 2025-era client can never answer the prompt. Stdio is never refused.
|
|
80
|
+
`sessionMode` declares the HTTP session posture in `src/` instead of leaving it to a deployment's `MCP_SESSION_MODE`, which still wins whenever it carries a meaningful value (an empty string and an unsubstituted `${…}` placeholder read as unset and fall through to the option). This server declares `'stateless'` (no tool calls `ctx.requestInput`), and `.env.example`, the `Dockerfile`, and the README env table say the same; keep all four in agreement. Add `require: 'stateful'` when a tool asks the caller for input mid-handler via `ctx.requestInput`: startup then fails with a `ConfigurationError` rather than serving a mode in which a 2025-era client can never answer the prompt. Stdio is never refused.
|
|
68
81
|
|
|
69
|
-
`teardown(core)` is the `setup()` counterpart — release a watcher, socket, or non-`unref()`'d timer there. It runs after the transport stops and before the logger closes, on every shutdown path, and a signal-triggered shutdown then exits the process explicitly (0, or 1 if a step never settles within the framework's 10 s ceiling).
|
|
82
|
+
`teardown(core)` is the `setup()` counterpart — release a watcher, socket, or non-`unref()`'d timer there. It runs after the transport stops and before the logger closes, on every shutdown path, and a signal-triggered shutdown then exits the process explicitly (0, or 1 if a step never settles within the framework's 10 s ceiling). This server holds no such handle (each mirror query runs in a child process that is reaped before the request returns), so it declares no `setup` or `teardown`.
|
|
70
83
|
|
|
71
84
|
---
|
|
72
85
|
|
|
@@ -135,23 +148,34 @@ See framework CLAUDE.md and the `api-errors` skill for the full auto-classificat
|
|
|
135
148
|
|
|
136
149
|
## Structure
|
|
137
150
|
|
|
151
|
+
```text
|
|
152
|
+
src/
|
|
153
|
+
index.ts # createApp() entry point, tool registration, server instructions
|
|
154
|
+
config/
|
|
155
|
+
server-config.ts # Mirror enablement and path, transport-aware historical privacy policy
|
|
156
|
+
services/
|
|
157
|
+
genealogy/ # Discovery, record-source descriptors and dispatch, shared schemas and tool fields
|
|
158
|
+
wikitree/ # WikiTree transport and deadline, profile search and reads, privacy, pedigree walks
|
|
159
|
+
open-archives/ # Open Archives records, transcriptions, and reference lists
|
|
160
|
+
socrata/ # Eight live US indexes and their query builder
|
|
161
|
+
mirror/ # Mirror sources, archive ingestion, SQLite snapshots, query worker, mirror CLI
|
|
162
|
+
mcp-server/
|
|
163
|
+
tools/definitions/ # 10 read-only tool definitions (*.tool.ts)
|
|
164
|
+
tests/ # Provider, privacy, and mirror tests with fixtures (wikitree/, records/, mirror/)
|
|
165
|
+
```
|
|
166
|
+
|
|
138
167
|
See [docs/tree.md](./docs/tree.md) for the full layout.
|
|
139
168
|
|
|
140
|
-
|
|
141
|
-
|:---|:---|
|
|
142
|
-
| `src/index.ts` | Server entry point and tool registration |
|
|
143
|
-
| `src/config/server-config.ts` | Mirror and historical privacy settings |
|
|
144
|
-
| `src/mcp-server/tools/definitions/` | Ten read-only tool definitions |
|
|
145
|
-
| `src/services/genealogy/` | Discovery, routing, source descriptors, and shared response schemas |
|
|
146
|
-
| `src/services/wikitree/` | Profile search, reads, and pedigree traversal |
|
|
147
|
-
| `src/services/open-archives/` | Archive records, transcriptions, and references |
|
|
148
|
-
| `src/services/socrata/` | Eight live US indexes |
|
|
149
|
-
| `src/services/mirror/` | Archive ingestion, SQLite stores, and snapshot CLI |
|
|
150
|
-
| `tests/` | Provider, privacy, and lifecycle regression tests |
|
|
169
|
+
---
|
|
151
170
|
|
|
152
171
|
## Naming
|
|
153
172
|
|
|
154
|
-
|
|
173
|
+
| What | Convention | Example |
|
|
174
|
+
|:-----|:-----------|:--------|
|
|
175
|
+
| Files | kebab-case with suffix | `search-records.tool.ts` |
|
|
176
|
+
| Tool names | `genealogy_` prefix, snake_case | `genealogy_search_records` |
|
|
177
|
+
| Directories | kebab-case | `src/services/open-archives/` |
|
|
178
|
+
| Descriptions | Single string or template literal, no `+` concatenation | `'Search the text of Open Archives pages by word, phrase, or wildcard.'` |
|
|
155
179
|
|
|
156
180
|
---
|
|
157
181
|
|
|
@@ -242,6 +266,7 @@ When you complete a skill's checklist, check the boxes and add a completion time
|
|
|
242
266
|
| `bun run changelog:build` | Regenerate `CHANGELOG.md` from `changelog/*.md` |
|
|
243
267
|
| `bun run changelog:check` | Verify `CHANGELOG.md` is in sync (used by devcheck) |
|
|
244
268
|
| `bun run bundle` | Build, pack, and clean a `.mcpb` for one-click Claude Desktop install |
|
|
269
|
+
| `bun run release:github` | Create GitHub Release from an annotated tag — enforces `v<VERSION>: <subject>` title, attaches `.mcpb` bundle |
|
|
245
270
|
|
|
246
271
|
**CI is one file.** `.github/workflows/codeql.yml` (scaffolded) is the only GitHub Actions workflow: CodeQL is GitHub-owned end to end, and the file runs only while the repo's CodeQL *default setup* is turned off. Verification — `devcheck`, tests, the release gates — runs locally; don't add a workflow that re-runs it.
|
|
247
272
|
|
|
@@ -249,11 +274,11 @@ When you complete a skill's checklist, check the boxes and add a completion time
|
|
|
249
274
|
|
|
250
275
|
## Bundling
|
|
251
276
|
|
|
252
|
-
`npm run bundle` produces a `.mcpb` extension bundle for one-click install in Claude Desktop. `mcpb pack` reads `.mcpbignore`, not `.gitignore`, so every root path the bundle must not ship — source, tests, docs, caches, logs, agent docs, plugin manifests, gitignored local files — needs a root-anchored line there (`/docs/`, never `docs/`, which also strips `node_modules/*/docs/`); `lint:packaging` names each missing or unanchored line. Root `skills/` ships on purpose. The pack step is followed by `scripts/clean-mcpb.ts`, which prunes dev dependencies (`mcpb clean`) and strips
|
|
277
|
+
`npm run bundle` produces a `.mcpb` extension bundle for one-click install in Claude Desktop. `mcpb pack` reads `.mcpbignore`, not `.gitignore`, so every root path the bundle must not ship — source, tests, docs, caches, logs, agent docs, plugin manifests, gitignored local files — needs a root-anchored line there (`/docs/`, never `docs/`, which also strips `node_modules/*/docs/`); `lint:packaging` names each missing or unanchored line. Root `skills/` ships on purpose. The pack step is followed by `scripts/clean-mcpb.ts`, which prunes dev dependencies (`mcpb clean`) and strips five classes of `node_modules/**` content that root-anchored `.mcpbignore` patterns cannot reach: dependency-shipped agent docs — `framework-skills/`, `skills/`, `.claude/`, `.agents/`, `AGENTS.md`, and `CLAUDE.md` at a package's root, and `SKILL.md` anywhere (a `skills/` deeper in a package is runtime code and stays); platform-specific native bindings, which would otherwise lock the bundle to the platform it was packed on; node-gyp build output beside a `binding.gyp` (`config.gypi`, Makefiles, `obj.target/`, `.deps/`, object files and debug symbols), which records the packing machine's paths — compiled `*.node` addons stay; build-only package files — the framework's `changelog/`, `scripts/`, `templates/`, and config bases (`biome.json`, `vitest.config.base.mjs`, `config/tsconfig.base.json`), and `better-sqlite3`'s `deps/` and `src/` C sources; and dependency test suites — a `test/`, `tests/`, or `__tests__/` directory at a package's root, and `*.test.*` and `*.spec.*` scripts anywhere (a `tests/` deeper in a package can be runtime code and stays). A server using DataCanvas therefore ships a portable bundle without the DuckDB native — `@duckdb/node-api` is an optional peer loaded lazily, so canvas tools report an actionable install hint and every other tool works normally. MCPB is stdio-only — HTTP and Cloudflare Workers deployments are unaffected. Consumers who don't need it can delete `manifest.json` and `.mcpbignore`; `lint:packaging` skips cleanly.
|
|
253
278
|
|
|
254
279
|
**Adding an env var requires both files:** `server.json` (registry discovery, `environmentVariables[]`) and `manifest.json` (bundle install UX, `mcp_config.env` + `user_config`). `lint:packaging` (run by `devcheck`) verifies the env var names match, that every `user_config` option is wired into `mcp_config.env` as `"X": "${user_config.X}"` (the host substitutes nothing else — `"${X}"` reaches the server as that literal string), and that an optional string option carries `"default": ""`.
|
|
255
280
|
|
|
256
|
-
**README install badges** (Claude Desktop `.mcpb`,
|
|
281
|
+
**README install badges** (Claude Desktop `.mcpb`, Codex, GitHub Copilot) and the `encodeURIComponent` config-generation command are ship-time concerns — run the `polish-docs-meta` skill, which carries the badge format, layout, and generation snippets in `framework-skills/polish-docs-meta/references/readme.md`.
|
|
257
282
|
|
|
258
283
|
---
|
|
259
284
|
|
|
@@ -284,6 +309,12 @@ security: false # optional — true ONLY for a source
|
|
|
284
309
|
|
|
285
310
|
---
|
|
286
311
|
|
|
312
|
+
## Publishing
|
|
313
|
+
|
|
314
|
+
**Every release goes through a release PR** — `git-wrapup`'s "Release PR mode", mode `straight-through`. Run `git-wrapup` and `release-and-publish` in sequence in the same run. Verify with `bun run devcheck`, `bun run rebuild`, and `bun run test` before publishing to npm, the MCP Registry, and GHCR. Attach the MCPB bundle to the GitHub release.
|
|
315
|
+
|
|
316
|
+
---
|
|
317
|
+
|
|
287
318
|
## Imports
|
|
288
319
|
|
|
289
320
|
```ts
|
|
@@ -310,7 +341,7 @@ import { getMyService } from '@/services/my-domain/my-service.js';
|
|
|
310
341
|
- [ ] If wrapping external API: tests include at least one sparse payload case with omitted upstream fields
|
|
311
342
|
- [ ] Registered in `createApp()` arrays (directly or via barrel exports)
|
|
312
343
|
- [ ] Tests use `createMockContext()` from `@cyanheads/mcp-ts-core/testing`
|
|
313
|
-
- [ ] `plugin.json` + `mcp.json` (Agent Plugins 1.0.0 — read by Codex,
|
|
344
|
+
- [ ] `plugin.json` + `mcp.json` (Agent Plugins 1.0.0 — read by Codex, GitHub Copilot, VS Code, Kiro) populated — `plugin.json` `name` = the unscoped repo name (lowercase `a-z`, `0-9`, `-`, `.` only); `version`, `description`, `author`, `homepage`, `repository`, `license`, `keywords` from `package.json`; no other top-level field, `extensions` included. `mcp.json` holds one `"type": "stdio"` entry keyed by the unscoped name, `npx -y <full package name>`, and the same fixed `env` as `.codex-plugin/mcp.json`. Neither file carries a user-supplied variable (no `""`, no `${…}` besides `${PLUGIN_ROOT}`/`${PLUGIN_DATA}`): keys reach Codex through `.codex-plugin/mcp.json` `env_vars`, which works only while `.codex-plugin/plugin.json` keeps `"mcpServers": "./.codex-plugin/mcp.json"`
|
|
314
345
|
- [ ] `.codex-plugin/plugin.json` populated — `name`, `version`, `description`, `repository`, `license` from `package.json`; `interface.displayName` = the unscoped repo name (never the npm scope — `lint:packaging` enforces this); `interface.shortDescription` from `package.json` description
|
|
315
346
|
- [ ] `.codex-plugin/mcp.json` updated — server name key is the unscoped repo name; every user-supplied variable (API key, contact email, instance URL) is listed in `env_vars` so Codex forwards it from the user's environment. Never write `"KEY": ""` into `env` — an empty value replaces the user's exported key and is read as unset
|
|
316
347
|
- [ ] `.claude-plugin/plugin.json` populated — `name`, `version`, `description`, `author`, `repository`, `license`, `keywords` from `package.json`; inline `mcpServers` entry keyed by the unscoped repo name. Every user-supplied variable is declared under `userConfig` (`type`, `title`, `description`; `sensitive: true` for keys and tokens; `required: true` or `default: ""`) and referenced from `env` as `"KEY": "${user_config.<option>}"` — mirror the `user_config` block in `manifest.json`. Never write `"KEY": ""` into `env`
|
package/CLAUDE.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Developer Protocol
|
|
2
2
|
|
|
3
|
-
**Server:** genealogy-mcp-server
|
|
4
|
-
**Version:** 0.
|
|
5
|
-
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.
|
|
3
|
+
**Server:** @cyanheads/genealogy-mcp-server
|
|
4
|
+
**Version:** 0.2.1
|
|
5
|
+
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.26`
|
|
6
6
|
**Engines:** Bun ≥1.4.4, Node ≥24.0.0
|
|
7
7
|
**MCP SDK:** `@modelcontextprotocol/server` ^2.4.0
|
|
8
8
|
**Zod:** ^4.6.7
|
|
@@ -11,9 +11,22 @@
|
|
|
11
11
|
|
|
12
12
|
---
|
|
13
13
|
|
|
14
|
-
##
|
|
14
|
+
## What's Next?
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
When the user asks what's next or needs direction, suggest options based on the current project state. Common next steps:
|
|
17
|
+
|
|
18
|
+
1. **Re-run the `setup` skill** — ensures CLAUDE.md, skills, structure, and metadata are populated and up to date with the current codebase
|
|
19
|
+
2. **Run the `design-mcp-server` skill** — if the tool/resource surface hasn't been mapped yet, work through domain design
|
|
20
|
+
3. **Add tools/resources/prompts** — scaffold new definitions using the `add-tool`, `add-app-tool`, `add-resource`, `add-prompt` skills
|
|
21
|
+
4. **Add services** — scaffold domain service integrations using the `add-service` skill
|
|
22
|
+
5. **Add tests** — scaffold tests for existing definitions using the `add-test` skill
|
|
23
|
+
6. **Field-test definitions** — exercise tools/resources/prompts with real inputs using the `field-test` skill, get a report of issues and pain points
|
|
24
|
+
7. **Run `devcheck`** — lint, format, typecheck, and security audit
|
|
25
|
+
8. **Run the `security-pass` skill** — audit handlers for MCP-specific security gaps: output injection, scope blast radius, input sinks, tenant isolation
|
|
26
|
+
9. **Run the `polish-docs-meta` skill** — finalize README, CHANGELOG, metadata, and agent protocol for shipping
|
|
27
|
+
10. **Run the `maintenance` skill** — investigate changelogs, adopt upstream changes, and sync skills after `bun update --latest`
|
|
28
|
+
|
|
29
|
+
Tailor suggestions to what's actually missing or stale — don't recite the full list every time.
|
|
17
30
|
|
|
18
31
|
---
|
|
19
32
|
|
|
@@ -42,7 +55,7 @@
|
|
|
42
55
|
|
|
43
56
|
### Tool
|
|
44
57
|
|
|
45
|
-
Use `src/mcp-server/tools/definitions/
|
|
58
|
+
Use `src/mcp-server/tools/definitions/get-profiles.tool.ts` as a read-only definition pattern. It reuses the provider's input and output schemas, passes the caller's cancellation signal into a provider deadline, and renders the same data in `content[]` and `structuredContent` through `formatData`.
|
|
46
59
|
|
|
47
60
|
### Server config
|
|
48
61
|
|
|
@@ -64,9 +77,9 @@ await createApp({
|
|
|
64
77
|
});
|
|
65
78
|
```
|
|
66
79
|
|
|
67
|
-
`sessionMode` declares the HTTP session posture in `src/` instead of leaving it to a deployment's `MCP_SESSION_MODE`, which still wins whenever it carries a meaningful value (an empty string and an unsubstituted `${…}` placeholder read as unset and fall through to the option). Add `require: 'stateful'` when a tool asks the caller for input mid-handler via `ctx.requestInput`: startup then fails with a `ConfigurationError` rather than serving a mode in which a 2025-era client can never answer the prompt. Stdio is never refused.
|
|
80
|
+
`sessionMode` declares the HTTP session posture in `src/` instead of leaving it to a deployment's `MCP_SESSION_MODE`, which still wins whenever it carries a meaningful value (an empty string and an unsubstituted `${…}` placeholder read as unset and fall through to the option). This server declares `'stateless'` (no tool calls `ctx.requestInput`), and `.env.example`, the `Dockerfile`, and the README env table say the same; keep all four in agreement. Add `require: 'stateful'` when a tool asks the caller for input mid-handler via `ctx.requestInput`: startup then fails with a `ConfigurationError` rather than serving a mode in which a 2025-era client can never answer the prompt. Stdio is never refused.
|
|
68
81
|
|
|
69
|
-
`teardown(core)` is the `setup()` counterpart — release a watcher, socket, or non-`unref()`'d timer there. It runs after the transport stops and before the logger closes, on every shutdown path, and a signal-triggered shutdown then exits the process explicitly (0, or 1 if a step never settles within the framework's 10 s ceiling).
|
|
82
|
+
`teardown(core)` is the `setup()` counterpart — release a watcher, socket, or non-`unref()`'d timer there. It runs after the transport stops and before the logger closes, on every shutdown path, and a signal-triggered shutdown then exits the process explicitly (0, or 1 if a step never settles within the framework's 10 s ceiling). This server holds no such handle (each mirror query runs in a child process that is reaped before the request returns), so it declares no `setup` or `teardown`.
|
|
70
83
|
|
|
71
84
|
---
|
|
72
85
|
|
|
@@ -135,23 +148,34 @@ See framework CLAUDE.md and the `api-errors` skill for the full auto-classificat
|
|
|
135
148
|
|
|
136
149
|
## Structure
|
|
137
150
|
|
|
151
|
+
```text
|
|
152
|
+
src/
|
|
153
|
+
index.ts # createApp() entry point, tool registration, server instructions
|
|
154
|
+
config/
|
|
155
|
+
server-config.ts # Mirror enablement and path, transport-aware historical privacy policy
|
|
156
|
+
services/
|
|
157
|
+
genealogy/ # Discovery, record-source descriptors and dispatch, shared schemas and tool fields
|
|
158
|
+
wikitree/ # WikiTree transport and deadline, profile search and reads, privacy, pedigree walks
|
|
159
|
+
open-archives/ # Open Archives records, transcriptions, and reference lists
|
|
160
|
+
socrata/ # Eight live US indexes and their query builder
|
|
161
|
+
mirror/ # Mirror sources, archive ingestion, SQLite snapshots, query worker, mirror CLI
|
|
162
|
+
mcp-server/
|
|
163
|
+
tools/definitions/ # 10 read-only tool definitions (*.tool.ts)
|
|
164
|
+
tests/ # Provider, privacy, and mirror tests with fixtures (wikitree/, records/, mirror/)
|
|
165
|
+
```
|
|
166
|
+
|
|
138
167
|
See [docs/tree.md](./docs/tree.md) for the full layout.
|
|
139
168
|
|
|
140
|
-
|
|
141
|
-
|:---|:---|
|
|
142
|
-
| `src/index.ts` | Server entry point and tool registration |
|
|
143
|
-
| `src/config/server-config.ts` | Mirror and historical privacy settings |
|
|
144
|
-
| `src/mcp-server/tools/definitions/` | Ten read-only tool definitions |
|
|
145
|
-
| `src/services/genealogy/` | Discovery, routing, source descriptors, and shared response schemas |
|
|
146
|
-
| `src/services/wikitree/` | Profile search, reads, and pedigree traversal |
|
|
147
|
-
| `src/services/open-archives/` | Archive records, transcriptions, and references |
|
|
148
|
-
| `src/services/socrata/` | Eight live US indexes |
|
|
149
|
-
| `src/services/mirror/` | Archive ingestion, SQLite stores, and snapshot CLI |
|
|
150
|
-
| `tests/` | Provider, privacy, and lifecycle regression tests |
|
|
169
|
+
---
|
|
151
170
|
|
|
152
171
|
## Naming
|
|
153
172
|
|
|
154
|
-
|
|
173
|
+
| What | Convention | Example |
|
|
174
|
+
|:-----|:-----------|:--------|
|
|
175
|
+
| Files | kebab-case with suffix | `search-records.tool.ts` |
|
|
176
|
+
| Tool names | `genealogy_` prefix, snake_case | `genealogy_search_records` |
|
|
177
|
+
| Directories | kebab-case | `src/services/open-archives/` |
|
|
178
|
+
| Descriptions | Single string or template literal, no `+` concatenation | `'Search the text of Open Archives pages by word, phrase, or wildcard.'` |
|
|
155
179
|
|
|
156
180
|
---
|
|
157
181
|
|
|
@@ -242,6 +266,7 @@ When you complete a skill's checklist, check the boxes and add a completion time
|
|
|
242
266
|
| `bun run changelog:build` | Regenerate `CHANGELOG.md` from `changelog/*.md` |
|
|
243
267
|
| `bun run changelog:check` | Verify `CHANGELOG.md` is in sync (used by devcheck) |
|
|
244
268
|
| `bun run bundle` | Build, pack, and clean a `.mcpb` for one-click Claude Desktop install |
|
|
269
|
+
| `bun run release:github` | Create GitHub Release from an annotated tag — enforces `v<VERSION>: <subject>` title, attaches `.mcpb` bundle |
|
|
245
270
|
|
|
246
271
|
**CI is one file.** `.github/workflows/codeql.yml` (scaffolded) is the only GitHub Actions workflow: CodeQL is GitHub-owned end to end, and the file runs only while the repo's CodeQL *default setup* is turned off. Verification — `devcheck`, tests, the release gates — runs locally; don't add a workflow that re-runs it.
|
|
247
272
|
|
|
@@ -249,11 +274,11 @@ When you complete a skill's checklist, check the boxes and add a completion time
|
|
|
249
274
|
|
|
250
275
|
## Bundling
|
|
251
276
|
|
|
252
|
-
`npm run bundle` produces a `.mcpb` extension bundle for one-click install in Claude Desktop. `mcpb pack` reads `.mcpbignore`, not `.gitignore`, so every root path the bundle must not ship — source, tests, docs, caches, logs, agent docs, plugin manifests, gitignored local files — needs a root-anchored line there (`/docs/`, never `docs/`, which also strips `node_modules/*/docs/`); `lint:packaging` names each missing or unanchored line. Root `skills/` ships on purpose. The pack step is followed by `scripts/clean-mcpb.ts`, which prunes dev dependencies (`mcpb clean`) and strips
|
|
277
|
+
`npm run bundle` produces a `.mcpb` extension bundle for one-click install in Claude Desktop. `mcpb pack` reads `.mcpbignore`, not `.gitignore`, so every root path the bundle must not ship — source, tests, docs, caches, logs, agent docs, plugin manifests, gitignored local files — needs a root-anchored line there (`/docs/`, never `docs/`, which also strips `node_modules/*/docs/`); `lint:packaging` names each missing or unanchored line. Root `skills/` ships on purpose. The pack step is followed by `scripts/clean-mcpb.ts`, which prunes dev dependencies (`mcpb clean`) and strips five classes of `node_modules/**` content that root-anchored `.mcpbignore` patterns cannot reach: dependency-shipped agent docs — `framework-skills/`, `skills/`, `.claude/`, `.agents/`, `AGENTS.md`, and `CLAUDE.md` at a package's root, and `SKILL.md` anywhere (a `skills/` deeper in a package is runtime code and stays); platform-specific native bindings, which would otherwise lock the bundle to the platform it was packed on; node-gyp build output beside a `binding.gyp` (`config.gypi`, Makefiles, `obj.target/`, `.deps/`, object files and debug symbols), which records the packing machine's paths — compiled `*.node` addons stay; build-only package files — the framework's `changelog/`, `scripts/`, `templates/`, and config bases (`biome.json`, `vitest.config.base.mjs`, `config/tsconfig.base.json`), and `better-sqlite3`'s `deps/` and `src/` C sources; and dependency test suites — a `test/`, `tests/`, or `__tests__/` directory at a package's root, and `*.test.*` and `*.spec.*` scripts anywhere (a `tests/` deeper in a package can be runtime code and stays). A server using DataCanvas therefore ships a portable bundle without the DuckDB native — `@duckdb/node-api` is an optional peer loaded lazily, so canvas tools report an actionable install hint and every other tool works normally. MCPB is stdio-only — HTTP and Cloudflare Workers deployments are unaffected. Consumers who don't need it can delete `manifest.json` and `.mcpbignore`; `lint:packaging` skips cleanly.
|
|
253
278
|
|
|
254
279
|
**Adding an env var requires both files:** `server.json` (registry discovery, `environmentVariables[]`) and `manifest.json` (bundle install UX, `mcp_config.env` + `user_config`). `lint:packaging` (run by `devcheck`) verifies the env var names match, that every `user_config` option is wired into `mcp_config.env` as `"X": "${user_config.X}"` (the host substitutes nothing else — `"${X}"` reaches the server as that literal string), and that an optional string option carries `"default": ""`.
|
|
255
280
|
|
|
256
|
-
**README install badges** (Claude Desktop `.mcpb`,
|
|
281
|
+
**README install badges** (Claude Desktop `.mcpb`, Codex, GitHub Copilot) and the `encodeURIComponent` config-generation command are ship-time concerns — run the `polish-docs-meta` skill, which carries the badge format, layout, and generation snippets in `framework-skills/polish-docs-meta/references/readme.md`.
|
|
257
282
|
|
|
258
283
|
---
|
|
259
284
|
|
|
@@ -284,6 +309,12 @@ security: false # optional — true ONLY for a source
|
|
|
284
309
|
|
|
285
310
|
---
|
|
286
311
|
|
|
312
|
+
## Publishing
|
|
313
|
+
|
|
314
|
+
**Every release goes through a release PR** — `git-wrapup`'s "Release PR mode", mode `straight-through`. Run `git-wrapup` and `release-and-publish` in sequence in the same run. Verify with `bun run devcheck`, `bun run rebuild`, and `bun run test` before publishing to npm, the MCP Registry, and GHCR. Attach the MCPB bundle to the GitHub release.
|
|
315
|
+
|
|
316
|
+
---
|
|
317
|
+
|
|
287
318
|
## Imports
|
|
288
319
|
|
|
289
320
|
```ts
|
|
@@ -310,7 +341,7 @@ import { getMyService } from '@/services/my-domain/my-service.js';
|
|
|
310
341
|
- [ ] If wrapping external API: tests include at least one sparse payload case with omitted upstream fields
|
|
311
342
|
- [ ] Registered in `createApp()` arrays (directly or via barrel exports)
|
|
312
343
|
- [ ] Tests use `createMockContext()` from `@cyanheads/mcp-ts-core/testing`
|
|
313
|
-
- [ ] `plugin.json` + `mcp.json` (Agent Plugins 1.0.0 — read by Codex,
|
|
344
|
+
- [ ] `plugin.json` + `mcp.json` (Agent Plugins 1.0.0 — read by Codex, GitHub Copilot, VS Code, Kiro) populated — `plugin.json` `name` = the unscoped repo name (lowercase `a-z`, `0-9`, `-`, `.` only); `version`, `description`, `author`, `homepage`, `repository`, `license`, `keywords` from `package.json`; no other top-level field, `extensions` included. `mcp.json` holds one `"type": "stdio"` entry keyed by the unscoped name, `npx -y <full package name>`, and the same fixed `env` as `.codex-plugin/mcp.json`. Neither file carries a user-supplied variable (no `""`, no `${…}` besides `${PLUGIN_ROOT}`/`${PLUGIN_DATA}`): keys reach Codex through `.codex-plugin/mcp.json` `env_vars`, which works only while `.codex-plugin/plugin.json` keeps `"mcpServers": "./.codex-plugin/mcp.json"`
|
|
314
345
|
- [ ] `.codex-plugin/plugin.json` populated — `name`, `version`, `description`, `repository`, `license` from `package.json`; `interface.displayName` = the unscoped repo name (never the npm scope — `lint:packaging` enforces this); `interface.shortDescription` from `package.json` description
|
|
315
346
|
- [ ] `.codex-plugin/mcp.json` updated — server name key is the unscoped repo name; every user-supplied variable (API key, contact email, instance URL) is listed in `env_vars` so Codex forwards it from the user's environment. Never write `"KEY": ""` into `env` — an empty value replaces the user's exported key and is read as unset
|
|
316
347
|
- [ ] `.claude-plugin/plugin.json` populated — `name`, `version`, `description`, `author`, `repository`, `license`, `keywords` from `package.json`; inline `mcpServers` entry keyed by the unscoped repo name. Every user-supplied variable is declared under `userConfig` (`type`, `title`, `description`; `sensitive: true` for keys and tokens; `required: true` or `default: ""`) and referenced from `env` as `"KEY": "${user_config.<option>}"` — mirror the `user_config` block in `manifest.json`. Never write `"KEY": ""` into `env`
|