Back to the catalog

PlayByKey Music Theory

Chords, scales, progressions, transposition, and MIDI tools for music theory AI agents.

Open source Open in the app JSON README (API)

About

Chords, scales, progressions, transposition, and MIDI tools for music theory AI agents.

Details

Kind
MCP servers
Topic
No topic detected
Publisher
com.playbykey
Origin
official
Category
ferramentas
Transport
local
Version
1.6.0
Stars
1
Last push
2026-09-01T06:02:56Z
Repository state
ativo
Language
TypeScript
License
MIT
Added
2026-08-29 03:01:19
Updated
2026-08-29 03:01:19
Origin id
com.playbykey/theory-mcp

README

<a href="https://playbykey.com">
  <picture>
    <source media="(prefers-color-scheme: dark)" srcset="assets/logo-dark.svg" />
    <img src="assets/logo-light.svg" alt="PlayByKey" width="220" height="42" />
  </picture>
</a>

# Developer Tools

Packages for PlayByKey - see the table below for what's here.

- **npm:** [npmjs.com/package/@playbykey/theory](https://www.npmjs.com/package/@playbykey/theory)
- **Documentation:** [theory-engine.docs.playbykey.com](https://theory-engine.docs.playbykey.com) - interactive playgrounds
- **Changelog:** [GitHub Releases](https://github.com/DigitalBrewLLC/playbykey-dev-tools/releases)

---

## Install

```sh
npm install @playbykey/theory
pnpm add @playbykey/theory
yarn add @playbykey/theory
bun add @playbykey/theory
```

Quickstart and API examples: [packages/theory/README.md](./packages/theory)

---

## Why @playbykey/theory

- **Foundation music theory engine:** music theory as code. Modes, keys, intervals, and scale relationships resolved deterministically; one source of truth every app, notation tool, or AI agent can build on.
- **Zero dependencies:** no transitive baggage; safe for agents, edge runtimes, and tight bundles
- **Strictly typed:** every function's types exported alongside it, no `any`
- **Agent-ready:** copy-paste LLM context prompt and [interactive docs](https://theory-engine.docs.playbykey.com)
- **Sharps-only notation:** one canonical spelling per note (`C#`, 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.

---

## Packages

| Package                                          | Description                                                                                             | Links                                                                                                                                                                                   |
| ------------------------------------------------ | ------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`@playbykey/theory`](./packages/theory)         | Zero-dependency music theory engine - scales, modes, intervals, chords, progressions, key relationships | [npm](https://www.npmjs.com/package/@playbykey/theory) · [docs](https://theory-engine.docs.playbykey.com) · [changelog](https://github.com/DigitalBrewLLC/playbykey-dev-tools/releases) |
| [`@playbykey/theory-mcp`](./packages/theory-mcp) | MCP server that exposes the theory engine as AI-callable tools                                          | [npm](https://www.npmjs.com/package/@playbykey/theory-mcp) · [README](./packages/theory-mcp)                                                                                            |
| [`theory-docs`](./packages/theory-docs)          | Starlight documentation site (private workspace package)                                                | [live site](https://theory-engine.docs.playbykey.com) · [README](./packages/theory-docs)                                                                                                |

---

## License

MIT for the repository tooling and `@playbykey/theory`. See [LICENSE](./LICENSE).
Individual packages may declare their own license in their `package.json`.

More