Back to MCP directory
publicPublicdnsLocal runtime

Alexa Shopping List

一个通过MCP与AI助手交互管理Alexa购物列表的工具,需手动登录获取Cookie并定期刷新。

article

README

🚀 Alexa 购物清单管理器

本工具可让您无缝管理Alexa购物清单,能即时添加、删除和查看项目。通过MCP与Claude或Cursor等AI助手交互,实现与Alexa购物清单的本地通信。

在Claude Desktop中的示例用法

🚀 快速开始

此工具能让您轻松管理Alexa购物清单,通过MCP与AI助手交互,实现与清单的本地通信。

⚠️ 重要提示

此工具需要手动身份验证和Cookie刷新。它使用通过手动登录过程提取的浏览器cookie,且Amazon会话会过期。您必须定期重新运行登录脚本(步骤5和6),当工具停止工作时。

✨ 主要特性

  • 无缝管理Alexa购物清单,可即时添加、删除和查看项目。
  • 通过MCP与AI助手交互,实现与Alexa购物清单的本地通信。

📦 安装指南

先决条件

  • Python 3.10+
  • uv(安装:pip install uv 或参见astral.sh/uv
  • Docker及Docker Compose(或Docker Desktop)
  • Google Chrome(用于登录脚本)
  • Amazon账户(带有Alexa)

设置与运行

1. 克隆仓库

# git clone <repository_url>
cd alexa-mcp

2. 配置设置 编辑src/auth/config.py以反映您的Amazon凭证:

AMAZON_EMAIL = "你的亚马逊邮箱"
AMAZON_PASSWORD = "你的亚马逊密码"

3. 安装依赖项 在项目的根目录中运行以下命令:

pip install -r src/api/requirements.txt
pip install -r src/auth/requirements.txt
pip install -r src/mcp/requirements.txt

4. 启动API服务器 从项目根目录运行以下命令:

uvicorn src.api.main:app --reload

默认情况下,API将在http://localhost:8000上可用。 5. 启动MCP服务器 从项目根目录运行以下命令:

uvicorn src.mcp.mcp_server:app --reload

💻 使用示例

连接MCP客户端(Claude Desktop / Cursor)

要将此服务器与MCP客户端(如Claude Desktop或Cursor)一起使用,需要在客户端的mcp.json文件中添加其配置。此文件告诉客户端如何找到和运行您的本地MCP服务器。

  1. 找到您的MCP客户端配置文件(通常名为mcp.json)。具体位置因客户端而异。
  2. 打开文件并在主"mcpServers": { ... }对象内添加以下条目:
    "alexa-shopping-list": {
        "displayName": "Alexa Shopping List MCP",
        "description": "MCP Server for interacting with Alexa shopping list via local API",
        "command": "/path/to/your/alexa-mcp/.venv/bin/python",
        "args": [
          "-m",
          "src.mcp.mcp_server"
        ],
        "workingDirectory": "/path/to/your/alexa-mcp",
        "env": {
          "PYTHONPATH": "/path/to/your/alexa-mcp"
        }
    }

重要注意事项

  • 必须将占位符绝对路径/path/to/your/alexa-mcp替换为计算机上项目的实际绝对路径。
  • 确保.venv虚拟环境存在于该位置,并且已安装MCP依赖项(运行uv pip install -r src/mcp/requirements.txt)。
  1. 保存mcp.json文件。
  2. 重新启动您的MCP客户端。现在应该可以找到“Alexa Shopping List MCP”服务器。

🔧 技术细节

组件

  1. API服务器(src/api):使用FastAPI的Docker容器与Alexa通信。
  2. MCP服务器(src/mcp):本地脚本提供MCP工具,代理到API服务器。
  3. 登录脚本(src/auth):用于通过Selenium进行手动登录和Cookie注入的本地脚本。

📄 许可证

文档未提及相关信息,故跳过该章节。

🤝 支持

喜欢这个工具?考虑支持开发者:

赞助 TheSethRose

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client