Skip to main content
Glama

MCP MIDI Server

by sandst1

MCP MIDI サーバー

LLM が MIDI 入力をサポートする任意のソフトウェアに MIDI シーケンスを送信できるようにする FastMCP サーバー。

特徴

  • 仮想MIDI出力ポートを作成します
  • MIDIノートオン/オフメッセージを送信します
  • 制御変更(CC)メッセージを送信する
  • 正確なタイミングでMIDIイベントをシーケンスします
  • MIDIをサポートするあらゆるアプリケーションでMIDI入力デバイスとして使用できます。

要件

  • Python 3.7以上
  • rtmidi
  • ファストmcp
  • Python-dotenv
  • 非同期

インストール

  1. リポジトリをクローンします。
    git clone <repository-url> cd mcp-server-midi
  2. 仮想環境を作成し、アクティブ化して依存関係をインストールします。
    python -m venv .venv source .venv/bin/activate pip install -r requirements.txt
  3. 設定を含む.envファイルを作成します。
    PORT=8123

使用法

サーバーを実行します。

python mcp_midi_server.py

サーバーは「MCP MIDI Out」という仮想MIDIポートを作成します。このポートは他のアプリケーションでMIDI入力デバイスとして使用できます。これにより、以下のことが可能になります。

  • Ableton Live、Logic Pro、FL Studioなどのデジタルオーディオワークステーション(DAW)を接続して、このサーバーからMIDIを受信します。
  • サーバーを使用して、コンピューターのMIDIインターフェースを介してハードウェアシンセサイザーを制御します。
  • MIDI 入力を受け入れる他のソフトウェア (仮想楽器、照明コントローラーなど) に接続します。

お好みの MIDI 対応アプリケーションで、MIDI 入力デバイスとして「MCP MIDI Out」を選択するだけです。

MCP 構成

サーバーは Server-Sent Events (SSE) を使用します。Cursor でこれを設定する方法は次のとおりです。

{ "mcpServers": { "midi": { "url": "http://localhost:8123/sse" } } }

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 メジャー コードを演奏する:

events = [ {"note": 60, "velocity": 100, "duration": 1.0, "start_time": 0.0}, # C4 {"note": 64, "velocity": 100, "duration": 1.0, "start_time": 0.0}, # E4 {"note": 67, "velocity": 100, "duration": 1.0, "start_time": 0.0}, # G4 ] # Send to the MCP MIDI Server API

ライセンス

マサチューセッツ工科大学

-
security - not tested
F
license - not found
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

仮想 MIDI 出力ポートを作成し、LLM が MIDI 入力を受け入れる任意のソフトウェアに MIDI データを生成して送信できるようにする FastMCP サーバー。

  1. 特徴
    1. 要件
      1. インストール
        1. 使用法
          1. MCP 構成
            1. APIメソッド
              1. メモを送信
              2. ノート送信オフ
              3. コントロール変更を送信
              4. MIDIシーケンスを送信する
              1. ライセンス

                Related MCP Servers

                • -
                  security
                  A
                  license
                  -
                  quality
                  FastMCP 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 6 months ago
                  3
                  Python
                  MIT License
                • -
                  security
                  F
                  license
                  -
                  quality
                  A production-ready MCP server built with FastAPI, providing an enhanced tool registry for creating, managing, and documenting AI tools for Large Language Models (LLMs).
                  Last updated 5 months ago
                  32
                  Python
                • A
                  security
                  A
                  license
                  A
                  quality
                  The Fibery MCP server provides integration between Fibery and any LLM provider supporting the MCP protocol (e.g., Claude for Desktop), allowing you to explore Fibery Workspace Schema, query databases, create and update entities using natural language.
                  Last updated a month ago
                  6
                  23
                  Python
                  MIT License
                  • Apple
                  • Linux
                • A
                  security
                  A
                  license
                  A
                  quality
                  A powerful MCP tool for parsing and manipulating MIDI files that allows users to read, analyze, and modify MIDI files through natural language commands, supporting operations like reading file information, modifying tracks, adding notes, and setting tempo.
                  Last updated 3 months ago
                  11
                  427
                  5
                  JavaScript
                  MIT License
                  • Linux
                  • Apple

                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/sandst1/mcp-server-midi'

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