# TicketLab_MCP [![Quality Gate Status](https://sonarqube.app.andreferraro.com/api/project_badges/measure?project=TicketLab_MCP&metric=alert_status&token=sqb_4b948ba1389feb0284d7d2630171396ed00b4478)](https://sonarqube.app.andreferraro.com/dashboard?id=TicketLab_MCP) Hello world — repositório de testes MCP do TicketLab. ## Quick start ```bash npm ci cp .env.example .env # preencha LITELLM_API_KEY npm run migrate npm start ``` Requires Node.js 22+ and npm (`package-lock.json`). ## SQLite ```bash npm run migrate ``` Cria/atualiza `SQLITE_PATH` (default `data/ticketlab.sqlite`) com a migration `migrations/001_tickets.sql`. ## LiteLLM Configure no `.env` (veja `.env.example`): - `LITELLM_BASE_URL` - `LITELLM_MODEL` - `LITELLM_API_KEY` ## Observability lab stack Local Grafana + Tempo + Loki + OTEL Collector (+ Prometheus): ```bash docker compose up -d ``` | What | Where | |------|--------| | Grafana UI | http://localhost:3001 (`admin` / `admin`) | | Demo dashboard | http://localhost:3001/d/ticketlab-demo (folder TicketLab; starred) | | OTLP HTTP | `http://localhost:4318` | | OTLP gRPC | `localhost:4317` | | Tempo | http://localhost:3200 | | Loki | http://localhost:3100 | | Prometheus | http://localhost:9090 | Copy `.env.example` → `.env` for LiteLLM, SQLite e OTLP. Datasources (Prometheus, Loki, Tempo) are provisioned automatically. Stop with `docker compose down`. ## Scripts - `npm run build` — compile TypeScript to `dist/` - `npm start` — hello world with OTLP (trace → Tempo, log → Loki, metric → Prometheus) - `npm run typecheck` — type-check without emitting - `npm run migrate` — apply SQLite migrations - `npm test` — build and run tests ## CI / quality gate Pushes and PRs into `develop`, `release/**` and `main` run SonarQube via Gitea Actions. Merge is blocked until the Quality Gate passes. ## Plane MCP (self-hosted CE) Plane CE 1.3.1 does not expose Cloud-only routes such as `/projects-lite/`. The Cursor config in `.cursor/mcp.json` therefore runs [plane-ce-mcp](https://github.com/Bl4nk44/plane-ce-mcp) locally via `uvx` with `PLANE_BASE_URL=https://plane.app.andreferraro.com` (requires [`uv`](https://docs.astral.sh/uv/) on PATH). Workarounds on CE: always pass `project_id` to `list_work_items` after `list_projects`; workspace-wide `list_work_items` and `count_work_items` may still fail.