# ACE Studio MCP Server

## ACE Studio MCP Server

{% hint style="warning" %}

#### 实验状态

ACE Studio MCP Server 当前处于 **实验阶段**.

**请注意：**

* 部分功能和设置可能尚未完全实现
* 功能与特性可能会发生变化
* 使用过程中可能会遇到错误或性能问题
* 稳定版发布后，我们将公布使用指南和速率限制

我们正在积极改进此功能。如果您有任何反馈或遇到问题，请通过以下方式联系我们： [**support@acestudio.ai**](mailto:support@acestudio.ai).
{% endhint %}

ACE Studio MCP server 提供了一套丰富的工具，让 AI agent 能够自主浏览并执行创意编辑。通过为 AI agent 提供对工程每个细节的全面洞察，它能够以更快的速度和更大的创作自由度，帮助您创作和编辑歌曲。

[模型上下文协议](https://modelcontextprotocol.io/docs/getting-started/intro) （MCP）是一种开放标准，使 AI 助手能够无缝连接外部应用和数据源。ACE Studio MCP server 实现了该协议，为 AI agent 直接访问您的创作工作区提供支持。

### 快速开始

#### 启动 ACE Studio MCP Server

1. 打开 **ACE Studio**.
2. 前往 **偏好设置 → 通用 → MCP Server**.
3. 选择一种传输模式： **HTTP** 或 **STDIO**.

> 您在此选择的传输模式决定 AI 客户端如何连接到 ACE Studio。有关详细信息和针对不同客户端的配置，请参见下方章节。

请根据您选择的传输模式和 AI 客户端，选择相应的配置。

#### 可流式 HTTP 模式

在 HTTP 模式下，ACE Studio 会在本地固定地址运行一个 MCP server。您的 AI 客户端将通过网络连接到它。

**服务器地址：** `http://localhost:21572/mcp`

> **技术说明**：ACE Studio MCP Server 使用 **可流式 HTTP 传输协议**。请保留此地址，以便进行下一步配置。

**Claude Desktop**

> ⚠ 在 Claude Desktop 中设置 ACE Studio MCP Server 需要编辑 JSON 配置文件。如果您不熟悉技术配置，我们建议尝试更易用的客户端。

**配置步骤：**

1. 如有需要，请安装 Node.js。
   * 访问 [nodejs.org](https://nodejs.org) 并下载 LTS 版本。
2. 找到 Claude Desktop 的配置文件。
   * **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
   * **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
3. 编辑配置文件并添加以下内容：

```json
{
   "mcpServers": {
       "acestudio": {
           "command": "npx",
           "args": [
               "mcp-remote",
               "http://localhost:21572/mcp"
           ]
       }
   }
}
```

4. 保存文件并重启 Claude Desktop。

**验证连接：**\
在 Claude 中输入：

```
请检查当前 ACE Studio 工程信息
```

如果 Claude 返回工程详情，则连接成功。

**Cursor**

您可以直接点击 [此处](https://cursor.com/en-US/install-mcp?name=ACE-Studio\&config=eyJ1cmwiOiJodHRwOi8vbG9jYWxob3N0OjIxNTcyL21jcCJ9).

将 MCP server 添加到 Cursor，或者手动设置：

1. 打开 Cursor 设置。
2. 找到 **Tools & MCP** 部分。
3. 点击 **New MCP Server**.
4. 并填写以下 JSON：

```json
{
 "mcpServers": {
   "ACE-Studio": {
     "url": "http://localhost:21572/mcp",
     "headers": {}
   }
 }
}
```

5. 点击 **保存**.
6. 重启 Cursor。

**验证连接：**\
在 Cursor Chat 中输入：

```
@acestudio 当前工程中有哪些轨道？
```

**通过原生 MCP 支持使用 VS Code**

您可以直接点击将 MCP server 添加到 VS Code [此处](https://insiders.vscode.dev/redirect?url=vscode%3Amcp%2Finstall%3F%7B%22name%22%3A%22acestudio%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22http%3A%2F%2Flocalhost%3A21572%2Fmcp%22%7D).

将 MCP server 添加到 Cursor，或者手动设置：

1. 创建或编辑 `.vscode/mcp.json` 于您的工作区中。
2. 添加以下配置：

```json
{
 "servers": {
   "ACE-Studio": {
     "type": "http",
     "url": "http://localhost:21572/mcp"
   }
 }
}
```

**通过 Cline 使用 VS Code**

1. 安装 Cline 扩展。
2. 打开扩展设置。
3. 找到 MCP Servers 配置部分。
4. 添加新服务器：

```json
{
 "mcpServers": {
   "ACE-Studio": {
     "url": "http://localhost:21572/mcp",
     "type": "streamableHttp",
     "headers": {}
   }
 }
}
```

**其他客户端**

对于大多数客户端，请使用以下配置：

* **传输类型：** 可流式 HTTP。某些客户端可能将其称为 `远程`.
* **服务器 URL：** `http://localhost:21572/mcp`

或者使用以下 JSON 导入 MCP server：

```json
{
 "mcpServers": {
   "ACE-Studio": {
     "url": "http://localhost:21572/mcp",
     "headers": {}
   }
 }
}
```

#### STDIO 模式

在 STDIO 模式下，您的 AI 客户端会通过标准输入和标准输出直接启动并与 ACE Studio MCP server 通信。这个设置更简单。您无需手动启动服务器或使用网络地址。

**获取命令：**

1. 在 ACE Studio 中，前往 **偏好设置 → 通用 → MCP Server**.
2. 将模式设置为 **STDIO**.
3. 点击 **复制命令** 以将服务器命令复制到剪贴板。

复制后的命令如下：

```
"/Applications/ACE Studio.app/Contents/Helpers/ace_mcp_server" --stdio
```

请在下方配置步骤中使用此命令。

{% hint style="info" %}
命令路径因操作系统而异。请在下方每个客户端配置中，使用从 ACE Studio 复制的准确命令。
{% endhint %}

**Claude Desktop**

STDIO 是 Claude Desktop 的原生传输方式。您无需额外工具，例如 `mcp-remote`.

1. 找到 Claude Desktop 的配置文件。
   * **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
   * **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
2. 编辑配置文件并添加以下内容：

```json
{
   "mcpServers": {
       "acestudio": {
           "command": "/Applications/ACE Studio.app/Contents/Helpers/ace_mcp_server",
           "args": ["--stdio"]
       }
   }
}
```

3. 保存文件并重启 Claude Desktop。

**验证连接：**\
在 Claude 中输入：

```
请检查当前 ACE Studio 工程信息
```

如果 Claude 返回工程详情，则连接成功。

**Cursor**

1. 打开 Cursor 设置。
2. 找到 **Tools & MCP** 部分。
3. 点击 **New MCP Server**.
4. 并填写以下 JSON：

```json
{
 "mcpServers": {
   "ACE-Studio": {
     "command": "/Applications/ACE Studio.app/Contents/Helpers/ace_mcp_server",
     "args": ["--stdio"]
   }
 }
}
```

5. 点击 **保存**.
6. 重启 Cursor。

**验证连接：**\
在 Cursor Chat 中输入：

```
@acestudio 当前工程中有哪些轨道？
```

**通过原生 MCP 支持使用 VS Code**

1. 创建或编辑 `.vscode/mcp.json` 于您的工作区中。
2. 添加以下配置：

```json
{
 "servers": {
   "ACE-Studio": {
     "command": "/Applications/ACE Studio.app/Contents/Helpers/ace_mcp_server",
     "args": ["--stdio"]
   }
 }
}
```

**通过 Cline 使用 VS Code**

1. 安装 Cline 扩展。
2. 打开扩展设置。
3. 找到 MCP Servers 配置部分。
4. 添加新服务器：

```json
{
 "mcpServers": {
   "ACE-Studio": {
     "command": "/Applications/ACE Studio.app/Contents/Helpers/ace_mcp_server",
     "args": ["--stdio"]
   }
 }
}
```

**其他客户端**

对于大多数客户端，请使用以下配置：

* **传输类型：** STDIO
* **命令：** `/Applications/ACE Studio.app/Contents/Helpers/ace_mcp_server`
* **参数：** `--stdio`

或者使用以下 JSON 导入 MCP server：

```json
{
 "mcpServers": {
   "ACE-Studio": {
     "command": "/Applications/ACE Studio.app/Contents/Helpers/ace_mcp_server",
     "args": ["--stdio"]
   }
 }
}
```

### 使用示例

连接后，您可以尝试以下提示，与 AI 助手协作：

#### 创建新工程

```
帮我在 ACE Studio 中创建一个 BPM 120 的新流行风格工程，
采用 C 大调，添加一条主唱轨道和一条小提琴伴奏轨道
```

#### 生成歌词和旋律

```
基于主题“海边的夏日回忆”，
在 ACE Studio 中写一段 8 小节副歌。
旋律应轻快灵动，使用五声音阶
```

#### 编辑 MIDI

```
在 ACE Studio 中，于第 9-16 小节添加一个钢琴和弦进行：
C - Am - F - G，每个和弦持续 2 小节
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.acestudio.ai/docs/product-wiki-zh/ai-gong-ju/ace-studio-mcp-server.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
