# Upflag — Error Tracking & Uptime Monitoring Plain-English error alerts and uptime monitoring for JS apps. Built for AI-assisted development. ## Setup Run this in the project root: ``` npx upflag init --key uf_YOUR_KEY --url https://myapp.com ``` Flags are optional — without them it falls back to interactive prompts. Also reads `UPFLAG_API_KEY` from env. Auto-detects framework (Next.js, Vite, Astro, HTML), creates a monitor, and injects the error tracking snippet. Get an API key at https://upflag.io/dashboard/errors ## MCP Server (Claude Code, Cursor, etc.) Add to MCP config (e.g. `.claude/mcp.json` or `.cursor/mcp.json`): ```json { "mcpServers": { "upflag": { "command": "npx", "args": ["-y", "@upflag/mcp-server"], "env": { "UPFLAG_API_KEY": "uf_YOUR_KEY" } } } } ``` This gives the LLM three tools: `add_monitoring`, `list_errors`, `check_status`. ## API (base: https://upflag.io) Auth: `X-API-Key: ` — keys start with `uf_`. | Method | Endpoint | Purpose | |--------|----------|---------| | POST | /api/v1/errors | Submit errors (auto-sent by snippet) | | GET | /api/v1/errors/list | List error groups with plain-English summaries | | GET | /api/v1/errors/:id | Error detail with stack trace and explanation | | POST | /api/v1/errors/:id/resolve | Resolve an error | | POST | /api/v1/monitors | Create monitor `{"name":"...","url":"..."}` | | GET | /api/v1/monitors | List monitors with uptime stats | | GET | /api/v1/status | Project health overview | ## Links - Dashboard: https://upflag.io/dashboard - Help: https://upflag.io/help