Chords, scales, progressions, transposition, and MIDI tools for music theory AI agents.
Packages for PlayByKey - see the table below for what's here.
npm install @playbykey/theory
pnpm add @playbykey/theory
yarn add @playbykey/theory
bun add @playbykey/theory
Quickstart and API examples: packages/theory/README.md
anyC#, not Db) keeps the Note type safe and unambiguous. Flats are fully supported for both input (parseNote/parseNoteToken accept Db, Eb, Gb, Ab, Bb) and output (getFlats/getEnharmonicLabels), without extending Note itself.| Package | Description | Links |
|---|---|---|
@playbykey/theory | Zero-dependency music theory engine - scales, modes, intervals, chords, progressions, key relationships | npm · docs · changelog |
@playbykey/theory-mcp | MCP server that exposes the theory engine as AI-callable tools | npm · README |
theory-docs | Starlight documentation site (private workspace package) | live site · README |
MIT for the repository tooling and @playbykey/theory. See LICENSE.
Individual packages may declare their own license in their package.json.
Source-derived launch command. Check the maintainer’s required arguments and credentials before running:
npx -y @playbykey/theory-mcpMerge this template into ~/Library/Application Support/Claude/claude_desktop_config.json. Keep existing servers. Add any arguments, credentials, and permissions required by the maintainer; this template has not been install-tested.
{
"mcpServers": {
"com-playbykey-theory-mcp": {
"command": "npx",
"args": [
"-y",
"@playbykey/theory-mcp"
]
}
}
}Restart Claude Desktop completely for changes to take effect. Confirm the server appears connected in the client’s tool list, then try a read-only example from its documentation.
Claude Desktop setup referencePlayByKey Music Theory works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.
~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.~/.cursor/mcp.jsonRestart Cursor for changes to take effect..vscode/mcp.jsonReload VS Code window for changes to take effect.~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect..mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.