Alttext Mcp

io.github.alttextai由 GitHub 账号 alttextai 发布v1.0.5更新于 Oct 24, 2026

Generate alt text, translate descriptions, and manage your AltText.ai image library.

已验证STDIO仅桌面效率与工作流媒体与设计

概览

AI 生成的概览

让助手通过 AltText.ai API 为图片生成和翻译替代文本,并管理 AltText.ai 图片库。

可以做什么
封装 AltText.ai API,让助手可以根据图片链接或本地文件生成替代文本、把已有图片翻译成其他语言,并读取或修改账户信息(如积分余额和 webhook 地址)。它还能管理图片库:按资源 ID 列出、搜索、查看、更新和删除图片。批量工具可从包含图片链接的 CSV 生成替代文本,并扫描网页找出缺少替代文本的图片,排队进行后台生成。
适用场景
适合让助手为图片撰写或翻译替代文本、检查网页中缺失的替代文本,或在不离开聊天客户端的情况下维护已有的 AltText.ai 图片库。最适合已经拥有 AltText.ai 账户、希望以对话方式完成图片无障碍工作的用户。
运行要求
通过 npx 以 stdio 方式在本地运行,需要 Node.js 22 或更高版本。需要在 ALTTEXT_API_KEY 环境变量中提供 AltText.ai API 密钥;ALTTEXT_API_BASE_URL 可选,用于代理或备用端点。需要网络访问 AltText.ai API,本地图片或 CSV 路径指的是运行客户端的那台机器。
安装前请注意
生成、翻译和图片转换会消耗 AltText.ai 账户积分,付费操作前请先查看余额。该服务器可能覆盖已有替代文本、在更新时替换字段,并从图片库中删除图片。本地图片文件和 CSV 内容会上传到 AltText.ai,CSV 导入或网页扫描会排队后台任务,完成并非即时。API 密钥会出现在启动时下载并执行的软件包的环境中。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Alttext Mcp,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

AltText.ai MCP Server

An MCP server that lets AI assistants generate alt text, manage image libraries, and queue alt text generation for web page images using the AltText.ai API.

Works with Claude Desktop, Claude Code, Cursor, Windsurf, and any MCP-compatible client.

Verify this package

This server runs npx -y @alttext_ai/alttext-mcp, which downloads and executes code with your API key in its environment. That's worth a moment of verification before you install — by you or by an AI agent doing the setup. Everything below should match:

SignalValue
npm package@alttext_ai/alttext-mcp
Source repositorygithub.com/alttextai/alttext-mcp
PublisherAltText.ai
ProvenancePublished from this repo's CI with npm provenance — npm shows a verified build badge linking the package to this exact commit

The npm scope is @alttext_ai (with an underscore), while the GitHub org is alttextai (no underscore). This is intentional, not a typosquat: the @alttextai npm scope was already taken, so we publish under @alttext_ai. The two names refer to the same official AltText.ai package.

To cryptographically verify the published package was built by this repo's CI — not just trust the metadata — run:

sh
npm audit signatures

from a project where the package is installed. This validates the registry signature and the npm provenance attestation, which links the tarball to a specific commit and GitHub Actions build. A counterfeit package can forge repository.url and other metadata, but it cannot forge the provenance attestation — so this is the check that actually matters.

(For a quick, weaker cross-reference of the claimed source you can run npm view @alttext_ai/alttext-mcp repository.url, but note that field is publisher-controlled metadata and proves nothing on its own.)

Pinning a version

The setup snippet uses npx -y @alttext_ai/alttext-mcp, which always resolves to the latest published version and re-runs it on every launch. That keeps you current, but it also means a future release runs automatically without review. If you want a reproducible, audited install, pin a specific version:

json
"args": ["-y", "@alttext_ai/[email protected]"]

Run npm audit signatures against the pinned version, and bump it deliberately when you're ready to take a new release.

Setup

Requirements: Node.js 22+ and an AltText.ai API key

Add the server to your MCP client configuration:

json
{  "mcpServers": {    "alttext-ai": {      "command": "npx",      "args": ["-y", "@alttext_ai/alttext-mcp"],      "env": {        "ALTTEXT_API_KEY": "your-api-key"      }    }  }}

Where to add this:

ClientConfig file
Claude Desktopclaude_desktop_config.json
Claude Code.mcp.json in your project root
CursorMCP settings in the Cursor preferences
WindsurfMCP settings in the Windsurf preferences

Command-line tool

The same operations are available as the alttext command, which also manages an account's site API keys with a full-access key. See packages/cli/README.md for commands, flags and exit codes.

Once @alttext_ai/cli is released on npm:

sh
npm install -g @alttext_ai/clialttext loginalttext whoami

