100% deterministic — 0 chord hallucinations

The deterministic theory rail
for AI agents.

100% computed from pitch-class sets. Zero chord hallucinations.

When an AI agent (in Claude, Cursor, or a DAW environment) is asked to make harmonic decisions, it generates plausible-sounding text tokens. It cannot reliably compute interval arithmetic, enharmonic spellings, voice leading, or tritone substitutions. In audio diffusion models, text conditioning fails to follow chord charts 10 out of 12 bars by chance alone.

THIRI is the verification rail. Instead of letting an LLM guess at notes, agents delegate musical reasoning to THIRI over the Model Context Protocol (MCP) or REST. Call it with the same chord progression a thousand times; you will receive the exact, mathematically verified musical answer every time. Not locked into subjective tastes — it works as an objective reward model / verifier with parametric voicing rules (drop-2, rootless, quartal).

REST https://chords.thiri.ai/v2 Copy
Star and clone the MCP repo on GitHub Get a free API key (1,000 calls/mo) Subscribe to Game THIRI

The five primitives

Same engine over REST at chords.thiri.ai and over MCP. Sit THIRI downstream of a generator when you need a chart an agent can trust.

analyze_chord

POST /v2/analyze

Parses arbitrary chord symbols into roots, qualities, intervals, and roman-numeral harmonic function.

resolve_chord

POST /v2/resolve

Resolves chord symbols to spelled pitch classes, exact frequencies in Hz, MIDI notes, and recommended improvisation scales.

generate_voicing

POST /v2/voicing

Generates instrument-ready voicings (drop-2, rootless, quartal, shell) with voice-leading constraints.

reharmonize

POST /v2/reharmonize

Returns up to 4 complete reharmonized variations (diatonic substitutions, secondary dominants, tritone subs, Coltrane changes).

conduct_band

POST /v2/conduct

Translates arrangement prompts into coordinated multi-track MIDI lanes (bass, drums, chordal bed, melody).

Transports

Two ways to reach the same five tools. 796 monthly npm downloads for @bluesprincemedia/thiri-mcp. Verified identical responses over stdio and hosted HTTPS.

Hosted MCP connector

https://mcp.thiri.ai/mcp — 1-click in Claude Settings. → add the connector

Local stdio

npx -y @bluesprincemedia/thiri-mcp — Claude Code, Cursor, CI. → local setup

REST

Any language that speaks HTTP. Base: https://chords.thiri.ai/v2. → the endpoints

Keys: build.thiri.ai/keys. This page is the API reference. For live usage and quota, open the developer dashboard.

POST Analyze POST Resolve POST Voice POST Reharmonize MCP Server Errors Pricing FAQ
🔑

Authentication

All requests require a Bearer token. Include it in every request header:
Authorization: Bearer your_api_token


1

Analyze Chord

POST
/v2/analyze

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.

Request
{
  "chord": "Dm7",
  "key": "C"
}
Response
{
  "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" }
  ]
}
Request Parameters
FieldTypeRequiredDescription
chordstringYesAny standard chord symbol
keystringNoKey center for functional analysis
Response Fields
FieldTypeDescription
symbolstringOriginal input chord symbol
rootstringRoot note name
qualitystringChord quality classification
intervalsnumber[]Semitone intervals from root
extensionsnumber[]Upper extensions present
alterationsstring[]Altered tones (e.g. "b9", "#11")
bassNotestring | nullSlash chord bass note
numeralstringRoman numeral (when key provided)
degreenumberScale degree 1–7 (when key provided)
diatonicbooleanWhether chord belongs to the key
functionstringtonic, subdominant, predominant, or dominant
Supported formats: Standard chord notation including slash chords (Cmaj7/E), shorthand symbols (△, °, ø), all extensions and alterations. Repeat signs (%) and N.C. are handled gracefully.

2

Resolve Chord

POST
/v2/resolve

Resolves a chord symbol to its spelled-out notes, frequencies, MIDI numbers, and recommended improvisation scales.

Request
{
  "chord": "Cm7"
}
Response
{
  "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."
    }
  ]
}
Response Fields
FieldTypeDescription
notesstring[]Spelled note names
intervalsstring[]Interval labels
semitonesnumber[]Semitone offsets from root
frequenciesnumber[]Frequencies in Hz (A4 = 440)
midinumber[]MIDI note numbers
scalesstring[]Recommended scales for improvisation

3

Generate Voicing

POST
/v2/voicing

Generate instrument-ready voicings for a chord in a specified style. Supports voice leading from a previous voicing to ensure smooth transitions.

