Alexa Mcp

io.github.chrischallv0.1.0更新于 Oct 8, 2026

Amazon Alexa for Claude — Echo devices, announcements, routines, smart home, lists

概览

AI 生成的概览

让助手列出并控制 Amazon Alexa 设备、语音播报、运行例程,以及管理智能家居设备和清单。

功能
通过 Amazon 私有的 Alexa Web API 工作,可列出 Echo 音箱、Echo Show 和 Fire TV 及其在线状态,并读取媒体播放状态、音量、例程、智能家居设备与场景、购物和待办清单、闹钟、计时器和提醒。写入类工具可设置音量、控制播放、让单台设备说话或在多台设备上播报、运行例程、开关智能家居设备、调节亮度、激活场景,以及增删清单条目。这些操作受确认机制约束:首次调用只返回预览和 confirmToken,只有携带该令牌再次调用才会真正执行。
适用场景
适合让助手读取或操作已有的 Alexa 环境:查看哪些设备在线、正在播放什么、购物清单内容,或触发某个例程与播报。它不是通用的语音指令通道,任意语音命令被有意排除在外。
运行要求
以 npm 包形式通过 stdio 在本地运行,仅支持桌面端。需要 Node.js,并需在浏览器中一次性登录 Amazon;登录会注册一个名为 alexa-mcp 的虚拟设备,并把注册信息(刷新令牌和会话 cookie)保存到状态目录,默认 ~/.alexa-mcp。也可以通过 ALEXA_REGISTRATION 环境变量提供注册信息。需要访问 Amazon 的网络连接。
安装前请注意
注册信息属于凭据:其中包含刷新令牌和会话 cookie,login --print 输出的 base64 行同样应按凭据对待。登录在你自己的浏览器中完成,服务器不会看到你的密码。写入类工具会改动真实设备和清单,确认行为由 MCP_CONFIRM_MODE 和 MCP_CONFIRM_ELICITATION 控制,可被设置为跳过提示。它依赖私有 API,Amazon 改动后可能失效;项目声明由 AI 开发和维护。

安装

在 SourceWeft 中

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

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

其他 MCP 客户端

参照 仓库 中的启动说明。

README

alexa-mcp

This project was developed and is maintained by AI (Claude Code). Use at your own discretion.

An MCP server for Amazon Alexa: list and control Echo speakers, Echo Shows and Fire TVs, make Alexa speak or announce, run routines, control the smart-home devices and scenes Alexa knows about, read and edit shopping/to-do lists, and see alarms, timers and reminders.

It talks to Amazon's private Alexa web API — the one the Alexa app uses — through alexa-remote2. There is no public API for any of this, so expect occasional breakage when Amazon changes things.

Sign in once

You sign in to Amazon in your own browser; this server never sees your password.

  • In a chat: ask Claude to sign in to Alexa. It calls alexa_begin_login and gives you an amazon.com link. Sign in there (password, two-step code, whatever Amazon asks), and you land on a blank www.amazon.com/ap/maplanding page. Paste that page's address back and Claude calls alexa_finish_login.
  • Hosted connector: the sign-in page shows a Sign in to Amazon button and a box for that same address.
  • Terminal: npx @chrischall/alexa-mcp login prints the link and reads the pasted address (--print also writes the registration as one base64 line for ALEXA_REGISTRATION; treat it as a credential).

Under the hood this is the Alexa iOS app's OAuth sign-in with PKCE. The link carries only a challenge, the matching secret stays on the server, and the code in the pasted address is single-use and expires in minutes. Finishing registers a virtual device named alexa-mcp on your account and saves the registration (refresh token plus session cookies) to ~/.alexa-mcp/registration.json (mode 0600). After that no browser is needed: cookies are re-minted from the refresh token every few days. To revoke access, remove the alexa-mcp device from your Amazon account (Manage Your Content and Devices → Devices).

Tools

ToolWhat it does
alexa_list_devicesEcho/Fire TV/other Alexa devices with online status
alexa_get_now_playingMedia state on one device
alexa_list_volumesVolume and mute (only devices Amazon reports — often just a few)
alexa_list_routinesRoutines with their triggers
alexa_list_smart_homeSmart-home devices, groups and scenes, with the actions this server can send
alexa_list_lists / alexa_get_list_itemsShopping and to-do lists
alexa_list_alarms_remindersAlarms, timers and reminders
alexa_set_volume ✋Set a device's volume
alexa_playback ✋Play / pause / next / previous
alexa_speak ✋Speak on one device, or announce on several
alexa_run_routine ✋Run a routine now
alexa_control_smart_home ✋turnOn / turnOff / setBrightness / sceneActivate (no locks, garage doors or thermostats)
alexa_add_list_item ✋ / alexa_remove_list_item ✋Edit a list
alexa_begin_login / alexa_finish_loginBrowser sign-in (see above)
alexa_session_statusConfiguration, no network
alexa_healthcheckDoes Amazon still accept the session?

✋ = confirmation-gated. A client that supports prompts asks you first; elsewhere (claude.ai, Claude Desktop) the first call sends nothing and returns a preview plus a confirmToken, and only a repeat call with that token acts. Arbitrary voice commands ("Alexa, …") are deliberately not exposed: they can buy things and unlock doors.

Configuration

VariableDefaultPurpose
ALEXA_REGISTRATION—Registration JSON, or the base64 line from login --print. Optional when the state file exists.
ALEXA_STATE_DIR~/.alexa-mcpWhere registration.json and pending sign-ins live.
ALEXA_AMAZON_PAGEamazon.comAmazon site of the account (or what the registration recorded).
ALEXA_ACCEPT_LANGUAGEen-USAccept-Language sent to Amazon.
MCP_CONFIRM_MODEask-userask-user / auto / refuse — whether the model must get your approval in chat before using a confirmToken.
MCP_CONFIRM_ELICITATIONonoff skips the confirmation prompt even on clients that declare support.

When both ALEXA_REGISTRATION and the state file are present, the state file wins if it is the same virtual device and at least as new (it is the refreshed copy); otherwise the env var wins (a fresh login).

Hosting

mint.yaml describes the server to mcp-host: one child per user (identity.perUserChild), a two-step auth.flow (begin → sign in on amazon.com → paste the address), and the registration persists in each user's data dir.

Development

sh
npm installnpm test          # typecheck + vitest (no network)npm run build     # tsc + esbuild bundle (dist/bundle.js is the .mcpb entry)

See docs/ALEXA-API.md for the verified response shapes and hosts.

来源:README.md,提交 065794d

工具

0
工具元数据尚未被收录。

版本历史

1
  1. v0.1.0最新Oct 8, 2026