task_list.md•4.58 kB
# Task List
## MVP Priority (P1)
- [x] Initialize TypeScript project, ESLint/Prettier, and test runner.
- [x] Implement config loader (`src/config/index.ts`) with env + JSON file.
- [x] Build stdio MCP server (`src/cli.ts`, `src/mcp/server.ts`).
- [x] Implement GitLab tools: projects, merge requests, issues.
- [x] Implement Jira tools: search issues, get issue.
- [x] Wire tool handlers with validation and error mapping.
- [x] Add NPM scripts: `dev`, `build`, `test`, `lint`, `format`.
- [x] Minimal README with install, config, usage, and client snippet.
- [x] Dockerfile + run example with env vars.
## Project Scaffolding
- [x] Initialize TypeScript Node project (`package.json`, `tsconfig.json`).
- [x] Set up ESLint + Prettier configs and scripts.
- [x] Add Vitest or Jest for testing with TypeScript.
- [x] Create executable `bin/mcp-gitlab-jira` (shebang + node runner).
- [x] Add `.gitignore` (node_modules, dist, coverage).
- [x] Add `Makefile` with common dev targets (install, build, test, lint, run, demo).
## MCP Server
- [x] Implement stdio-based MCP server launcher in `src/cli.ts`.
- [x] Create `src/mcp/server.ts` to register tools and handle requests.
- [x] Define tool interfaces and parameter/result schemas.
- [x] Map structured errors to MCP error responses.
## Configuration
- [x] Implement `src/config/index.ts` to load env vars and `~/.mcp-gitlab-jira.json`.
- [x] Validate config and fail fast with clear messages.
- [x] Redact tokens in error messages (sanitize).
## GitLab Adapter
- [x] Add `src/adapters/gitlab.ts` with authenticated REST client.
- [x] Implement: `gitlab_list_projects`, `gitlab_list_merge_requests`, `gitlab_list_issues`.
- [x] Support pagination, timeouts, and consistent error handling.
- [x] Unit tests with mocked HTTP responses.
## Jira Adapter
- [x] Add `src/adapters/jira.ts` with authenticated REST client.
- [x] Implement: `jira_search_issues`, `jira_get_issue`.
- [x] Support pagination/limits and consistent error handling.
- [x] Unit tests with mocked HTTP responses.
## Tool Handlers
- [x] Wire adapters to MCP tools (basic bindings in `src/tools/index.ts`).
- [x] Add basic validation for inputs and error mapping.
- [x] Add type-safe input/output schemas using Zod.
- [x] Add examples and metadata (names, descriptions) per PRD.
## CLI & Runtime
- [x] Parse flags (`--help`, `--config`) and print usage.
- [x] Graceful startup/shutdown; propagate non-zero exit on fatal config.
- [x] Minimal structured logging with secret redaction.
## Build, Test, and Coverage
- [x] Implement scripts: `dev`, `build`, `test`, `lint`, `format`.
- [x] Achieve ≥80% coverage for adapters and handlers.
- [x] Add `test:watch` and coverage collection.
- [x] Add unit tests for tool validation and error sanitization.
- [x] Run tests locally and verify passing.
- [x] Add `make check` aggregator for lint, format-check, and tests.
## Docker & Distribution
- [x] Create `Dockerfile` and `.dockerignore`.
- [ ] Verify runtime via `docker run` with env vars.
- [ ] Prepare NPM publish config (files, bin map, version).
## CI/CD
- [ ] Add GitHub Actions: install, lint, test, build, docker build.
- [ ] Upload coverage summary; require checks on PRs.
- [ ] Optional: release workflow for NPM and GHCR.
## Documentation
- [x] Write `README.md` with install, config, and usage examples.
- [x] Add example MCP client config snippet.
- [x] Confirm `AGENTS.md` matches actual scripts and layout.
- [x] Add tool example calls and demo script with sample output.
- [x] Add README intro (what/why/how) and links to dev log and task list.
- [x] Add Architecture section with sequence diagram.
- [x] Add Module Map and Error Propagation sections.
## Next Steps (P2)
- [x] Implement real MCP transport (stdio/JSON-RPC) and request routing.
- [x] Surface schema metadata to MCP layer for discoverability.
- [x] Add adapter pagination + timeouts + basic retry/backoff handling.
- [x] Write unit tests for adapters with mocked HTTP.
- [x] Add minimal structured logging with redaction (exclude tokens, auth headers, and query params).
- [x] Add README section with MCP client registration snippet and tool examples.
## Performance & Quality
- [ ] Verify listing up to 100 items <2s (basic benchmark).
- [ ] Add simple retry/backoff for transient HTTP failures.
- [ ] Pre-commit hooks via Husky + lint-staged (optional).
## Future (Post-MVP)
- [ ] Add write operations (create issues/comments, approve MRs).
- [ ] Pipeline status retrieval and Jira sprint reporting.
- [ ] Pagination streaming and expanded filters.