Skip to main content

Overview

Model Context Protocol (MCP) is an emerging protocol that allows AI programming assistants to directly call external tools and APIs. Ace Data Cloud provides multiple MCP Servers (Suno, Midjourney, SERP, etc.) that can be used directly in tools like Cursor, Claude Desktop, and others.

Services Involved

  • Suno: POST https://api.acedata.cloud/suno/audios
  • Midjourney: POST https://api.acedata.cloud/midjourney/imagine
  • Google Search: POST https://api.acedata.cloud/serp/google

Technical Solution

Prerequisites

  1. Register an account at Ace Data Cloud
  2. Obtain an API Token
  3. Install Python 3.7+ and the requests library

Implementation Steps

Step 1: Install MCP Server

Install via pip: pip install mcp-suno (or mcp-midjourney, mcp-serp).

Step 2: Configure Token

Set the environment variable ACEDATACLOUD_API_TOKEN to your API Token.

Step 3: Use in Programming Tools

Add the corresponding Server in the MCP configuration of Cursor or Claude Desktop.

Code Example

Below is a complete Python example using Suno:
import requests

API_TOKEN = "YOUR_API_TOKEN"

def call_suno():
    response = requests.post(
        "https://api.acedata.cloud/suno/audios",
        headers={
            "Authorization": f"Bearer {API_TOKEN}",
            "Content-Type": "application/json",
        },
        json={
    "action": "generate",
    "prompt": "A cheerful pop song about summer vacation",
    "model": "chirp-v5",
    "custom": false
},
    )
    return response.json()

result = call_suno()
print(result)

Best Practices

  • Error Retry: Use exponential backoff retry for 429 (rate limiting) and 5xx errors
  • Asynchronous Handling: For time-consuming tasks (image/video generation), use callback_url to receive results asynchronously
  • Cost Control: Monitor usage and expenses through the Ace Data Cloud console
  • Token Security: Store API Token in environment variables; avoid hardcoding in code