Skip to main content
Glama

MIDI File MCP

by xiaolaa2

🎵 MIDI 文件 MCP

执照 tonejs 微胶囊钙


📖 简介

这是一款基于 Tone.js 和 @tonejs/midi 库的 MIDI 文件解析和操作工具,通过 MCP(模型上下文协议)服务提供功能。此工具可让您轻松读取、分析和修改 MIDI 文件,而无需深入研究 MIDI 文件格式的复杂性。

✨ 特点

  • 读取 MIDI 文件信息

  • 获取并修改音轨、音符、控制变化和弯音信息

  • 设置 MIDI 文件速度 (BPM)

  • 向特定音轨添加新音符、控制变化和弯音

  • 添加新曲目

  • 全面的错误处理

📥 先决条件

  1. 安装Node.js :确保 npx 命令可以正常运行,建议从Node.js 官网安装最新稳定版本

🔧 使用方法

与 MCP 客户端一起使用,支持的客户端包括但不限于:

游标配置示例

在 Cursor 中配置 midi-file-mcp:

"midi-file-mcp": { "command": "npx", "args": [ "-y", "midi-file-mcp" ] }

🎹 使用 MIDI 解析器 MCP 和绝对路径

MIDI Parser MCP 中的所有操作都需要 MIDI 文件的绝对路径。这确保了无论当前工作目录如何,该工具都能正确定位和操作您的 MIDI 文件。

示例提示

以下是一些您可以与 AI 助手一起使用的示例提示:

  1. 获取 MIDI 文件信息

    Can you show me information about the MIDI file at D:\path\to\your\file.mid?
  2. 分析曲目

    Please analyze all tracks in D:\path\to\your\file.mid and tell me how many notes are in each track.
  3. 设置节奏

    Change the tempo of D:\path\to\your\file.mid to 120 BPM.
  4. 使用注释

    Show me all notes in track 1 of D:\path\to\your\file.mid.
  5. 添加注释

    Add a C4 note at position 0 with a duration of 1 beat to track 0 in D:\path\to\your\file.mid.

可用操作

手术

描述

参数

获取midi信息

获取常规 MIDI 文件信息

文件路径

设置节奏

设置 MIDI 文件的节奏 (BPM)

文件路径,bpm

获取轨迹信息

获取有关所有曲目的信息

文件路径

通过索引获取轨迹信息

获取有关特定曲目的信息

文件路径、轨道索引

通过索引获取笔记

获取特定曲目的所有音符

文件路径、轨道索引

通过索引获取弯音

获取特定音轨的所有弯音

文件路径、轨道索引

通过索引获取控制更改

获取特定轨道的所有控制变化

文件路径、轨道索引

按索引添加注释

向特定轨道添加注释

文件路径、曲目索引、注释

通过索引添加控制更改

将控制更改添加到特定轨道

文件路径、轨道索引、控制变化

按索引添加弯音

为特定音轨添加弯音

文件路径、音轨索引、弯音

添加轨道

向 MIDI 文件添加新音轨

文件路径

注意:使用 Windows 路径时,请始终在文件路径中使用双反斜杠 ( \\ ) 或正斜杠 ( / ),以避免出现错误。

📄 许可证

本项目遵循 MIT 许可证。详情请参阅 LICENSE 文件。

🙏 致谢

感谢以下项目和库,如果没有它们,这个工具就不可能实现:

Deploy Server
A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

一个强大的 MCP 工具,用于解析和操作 MIDI 文件,允许用户通过自然语言命令读取、分析和修改 MIDI 文件,支持读取文件信息、修改音轨、添加音符和设置节奏等操作。

  1. 📖 简介
    1. ✨ 特点
      1. 📥 先决条件
        1. 🔧 使用方法
          1. 游标配置示例
          2. 🎹 使用 MIDI 解析器 MCP 和绝对路径
        2. 📄 许可证
          1. 🙏 致谢

            Related MCP Servers

            • A
              security
              A
              license
              A
              quality
              An MCP server that provides tools for reading, writing, and editing files on the local filesystem.
              Last updated -
              1,552
              Apache 2.0
              • Apple
            • A
              security
              A
              license
              A
              quality
              An MCP server that implements Claude Code-like functionality, allowing the AI to analyze codebases, modify files, execute commands, and manage projects through direct file system interactions.
              Last updated -
              15
              265
              MIT License
              • Apple
              • Linux
            • A
              security
              A
              license
              A
              quality
              An MCP tool that provides AI with the ability to compress and decompress local files.
              Last updated -
              4
              7
              11
              MIT License
            • -
              security
              F
              license
              -
              quality
              A FastMCP server that creates a virtual MIDI output port, allowing LLMs to generate and send MIDI data to any software that accepts MIDI input.
              Last updated -
              11

            View all related MCP servers

            MCP directory API

            We provide all the information about MCP servers via our MCP API.

            curl -X GET 'https://glama.ai/api/mcp/v1/servers/xiaolaa2/midi-file-mcp'

            If you have feedback or need assistance with the MCP directory API, please join our Discord server