Knowledge base

How to connect Claude Code to Mighty

Last updated 08/10/2026
Add Mighty to Claude Code with 1 command, so you can ask about your figures from the terminal.

Claude Code is the version of Claude, the AI assistant made by Anthropic, that runs in a terminal (the window where you type commands). When you connect it to Mighty, you can ask about your company's figures and prepare drafts without leaving that window.

If you use Claude in a web browser or the Claude desktop app, follow How to connect Claude to Mighty instead. That guide also explains what Claude can and cannot do in your accounts.

What you need first

  • Claude Code installed and signed in.
  • An API key from Mighty. An API key is a long password that lets another app into your Mighty company. The first step below shows where to create one.
Treat your key like a password. Anyone who has it can read your accounting figures and create invoices in your company. Do not paste it into a chat message or save it in a file you share with other people.

The command

Copy this command, then put your own key in place of YOUR_KEY. Keep the quotation marks.

claude mcp add --transport http --scope user mighty https://api.mightyaccounting.com/mcp --header "X-Api-Key: YOUR_KEY"

Each part does 1 job:

PartWhat it means
mighty The name Claude Code uses for the connection. You can choose a different name.
https://api.mightyaccounting.com/mcp The address where Claude Code reaches Mighty.
--header "X-Api-Key: YOUR_KEY" Sends your key with every request, so Mighty knows which company to open.
--scope user Makes the connection available in every folder you work in, and keeps it private to you.

Keeping your key out of shared projects

The scope decides where Claude Code saves the connection, including your key.

  • --scope user saves it in your own settings. Only you can use it. We recommend this one.
  • --scope local saves it in your own settings too, but only for the folder you are in when you run the command. This is what you get if you leave the scope out.
  • --scope project saves it in a file called .mcp.json inside the project folder. If that folder is shared with other people, they get your key. Do not use this scope for Mighty.

More than 1 company

A key works for 1 company only. To connect a second company, create a key in that company and run the command again with a different name, such as mighty-second-company. Tell Claude Code which company you mean when you ask a question.

Removing the connection

Run this command in your terminal:

claude mcp remove mighty

Then revoke the key in Mighty so it cannot be used again. Go to Company Settings, open the Other tab, select API Keys and select Revoke next to the key.

Common questions

What if mighty shows as failed in the list?

This nearly always means Mighty did not accept the key. Check in Mighty that the key shows Active. If it does, remove the connection and add it again, taking care to paste the whole key with no extra spaces.

What if I lost my key?

Mighty shows a key once and cannot show it again. Revoke that key, create a new one, then remove the connection and add it again with the new key.

How do I see which connections I have?

Run claude mcp list in your terminal. It lists every connection and whether it is working.

Does Claude Code change my accounts?

It has the same limits as Claude everywhere else. It reads your figures and reports. An invoice it creates is saved as a Draft unless you ask for it to be raised, and a bank suggestion is saved as a draft for you to approve in Mighty. A mileage claim is the exception: it counts in your accounts as soon as Claude Code records it.

How to do it in Mighty

Step 1
Create a key in Mighty and copy it Go to Company Settings, open the Other tab and select API Keys. Select Create Key, enter a Description such as Claude Code on my laptop, select Create, then select Copy.
Step 2
Open a terminal Open the terminal you normally use for Claude Code. If Claude Code is already running, type /exit to leave it first.
Step 3
Run the command to add Mighty Enter this command on 1 line, with your own key in place of YOUR_KEY: claude mcp add --transport http --scope user mighty https://api.mightyaccounting.com/mcp --header "X-Api-Key: YOUR_KEY". Claude Code replies with a line starting Added.
Step 4
Start Claude Code and check the connection Type claude to start Claude Code, then type /mcp. You should see mighty in the list, marked as connected.
Step 5
Ask a question Ask: What is my bank balance in Mighty? Claude Code asks your permission the first time, then shows the figure from your dashboard.

Related articles

A mobile version of this screen is available. Switch
This page lost its connection to the server. Reload to carry on.