{"$schema":"https://wellknown.network/schemas/agent-record-v1.json","schemaVersion":"1","id":"ag_rxw2hrd99582","handle":"tai-mcp","url":"https://wellknown.network/agents/tai-mcp","links":{"self":"https://wellknown.network/agents/tai-mcp/record.json","html":"https://wellknown.network/agents/tai-mcp","markdown":"https://wellknown.network/agents/tai-mcp/record.md","api":"https://wellknown.network/api/v1/agents/tai-mcp","status":"https://wellknown.network/api/v1/agents/tai-mcp/status","claim":"https://wellknown.network/agents/tai-mcp/claim","claimApi":"https://wellknown.network/api/v1/claims","claimDescriptor":"https://wellknown.network/agents/tai-mcp/claim.json","badge":"https://wellknown.network/agents/tai-mcp/badge.svg","openapi":"https://wellknown.network/openapi.json","history":"https://wellknown.network/api/v1/agents/tai-mcp/history","tools":"https://wellknown.network/api/v1/agents/tai-mcp/tools"},"ard":{"identifier":"urn:air::server:tai-mcp","type":"application/mcp-server-card+json"},"kind":"mcp_server","declared":{"name":"tai-mcp","summary":"Local stdio MCP for the tai-openapi image generation API.","description":"# tai-mcp \n \n`tai-mcp` 是一个仅通过 stdio 运行的本地 MCP，把 `tai-openapi` 的 OpenAI 兼容图片生成和 \n编辑接口封装为 MCP 工具。它不监听端口，也不提供 HTTP、鉴权、CORS、健康检查或 Docker \n部署入口。 \n \n## 工具 \n \n- `generate_image`：调用 `POST /v1/images/generations` 生成图片。 \n- `edit_image`：调用 `POST /v1/images/edits` 编辑一张或多张图片。 \n- `get_image_model_capabilities`：查询编辑模型的图片数量、mask、size 和扩展参数约束。 \n- `list_image_models`：列出上游当前启用的模型。 \n \n生成和编辑都支持 `response_format=\"url\"`（默认）与 `response_format=\"b64_json\"`： \n \n- `url`：MCP 返回包含上游图片 URL 的 JSON 文本，不下载图片。 \n- `b64_json`：MCP 返回标准 `ImageContent` 和图片元数据。 \n \n## 图片编辑输入 \n \n`edit_image.images` 是有序的本地图片绝对路径列表，`mask` 是可选的本地图片绝对路径。 \n支持 PNG、JPEG 和 WebP。MCP 在本机读取文件，再通过 OpenAI 兼容的 multipart `image[]` \n和 `mask` 文件字段上传到 `tai-openapi`，图片内容不经过 MCP JSON/base64 传输。 \n \n路径必须满足以下条件： \n \n- 使用普通文件系统绝对路径，例如 `C:\\Users\\me\\Pictures\\source.png`；不要使用 `file://`； \n- 最终解析路径位于 `MCP_ALLOWED_IMAGE_ROOTS` 配置的目录中； \n- 文件扩展名和实际图片格式一致； \n- 单个文件不超过 `MCP_MAX_IMAGE_BYTES`。 \n \n相对路径、HTTP URL、base64 和 Data URL 不再作为编辑输入接受。 \n \n示例： \n \n```json \n{ \n  \"prompt\": \"Make the bodywork brighter\", \n  \"images\": [ \n    \"C:\\\\Users\\\\me\\\\Pictures\\\\car.png\", \n    \"C:\\\\Users\\\\me\\\\Pictures\\\\reference.png\" \n  ], \n  \"model\": \"tai-image-to-image\", \n  \"response_format\": \"url\", \n  \"parameters\": {\"denoise\": 0.55} \n} \n``` \n \n编辑前建议先调用 `get_image_model_capabilities(model)`，按返回的 `input.min_images`、 \n`input.max_images`、`input.mask`、`input.size`、`input.prompt_required` 和 \n`parameters_schema` 组织参数。 \n \n## 安装与配置 \n \n要求 Python 3.12+ 和 [uv](https://docs.astral.sh/uv/)。 \n \n```powershell \nCopy-Item .env.example .env \nuv sync --extra dev \n``` \n \n在 `.env` 中至少配置现有的 `TAI_OPENAPI_*` 变量： \n \n```dotenv \nTAI_OPENAPI_BASE_URL=http://127.0.0.1:8000/v1 \nTAI_OPENAPI_API_KEY=replace-with-tai-openapi-api-key \nTAI_IMAGE_MODEL=tai-text-to-image \nTAI_IMAGE_EDIT_MODEL=tai-image-to-image \nMCP_ALLOWED_IMAGE_ROOTS=C:\\Users\\me\\Pictures \n``` \n \n| 环境变量 | 默认值 | 说明 | \n| --- | --- | --- | \n| `TAI_OPENAPI_BASE_URL` | `http://127.0.0.1:8000/v1` | OpenAI 兼容接口地址，必须以 `/v1` 结尾 | \n| `TAI_OPENAPI_API_KEY` | 无 | 上游 Bear…","publisher":null,"homepage":null,"repository":null,"version":"0.1.1","license":null,"protocols":["mcp"],"tags":["mcp"],"pricing":null,"endpoints":[{"url":"pypi:tai-mcp","type":"package_pypi","auth":null,"probeable":false}],"skills":null,"tools":null,"extra":null,"attribution":{"kind":"pypi","name":"pypi","summary":"pypi","version":"pypi","description":"pypi"}},"derived":{"capabilities":[{"slug":"media.image-generation","name":"Image Generation","confidence":1,"provenance":"derived"},{"slug":"dev.docs-lookup","name":"Documentation Lookup","confidence":0.791,"provenance":"derived"}],"categories":["dev","media"],"language":"en"},"observed":{"status":"unknown","statusReason":"Distributed as a package to run locally; no network endpoint to check.","lastOkAt":null,"lastProbedAt":null,"statusComputedAt":null,"reliability30d":null,"latestObservations":[],"tools":null,"package":{"name":"tai-mcp","registry":"pypi","observedAt":"2026-11-04T02:26:16.473Z","publishedAt":"2026-08-06T02:09:32.175840Z","latestVersion":"0.1.1"},"toolSurface":null,"endpointFacts":[]},"verification":{"claimed":false,"claimedAt":null,"proofs":[]},"provenance":{"sources":[{"source":"pypi","key":"tai-mcp","url":"https://pypi.org/project/tai-mcp/","firstSeenAt":"2026-09-10T13:20:43.547Z","fetchedAt":"2026-11-04T02:24:11.310Z","normalizedAt":"2026-11-04T02:24:11.310Z"}]},"firstSeenAt":"2026-09-10T13:20:43.547Z","updatedAt":"2026-11-04T02:26:16.473Z"}