Development

February 2, 2026 ยท View on GitHub

To develop or contribute to the Docs MCP Server:

  • Fork the repository and create a feature branch.
  • Follow the code conventions in ARCHITECTURE.md.
  • Write clear commit messages (see Git guidelines below).
  • Open a pull request with a clear description of your changes.

For questions or suggestions, open an issue.

Architecture

For details on the project's architecture and design principles, please see ARCHITECTURE.md.

Notably, the vast majority of this project's code was generated by the AI assistant Cline, leveraging the capabilities of this very MCP server.

Development Workflow

Key Commands

Use Node.js v22 for local development (for example, nvm use 22). If you switch Node versions after installing dependencies, run npm rebuild to recompile native modules.

TaskCommandDescription
Setupnpm installInstall dependencies
Buildnpm run buildBuild both server and web assets
Lintnpm run lintCheck code issues with Biome
Fixnpm run lint:fixAuto-fix lint issues (add -- --unsafe if needed)
Typechecknpm run typecheckRun TypeScript compiler checks
Formatnpm run formatFormat code with Biome
Test Allnpm testRun all tests with Vitest
Test Singlenpx vitest run <path>Run a specific test file (e.g., src/utils/foo.test.ts)

Git Workflow

  • Branching: <type>/<issue>-<desc> (e.g., feat/123-add-cache)
  • Pre-commit: Husky runs lint, typecheck, and tests. Never bypass.
  • Security: NEVER commit secrets, credentials, or sensitive data (e.g., .env).

Commit Messages

Strictly enforced by commitlint. Commits will fail if format is incorrect.

  • Format: <type>(<scope>): <subject> (Scope is optional but recommended)
  • Types: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert
  • Subject Rules:
    • Must be lower case
    • Must NOT end with a period
    • Keep header under 100 characters
  • Body/Footer:
    • Separate from header with a blank line
    • No line length limit (configured in commitlint.config.js)