sonic-mcp

sonic-mcp

MCP server that connects Claude Code to Sonic Pi for AI-assisted beat making, enabling live code execution and pattern management.

Category
Visit Server

README

sonic-mcp

MCP server that connects Claude Code to Sonic Pi for AI-assisted beat making.

Requirements

  • Sonic Pi running on your machine
  • uv (recommended) or pip

Setup

1. Add to Claude Code

Add this to ~/.claude/mcp.json for global use, or a project's .mcp.json to keep it scoped:

{
  "mcpServers": {
    "sonic-pi": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/AJBogo9/sonic-mcp.git", "sonic-mcp"],
      "env": {
        "SONIC_PI_PATTERNS_DIR": "/home/yourname/patterns"
      }
    }
  }
}

SONIC_PI_PATTERNS_DIR defaults to ~/patterns if not set.

2. Start the Sonic Pi listener

Paste this into a Sonic Pi buffer and hit Run before using any MCP tools. It listens for incoming code over OSC and evaluates it live:

live_loop :mcp_runner do
  use_real_time
  code = sync "/osc*/run-code"
  begin
    eval(code[0].to_s)
  rescue Exception => e
    puts "Error: #{e.message}"
  end
end

That's it. You can now ask Claude to write and play Sonic Pi code directly.

Tools

Tool Description
run_code Send Sonic Pi code to execute
stop_all Stop all playing sounds
get_log Read Sonic Pi's output log so Claude can see errors and self-correct
save_pattern Save a pattern to the library
list_patterns List patterns in the library
load_pattern Load a pattern as a starting point for iteration
record_start Start Sonic Pi's built-in recording
record_stop Stop recording and save to disk

How it works

Claude Code calls tools over the MCP protocol. The server translates each tool call into an OSC message sent to Sonic Pi on localhost:4560. The get_log tool reads ~/.sonic-pi/log/server-output.log so Claude can catch errors and fix them without you needing to copy-paste them.

Local development

git clone https://github.com/yourusername/sonic-mcp.git
cd sonic-mcp
pip install -e .

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
Qdrant Server

Qdrant Server

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

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