Until then, build it from a clone of this repo:

sh
npm installnpm run buildnpm link --workspace packages/cli

Agent skill

skills/alttext teaches Claude Code, Codex and other coding agents to drive the alttext CLI: checking whoami first, parsing --json, dry-running and asking before a rotate, revoke or delete, keeping tokens out of the conversation, and the reseller workflows for onboarding, billing and leaked keys. The skill contains no credentials, and it tells the agent to have you run alttext login yourself rather than paste a key into chat. It needs the CLI installed.

With npx skills, for any supported agent:

sh
npx skills add alttextai/alttext-mcp --skill alttext

As a Claude Code plugin, from this repo's plugin marketplace:

sh
claude plugin marketplace add alttextai/alttext-mcpclaude plugin install alttext@alttext-ai

Or in one step inside a Claude Code session (2.1.275 or later): /plugin install alttext --marketplace alttextai/alttext-mcp.

From a local clone, pass the clone's path instead: npx skills add ./alttext-mcp --skill alttext, or claude plugin marketplace add ./alttext-mcp.

Tools

Account Management

ToolDescription
get_accountCheck your credit balance, usage, and account settings.
update_accountUpdate account name, webhook URL, or notification email.

Generate Alt Text

ToolDescription
generate_alt_textGenerate alt text for an image URL. Supports multilingual output, custom prompts, keywords, and character limits. Uses account credits.
generate_alt_text_from_fileGenerate alt text from a local image file. Automatically base64-encodes and uploads. Uses account credits.
translate_imageAdd alt text in a new language for an existing image (by asset_id). Uses account credits.

Manage Image Library

ToolDescription
list_imagesList images in your library with pagination.
search_imagesSearch your image library by alt text content.
get_imageGet details for a specific image by asset ID.
update_imageUpdate alt text, tags, or metadata for an image.
delete_imageDelete an image from your library.

Bulk Operations

ToolDescription
bulk_createBulk generate alt text from a CSV file with image URLs and optional metadata.
scrape_pageScan a web page, find images missing alt text, and queue generation. Results are async -- use list_images to check progress.

Effects and processing

This package uses stdio and runs on the machine launching the MCP client. Image and CSV paths refer to that machine; selected file contents are uploaded to AltText.ai.

Generation and translation use your account credits. Additional languages and image conversion can increase the total. Check get_account before paid work. Generation can overwrite existing alt text when requested; updates replace supplied fields and deletion removes the image from the library.

CSV imports and page scraping queue background processing. An accepted request does not mean generation has finished; inspect the image library and any configured completion notifications. Tool annotations describe effects for clients; they do not enforce confirmation.

Example Prompts

Once configured, just ask your AI assistant:

Account & Credits

Generate Alt Text

  • "Generate alt text for https://example.com/photo.jpg"
  • "Generate alt text for this image" (with local file)
  • "Generate alt text in French and Spanish for this image"
  • "Translate image abc123 to German"

Manage Library

  • "Search my images for 'product photo'"
  • "List my images"
  • "Get details for image abc123"
  • "Update the alt text for asset abc123"
  • "Delete image xyz789"

Bulk Operations

  • "Generate alt text for images missing it on https://example.com"
  • "Process this CSV file of image URLs" (bulk_create)

Environment Variables

VariableRequiredDescription
ALTTEXT_API_KEYYesYour AltText.ai API key
ALTTEXT_API_BASE_URLNoOverride the API base URL (default: https://alttext.ai/api/v1)

Development

The repo is an npm workspace: packages/core (private API client, schemas and formatters, bundled into each published package), packages/mcp (@alttext_ai/alttext-mcp) and packages/cli (@alttext_ai/cli, the alttext command).

sh
npm installnpm run check

The root package.json version is the only one to edit. npm run version:stamp copies it into every package and server.json, and CI fails when they drift. A v* tag matching that version publishes both packages.

Tests use mocked fetch calls -- no API key or network access needed.

npm run skills:validate checks each skill's frontmatter and links, and that every alttext command and flag a skill mentions exists in the built CLI. It runs as part of npm run check, after the build.

Hosted deployments must rate-limit POST /register at a trusted edge using the verified client address. The Node service deliberately ignores forwarded client-address headers because accepting them without an authenticated proxy boundary would let callers spoof the rate-limit identity.

The production container and required settings are documented in docs/deployment.md.

License

MIT

Registry publishing

server.json describes the stdio npm package. Its name matches mcpName in packages/mcp/package.json; both versions must match the release being submitted. Publish and verify that exact npm version before running mcp-publisher publish. Registry acceptance and directory approval are separate from an npm release.

来源:README.md,提交 b960ccc

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v1.0.5最新Sep 17, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分