Claude Code

Add Ternary as a remote MCP server from the terminal, authenticate with /mcp, and ask spend questions from Claude Code.

Connect Claude Code to Ternary from the command line.

Claude Code uses the same remote Ternary MCP server as Claude, but you configure the connection from your terminal.

Before you start

You need:

  • An existing Ternary account
  • Access to at least one Ternary tenant
  • Claude Code installed and signed in

Step 1: Add Ternary

Open a terminal on your machine. Paste one of the commands below and press Enter.

Run this in your shell, not as a message inside a Claude Code chat. If Claude Code is already open, use a separate terminal window.

Choose the tab that matches where your Ternary tenant is hosted.

Add Ternary for the current project:

claude mcp add --transport http ternary https://core-api.ternary.app/mcp

Or add it for all of your projects (use this command if you want Ternary available whenever you open Claude Code):

claude mcp add -s user --transport http ternary https://core-api.ternary.app/mcp

Step 2: Authenticate

  1. Open Claude Code.

  2. Run:

    /mcp
  3. Select ternary.

  4. Choose the authentication option.

  5. Sign in to Ternary in the browser window that opens.

  6. Approve the access request.

Return to Claude Code. /mcp should now show Ternary as connected. The authenticated session is remembered.

Step 3: Ask a question

Try:

Using Ternary, show last month's spend by provider.

Which budgets are currently at risk?

List recent cost alerts.

Show our largest current savings recommendations.

Permissions and writes

Claude Code accesses Ternary with your existing Ternary permissions.

Most current capabilities read data. The only current write action is creating a private report when you explicitly ask the assistant to save an analysis.

Troubleshooting

Authentication does not open

Run /mcp, select ternary, and start authentication manually.

Sign-in fails

Confirm that the MCP URL matches the region where your Ternary account exists, and that the URL has no trailing slash.

No tenants appear

Your Ternary user may not have an explicit tenant role. Ask your Ternary administrator to grant access.

See Troubleshooting Ternary MCP for shared issues.


Did this page help you?