Scribbletune MCP Server

Scribbletune MCP Server

Enables AI agents to generate MIDI clips from natural language descriptions and export them for import into digital audio workstations. Wraps Scribbletune to provide music composition tools for creating riffs, chords, and arpeggios with scale-aware progressions, rhythmic patterns, and genre-specific parameters.

Category
访问服务器

README

scribbletune-mcp-server

Work in progress. The server is functional but actively evolving. Feedback, ideas, bug reports, and contributions are warmly welcome — please open an issue or a PR.

An MCP (Model Context Protocol) server that brings MIDI generation into AI agent workflows. It wraps Scribbletune — a wonderful open-source library by Walmik Deshpande — and exposes it as a set of tools and resources that an LLM can call to compose and export MIDI clips.


The idea

Modern AI assistants can talk about music — genres, moods, harmony, rhythm — but they can't produce it in a form you can load into your DAW. This project bridges that gap.

The intended workflow is an AI agent acting as a creative co-producer:

  1. You describe a musical idea in natural language —
    "2-bar Deep Tech bassline in G# minor, 131 BPM, plucky, 16th-note groove"
  2. The agent reads the Scribbletune concept docs exposed as MCP resources to understand scales, patterns, and articulation parameters
  3. It translates your idea into a structured tool call, discussing options with you if needed
  4. The server generates a MIDI file and stores it in a key-value store
  5. The agent hands you a download link — drag the .mid file straight into Ableton, Logic, FL Studio, or any DAW

No coding required on your end. The agent handles the translation from musical intent to MIDI.


Features

  • Streamable HTTP transport — stateless MCP over HTTP, compatible with any MCP client (Claude Desktop, custom agents, etc.)
  • generate-clip tool — generate a MIDI clip from a musical description (riff, chord progression, or arpeggio)
  • get-progression tool — resolve scale degrees to chord names before generating a clip
  • 7 MCP resources — Scribbletune concept documentation as Markdown so the agent understands notes, patterns, scales, chords, progressions, and genre-specific guidance out of the box
  • MIDI store service (coming soon) — dedicated service backed by Redis/Valkey for storing and serving MIDI files
  • Built with NestJS, @rekog/mcp-nest, and Nx

Architecture

Your AI Agent (Claude, GPT, etc.)
        │
        │  MCP  (Streamable HTTP, stateless)
        ▼
scribbletune-mcp-server   :3000
        │
        │  POST /clips
        ▼
scribbletune-midi-store   :3001  ← coming soon
        │
        ▼
   Redis / Valkey

        ↓
User downloads .mid → imports into DAW

Getting started

Prerequisites

  • Node.js 20+
  • npm

Install

git clone https://github.com/claboran/scribbletune-mcp-ws.git
cd scribbletune-mcp-ws
npm install

Run the dev server

npm run mcp:dev

The server starts on http://localhost:3000/mcp.

In development the MIDI store is mocked — generate-clip generates real MIDI bytes but does not persist them. A [MOCK] warning is logged on each call so you know exactly what's happening.

Inspect with MCP Inspector

With the dev server running, open a second terminal:

npm run mcp:inspect

This launches the @modelcontextprotocol/inspector UI in your browser. Follow these steps to connect:

  1. Set Transport Type to Streamable HTTP
  2. Set URL to http://localhost:3000/mcp
  3. Click Connect
  4. Use the Resources tab to read the Scribbletune concept docs
  5. Use the Tools tab to call generate-clip or get-progression interactively

MCP Inspector showing generate-clip and get-progression tools connected to the local server

Build

npm run mcp:build

MCP tools

generate-clip

Generates a MIDI clip and returns a download key and URL.

Parameter Type Description
command riff | chord | arp Type of clip: melodic line, chord block, or arpeggio
root string Root note with octave, e.g. "G#3"
mode string Scale name, e.g. "minor", "dorian", "phrygian"
pattern string Rhythm pattern: x=hit -=rest _=sustain R=random
subdiv string Step duration: "16n" "8n" "4n" "1m"
progression string Chord names or degrees — required for chord / arp
bpm number Tempo in BPM
sizzle string Velocity envelope: sin cos rampUp rampDown
amp number Max velocity 0–127
accent string Accent pattern, e.g. "x--x"
arpCount number Notes per chord for arp command (default 4)
arpOrder string Arp note order, e.g. "0123" ascending, "3210" descending

Returns { key, downloadUrl, ttlSeconds, meta }.

get-progression

Resolves scale degrees to chord names. Useful before generate-clip when working with chord or arp commands. Not needed for basslines or melodic riffs.

Parameter Type Description
root string Root note with octave
mode enum Scale/mode name
degrees string Space-separated degrees, e.g. "I IV V ii" — random if omitted
count number Number of chords when generating randomly (2–8)

Returns { degrees, chordNames, hint }.


MCP resources

The agent reads these before making tool calls to avoid hallucinating invalid parameter values.

URI Description
scribbletune://docs/overview What Scribbletune is, the clip model, riff/chord/arp commands
scribbletune://docs/clip Full clip() parameter reference
scribbletune://docs/notes-and-patterns Note naming, octaves, pattern syntax
scribbletune://docs/scales All 80+ valid scale names
scribbletune://docs/chords Chord types and notation
scribbletune://docs/progression Progression API and scale degree tables by mode
scribbletune://docs/genre-scale-guide Genre → scale, BPM, and pattern recommendations

Project structure

This is an Nx monorepo.

apps/
  scribbletune-mcp-server/   # This MCP server (operational)
  scribbletune-midi-store/   # MIDI storage service (coming soon)

Roadmap

  • [ ] scribbletune-midi-store — Redis/Valkey-backed MIDI storage with HTTP download endpoint
  • [ ] Docker Compose setup for full local stack
  • [ ] Multi-clip session tool — generate bass, chords, and melody in a single call
  • [ ] Example agent system prompts and Claude Desktop configuration

Credits and acknowledgements

This project would not exist without the work of others.

Scribbletune by Walmik Deshpande is the MIDI generation engine at the heart of this server. Scribbletune is a beautifully designed library that makes programmatic music composition expressive and accessible. Please visit the project, star the repo, and consider contributing.

@rekog/mcp-nest by the rekog-labs team provides first-class NestJS integration for the Model Context Protocol and made building this server a pleasure.

Model Context Protocol by Anthropic is the open standard that makes tool-augmented AI agents possible.


Contributing

This project is in active early development and there is plenty of room to grow — in tooling, musical concepts, documentation quality, and agent integration examples.

  • Open an issue to suggest features, report bugs, or discuss the direction
  • PRs are welcome — please open an issue first for larger changes so we can align before you invest time

License

MIT — © 2026 the scribbletune-mcp-server contributors

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选