> 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 服务器

## 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 服务器**.
3. 选择一种传输模式： **HTTP** 或 **STDIO**.

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

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

#### 流式 HTTP 模式

在 HTTP 模式下，ACE Studio 会在固定地址运行本地 MCP 服务器。你的 AI 客户端通过网络连接到它。

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

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

**Claude Desktop**

> ⚠ 在 Claude Desktop 中设置 ACE Studio MCP 服务器需要编辑 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 服务器添加到 Cursor，或者手动设置：

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

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

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

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

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

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

你可以直接通过点击将 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).

将 MCP 服务器添加到 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 服务器：

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

#### STDIO 模式

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

**获取命令：**

1. 在 ACE Studio 中，前往 **偏好设置 → 常规 → MCP 服务器**.
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. 找到 **工具与 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 服务器：

```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.
