Skip to content

Latest commit

 

History

History
38 lines (32 loc) · 2.18 KB

File metadata and controls

38 lines (32 loc) · 2.18 KB

Repository Guidelines

Project Structure & Module Organization

  • apps/brave-search-mcp/ hosts the MCP server package. Server entry points live in src/, with tool implementations in src/tools/. UI assets and build inputs live under ui/, and build output goes to dist/.
  • packages/brave-search/ is the shared Brave Search SDK (typed API wrapper) with src/ sources and dist/ output.
  • docs/ and scripts/ contain repo documentation and utility scripts.
  • Monorepo wiring lives in pnpm-workspace.yaml and turbo.json.

Build, Test, and Development Commands

Run commands from the repo root unless noted.

  • pnpm install installs workspace dependencies.
  • pnpm run dev runs package dev tasks via Turbo.
  • pnpm run build builds all packages via Turbo.
  • pnpm run lint runs ESLint with auto-fix.
  • pnpm run check runs lint (no fix) and TypeScript checks.
  • pnpm run test runs the app workspace's default Vitest suite from the repo root.
  • pnpm run clean removes build outputs.
  • pnpm -C apps/brave-search-mcp build builds only the MCP server package.
  • BRAVE_API_KEY=... npx -y brave-search-mcp --http runs the server locally in HTTP mode.

Coding Style & Naming Conventions

  • TypeScript + ESM across packages.
  • ESLint uses @antfu/eslint-config with 2-space indentation, semicolons, and single quotes.
  • Match existing naming patterns in each folder (e.g., PascalCase tool classes under src/tools/).

Testing Guidelines

  • The repo's canonical automated test command is pnpm run test.
  • Use pnpm run check and pnpm run test before opening a PR; add tests alongside new features if you introduce a framework.

Commit & Pull Request Guidelines

  • Recent commits use short, imperative, sentence-case summaries (e.g., “Fix query spacing”).
  • Keep commits focused; prefer one logical change per commit.
  • PRs should include: a clear description, rationale, and any manual test notes (commands or steps).
  • If user-facing behavior changes, add a Changeset before release (pnpm changeset).

Configuration & Security Notes

  • The server requires BRAVE_API_KEY at runtime; avoid committing real keys.
  • Default HTTP mode runs on port 3001; override with PORT when needed.