AI assistants

Copilot CLI

Connect GitHub Copilot CLI to the hosted Costfluent MCP server with an http entry that sends your API token, or run the server on your machine with costfluent mcp install, with the Costfluent plugin's cost skills.

Copilot CLI connects to the hosted Costfluent MCP server at https://mcp.costfluent.com with an API token in a header, from an entry in its mcp-config.json. To run the server on your machine instead, costfluent mcp install adds an entry that starts it, reading the token from COSTFLUENT_API_TOKEN rather than writing it into the file. The Costfluent plugin of costfluent/agent-skills adds the cost skills.

Before you start

  • An API token from the Read only preset, with write capabilities only if Copilot CLI may change objects; see Create a token.
  • To run the server on your machine, costfluent-mcp and the command line, costfluent, on your PATH; both come in the same release archive.

Connect with an API token

  1. Add the server to ~/.copilot/mcp-config.json, or to mcp-config.json in COPILOT_HOME when that is set. The entry reads the token from COSTFLUENT_API_TOKEN, so the file holds no token; if costfluent mcp install wrote a costfluent entry there before, replace it:

    JSONCode
    { "mcpServers": { "costfluent": { "type": "http", "url": "https://mcp.costfluent.com", "headers": { "Authorization": "Bearer ${COSTFLUENT_API_TOKEN}" }, "tools": ["*"] } } }
  2. Set COSTFLUENT_API_TOKEN to the token in your shell, and start Copilot CLI from that shell.

  3. Ask a question, such as "What did we spend on AWS last month, by service?".

Instead of step 1, /mcp add in Copilot CLI opens a form: choose the HTTP server type, enter the URL and, under HTTP Headers, the Authorization header, and press Ctrl+S to save.

Run it on your machine

  1. Run copilot plugin marketplace add costfluent/agent-skills, then copilot plugin install costfluent@costfluent.
  2. Run costfluent mcp install --client copilot --write. It adds the server to ~/.copilot/mcp-config.json, or to mcp-config.json in COPILOT_HOME when that is set.
  3. Set COSTFLUENT_API_TOKEN to the token in your shell, start Copilot CLI from that shell and ask a question, such as "What did we spend on AWS last month, by service?".

How it behaves

  • VS Code's agent sessions read the same mcp-config.json, so the entry reaches them too.
  • The client is copilot: costfluent mcp install has no copilot-cli.
  • The entry lets Copilot CLI call every tool the server offers, and the server offers only those the token's capabilities allow.