music21-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@music21-mcpAnalyze the key of bach_prelude.mid"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
music21 MCP Server
Servidor MCP de análise musical usando music21 + FastMCP + Pydantic.
Complementa o seu MIDI-compostion-tools-MCP focado em construção: enquanto o toolkit constrói composições, este servidor analisa arquivos existentes.
🛠 Tools disponíveis (8)
Tool | O que faz |
| Visão geral: título, compositor, partes, assinaturas, duração |
| Detecta tonalidade (algoritmo Krumhansl-Schmuckler) com confiança |
| Extrai acordes, numerais romanos, cadências, progressão resumida |
| Contorno, âmbito, intervalos, clímax, lista de notas |
| Fórmula de compasso, tempo, densidade, síncope, padrões rítmicos |
| Detecta seções (A, B, A'…), repetições, forma geral (ABA, Rondó…) |
| Erros de voice-leading: quintas paralelas, cruzamentos, saltos |
| Motivos recorrentes e suas transformações (inversão, retrogrado…) |
Related MCP server: musescore-mcp
📦 Instalação
# 1. Clonar / copiar a pasta music21-mcp
cd music21-mcp
# 2. Criar ambiente virtual (recomendado)
python -m venv .venv
source .venv/bin/activate # Linux/macOS
.venv\Scripts\activate # Windows
# 3. Instalar dependências
pip install -r requirements.txt▶️ Executar
python server.pyO servidor roda via stdio — padrão para integração local com Claude Desktop, Cursor, etc.
⚙️ Configuração no Claude Desktop
Adicione ao seu claude_desktop_config.json:
{
"mcpServers": {
"music21": {
"command": "python",
"args": ["/caminho/absoluto/para/music21-mcp/server.py"],
"env": {}
}
}
}Dica: se usar virtualenv, use o Python do venv:
"/caminho/para/music21-mcp/.venv/bin/python"
🔗 Integração com seu MCP Music Toolkit
Pipeline típico:
music21 MCP (analyze_harmony)
→ detecta progressão do arquivo
→ passa para seu toolkit (comp_set_progression)
→ gera variação ou arranjo
music21 MCP (check_counterpoint)
→ aponta erros no MIDI gerado
→ seu toolkit (theory_voice_lead_sequence)
→ corrige o voice leading📁 Estrutura
music21-mcp/
├── server.py # FastMCP — 8 tools registradas
├── models.py # Pydantic schemas input/output
├── requirements.txt
├── analyzers/
│ ├── harmony.py # Acordes + numerais romanos + cadências
│ ├── melody.py # Contorno, âmbito, intervalos
│ ├── rhythm.py # Tempo, densidade, síncope
│ ├── form.py # Seções e forma musical
│ ├── counterpoint.py # Erros de contraponto/voice-leading
│ ├── score_info.py # Metadados e visão geral
│ └── motifs.py # Padrões motívicos recorrentes
└── utils/
└── loader.py # Carregar arquivos + helpers music21💡 Exemplo de uso
# analyze_key
{
"file_path": "/home/user/bach_prelude.mid",
"response_format": "json"
}
# analyze_harmony com recorte de compasses
{
"file_path": "/home/user/sonata.xml",
"measures": [1, 16],
"response_format": "markdown"
}
# analyze_motifs customizado
{
"file_path": "/home/user/symphony.mid",
"motif_length": 5,
"min_occurrences": 3
}This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseAqualityDmaintenanceEnables AI models to analyze audio files through numerical fingerprints, pitch tracking, and visual spectrograms without requiring direct audio playback. It provides tools for comparing audio iterations and detecting patterns using token-efficient analysis operations.Last updated11
- FlicenseAqualityCmaintenanceEnables Claude AI to convert, edit, and analyze MuseScore files (.mscz, .musicxml, MIDI) through natural language commands, supporting format conversion, transposition, harmony analysis, and more.Last updated201
- AlicenseAqualityBmaintenanceProvides atomic music-theory and MIDI tools for composing, enabling LLMs to chain deterministic steps like scale/chord lookups, degree resolution, rhythm generation, and MIDI rendering.Last updated131MIT
- Alicense-qualityDmaintenanceEnables AI-assisted MIDI music generation and composition through natural language, supporting style, tempo, key, and instrument selection.Last updatedMIT
Related MCP Connectors
Deterministic music theory for agents: analyze, voice, reharmonize, conduct — computed, not guessed
Privacy-first audio intelligence: BPM, key, waveform. Audio never stored. Pay per second.
Create, co-edit, analyze, publish, and export collaborative step-sequencer sessions through MCP.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/FernandoDaSilva-T/music21-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server