mirror of
https://gh.wpcy.net/https://github.com/verygoodplugins/mcp-freescout.git
synced 2026-05-29 06:24:02 +08:00
Major update with breaking changes: FreeScout search API now uses explicit filter parameters instead of query-string syntax, and Git/GitHub tools have been removed. Migrated to MCP SDK 1.25+ with modern McpServer and registerTool() patterns, added Zod schema validation, structured outputs, exponential backoff retry logic, and improved reliability. Includes new test suite, Jest config, and documentation updates for v2.0 features and migration guidance.
2.5 KiB
2.5 KiB
Repository Guidelines
Project Structure & Modules
- Source: TypeScript sources live in
src/(index.ts,freescout-api.ts,ticket-analyzer.ts,types.ts). - Build output: Compiled JavaScript and type declarations are in
dist/(do not edit directly). - Entry point: The MCP server CLI entry is
src/index.ts, built todist/index.jsand exposed asmcp-freescout.
Build, Test & Development
- Install:
npm install– install dependencies. - Dev server:
npm run dev– runsrc/index.tswith live reload. - Build:
npm run build– compile TypeScript todist/. - Test:
npm test– run Jest test suite. - Lint:
npm run lint– run ESLint oversrc/**/*.ts. - Format:
npm run format– apply Prettier formatting tosrc/**/*.ts.
Coding Style & Naming
- Language: TypeScript with ES modules (
type: module). - Formatting: Use Prettier via
npm run format; 2‑space indentation and single quotes where possible. - Linting: ESLint with
@typescript-eslintrules; fix warnings before opening a PR. - Naming: Use
camelCasefor variables/functions,PascalCasefor classes/types, and descriptive file names (e.g.,freescout-api.ts).
Testing Guidelines
- Framework: Jest (
npm test). - Location: Place tests alongside code as
*.test.tsor in a dedicated test folder if introduced consistently. - Scope: Cover new behavior, especially FreeScout API calls and ticket analysis logic.
- CI readiness: Ensure
npm testandnpm run lintpass locally before pushing.
Commit & Pull Requests
- Commits: Write clear, imperative messages (e.g.,
Add ticket analyzer tests,Fix FreeScout auth error). - Branches: Use short, descriptive names (e.g.,
feat/ticket-tags,fix/rate-limits). - PRs: Include a concise summary, motivation, testing notes (
npm test,npm run lint), and link related issues. Add screenshots or logs when changing error handling or CLI behavior.
Memory MCP Usage
- Start of work: Use the memory MCP to recall project-specific context for the area you are modifying (recent bugs, decisions, or related files).
- During/after work: When you fix an issue or learn something important (API behavior, edge case, configuration nuance), store or update a memory via the MCP.
- Associations: When relevant, associate new memories with existing ones (e.g., linking a bugfix to a specific module or decision) to keep context navigable for future tasks.