支付API服务

Conekta MCP Server是一个支付API服务,提供核心支付操作作为Model Context Protocol的工具。

  • by conekta
  • Python
  • 混合部署
  • 2 星标
  • 更新于
在 GitHub 查看 conekta/mcp-server

使用说明

Conekta MCP服务器

MCP服务器 连接。。。 支付API。将Conekta的核心支付业务暴露为 模型上下文协议.

设置

# Install dependencies
uv sync

# Set your Conekta API key
export CONEKTA_API_KEY=key_your_api_key

# Run the server
uv run python -m conekta_mcp

默认情况下,服务器使用 stdio 本地MCP客户端(如Claude Desktop)的传输。

托管MCP

服务器可通过Streamable HTTP远程访问:

https://mcp.conekta.com/mcp

如果要连接到托管的Conekta MCP服务器,请使用此端点。 在请求头中发送您的Conekta API密钥:

Authorization: Bearer key_xxx

配置(托管/流式HTTP)

如果您的MCP客户端支持通过HTTP的远程服务器,JSON配置应包括托管URL和 Authorization 头球

例子:

{
  "mcpServers": {
    "conekta": {
      "url": "https://mcp.conekta.com/mcp",
      "headers": {
        "Authorization": "Bearer key_xxx"
      }
    }
  }
}

笔记:

  • 替换 key_xxx 使用您真正的Conekta API私有密钥。
  • 标题必须准确无误 Authorization.
  • 该值必须包括 Bearer 前缀。

克劳德代码(CLI)

claude mcp add --transport http conekta https://mcp.conekta.com/mcp \
  --header "Authorization: Bearer key_xxx"

替换 key_xxx 使用您真正的Conekta API私有密钥。

配置(克劳德桌面/stdio)

添加 ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "conekta": {
      "command": "uv",
      "args": ["--directory", "/absolute/path/to/mcp", "run", "python", "-m", "conekta_mcp"],
      "env": {
        "CONEKTA_API_KEY": "key_your_api_key"
      }
    }
  }
}

可用工具

资源 工具
平衡 get_balance
客户群 create_customer, list_customers, get_customer, update_customer
订单 create_order, list_orders, get_order, update_order, cancel_order, capture_order
费用 list_charges
退款 create_refund
计划 create_plan, list_plans, get_plan
订阅 list_subscriptions, get_subscription, create_subscription, update_subscription, cancel_subscription, pause_subscription, resume_subscription
结账 create_checkout, list_checkouts, get_checkout, cancel_checkout, send_checkout_email, send_checkout_sms
活动 list_events, get_event
公司 get_current_company

码头工人

docker run --pull=always -i --rm \
  -e CONEKTA_API_KEY=key_your_api_key \
  ghcr.io/conekta/mcp-server:latest

配置(带Docker/stdio的克劳德桌面)

{
  "mcpServers": {
    "conekta": {
      "command": "docker",
      "args": ["run", "--pull=always", "-i", "--rm", "-e", "CONEKTA_API_KEY", "ghcr.io/conekta/mcp-server:latest"],
      "env": {
        "CONEKTA_API_KEY": "key_your_api_key"
      }
    }
  }
}

发展

# Install with dev dependencies
uv sync --extra dev

# Run tests
uv run pytest tests/ -v