MCP MIDI 服务器
FastMCP 服务器允许 LLM 将 MIDI 序列发送到任何支持 MIDI 输入的软件。
特征
- 创建虚拟 MIDI 输出端口
- 发送 MIDI 音符开/关消息
- 发送控制变更 (CC) 消息
- 以精确的时间对 MIDI 事件进行排序
- 可在任何支持 MIDI 的应用程序中用作 MIDI 输入设备
要求
- Python 3.7+
- rtmidi
- fastmcp
- python-dotenv
- 异步
安装
- 克隆存储库:
- 创建虚拟环境,激活它并安装依赖项:
- 使用您的配置创建一个
.env
文件:
用法
运行服务器:
服务器会创建一个名为“MCP MIDI Out”的虚拟 MIDI 端口,可在其他应用程序中用作 MIDI 输入设备。这意味着您可以:
- 连接数字音频工作站 (DAW),如 Ableton Live、Logic Pro 或 FL Studio,以从此服务器接收 MIDI
- 使用服务器通过计算机的 MIDI 接口控制硬件合成器
- 连接到任何其他接受 MIDI 输入的软件(虚拟乐器、照明控制器等)
只需在您首选的 MIDI 兼容应用程序中选择“MCP MIDI Out”作为 MIDI 输入设备。
MCP 配置
服务器使用服务器发送事件(SSE),这是在 Cursor 中配置它的方法:
API 方法
发送注释
发送 MIDI Note On 消息。
参数:
note
:MIDI 音符编号(0-127)velocity
:音符速度(0-127,默认127)channel
:MIDI 通道(0-15,默认 0)
发送注释关闭
发送 MIDI 音符关闭消息。
参数:
note
:MIDI 音符编号(0-127)velocity
:音符关闭速度(0-127,默认64)channel
:MIDI 通道(0-15,默认 0)
发送控制变更
发送 MIDI 控制变化 (CC) 消息。
参数:
controller
:CC控制器编号(0-127)value
:CC值(0-127)channel
:MIDI 通道(0-15,默认 0)
发送 MIDI 序列
发送具有指定持续时间的一系列 MIDI 音符开/关消息。
参数:
events
:事件字典列表。每个字典必须包含:note
:MIDI 音符编号(0-127)velocity
:音符速度(0-127,默认127)channel
:MIDI 通道(0-15,默认 0)duration
:发送 Note Off 之前保持音符的时间(秒)start_time
:相对于序列开始的时间(以秒为单位)(默认值为 0)
例子
使用 API 弹奏 C 大调和弦:
执照
麻省理工学院
This server cannot be installed
local-only server
The server can only run on the client's local machine because it depends on local resources.
创建虚拟 MIDI 输出端口的 FastMCP 服务器,允许 LLM 生成 MIDI 数据并将其发送到任何接受 MIDI 输入的软件。
Related MCP Servers
- -securityAlicense-qualityFastMCP is a comprehensive MCP server allowing secure and standardized data and functionality exposure to LLM applications, offering resources, tools, and prompt management for efficient LLM interactions.Last updated -3PythonMIT License
- -securityAlicense-qualityAn MCP server that connects any MCP client (like Claude or Cursor) with the browser using browser-use, allowing clients to utilize existing LLMs without requiring additional API keys.Last updated -32PythonApache 2.0
- -securityFlicense-qualityAn MCP server that allows Claude to interact with local LLMs running in LM Studio, providing access to list models, generate text, and use chat completions through local models.Last updated -Python
- AsecurityAlicenseAqualityAn MCP Server that enables LLMs to build real-time 3D web applications in the PlayCanvas Editor.Last updated -218938TypeScriptMIT License