Deterministic music theory over REST + MCP. Analyze any chord symbol or note set, get its roman-numeral harmonic function, generate instrument-ready voicings, and reharmonize entire progressions — correct on every call, computed not guessed. The ground-truth layer your AI calls instead of hallucinating.
Musicians: try the live demos →
Same engine, same key — three ways to reach it. Pick by where your code lives.
An app, backend, or script — any language that speaks HTTP. → the endpoints
An AI agent in Claude or Cursor — one-click custom connector, nothing to install. → add the connector
Claude Code, CI, or a self-hosted agent — run it via npx from a config file. → local setup
Common pattern: sit THIRI downstream of a generator — pipe AI-generated audio (or any chord set) into /v2/analyze and /v2/reharmonize to get a correct chord chart your agent can trust.
This page is the API reference & integration guide. For live usage and quota, open the developer dashboard →
All requests require a Bearer token. Include it in every request header:
Authorization: Bearer your_api_token
Parse any chord symbol into its root, quality, intervals, and extensions. When a key is provided, returns the chord's Roman numeral and harmonic function.
{
"chord": "Dm7",
"key": "C"
}
{
"symbol": "Dm7",
"root": "D",
"quality": "minor7",
"intervals": [0, 3, 7, 10],
"extensions": [],
"alterations": [],
"bassNote": null,
"numeral": "ii",
"degree": 2,
"diatonic": true,
"function": "predominant",
"scales": [
{ "name": "Dorian", "role": "primary" },
{ "name": "Aeolian", "role": "secondary" }
]
}
| Field | Type | Required | Description |
|---|---|---|---|
| chord | string | Yes | Any standard chord symbol |
| key | string | No | Key center for functional analysis |
| Field | Type | Description |
|---|---|---|
| symbol | string | Original input chord symbol |
| root | string | Root note name |
| quality | string | Chord quality classification |
| intervals | number[] | Semitone intervals from root |
| extensions | number[] | Upper extensions present |
| alterations | string[] | Altered tones (e.g. "b9", "#11") |
| bassNote | string | null | Slash chord bass note |
| numeral | string | Roman numeral (when key provided) |
| degree | number | Scale degree 1–7 (when key provided) |
| diatonic | boolean | Whether chord belongs to the key |
| function | string | tonic, subdominant, predominant, or dominant |
Cmaj7/E), shorthand symbols (△, °, ø), all extensions and alterations. Repeat signs (%) and N.C. are handled gracefully.
Resolves a chord symbol to its spelled-out notes, frequencies, MIDI numbers, and recommended improvisation scales.
{
"chord": "Cm7"
}
{
"root": "C",
"quality": "m7",
"notes": ["C", "Eb", "G", "Bb"],
"intervals": ["1", "b3", "5", "b7"],
"semitones": [0, 3, 7, 10],
"frequencies": [261.63, 311.13, 392.0, 466.16],
"midi": [60, 63, 67, 70],
"scales": [
{
"name": "Dorian",
"role": "primary",
"semitones": [0,2,3,5,7,9,10],
"degrees": ["1","2","b3","4","5","6","b7"],
"character": "Minor but bright — the 6th lifts it."
}
]
}
| Field | Type | Description |
|---|---|---|
| notes | string[] | Spelled note names |
| intervals | string[] | Interval labels |
| semitones | number[] | Semitone offsets from root |
| frequencies | number[] | Frequencies in Hz (A4 = 440) |
| midi | number[] | MIDI note numbers |
| scales | string[] | Recommended scales for improvisation |
Generate instrument-ready voicings for a chord in a specified style. Supports voice leading from a previous voicing to ensure smooth transitions.
{
"chord": "Dm7",
"style": "rootless",
"octave": 3,
"previousNotes": ["E3", "G3", "Bb3", "D4"]
}
{
"notes": ["F3", "A3", "C4", "E4"],
"midi": [53, 57, 60, 64],
"intervals": ["m3", "P5", "m7", "M9"],
"template": "bill_evans_rootless",
"voiceLeadingScore": 0.94,
"style": "rootless",
"chord": "Dm7"
}
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| chord | string | Yes | — | Chord symbol |
| style | string | No | "pad" | Voicing style |
| octave | number | No | 3 | Base octave |
| previousNotes | string[] | No | — | Previous voicing for voice leading |
previousNotes is provided, the engine optimizes the new voicing's register to minimize movement between chords, preventing jarring jumps during progressions.
Analyze a chord progression and generate reharmonization suggestions. Returns per-bar substitution options with explanations, plus complete alternative progressions.
{
"bars": ["Cmaj7", "Dm7", "G7", "Cmaj7"],
"key": "C"
}
{
"original": ["Cmaj7", "Dm7", "G7", "Cmaj7"],
"key": "C",
"suggestions": {
"0": [{
"name": "Secondary Dominant",
"chords": ["A7"],
"explanation": "A7 targets Dm7 as its V7...",
"adventurousness": 2,
"genres": ["jazz", "pop"]
}]
},
"alternatives": [
{
"name": "Tritone Subs",
"bars": ["Cmaj7", "Dm7", "Db7", "Cmaj7"],
"adventurousness": 4
},
{
"name": "Dark Mode",
"bars": ["Cmaj7", "Fm7", "G7", "Cmaj7"],
"adventurousness": 5
}
]
}
| Field | Type | Required | Description |
|---|---|---|---|
| bars | string[] | Yes | Chord symbols, one per bar |
| key | string | Yes | Key center |
| Field | Type | Description |
|---|---|---|
| name | string | Human-readable technique name |
| chords | string[] | Replacement chord(s) for the bar |
| explanation | string | Why this substitution works musically |
| adventurousness | number | Harmonic adventurousness (1–10) |
| genres | string[] | Genres where this sounds most natural |
THIRI ships an MCP server alongside the REST API. Any MCP-compatible client — Claude Desktop, Cursor, custom agents — can reach into the engine directly without writing HTTP plumbing. Two ways to connect: hosted (one-click, nothing to install) or local (npm/stdio).
No install, no config file. In Claude: Settings → Connectors → Add custom connector, then paste the URL below. Claude registers itself and opens the THIRI consent page — paste your sk_live_ key once and the four tools appear.
Authenticated with your existing THIRI key (key-as-credential OAuth) — same key, same monthly quota as REST and the npm client.
{
"mcpServers": {
"thiri": {
"command": "npx",
"args": ["-y", "@bluesprincemedia/thiri-mcp"],
"env": {
"THIRI_API_KEY": "sk_live_your_key"
}
}
}
}
| Tool | Description |
|---|---|
analyze_chord | Parse a chord symbol into root, quality, intervals, extensions, and harmonic function |
resolve_chord | Resolve to spelled notes, frequencies, MIDI, and recommended scales |
generate_voicing | Instrument-ready voicings in any style, voice-leading aware |
reharmonize | Substitution suggestions and complete alternative progressions |
Same engine, same auth, same rate limits as the REST API. Use MCP when you want the engine inside an agent loop; use REST when you want it inside an app.
All endpoints return standard HTTP status codes.
{
"error": "invalid_chord",
"message": "Could not parse chord symbol: Xmaj99"
}
API live — free tier includes 1,000 calls/mo. Paste your key on the usage dashboard to see quota.