npm @imageat/mcpstreamable-httpupdated 26d ago
Model Context Protocol (MCP) server for ImageAT. Gives any MCP client (Claude Desktop, Cursor, etc.) tools to generate images, generate video, and run ImageAT's image-edit features — billed against your ImageAT account credits.
imageat 能做什么?
@imageat/mcp
Model Context Protocol (MCP) server for ImageAT. Gives any MCP client (Claude Desktop, Cursor, etc.) tools to generate images, generate video, and run ImageAT's image-edit features — billed against your ImageAT account credits.
Tools
| Tool | What it does |
|---|---|
imageat_generate_image |
Text-to-image / image-to-image. Returns CDN image URL(s). |
imageat_generate_video |
Text-to-video / image-to-video. Returns a CDN mp4 URL. |
imageat_check_credits |
Current credit balance. |
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. |
If the feature catalog can't be reached at startup, a single generic imageat_edit_image tool
(taking a feature id parameter) is registered instead, so the server still works.
Setup
- Create an API key on your ImageAT Projects page (starts with
iat_live_). - Add the server to your MCP client config:
{
"mcpServers": {
"imageat": {
"command": "npx",
"args": ["-y", "@imageat/mcp"],
"env": {
"IMAGEAT_API_KEY": "iat_live_xxxxxxxxxxxx"
}
}
}
}
- Restart the client. The
imageat_*tools will be available.
Environment variables
| Var | Required | Default | Notes |
|---|---|---|---|
IMAGEAT_API_KEY |
yes | — | Your iat_live_ key. |
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. |
Remote server (claude.ai, ChatGPT, other web clients)
The npx setup above is stdio — it works in desktop apps that launch a local process
(Claude Desktop, Cursor, Claude Code). Browser clients like claude.ai and chatgpt.com
instead connect to a remote MCP endpoint over Streamable HTTP.
The same tools are served over HTTP by dist/http.js. Each MCP session carries the user's
own API key via the Authorization: Bearer iat_live_... header (multi-user), so this is what
you point a hosted connector at.
# Run the remote server locally against a local ImageAT instance:
IMAGEAT_BASE_URL=http://localhost:3000 PORT=8787 npm run start:http
# MCP endpoint: http://localhost:8787/mcp · health: /health
Deploy it (e.g. on Dokploy as mcp.imageat.com) with the included Dockerfile, then add it as
a custom connector:
- claude.ai — Settings → Connectors → Add custom connector → URL
https://mcp.imageat.com/mcp. - ChatGPT — Connectors / Developer mode → add server URL
https://mcp.imageat.com/mcp.
Browser clients run the OAuth flow: after adding the connector they open a consent page
served by this server where you paste your iat_live_ key, and the client receives a short-lived
access token bound to it. Non-browser clients (mcp-remote, MCP Inspector, curl) can still send
a raw iat_live_ key directly as Authorization: Bearer iat_live_....
The OAuth layer (src/oauth.ts) is a minimal, stateless authorization server: it exposes the
RFC 8414/9728 discovery docs, RFC 7591 dynamic client registration, and PKCE /authorize +
/token. Access/refresh tokens are the API key encrypted (AES-256-GCM) under MCP_OAUTH_SECRET,
so there is no session store.
| Var | Where | Default | Notes |
|---|---|---|---|
PORT |
remote only | 8787 |
HTTP listen port. |
IMAGEAT_BASE_URL |
both | https://imageat.com |
Upstream web app serving /api/v1/*. |
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. |
MCP_PUBLIC_URL |
remote only | derived from request | Public origin, e.g. https://mcp.imageat.com. Only needed if proxy headers are wrong. |
Local development
npm install
npm run build
# Inspect the stdio server with the official MCP Inspector against a local ImageAT instance:
IMAGEAT_API_KEY=iat_live_... IMAGEAT_BASE_URL=http://localhost:3000 \
npx @modelcontextprotocol/inspector node dist/index.js
Auth roadmap
Today the server authenticates with a static iat_live_ API key (the remote server reads it
per-session from the Authorization header). Auth is isolated behind an AuthProvider interface
(src/auth.ts), so a future "Sign in with ImageAT" OAuth provider can be dropped in without
changing the tools, the HTTP client, or the backend /v1 routes.
安装
把 imageat 添加到你的客户端。选择你正在使用的那个。
{
"servers": {
"mcp": {
"type": "http",
"url": "https://mcp.imageat.com/mcp"
}
}
}Add to `.vscode/mcp.json` in your workspace.
claude mcp add mcp -- npx -y @imageat/mcpcodex mcp add mcp -- npx -y @imageat/mcpamp mcp add mcp -- npx -y @imageat/mcp{
"mcpServers": {
"mcp": {
"command": "npx",
"args": [
"-y",
"@imageat/mcp"
]
}
}
}Add to `claude_desktop_config.json`, then restart Claude Desktop.
{
"mcpServers": {
"mcp": {
"command": "npx",
"args": [
"-y",
"@imageat/mcp"
]
}
}
}Add to `~/.cursor/mcp.json`, or `.cursor/mcp.json` for a single project.
{
"mcpServers": {
"mcp": {
"command": "npx",
"args": [
"-y",
"@imageat/mcp"
]
}
}
}Add to `~/.codeium/windsurf/mcp_config.json`.
{
"mcpServers": {
"mcp": {
"command": "npx",
"args": [
"-y",
"@imageat/mcp"
]
}
}
}Add to `cline_mcp_settings.json` via the MCP Servers panel.
{
"mcpServers": {
"mcp": {
"command": "npx",
"args": [
"-y",
"@imageat/mcp"
]
}
}
}Add to `~/.gemini/settings.json`.
{
"mcpServers": {
"mcp": {
"type": "local",
"command": "npx",
"args": [
"-y",
"@imageat/mcp"
],
"tools": [
"*"
]
}
}
}Add to `~/.copilot/mcp-config.json`, or run `/mcp add` inside the CLI.
{
"context_servers": {
"mcp": {
"command": {
"path": "npx",
"args": [
"-y",
"@imageat/mcp"
]
}
}
}
}Add to your Zed `settings.json`.
npx -y @imageat/mcpRun `goose configure`, choose **Add Extension → Command-line Extension**, and paste this command.
3 个工具
imageat 向已连接的智能体提供 3 个工具。
- imageat_generate_image
- Text-to-image / image-to-image. Returns CDN image URL(s).
- imageat_generate_video
- Text-to-video / image-to-video. Returns a CDN mp4 URL.
- imageat_check_credits
- Current credit balance.
评分
69 / 100
良好
- 文档25/25
- 维护19/25
- 可信度6/20
- 能力4/15
- 安装体验15/15
- Documents what it does and how to connect
- Has a resolvable package or endpoint
- Exposes at least one tool, prompt or resource
- README has substantive content
- Includes a code example
- Documents its configuration
- Mentions credentials or security posture
- Last commit 19 days ago
- Has a release history
- Repository is not archived
- No licence detected
- Namespace verified in the official MCP registry
- Claimed by its owner
- Published under an organisation
- 3 tool(s) documented
- Provides prompt templates
- Provides resources
- 18 documented install method(s)
- Published to a package registry
- Offers a hosted endpoint — no local install
版本历史
| 版本 | 发布于 |
|---|---|
| 0.4.0最新 | 2026年8月31日 |