Request
{
  "chord": "Dm7",
  "style": "rootless",
  "octave": 3,
  "previousNotes": ["E3", "G3", "Bb3", "D4"]
}
Response
{
  "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"
}
Request Parameters
FieldTypeRequiredDefaultDescription
chordstringYesChord symbol
stylestringNo"pad"Voicing style
octavenumberNo3Base octave
previousNotesstring[]NoPrevious voicing for voice leading
Available Styles
rootless
Jazz voicings without the root — ideal for comping with a bassist
shell
Root, 3rd, and 7th only — economical and clear
drop2
Open voicing with wider spacing — classic big band sound
drop3
Wider drop voicing — orchestral spread
pad
Close-position stacking — full and warm
triad
Basic three-note voicing
Voice Leading: When previousNotes is provided, the engine optimizes the new voicing's register to minimize movement between chords, preventing jarring jumps during progressions.

4

Reharmonize

POST
/v2/reharmonize

Analyze a chord progression and generate reharmonization suggestions. Returns per-bar substitution options with explanations, plus complete alternative progressions.

Request
{
  "bars": ["Cmaj7", "Dm7", "G7", "Cmaj7"],
  "key": "C"
}
Response
{
  "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
    }
  ]
}
Request Parameters
FieldTypeRequiredDescription
barsstring[]YesChord symbols, one per bar
keystringYesKey center
Suggestion Fields
FieldTypeDescription
namestringHuman-readable technique name
chordsstring[]Replacement chord(s) for the bar
explanationstringWhy this substitution works musically
adventurousnessnumberHarmonic adventurousness (1–10)
genresstring[]Genres where this sounds most natural
Alternative progressions: Each response includes up to 4 complete reharmonized versions of the input, from conservative to adventurous. Each includes a name, description, full bar array, and an adventurousness rating.

CONNECT npx @bluesprincemedia/thiri-mcp

MCP Server

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).

Hosted — custom connector (Claude Desktop / web / mobile)

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 five tools appear.

CONNECTOR URL https://mcp.thiri.ai/mcp

Authenticated with your existing THIRI key (key-as-credential OAuth) — same key, same monthly quota as REST and the npm client.

Local — npm / stdio config (Claude Code, Cursor)

~/.claude/settings.json
{
  "mcpServers": {
    "thiri": {
      "command": "npx",
      "args": ["-y", "@bluesprincemedia/thiri-mcp"],
      "env": {
        "THIRI_API_KEY": "sk_live_your_key"
      }
    }
  }
}

Available tools

ToolDescription
analyze_chordParse a chord symbol into root, quality, intervals, extensions, and harmonic function
resolve_chordResolve to spelled notes, frequencies, MIDI, and recommended scales
generate_voicingInstrument-ready voicings in any style, voice-leading aware
reharmonizeSubstitution suggestions and complete alternative progressions — 8 techniques (tritone sub, ii–V insertion, modal interchange, Coltrane changes, backdoor, and more)
conduct_bandNatural-language band conduct — describe a groove, get back arranged lanes + MIDI. Hosted MCP returns the arrangement data; audio rendering (Csound → WAV) is a separate local-only server

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.


Error Handling

All endpoints return standard HTTP status codes.

200
Success
400
Invalid input — malformed chord or missing field
401
Unauthorized — invalid or missing token
404
Chord not found in harmony engine
429
Rate limit exceeded
500
Internal server error
Error Response
{
  "error": "invalid_chord",
  "message": "Could not parse chord symbol: Xmaj99"
}
Rate Limits
Free
100
requests / minute
Builder
300
requests / minute

Free. Builder.

Free: 1,000 calls/mo. Builder: 50,000 calls/mo via T.H.I.R.I. Builders on Skool.

Free
$0
forever
1,000 API calls / month
All five endpoints
MCP server access
100 req/min rate limit

FAQ

Questions agents ask

Short answers for install, hosts, license, and what the five tools return.

Where do I get a key?

Get a free key at build.thiri.ai/keys. That is the shared install gate. Nothing in T.H.I.R.I. Builders works until you install — mint a key first, then connect REST or MCP.

Which host do I call?

Do not send API keys to api.thiri.ai — that host is stale. REST lives at chords.thiri.ai. Hosted MCP lives at mcp.thiri.ai/mcp. A GET on the MCP root / returns 404; the server is alive at /mcp.

What’s the license / commercial use?

thiri-mcp is licensed PolyForm Noncommercial 1.0.0: free to use, modify, and share for non-commercial purposes only. Commercial use needs a paid license from Blues Prince Media.

How many tools / is conduct_band audio?

Five tools ship: analyze_chord, resolve_chord, generate_voicing, reharmonize, and conduct_band. Hosted conduct_band returns arrangement data and MIDI lanes, not a Csound→WAV audio render.

Copied to clipboard