> For the complete documentation index, see [llms.txt](https://docs.acestudio.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.acestudio.ai/docs/product-wiki-zh/ai-gong-ju/ace-studio-mcp-server.md).

# ACE Studio MCP Server

## ACE Studio MCP 服务器

{% hint style="warning" %}

#### 实验状态

ACE Studio MCP 服务器当前处于 **实验阶段**.

**请注意：**

* 部分功能和设置可能尚未完全实现
* 功能和特性可能会变更
* 使用过程中可能会遇到 Bug 或性能问题
* 正式版本发布时将公布使用指南和速率限制

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

ACE Studio MCP 服务器提供了丰富的工具集，使 AI 代理能够自主导航并执行创意编辑。通过让 AI 代理全面了解您工程中的每一处细节，它能够以更快的速度和更大的创作自由度，协助您进行歌曲创作与编辑。

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

### 快速开始

#### 启动 ACE Studio MCP 服务器

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

> 您在此选择的走带模式决定 AI 客户端如何连接到 ACE Studio。有关详细信息及各客户端的专属配置，请参见以下章节。

请根据所选走带模式和您的 AI 客户端选择相应的配置。

#### 可流式 HTTP 模式

在 HTTP 模式下，ACE Studio 会在固定地址运行本地 MCP 服务器。您的 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).

直接在 Cursor 中添加 MCP 服务器，或者手动设置：

1. 打开 Cursor 设置。
2. 找到 **Tools & MCP** 部分。
3. 点击 **新建 MCP 服务器**.
4. 填写以下 JSON：

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

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

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

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

**通过原生 MCP 支持使用 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).

直接在 Cursor 中添加 MCP 服务器，或者手动设置：

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 服务器通信。此方式更易于设置。您无需手动启动服务器或使用网络地址。

**获取命令：**

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. 点击 **新建 MCP 服务器**.
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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
