如何在 Antigravity/Cursor 中连接 MercadoLibre MCP:缺失指南

发布: (2026年2月7日 GMT+8 07:37)
3 分钟阅读
原文: Dev.to

Source: Dev.to

Introduction

如果你在使用 Antigravity(或 Cursor)作为 AI‑原生 IDE,可能已经注意到官方的 MercadoLibre 开发者文档尚未跟上这些工具的步伐。为 MercadoLibre 设置模型上下文协议(MCP)可能会因为特定的端口要求和 OAuth 流程而变得棘手。经过长时间的排查,这里提供一份面向 Antigravity 用户的权威指南。

The most common issue

在浏览器授权时,页面常常显示:

“La aplicación no está preparada para conectarse a Mercado Libre”

官方的 MercadoLibre MCP 代理应用严格要求重定向到 http://localhost:18999。然而,像 Antigravity 这类 IDE 使用的 mcp-remote 客户端如果没有另行指定,通常会随机挑选一个端口(例如 17135)。

Update mcp_config.json

在你的 mcp_config.json(通常位于 %APPDATA%\.gemini\antigravity\)中,添加 18999 作为位置参数:

{
  "mercadolibre": {
    "command": "npx",
    "args": [
      "-y",
      "mcp-remote",
      "https://mcp.mercadolibre.com/mcp",
      "18999"
    ]
  }
}

Warning
删除 mcp_config.json 中的以下行:

"--header",
"Authorization: Bearer APP_USR-..."

在通过浏览器登录时保留这些行会导致认证交换失败,出现 “Existing OAuth client information is required”

Resolve “address already in use 127.0.0.1:18999”

如果看到此错误,说明之前(失败的)尝试留下了一个“僵尸”进程。

Kill Node.js zombie processes

taskkill /F /IM node.exe

Clear the corrupt auth cache

rmdir /S /Q %USERPROFILE%\.mcp-auth

Browser specifics

如果 Firefox 是你的默认浏览器且 “Authorization Successful” 页面似乎没有向 IDE 反馈,请将回调链接复制粘贴到 Chrome 中。Chrome 在开发工具的本地回调处理上通常更可靠。

Beat the timeout

Antigravity 内置了超时机制。浏览器打开后请快速完成授权。若超时,你会看到 “context deadline exceeded” 错误。

Ngrok is not required

此设置不需要 Ngrok。MercadoLibre MCP 代理是官方应用,已经拥有与 localhost:18999 通信的权限。

Summary checklist

  • mcp_config.json 中强制使用端口 18999
  • 移除所有手动的 Authorization 头部。
  • 清理僵尸 Node.js 进程。
  • 删除损坏的认证缓存(.mcp-auth)。
  • 若默认浏览器无法完成 OAuth 回调,请使用 Chrome。

Happy AI‑coding! 🚀

Back to Blog

相关文章

阅读更多 »