AnkiConnect not
working on Mac?

Nov 3, 2026 · 5 min read

Almost every AnkiConnect failure on a Mac comes down to one of four things: Anki is not open with a profile loaded, the add-on is not installed or Anki was not restarted after installing it, something else is using the port, or a browser tool is not on the add-on's allowed list. Open http://localhost:8765 in a browser: if something answers, the add-on is fine and the problem is on the other side.

The quick checks, in order

Anki has to be running with a profile open, not sitting at the profile picker. AnkiConnect only exists inside a running Anki, so with Anki closed, every tool that talks to it fails the same way. Then check the add-on is installed and that you restarted Anki afterwards. Then open http://localhost:8765 in a browser. If the page loads or answers, the add-on is listening. If the browser says it cannot connect, it is not.

The add-on's own README lists the same first steps under troubleshooting: "Connection refused: check that Anki is running, the add-on is enabled, and your client uses the configured address and port. Restart Anki after installing the add-on or changing listener settings." (README read November 2026. The GitHub repository now just points to this address.)

Installing it and the add-on code

The code is 2055492159. It is on the AnkiConnect page on AnkiWeb. In Anki, choose Tools → Add-ons (⇧⌘A), click Get Add-ons…, paste the code, confirm, then restart Anki and open your profile. These are the steps in the README too.

One version detail. The current README says AnkiConnect needs Anki 26.08 or later, and says compatibility is tested with 26.08 and 26.09.3. As of November 2026 the Anki download page says the current version is 26.09.3. If you are on something older and nothing connects, check Anki → About against that first.

Test the port yourself

By default the add-on listens on 127.0.0.1, port 8765. If a browser at localhost:8765 gets nothing, try the README's own test in Terminal. It asks for your deck names:

curl --request POST http://127.0.0.1:8765/ \
          --header 'Content-Type: application/json' \
          --data '{"action":"deckNames","version":6,"params":{}}'

The README shows a reply of the form {"result":["Default"],"error":null}. If that works but your tool still fails, the add-on is healthy and the fault is in how the tool is set up: wrong port, or an API key. The default apiKey is null; if you set one in the add-on config, every client has to send it. To see or change any of this, go to Tools → Add-ons → Anki-Connect → Config, and restart Anki after changing listener settings.

The App Nap fix, and why it may not apply now

Older versions of AnkiConnect had a Mac-only trap. macOS App Nap could suspend Anki while another window was in front, and requests would hang. The old README fixed it by running this once, then restarting Anki:

defaults write net.ichi2.anki NSAppSleepDisabled -bool true

The current README says something different: "On macOS, Anki-Connect automatically suppresses App Nap after its HTTP listener starts", and "No defaults write commands or separate App Nap add-on are needed." So if you are on a recent add-on, skip this section. If requests only fail while Anki is in the background and you are on an older one, update the add-on first.

If you do try the old command, the bundle id may no longer be the one in that line. Check it first with osascript -e 'id of app "Anki"'; a recent install tested for this page printed net.ankiweb.launcher. Use whatever that command prints on your Mac, and treat the command as an experiment. It is not confirmed which id the running Anki process uses.

Browser tools, Yomitan and CORS

A browser extension is not the same as a local app. The page it runs on is an origin, and AnkiConnect keeps a list of which origins may call it. The default webCorsOriginList is ["http://localhost"]. The README says browser origins "require permission separately" and points to the access rules in its API guide. If a browser tool like Yomitan reports that it cannot reach Anki while curl works, this is the first thing to compare against that tool's own docs. Add the origin it sends to the list in the config, then restart Anki.

The README adds that on Windows you may need to allow Anki through the firewall. It says nothing like that for the Mac.

When a different add-on gets in the way

Anki's manual has a standard way to find an add-on that is causing trouble: close Anki, start it with ⇧ held until it says safe mode is on, and see if the problem goes. Safe mode turns add-ons off, which includes AnkiConnect, so you can use it to rule out something else, not to test AnkiConnect itself. The manual's other steps are in its troubleshooting page: restart, check add-ons, check your version, then Tools → Check Database.

How LeafyApp uses it, and what its messages mean

LeafyApp talks to Anki through this same add-on. It needs Anki 23.10 or newer on the Mac plus AnkiConnect, and it can install the add-on for you: Settings → Anki → Set up → "Set it up for me", then "Restart Anki". If you would rather do it by hand, the steps above are the same ones.

Once connected, "Add to Anki" in the word view sends a card, and you pick the deck from the arrow or with "New Deck…". A whole folder can have a deck, and "Send every word" in Settings sends everything from then on. Anki has to be open, or the words wait in LeafyApp and go over next time. If you change the card layout in Settings, cards already in Anki update. Deleting on one side never deletes on the other.

If LeafyApp says "Add-on missing", quit and reopen Anki, then click "Check again". It is usually the restart from the install step that got missed. Full steps are on the Anki setup page.

Questions people ask

Where do I find the AnkiConnect add-on code?
The code is 2055492159, from the AnkiConnect page on AnkiWeb. In Anki open Tools → Add-ons → Get Add-ons…, paste it, then restart Anki.

How do I check that localhost 8765 is working?
With Anki open and a profile loaded, visit http://localhost:8765 in a browser. If it will not connect, the add-on is not running: confirm it is installed and that you restarted Anki.

Why do I get an Anki connection failure from Yomitan on Mac?
First check the port answers with a browser or curl. If it does and Yomitan still fails, look at the add-on's webCorsOriginList and API key settings, because browser extensions need their origin allowed.

Do I still need the App Nap defaults command?
The current README says no, that the add-on suppresses App Nap on macOS itself. The command was for older versions. If you are on one and requests stall in the background, update the add-on first.

LeafyApp says Add-on missing. What do I do?
Quit and reopen Anki, then click Check again in LeafyApp. If it still fails, use Settings → Anki → Set up → Set it up for me, and click Restart Anki.

Anki, AnkiConnect, AnkiWeb and Yomitan are trademarks or product names of their respective owners. LeafyApp is an independent app, not affiliated with or endorsed by any of them, and the names are used here only to describe compatibility.