AGENTS.md
+26 −12
https://raw.githubusercontent.com/cyanheads/datacite-mcp-server/HEAD/AGENTS.md
− **Version:** 0.1.3− **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.15`− **MCP SDK:** `@modelcontextprotocol/server` ^2.3.1− // rendered text. Depositor text goes through the _text.ts helpers (flattenInline, blockquote,− // fenced), never raw.− This server registers no resources or prompts. Scaffold one with the `add-resource` or `add-prompt` skill.− import { parseEnvConfig } from '@cyanheads/mcp-ts-core/config';− `parseEnvConfig` maps Zod schema paths → env var names so errors name the variable (`DATACITE_CONTACT_EMAIL`) not the path (`contactEmail`). Throws `ConfigurationError`, which the framework prints as a clean startup banner. `initDataCiteServices()` reads the config in `setup()`, so a malformed value fails at startup. The contact email rides the `User-Agent` only — never a URL parameter, cache key, or log line.− server-config.ts # DATACITE_CONTACT_EMAIL, DATACITE_MAX_REQUESTS_PER_5MIN (Zod schema)− Skills are modular instructions in `framework-skills/` at the project root. Read them directly when a task matches — e.g., `framework-skills/add-tool/SKILL.md` when adding a tool. `bun run list-skills` prints the full registry. The directory is deliberately not `skills/`: Claude Code and Codex auto-load a plugin's root `skills/`, so a server that ships `.claude-plugin/` or `.codex-plugin/` would hand these development skills to every agent that installs it. Keep `skills/` free for skills meant f− | `bun run lint:packaging` | Packaging surface checks — `server.json`/`manifest.json` env-var parity (run by devcheck) |− `bun run bundle` produces `dist/datacite-mcp-server.mcpb` for one-click install in Claude Desktop. The pack step is followed by `scripts/clean-mcpb.ts`, which prunes dev dependencies (`mcpb clean`) and strips two classes of `node_modules/**` content that root-anchored `.mcpbignore` patterns cannot reach: dependency-shipped agent docs (`framework-skills/`, `skills/`, `.claude/`, `.agents/`, `SKILL.md`) and platform-specific native bindings, which would otherwise lock the bundle to the platform it+ **Version:** 0.2.1+ **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.18`+ **MCP SDK:** `@modelcontextprotocol/server` ^2.4.0+ // rendered text. Depositor text goes through the _text.ts helpers: flattenInline for inline+ // values, descriptionQuote for deposited descriptions, blockquote for other prose, urlLink+ // for URLs, and fenced for machine documents. Escape only at the rendering boundary.+ This server registers no explicit resources or prompts. Its root `skills/` tree is served through the Skills extension by `createApp({ skills: 'skills' })`. Scaffold an explicit resource or prompt with the `add-resource` or `add-prompt` skill.+ import { config, parseEnvConfig } from '@cyanheads/mcp-ts-core/config';+ clampLimits: z.stringbool().default(true).describe('Clamp oversized read counts; false advertises and enforces strict upstream caps.'),+ void config.pkg; // Load the framework config and Node .env before tool schemas read the switch.+ clampLimits: 'DATACITE_CLAMP_LIMITS',+ `parseEnvConfig` maps Zod schema paths → env var names so errors name the variable (`DATACITE_CONTACT_EMAIL`) not the path (`contactEmail`), and throws `ConfigurationError` for malformed values. Count schemas read the config during tool-definition construction; the framework config accessor loads Node's `.env` first. `DATACITE_CLAMP_LIMITS` defaults to `true`: search counts apply at most 1,000 and graph counts at most 100, with requested/applied notices, logs, and a counter. `false` advertises a+ server-config.ts # Contact email, request budget, and read-count clamping (Zod schema)+ jats-notice.ts # Detect empty names and inconsistent years without rewriting JATS+ _counts.ts # Count schemas, applied caps, and clamp telemetry+ Two skill trees live at the project root, written for different readers:+ | Tree | For | Written by |+ |:-----|:----|:-----------|+ | `framework-skills/` | The agent developing this server — framework skills (`metadata.audience: external`) plus server-specific development skills | `init` and `maintenance` for framework skills; the author for local skills |+ | `skills/` | Agents installing the server and calling its tools — tool chains, identifier sources, gates | The author, using `add-skill` |+ Read development skills directly when a task matches — e.g., `framework-skills/add-tool/SKILL.md` when adding a tool. `bun run list-skills` prints the full registry. Claude Code and Codex auto-load a plugin's root `skills/`, so development skills stay in `framework-skills/`. Published root skills ship through plugins, npm, Docker, the `.mcpb` bundle, and the MCP Skills extension; `lint:packaging` validates that tree.+ | `add-skill` | Author a skill the server publishes in root `skills/` for the agents that use it — structure, validation, delivery |+ | `bun run lint:packaging` | Packaging checks — env-var parity, `.mcpbignore` coverage, plugin manifests, published `skills/` (run by devcheck) |+ `bun run bundle` produces `dist/datacite-mcp-server.mcpb` for one-click install in Claude Desktop. `mcpb pack` reads `.mcpbignore`, not `.gitignore`; root development paths need root-anchored exclusions, while root `skills/` ships. `scripts/clean-mcpb.ts` prunes dev dependencies and strips dependency agent docs, platform-specific native bindings, node-gyp generator output containing build-host paths, and build-only package files. Compiled `*.node` addons stay. MCPB is stdio-only. `release-and-pu+ - [ ] Root `plugin.json` + `mcp.json` populated from `package.json`; the root MCP entry carries fixed env values only. User variables stay in the plugin overlays, and `.codex-plugin/plugin.json` keeps `"mcpServers": "./.codex-plugin/mcp.json"` so Codex forwards `env_vars`.+ - [ ] New root development paths have root-anchored `.mcpbignore` exclusions; root `skills/` ships, and `lint:packaging` validates it