Skip to content

Latest commit

 

History

15 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fretplot-mcp

A Model Context Protocol (MCP) server for the fretplot (CTAN) LuaTeX package written in Go using the official Go SDK for MCP.

This package allows MCP clients to generate fretplot and fretplot-specific LaTeX code from natural language descriptions of musical scales and chord voicings.

MCP tools and prompts

Each tool takes a query string.

Tool Purpose
fp .fp syntax, parameters, examples
fps .fps syntax, style customization
fptex \fptotikz, \fptemplate, \fpstemplate, \fpscale, and built-in scale/arpeggio macros

Each tool has a prompt of the same name as the tool associated with it, and each prompt takes a query string as argument to pass to the corresponding tool.

Installation

Prerequisites

Note: Lua, LaTeX, or fretplot are not required.

Build

$ git clone https://github.com/8vasu/fretplot-mcp
$ cd fretplot-mcp
$ go build .

Usage in Claude Code

  1. Connect to Claude Code:
$ claude mcp add --transport stdio --scope user fretplot -- /path/to/fretplot-mcp
  1. Start a new claude Claude Code session:
$ claude

The next steps can proceed in 2 ways:

Method 1: use an MCP tool of your choice

  1. In the Claude Code session, type /fp and select an MCP prompt from the menu using Up/Down arrow keys and then pressing Enter.
  2. Type your query. Here are some examples of how your Claude Code prompt might look when you have finished typing your query:
/mcp__fretplot__fp rotate a diagram by 90 degrees clockwise
/mcp__fretplot__fps make C# a red triangle
/mcp__fretplot__fptex B natural minor scale diagram
  1. Press Enter and wait for the MCP server and the LLM to do their magic!
  2. Once you have used a particular MCP tool, the fretplot documentation chunk pertaining to that MCP tool will be stored in the context of that Claude Code session, so unless you are in a new Claude Code session or the context gets compressed, subsequent queries pertaining to that MCP tool should be made simply in natural language without MCP prompt/tool usage in order to save tokens.

Method 2: let the LLM pick an MCP tool for you

  1. Describe what you want at the Claude Code prompt in natural language. For example, generate fretplot code to scale a diagarm by a factor of 2 or generate fps code to render B flat as a green circle.
  2. Press Enter and wait for the LLM to pick an MCP tool. If it does not pick an MCP tool and instead tries to search for fretplot in the filesystem, please deny, type use the fretplot MCP server, and press Enter.
  3. If the LLM has picked the right MCP tool, confirm its usage. Otherwise, deny and ask it to look for a different MCP tool.

About

MCP server with capability to generate fretplot code from natural language descriptions of musical scales and chord voicings.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages