# Repository Guidelines
## Project Structure & Module Organization
The codebase is a TypeScript MCP server for The Met API.
- `src/index.ts`: entrypoint (stdio by default, `--http` for Streamable HTTP).
- `src/MetMuseumServer.ts`: server composition and registration.
- `src/tools/`: MCP tools (`ListDepartmentsTool.ts`, `SearchMuseumObjectsTool.ts`, `GetObjectTool.ts`).
- `src/handlers/`: request/response handlers.
- `src/utils/` and `src/types/`: shared utilities and type definitions.
- `dist/`: build output generated by `pnpm run build` (do not hand-edit).
- `.github/workflows/publish.yml`: release workflow for npm publish + DXT packaging.
## Build, Test, and Development Commands
- `pnpm install`: install dependencies (use `CI=true pnpm install --frozen-lockfile` in CI).
- `pnpm run build`: compile TypeScript to `dist/` and set executable bits.
- `pnpm run lint`: run ESLint with auto-fix.
- `pnpm run lint:check`: lint without file changes.
- `pnpm run typecheck`: strict TS compile checks without emitting files.
- `pnpm run check`: full local gate (`lint:check` + `typecheck`).
- `node dist/index.js --http`: smoke-test HTTP transport on `http://localhost:3001/mcp`.
## Coding Style & Naming Conventions
Use the existing ESLint config (`@antfu/eslint-config`) and keep formatting consistent:
- 2-space indentation, semicolons, single quotes.
- ESM/TypeScript modules (`"type": "module"`).
- Keep tool/handler classes in `PascalCase.ts`; utility modules may use `kebab-case.ts` (for example, `server-utils.ts`).
- Prefer small, focused modules; place shared types in `src/types/types.ts`.
## Testing Guidelines
There is currently no dedicated unit-test framework in this repository. For contributions:
- Run `pnpm run check` before opening a PR.
- Smoke-test the built server (`pnpm run build` then `node dist/index.js --http`).
- If adding tests, use `*.test.ts` naming and place them close to the feature or under a `src/__tests__/` folder.
## Commit & Pull Request Guidelines
Recent commits use short, imperative subjects (for example, `Update README`, `Switch to pnpm`).
- Write concise, action-first commit messages.
- Keep commits focused to one change area.
- PRs should include: purpose, behavior changes, manual verification steps, and linked issues.
- For transport/tool output changes, include sample request/response snippets in the PR description.