跳过安装。2 分钟内即可运行。
在 cloud.anythingmcp.com 开始免费试用,一键添加 Tamara,然后将你的 AI 客户端(Claude、ChatGPT、Copilot 或 Cursor)指向生成的 MCP 端点。无需 Docker,无需 git clone,无需任何工程经验。
摘要
Tamara 先买后付(沙特阿拉伯、阿联酋、科威特、巴林、阿曼):按你的订单号或 Tamara ID 查询订单的状态以及已扣款、已退款和已结算金额,检查支付方式和客户资格。扣款和退款已包含在内,但安装时为关闭状态。
试试这样问
Tamara 的示例提示
点击任意提示即可复制,然后粘贴到 Claude、ChatGPT、Cursor、Gemini、Copilot 或 OpenClaw 中,在该连接器上运行。
Claude 是 AI,可能会出错。请核对回答。
💡 无需安装? 直接使用 cloud.anythingmcp.com。 登录、点击 Connectors → Tamara、粘贴凭证、生成 MCP API key,即可完成。无 Docker、无
git clone、无本地服务器。
Tamara + Cursor
Tamara 先买后付(沙特阿拉伯、阿联酋、科威特、巴林、阿曼):按你的订单号或 Tamara ID 查询订单的状态以及已扣款、已退款和已结算金额,检查支付方式和客户资格。扣款和退款已包含在内,但安装时为关闭状态。
前提条件
完整的设置说明已内置在连接器中 (在 store 中选择连接器时可见)。所需环境变量:
TAMARA_API_URL, TAMARA_API_TOKEN
步骤 1 — 获取凭证
设置大约需要 2 分钟。你需要一个 Tamara 商户账号及其 API 令牌。
- 登录 Tamara Partners Portal 并打开 API Token Management,或使用 Tamara 随商户账号发给你的 API 令牌。沙盒和生产环境的令牌不同。
- 把令牌粘贴到
TAMARA_API_TOKEN,不要带 "Bearer" 或空格。它以Authorization: Bearer <token>的形式发送。这里不使用通知令牌和公钥。 - 把
TAMARA_API_URL设为生产环境的https://api.tamara.co或沙盒的https://api-sandbox.tamara.co,必须与令牌匹配。 - 安装连接器并运行
tamara_list_payment_types:它会列出你的商店提供的支付方式,并确认令牌可用。
你的订单号还是 Tamara 的 ID:order_reference_id 是结账时发送的你自己的订单号,例如商店订单号;order_id 是 Tamara 生成的 UUID。大多数问题都从你的订单号开始,使用 tamara_get_order_by_reference。
可读取的内容:按你的订单号或 Tamara 订单 ID 查询的订单,包括状态、支付方式和分期数、客户、地址、商品、总额、已扣款、已退款、已取消和已支付金额、结算状态和日期,以及其交易(扣款、退款和取消);某个国家可用的支付方式(如 PAY_BY_INSTALMENTS 或 PAY_NOW),附订单最低和最高金额及支持的分期数,也可只返回适用于某个金额的方式;结账前,某位客户在某个金额下可以使用哪些支付选项,以及 Tamara 当前是否认为某位客户(按手机号、邮箱或两者)符合资格;以及已注册的 Webhook 及其 URL、事件和请求头。
订单状态:new、approved、authorised,然后是 partially_captured 或 fully_captured,以及 partially_refunded 或 fully_refunded;canceled、declined 和 expired 为最终状态。paid_amount 是客户目前已支付的金额;settlement_status 和 settlement_date 表示 Tamara 是否已向你结算。
安装时关闭:tamara_capture_order(发货时对已授权订单全额或部分扣款,以便 Tamara 结算)和 tamara_refund_order(对已扣款订单全额或部分退款;资金退回客户,无法撤回)。两者都会动用资金,因此由管理员有意开启。即使开启后,AI 也会先向你展示订单、金额和币种并等待你确认。
金额和时间:金额是包含 amount 和 currency 的对象;SAR 和 AED 为 2 位小数,BHD、KWD 和 OMR 为 3 位。时间为 UTC 的 ISO 8601 格式。
限制:Tamara 没有列出或搜索订单的接口,因此 AI 按你的订单号或 Tamara ID 查询订单。
常见错误:401 表示令牌错误,或令牌属于另一个环境(沙盒或生产)。订单返回 404 表示该环境中没有此参考号或 ID 的订单。扣款或退款返回 400 或 422 时会指出 Tamara 拒绝的字段,例如金额超过可扣款金额。403 表示令牌有效但无权使用此 API,请让 Tamara 为你的商户账号开通。
该连接器不会创建结账会话、授权或取消订单、使用 claims API,也不获取结算报表。
步骤 2 — 安装 adapter
curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d
步骤 3 — 在 Cursor 中添加连接器
你的服务器 URL: 在 AnythingMCP 中打开 MCP Servers → 此连接器所在的服务器,复制它的 URL(
https://cloud.anythingmcp.com/mcp/…)。本指南中出现YOUR_SERVER_ID的地方都用它替换。
Cursor 从 ~/.cursor/mcp.json 读取 MCP 服务器。添加以下条目:
{
"mcpServers": {
"anythingmcp": {
"url": "https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID",
"headers": { "X-API-Key": "YOUR_MCP_API_KEY" }
}
}
}
- 在 AnythingMCP 的 MCP Servers → 你的服务器 → API keys 中创建 MCP API 密钥,并用它替换
YOUR_MCP_API_KEY。 - 保存文件并重启 Cursor。
- 打开 Cursor → Settings → MCP,确认
anythingmcp已列出并处于已连接状态。 - 开始对话,智能体现在可以调用
Tamara的工具。
可用工具
| Tool | What it does |
|---|---|
tamara_list_payment_types | List the Tamara payment types available to the merchant in a country (PAY_BY_INSTALMENTS, PAY_NOW...) with minimum and maximum order… |
tamara_get_order_by_reference | Get a Tamara order by your own order number (the order_reference_id sent at checkout, e.g. the shop order number): Tamara order_id, status… |
tamara_get_order | Get a Tamara order by its Tamara order_id with the same details as tamara_get_order_by_reference: status, amounts (total, captured… |
tamara_check_payment_options | Check which Tamara payment options a specific customer can use for an order amount before checkout (has_available_payment_options… |
tamara_check_customer_eligibility | Check whether Tamara currently treats a customer as eligible (is_eligible), based on active decline records, for an order amount |
tamara_get_webhook | Get a registered webhook by its id: url, subscribed events (order_approved, order_authorised, order_captured, order_refunded...) and headers |
tamara_capture_order | Capture an authorised Tamara order in full or in part when it ships, so Tamara settles it |
tamara_refund_order | Refund a captured Tamara order in full or in part (simplified refund) |
示例提示
- “我们的订单 100245 在 Tamara 是什么状态?Tamara 已经给我们结算了吗?”
- “订单 100245 到目前为止已扣款、已退款和客户已支付的金额分别是多少?”
- “对于 1,200 SAR 的订单,我们商店在沙特阿拉伯提供哪些 Tamara 支付方式?”
- “手机号为 +966501234567 的客户能用 Tamara 支付 800 SAR 吗?”
- “订单 100245 已发货:全额扣款。先给我看订单和金额。”
FAQ
Cursor 免费套餐支持自定义 MCP 服务器吗? 支持,Hobby、Pro 和 Business 套餐均可使用 MCP。
下一步
这份指南对你有帮助吗?