fcp-midi

fcp-midi

Enables LLMs to compose music by describing musical intent using high-level operations like notes, chords, dynamics, and tempo, then renders the composition into standard MIDI files.

Category
Visit Server

README

fcp-midi

MCP server for semantic MIDI composition.

What It Does

fcp-midi lets LLMs compose music by describing musical intent -- notes, chords, dynamics, tempo changes -- and renders it into standard MIDI files. Instead of manipulating raw bytes or MIDI events, the LLM works with operations like note Bass E2 at:1.1 dur:quarter vel:90 and crescendo @track:Lead vel:45-75 @range:3.1-6.4. Built on the FCP framework, powered by pretty-midi for serialization.

Quick Example

midi_session('new "Voltage Drop" tempo:140 key:E-minor')

midi([
  'note Drums kick at:1.1 dur:eighth vel:100',
  'note Bass E2 at:1.1 dur:quarter vel:90',
  'chord Pad Em at:1.1 dur:whole vel:70',
  'crescendo @track:Lead vel:45-75 @range:3.1-6.4',
  'tempo 174 at:11.1',
])

midi_session('save as:./voltage_drop.mid')

Available MCP Tools

Tool Purpose
midi(ops) Batch mutations -- notes, chords, tracks, tempo, dynamics, copy/transpose
midi_query(q) Inspect the composition -- map, tracks, events, piano-roll, instruments, find
midi_session(action) Lifecycle -- new, open, save, checkpoint, undo, redo
midi_help() Full reference card

Hero Examples

Plumber's Journey -- Classic game theme faithfully recreated: 4 tracks, 288 notes, 16 seconds, 180 BPM.

Voltage Drop -- A drum-and-bass track with tempo acceleration (140 -> 155 -> 174 BPM), 5 tracks, breakbeats, sub-bass, arpeggios, and a signature DROP section. Also used in the FCP vs raw Python agent battle -- FCP produced 1,674 notes across 12 tracks in 87 seconds, compared to 694 notes from ~689 lines of hand-written Python.

See docs/examples/ for MIDI files and the full writeup.

Installation

Requires Python >= 3.11.

pip install fcp-midi

MCP Client Configuration

{
  "mcpServers": {
    "midi": {
      "command": "uv",
      "args": ["run", "python", "-m", "fcp_midi"]
    }
  }
}

Architecture

3-layer architecture:

MCP Server (Intent Layer)
  Parses op strings, dispatches to verb handlers
        |
Semantic Model
  Tracks, notes, chords, dynamics, tempo maps, markers
  In-memory composition graph with event sourcing
        |
Serialization (pretty-midi)
  Semantic model -> MIDI binary output

Key features:

  • Instrument library -- GM instruments by name (acoustic-grand-piano, synth-bass-1, standard-kit)
  • Soundfont support -- Load custom instrument banks
  • Beat addressing -- at:1.1 (bar 1, beat 1), at:3.2.240 (bar 3, beat 2, tick 240)
  • Duration vocabulary -- whole, half, quarter, eighth, sixteenth, triplet
  • Dynamics -- crescendo, diminuendo across ranges
  • Copy/transpose -- Duplicate and shift musical phrases

Development

uv sync
uv run pytest       # 658 tests
uv run pytest -m "not slow"  # skip stress tests
uv run ruff check   # linting
uv run pyright      # type checking

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured