HyperTTS MCP Bridge: generate HyperTTS audio from Claude

AnkiWeb addon 1885999094

Lets MCP clients like Claude list your HyperTTS presets and generate preset-based audio for Anki notes, writing the sound file into the preset's target field.
AI-generated summary; may contain mistakes.

card-creationaisync-integration

Open on AnkiWeb GitHub Ask about alternatives

AnkiWeb

Votes
0 (πŸ‘ 0 Β· πŸ‘Ž 0)
Updated
2026-10-24
Anki versions
25.09.4~
Languages
Python, JSON
Description language
en

Maintenance

active

  • Last update or commit: 2026-10-24 (8 days before the snapshot).
  • GitHub Actions workflows: 1.
  • Commits in the last year: 18.
  • Issues: 0 open, 0 closed.
  • Pull requests: 0 open, 0 merged.

Will it work on my Anki?

Version branches
Min AnkiMax AnkiUpdated
23.1025.09.4+2026-10-24
History across monthly snapshots

Loading…

Similar addons

Description

Lets Claude (or any other MCP client) add audio to your notes using your HyperTTS presets. Ask Claude to generate audio for a note, and the bridge does exactly what HyperTTS's own Apply To Notes button does: it reads the preset's source field, generates speech with the preset's voice, and puts the sound into the preset's target field.

Presets stay in HyperTTS: set up voices and fields there as usual, then use them from Claude.

What you need

  • HyperTTS, installed and enabled, with at least one preset.
  • This add-on.
  • The HyperTTS MCP Bridge extension for Claude Desktop (the .mcpb file), from the latest release on GitHub. Other MCP clients can run the server directly; see the project page.
  • An Anki MCP server, such as Anki MCP Server - AI Assistant Integration, so Claude can find your notes. Technically it's optional: the bridge identifies notes only by their note id, so without one you'd have to give Claude each note's id yourself, copied from Anki's Browser.

Anki must be running with a profile open whenever Claude uses the bridge.

Setup

  • Install this add-on and restart Anki. A tooltip confirms the bridge is listening.
  • Double-click the .mcpb file, and Claude Desktop asks to install it. (Or drag the file into Claude Desktop's Settings β†’ Extensions.) To upgrade later, install the newer .mcpb the same way.
  • Ask Claude something like "Add pronunciation audio to my 'good morning' card using my Basic Ukrainian preset."

Tools Claude gets

  • list_hypertts_presets: lists your HyperTTS presets.
  • generate_hypertts_audio: generates audio for a note with a preset, chosen by name or id. It can also speak different text than the note's source field.

Configuration

Go to Tools β†’ Add-ons β†’ HyperTTS MCP Bridge β†’ Config, and restart Anki after changes.

  • host: keep at 127.0.0.1.
  • port: default 8766. If you change it, change the Bridge URL in the extension's settings to match.
  • api_key: optional. Set it to a long random string, and enter the same value as the extension's Bridge API key.
  • max_text_override_chars: the longest custom text Claude may send, default 2000.

Privacy and security

The bridge only accepts connections from your own computer, and it refuses requests from web browsers, so websites can't use it. Text is sent to whichever text-to-speech service your HyperTTS preset uses, exactly as when you use HyperTTS directly.

Compatibility

Requires Anki 23.10 or later. Tested with HyperTTS 3.7.1.

The bridge works by calling HyperTTS's internals, which aren't a public interface, so a HyperTTS update could break it. If audio generation stops working after you update HyperTTS, check for an update to this add-on. This is an independent project, not made by or affiliated with the HyperTTS developers.

Source Code

github.com/bappelt/anki-hypertts-mcp

README

HyperTTS MCP Bridge

Lets an MCP client (like Claude) generate audio for an Anki note by calling an existing HyperTTS preset β€” the same thing the "Apply To Notes" button does in HyperTTS's GUI, just triggered via MCP instead of a click.

Scope is intentionally narrow: one call, "generate audio for note N with preset P," writing the [sound:...] tag into whatever field that preset is configured to target. It does not expose voice selection, service config, or preset editing over MCP β€” manage presets in HyperTTS's own UI as usual, then drive them remotely.

How it works

+- Claude Desktop ---------------------------------------------------+
|                                                                    |
|  +- HyperTTS MCP Bridge extension (.mcpb) ----------------------+  |
|  |              server/index.js  (Node MCP server)              |  |
|  |            run by Claude Desktop's built-in Node             |  |
|  |                              |                               |  |
|  +------------------------------|-------------------------------+  |
|                                 |                                  |
+---------------------------------|----------------------------------+
                                  |  HTTP to 127.0.0.1:8766
+- Anki --------------------------|----------------------------------+
|                                 |                                  |
|  +- HyperTTS MCP Bridge add-on -|-------------------------------+  |
|  |                              v                               |  |
|  |               hypertts_mcp_bridge/__init__.py                |  |
|  |                   (built from anki_addon/)                   |  |
|  |                              |                               |  |
|  +------------------------------|-------------------------------+  |
|                                 |  in-process Python call          |
|  +- HyperTTS add-on ------------|-------------------------------+  |
|  |                              v                               |  |
|  |                   hypertts_addon.hyper_tts                   |  |
|  |                 (HyperTTS's own live object)                 |  |
|  |                              |                               |  |
|  +------------------------------|-------------------------------+  |
|                                 |                                  |
+---------------------------------|----------------------------------+
                                  |  HTTPS, for most voices
                                  v
                TTS service (Google, ElevenLabs, ...)

This shows the Claude Desktop setup. With Claude Code or another MCP client, the client runs mcp_server/index.js directly from this project with your own Node install instead of from the .mcpb bundle.

The bridge add-on calls into HyperTTS directly, doing exactly what HyperTTS's own "Apply To Notes" button does.

Compatibility: tested with HyperTTS 3.7.1. The bridge relies on HyperTTS internals rather than a public API, so a future HyperTTS update could break it. If audio generation starts failing after a HyperTTS update, check for a newer version of this bridge.

Maintainers: see DEVELOPMENT.md for which internals are used and how to re-verify them.

Setup

1. Install the Anki add-on

  1. Install it from AnkiWeb (recommended): in Anki, Tools β†’ Add-ons β†’ Get Add-ons..., and paste the code 1885999094. Updates then arrive through Check for Updates.

  2. Or install it from a file: download hypertts_mcp_bridge-<version>.ankiaddon from the latest release, or build it yourself (needs only Python 3):

    python3 build_addon.py   # writes dist/hypertts_mcp_bridge-<version>.ankiaddon
    

    Then in Anki: Tools β†’ Add-ons β†’ Install from file... and pick that .ankiaddon file. Reinstalling a newer build the same way upgrades it in place and keeps your config. Use one method or the other: Anki treats an AnkiWeb install and a file install as separate add-ons, and two copies would compete for the same port.

  3. Restart Anki. A tooltip reads HyperTTS MCP Bridge listening on http://127.0.0.1:8766 (and the same line prints to the console if you launched Anki from a terminal).

  4. Make sure HyperTTS itself is installed and enabled β€” this add-on does nothing without it.

Optional: in Tools β†’ Add-ons β†’ HyperTTS MCP Bridge β†’ Config (or by editing the add-on's config.json), set "api_key" to a string to require an X-Api-Key: <value> header on every request. The same config also holds "host" and "port". Restart Anki after changing it.

2. Add the MCP server

Anki must be running (with both add-ons enabled) whenever you use these tools.

Option A β€” Claude Desktop, via the .mcpb bundle (recommended)

  1. Download hypertts-mcp-bridge-<version>.mcpb from the latest release, or build it yourself (needs Node + network):

    ./mcpb/build.sh          # writes dist/hypertts-mcp-bridge-<version>.mcpb
    
  2. Double-click the .mcpb file; Claude Desktop opens and asks to install it. (Or drag the file into Claude Desktop's Settings β†’ Extensions.) Claude Desktop ships its own Node runtime, so you don't need Node installed to run it. To upgrade later, install the newer .mcpb the same way; it replaces the old version.

  3. In the extension's settings, leave Bridge URL at http://127.0.0.1:8766 unless you changed host/port in the Anki add-on config. Fill in Bridge API key only if you set "api_key" there.

Option B β€” any MCP client, via the stdio server directly

cd mcp_server && npm install

Then register it (Claude Desktop's claude_desktop_config.json, Claude Code's claude mcp add, etc.), pointing at the absolute path to index.js:

{
  "mcpServers": {
    "hypertts-bridge": {
      "command": "node",
      "args": ["/absolute/path/to/anki-hypertts-mcp/mcp_server/index.js"],
      "env": { "HYPERTTS_BRIDGE_KEY": "only-if-you-set-one" }
    }
  }
}

HYPERTTS_BRIDGE_URL (default http://127.0.0.1:8766) and HYPERTTS_BRIDGE_KEY (default none) are the two env vars the server reads.

Tools exposed

  • list_hypertts_presets β€” returns each preset's id and name.
  • generate_hypertts_audio β€” args: note_id (required), preset (required β€” name or id), text_override (optional, generates audio for this text instead of the preset's configured source field).

Manual test (without an MCP client)

With Anki running:

curl http://127.0.0.1:8766/presets

curl -X POST http://127.0.0.1:8766/generate \
  -H "Content-Type: application/json" \
  -d '{"note_id": 1234567890123, "preset_id": "your-preset-id-from-above"}'

Get a real note_id from Anki's Browser (right-click a note's row β†’ "Info", or add a "Note ID" column).

Every response is JSON with an "ok" field; failures also carry "error".

Status Meaning
200 Success. /generate also returns target_field, source_text, processed_text, sound_file.
400 Caller mistake: malformed body, no such note, unknown preset, the note lacks the preset's fields, empty source text, or a text_override that is blank or over max_text_override_chars.
401 api_key is set and X-Api-Key is missing or wrong.
403 The request came from a web browser (it has an Origin header).
404 Unknown endpoint.
500 Anything else, such as a TTS service failure or HyperTTS not being enabled.

Security

The HTTP server binds to 127.0.0.1 only β€” nothing outside your machine can reach it. It also refuses any request carrying an Origin header, so web pages open in your browser can't drive it. It has no built-in rate limiting or write scoping beyond "generate audio into the field a preset targets," so treat it like AnkiConnect: fine for local personal use, not something to expose over a network.

Show Your Support

Buy me a coffee