# MTEC developer documentation

Markdown served in-app at **`/dev/docs/`** when developer docs are enabled (see repository root [README.md](../README.md) — Integration).

## Contents

| Document | Description |
|----------|-------------|
| [ports.md](./ports.md) | **8888** (HTTP, `/api`, WebSocket) vs **4000** (VBS TCP only). |
| [API.md](./API.md) | HTTP **`/api/*`** routes (v1 preview contract, grouped by UI area). |
| [realtime.md](./realtime.md) | Web UI **WebSocket** on **8888** (same server as HTTP; VBS uses TCP **4000**). |
| [agent.md](./agent.md) | Optional **agent API** (`/api/agent/*`) for AI tools and audit. |
| [agent-setup.md](./agent-setup.md) | **Install and deploy** AI/MCP: `.env.example`, `.env.mcp.example`, Docker. |

## Changelog (docs only)

| Date | Change |
|------|--------|
| (initial) | Added `README.md`, `API.md`, `realtime.md`; in-app `/dev/docs`; [`GET /api/dev/docs-enabled`](../api/dev/docs-enabled). |
| 2026-05-15 | Added [agent.md](./agent.md), [agent-setup.md](./agent-setup.md) for AI/MCP integration. |
| 2026-05-15 | agent-setup: Docker env automation (§3), MTEC deploy (§4.2), mtec-mcp deploy (§4.3). |
| 2026-05-15 | Agent settings in `.env` only; removed `conf/agent.env`. |
| 2026-05-15 | Added [ports.md](./ports.md); clarified 8888 vs 4000 in API/realtime/README. |
| 2026-05-15 | agent-setup: image vs deploy; `.env.mcp.example`; no site env in compose. |
| 2026-05-15 | `docker-compose.mcp.yml` (was `docker-compose.ai.yml`). |
| — | API docs: documented scheduling readiness endpoint and derived readiness/placeholder event fields. |
| — | API docs: documented commander app URL/QR endpoints used by the Trainees page commander QR. |
