Connect an agent

Choose how to connect your agent to Aikount. ChatGPT and Claude use remote MCP with OAuth sign-in; developer agents can also use an API key.

ChatGPT and Claude: no-code setup

Open Connect agent in the app, copy https://api.aikount.com/mcp, and follow your assistant's guide. Authorize the company and permissions in Aikount.

The API-key steps below are for developer clients and scripts.

Step 1 — Get an API key

From a logged-in session, mint an API key (prefix agl_) at POST /api/v1/auth/api-keys. Store it as a secret; it is shown only once. The details are in Authentication and API keys.

Check it works before continuing:

curl https://api.aikount.com/api/v1/tenants/me \
  -H "Authorization: Bearer agl_your_key_here"

In Windows PowerShell (5.1, the one bundled with Windows) curl is not the real curl; use:

Invoke-RestMethod -Uri "https://api.aikount.com/api/v1/tenants/me" -Headers @{ Authorization = "Bearer agl_your_key_here" }

Step 2 — Plug it into your agent

An agent can use Aikount two ways: over MCP (the agent discovers the accounting tools) or over direct HTTP (the agent calls the endpoints). The MCP route is the most convenient for agent clients:

  • Claude Code — add the Aikount MCP server. Remote: https://api.aikount.com/mcp with the Authorization: Bearer agl_... header. Local: uvx aikount-mcp with AIKOUNT_TOKEN=agl_....
  • Cursor — configure Aikount as an MCP server, remote or local, with the same token.
  • Gemini CLI — register it as an MCP server, with the token in the header (remote) or in AIKOUNT_TOKEN (local).
  • Codex — same: add the Aikount MCP server with your agl_ key.

The transport and authentication details for each mode (streamable-HTTP with header, or stdio with AIKOUNT_TOKEN) are in MCP.

The skill file (drop-in)

To let an agent grasp how to use Aikount at once —what it is, how it authenticates, what endpoints exist— we publish a ready-to-add skill file:

https://aikount.com/skills/agentledger/SKILL.md

Give it to your agent as context (or place it where your client loads skills). It summarizes the authentication model and the core endpoints, so the agent starts operating without you explaining it.

To install it as a Claude Code skill (folder ~/.claude/skills/agentledger/; on Windows, %USERPROFILE%\.claude\skills\agentledger\):

# macOS / Linux
mkdir -p ~/.claude/skills/agentledger
curl -fsSL https://aikount.com/skills/agentledger/SKILL.md -o ~/.claude/skills/agentledger/SKILL.md
# Windows PowerShell
New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\.claude\skills\agentledger" | Out-Null
Invoke-WebRequest -UseBasicParsing -Uri "https://aikount.com/skills/agentledger/SKILL.md" -OutFile "$env:USERPROFILE\.claude\skills\agentledger\SKILL.md"

The in-app Connect agent button gives you these commands with your token already filled in and picks the variant for your system.

Good practices

  • Use one key per agent/environment, so you can revoke one without affecting the others.
  • Don't put the key in the repository or in logs; pass it via environment variable or secrets manager.
  • Start on the demo or on test data before letting the agent operate on real data.

See also

Cookies & privacy

We use our own cookieless analytics. With your permission, we measure registrations and payments from Google and ChatGPT ads. Learn more · Privacy