电商平台连接器开发服务

MCP服务器加速了针对Amazon、eBay和Rakuten等电商平台的连接器开发,通过编码特定平台的知识(如认证流程、速率限制、端点特性和错误代码)使开发者无需阅读原始文档即可直接使用。

  • by OBeeNya
  • Python
  • 本地部署
  • 更新于
在 GitHub 查看 OBeeNya/mcp_connectors

使用说明

市场连接器MCP

MCP服务器可加速亚马逊、eBay和乐天的电子商务市场连接器开发。

每个服务器都对特定于市场的知识(身份验证流、速率限制、端点怪癖、错误代码)进行编码,这样开发人员代理就可以直接使用它,而无需阅读原始文档。

建筑

servers/
├── marketplace_api/      ← live: API specs, auth, rate limits, endpoints, error codes
├── schema_mapping/       ← live: field mapping, canonical models, transformer code generation
├── codegen/              ← planned: connector scaffolding and code generation
├── testing/              ← planned: test generation and sandbox interaction
└── compliance/           ← planned: marketplace listing rules and validation

需求

设置

1.克隆

git clone <repo-url>
cd marketplace-connectors-mcp

2.安装依赖项

uv sync

这将安装固定的确切版本 uv.lock --保证在任何机器上都能再现。

3.配置凭据

cp .env.example .env

打开 .env 并填写您所在市场的凭证。服务器在没有凭据的情况下工作——只有当连接器代码在运行时调用市场API时才需要凭据。

看 .env.example 查看完整列表以及在何处获取每个凭证。

4.运行服务器

开发模式 (使用MCP检查器UI):

uv run mcp dev servers/marketplace_api/server.py
uv run mcp dev servers/schema_mapping/server.py

生产/标准模式 (克劳德桌面和克劳德代码使用):

uv run marketplace-api-server
uv run schema-mapping-server

连接到克劳德

克劳德代码(CLI)

注册服务器一次:

claude mcp add marketplace-api -- uv --directory /absolute/path/to/marketplace-connectors-mcp run marketplace-api-server

验证:

claude mcp list

克劳德桌面

添加到您的Claude Desktop配置文件中:

操作系统 配置路径
macOS ~/Library/Application Support/Claude/claude_desktop_config.json
窗户 %APPDATA%\Claude\claude_desktop_config.json
Linux ~/.config/Claude/claude_desktop_config.json

看 mcp_config.example.json 以添加确切的块。


可用工具

工具 说明
list_supported_marketplaces() 列出可用市场
get_api_spec(marketplace) API样式、组、基本URL、常用gotchas
get_auth_config(marketplace) 身份验证方案、令牌流、所需的环境变量、沙盒详细信息
list_endpoints(marketplace, category) 带有参数、分页和使用说明的端点
get_rate_limits(marketplace, endpoint?) 速率限制表和限制/重试策略
get_error_codes(marketplace, http_status?) 带有可重试标志和建议操作的错误代码

分类 list_endpoints: orders · catalog · inventory · fulfillment · reports · returns

可用提示

提示 描述
connector_kickoff(marketplace) 结构化发现序列——在编写任何代码之前运行
auth_implementation_guide(marketplace) 认证模块规范,包括令牌刷新和边缘情况
rate_limit_strategy(marketplace) 设计HTTP客户端速率限制器和重试逻辑

项目结构

.
├── .env.example                        # Credential template — copy to .env
├── mcp_config.example.json             # Claude Desktop / Claude Code MCP config
├── pyproject.toml                      # Project metadata and dependencies
├── uv.lock                             # Pinned dependency versions
└── servers/
    └── marketplace_api/
        ├── server.py                   # FastMCP server (tools, resources, prompts)
        ├── specs/                      # High-level API overviews per marketplace
        └── fixtures/                   # Detailed reference data per marketplace
            ├── amazon/  (auth | rate_limits | error_codes | endpoints)
            ├── ebay/
            └── rakuten/