{
  "markdown": "# @imageat/mcp\n\nModel Context Protocol (MCP) server for **ImageAT**. Gives any MCP client (Claude Desktop, Cursor,\netc.) tools to generate images, generate video, and run ImageAT's image-edit features — billed\nagainst your ImageAT account credits.\n\n## Tools\n\n| Tool | What it does |\n|------|--------------|\n| `imageat_generate_image` | Text-to-image / image-to-image. Returns CDN image URL(s). |\n| `imageat_generate_video` | Text-to-video / image-to-video. Returns a CDN mp4 URL. |\n| `imageat_check_credits` | Current credit balance. |\n| `imageat_edit_<feature>` | One tool **per edit feature**, fetched live at startup — e.g. `imageat_edit_remove-background`, `imageat_edit_object-eraser`, `imageat_edit_relight`, `imageat_edit_virtual-try-on`, `imageat_edit_city-teleport`, `imageat_edit_ai-edit-pro`. New features appear automatically. |\n\nIf the feature catalog can't be reached at startup, a single generic `imageat_edit_image` tool\n(taking a `feature` id parameter) is registered instead, so the server still works.\n\n## Setup\n\n1. Create an API key on your ImageAT **Projects** page (starts with `iat_live_`).\n2. Add the server to your MCP client config:\n\n```json\n{\n  \"mcpServers\": {\n    \"imageat\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@imageat/mcp\"],\n      \"env\": {\n        \"IMAGEAT_API_KEY\": \"iat_live_xxxxxxxxxxxx\"\n      }\n    }\n  }\n}\n```\n\n3. Restart the client. The `imageat_*` tools will be available.\n\n### Environment variables\n\n| Var | Required | Default | Notes |\n|-----|----------|---------|-------|\n| `IMAGEAT_API_KEY` | yes | — | Your `iat_live_` key. |\n| `IMAGEAT_BASE_URL` | no | `https://imageat.com` | The web app that serves the `/api/v1/*` generation endpoints. Point at `http://localhost:3000` for local dev. |\n\n## Remote server (claude.ai, ChatGPT, other web clients)\n\nThe `npx` setup above is **stdio** — it works in desktop apps that launch a local process\n(Claude Desktop, Cursor, Claude Code). Browser clients like **claude.ai** and **chatgpt.com**\ninstead connect to a **remote MCP endpoint over Streamable HTTP**.\n\nThe same tools are served over HTTP by `dist/http.js`. Each MCP session carries the user's\nown API key via the `Authorization: Bearer iat_live_...` header (multi-user), so this is what\nyou point a hosted connector at.\n\n```bash\n# Run the remote server locally against a local ImageAT instance:\nIMAGEAT_BASE_URL=http://localhost:3000 PORT=8787 npm run start:http\n# MCP endpoint: http://localhost:8787/mcp   ·   health: /health\n```\n\nDeploy it (e.g. on Dokploy as `mcp.imageat.com`) with the included `Dockerfile`, then add it as\na custom connector:\n\n- **claude.ai** — Settings → Connectors → Add custom connector → URL `https://mcp.imageat.com/mcp`.\n- **ChatGPT** — Connectors / Developer mode → add server URL `https://mcp.imageat.com/mcp`.\n\nBrowser clients run the **OAuth** flow: after adding the connector they open a consent page\nserved by this server where you paste your `iat_live_` key, and the client receives a short-lived\naccess token bound to it. Non-browser clients (`mcp-remote`, MCP Inspector, curl) can still send\na raw `iat_live_` key directly as `Authorization: Bearer iat_live_...`.\n\nThe OAuth layer (`src/oauth.ts`) is a minimal, stateless authorization server: it exposes the\nRFC 8414/9728 discovery docs, RFC 7591 dynamic client registration, and PKCE `/authorize` +\n`/token`. Access/refresh tokens are the API key encrypted (AES-256-GCM) under `MCP_OAUTH_SECRET`,\nso there is no session store.\n\n| Var | Where | Default | Notes |\n|-----|-------|---------|-------|\n| `PORT` | remote only | `8787` | HTTP listen port. |\n| `IMAGEAT_BASE_URL` | both | `https://imageat.com` | Upstream web app serving `/api/v1/*`. |\n| `MCP_OAUTH_SECRET` | remote only | *(random per boot)* | Long random string that encrypts issued OAuth tokens. **Set this in production** or tokens are invalidated on every restart. |\n| `MCP_PUBLIC_URL` | remote only | derived from request | Public origin, e.g. `https://mcp.imageat.com`. Only needed if proxy headers are wrong. |\n\n## Local development\n\n```bash\nnpm install\nnpm run build\n\n# Inspect the stdio server with the official MCP Inspector against a local ImageAT instance:\nIMAGEAT_API_KEY=iat_live_... IMAGEAT_BASE_URL=http://localhost:3000 \\\n  npx @modelcontextprotocol/inspector node dist/index.js\n```\n\n## Auth roadmap\n\nToday the server authenticates with a static `iat_live_` API key (the remote server reads it\nper-session from the `Authorization` header). Auth is isolated behind an `AuthProvider` interface\n(`src/auth.ts`), so a future \"Sign in with ImageAT\" OAuth provider can be dropped in without\nchanging the tools, the HTTP client, or the backend `/v1` routes.\n",
  "bytes": 4669,
  "sha": "43ddcec65643717edd9ec1ecf2bc309831b1f94390a7623c8759f28ce05775b8",
  "repo_slug": "incendies/imageat-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_incendies_imageat_849ea49d/readme"
}