Skip to main content

MCP server for OceanEngine API operations including asset creation and product management

Project description

巨量引擎 MCP 服务器

一个用于巨量引擎 API 操作的 Model Context Protocol (MCP) 服务器,提供资产创建、事件管理和商品创建等功能。

功能特性

  • 资产管理: 创建第三方外部资产
  • 事件管理: 为资产创建事件
  • 商品管理: 创建 DPA (动态商品广告) 商品
  • 组合操作: 一键创建资产并自动创建事件

安装

pip install oceanengine-mcp-server

使用方法

本服务器不需要配置文件,所有参数通过工具调用时直接传入。

作为 MCP 服务器

在你的 MCP 客户端配置中添加:

{
    "mcpServers": {
        "oceanengine": {
            "command": "uvx",
            "args": ["oceanengine-mcp-server"]
        }
    }
}

Claude Desktop 配置示例

{
  "mcpServers": {
    "oceanengine": {
      "command": "uvx",
      "args": ["oceanengine-mcp-server"]
    }
  }
}

可用工具

1. create_product - 创建商品

创建DPA商品

  • advertiser_id: 广告主ID(必填)
  • access_token: 访问令牌(必填)
  • platform_id: 商品库ID(必填)
  • product_name: 商品名称(必填)
  • image_url: 商品图片URL(可选)

2. create_asset_and_event - 组合操作(推荐)

创建资产并自动创建事件

  • advertiser_id: 广告主ID(必填)
  • access_token: 访问令牌(必填)
  • asset_name: 资产名称(可选,默认"dsok")
  • asset_description: 资产描述(可选,默认为空)
  • event_id: 事件ID(可选,默认20)

使用示例

# 创建商品
create_product(
    advertiser_id="1234567890",
    access_token="your_access_token",
    platform_id="platform_123",
    product_name="我的商品",
    image_url="https://example.com/image.jpg"
)

# 创建资产并自动创建事件
create_asset_and_event(
    advertiser_id="1234567890",
    access_token="your_access_token",
    asset_name="我的资产",
    asset_description="资产描述",
    event_id=20
)

开发

# 开发模式安装
pip install -e .

# 运行服务器
oceanengine-mcp-server

注意事项

  • 所有工具都需要提供 advertiser_idaccess_token 参数
  • 资产创建成功后会返回 asset_id,可用于后续创建事件
  • 商品创建成功后会返回 product_id
  • 建议使用 create_asset_and_event 进行一键操作
  • 所有操作都会返回详细的 API 响应结果

许可证

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

oceanengine_mcp_server-1.1.0.tar.gz (28.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

oceanengine_mcp_server-1.1.0-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file oceanengine_mcp_server-1.1.0.tar.gz.

File metadata

File hashes

Hashes for oceanengine_mcp_server-1.1.0.tar.gz
Algorithm Hash digest
SHA256 164b5abe5a96f86f37a1392e661eb1be947feae15d0ad65ef6f5b09e7050c53c
MD5 5f9d6ad0c97ccb510a15743cd4a98732
BLAKE2b-256 6fdd584f0c3b5fe360bcd30f8088f1962defb30ec7df57ae2f9d70565cac0380

See more details on using hashes here.

File details

Details for the file oceanengine_mcp_server-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for oceanengine_mcp_server-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f2223fd7ca470305e6df736f9447af97b59227ab07e45e175183d8c35cba0311
MD5 9950386a15ea694b6c2335b3b9e23557
BLAKE2b-256 ff6e7be1e41365cc8383dad09a6f241e98ff0a37e47ea949fdeb31ef5593ed26

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page