Connect GitHub Copilot to Crane Ledger

GitHub Copilot in VS Code (and Visual Studio) can use Crane Ledger as an MCP tool server in Agent mode. Your IDE becomes the generative UI for the ledger.

Prerequisites

  1. GitHub Copilot enabled in VS Code or Visual Studio.
  2. A Crane Ledger API key (ha_live_…).
  3. Agent mode available for MCP tool use.

MCP endpoint

SettingValue
URLhttps://api.craneledger.ai/mcp
TransportStreamable HTTP
Auth (OAuth)Sign in at consent UI — no key in the client
Auth (API key)Authorization: Bearer ha_live_…
Consenthttps://craneledger.ai/oauth/consent

Organization scope comes from your OAuth token or API key — you do not pass organization_id separately.

Scopes: ledger:read, ledger:write, and optionally ledger:admin.

See Authentication and MCP tools.

VS Code configuration

VS Code uses a top-level servers key (not mcpServers). Create or edit .vscode/mcp.json in your workspace, or open user MCP config via MCP: Open User Configuration:

{
  "servers": {
    "crane-ledger": {
      "type": "http",
      "url": "https://api.craneledger.ai/mcp",
      "headers": {
        "Authorization": "Bearer ha_live_your_key_here"
      }
    }
  }
}

You can also run MCP: Add Server from the Command Palette and choose an HTTP server.

  1. Save the config.
  2. Switch GitHub Copilot Chat to Agent mode.
  3. Approve tool calls when Copilot invokes Crane Ledger.

Visual Studio

Use GitHub’s MCP configuration for Visual Studio (remote URL + credentials). Point at https://api.craneledger.ai/mcp with the same Bearer header. See GitHub docs: extend Copilot Chat with MCP.

Example prompts

Once connected, try:

  • "Set up a basic chart of accounts for a small service business"
  • "Create an invoice for $2,500 to Acme Corp for consulting"
  • "What's our cash position right now?"
  • "Show me profit and loss for last quarter"
  • "How many credits do I have left?"

Troubleshooting

IssueWhat to try
Tools not visibleConfirm Agent mode; restart MCP / reload window
mcpServers ignoredRename the top-level key to servers in .vscode/mcp.json
401Fix the Bearer key in headers
Writes blockedCheck draft approval

Need help?

Create a free account (GitHub, Google, Apple, or email) to access our support portal. Once signed in, use the Support tab in your dashboard to submit a support ticket — no GitHub account required. Our team typically responds within 24 hours.