AI and MCP

How to connect GitHub Copilot CLI to SpendixAI with MCP

Add SpendixAI to GitHub Copilot CLI with a single command, sign in with OAuth and ask about your expenses from the terminal without handing over write access.

Editorial illustration for How to connect GitHub Copilot CLI to SpendixAI with MCP

If your Copilot subscription already covers the terminal, GitHub Copilot CLI is one of the quicker ways to put an AI model in front of your expense records. It supports remote MCP servers that use OAuth, so apart from one address there is nothing to paste.

Those records come from SpendixAI, which we make as a personal expense tracker for India. It works from uploaded statements and entries typed by hand, with no bank login involved.

What the connection does

Copilot CLI calls SpendixAI's tools over MCP to look up transactions and reports. The wording of each answer is produced by Copilot, under GitHub's terms, while the numbers come from your workspace. Always check anything important against the matching SpendixAI report.

The one-command setup

The command is copilot mcp add, followed by the transport flag set to http, the name spendixai and then <your SpendixAI server address>. It writes the entry to ~/.copilot/mcp-config.json. If you prefer editing that file, the entry needs a type of http, the url field and a tools field. The tools field is required, and a single star in it means every tool. Inside a session, /mcp add asks for the same details one by one.

Signing in

  1. Copy the server address from Developer → MCP connections in SpendixAI.
  2. Run the add command in your terminal.
  3. Start a Copilot CLI session. If the server is listed as needing authentication, run /mcp auth spendixai.
  4. Complete the browser sign-in, then choose your workspace.
  5. Pick the first preset on the consent screen, Read only, and approve.

Work and school accounts

On Copilot Business and Enterprise, the MCP servers in Copilot policy is off by default and an administrator must enable it. An organisation can also keep a registry allowlist, which may block SpendixAI. If the server will not connect on a work login, that is the first thing to ask about. We did not find a minimum Copilot CLI version in the documentation, so if the add command is not recognised, update the CLI first and then try again. Whether that is the cause on your account is something only your administrator can confirm.

Permissions and prompts

In its default mode Copilot CLI asks before using a tool. You can pre-approve a named tool or a whole server with the allow-tool flag, block one with deny-tool, and review everything with /permissions. The commands /allow-all and /yolo, and the allow-all flag, switch prompts off entirely. For finance data, avoid them.

Quick reference

Command or flagWhat it does
copilot mcp add with the http transportSaves SpendixAI as a remote server
/mcp auth spendixaiStarts or refreshes the browser sign-in
The additional-mcp-config flagAdds the same JSON for one session only
/permissionsShows what the CLI may do without asking
/allow-allTurns prompts off, so avoid it here

Questions to ask once it works

Because Copilot CLI is a coding tool, it may try to be clever and write a script around your question. Keep requests plain. Ask what you spent on food last month compared with the month before, or ask for your recurring charges and what each costs per year. If a number looks surprising, open the report in SpendixAI and compare it before acting on it.

Two limits are worth knowing. Whether the very first sign-in starts by itself was not confirmed, since the documentation describes /mcp auth for servers that need authentication. And the Copilot cloud agent and code review do not currently support remote servers that use OAuth, so this works in the CLI only.

We checked this setup against GitHub's documentation in November 2026. If a command differs on your machine, follow GitHub's current guide, and disconnect any time from Developer → MCP connections.

SPENDIXAI JOURNAL

Useful ideas start with a clearer picture of your own spending.

Explore your reports