Choose the right credential

SituationCredentialTenant
You are talking to the assistant yourselfYour own Ledger17 loginChosen in conversation if you belong to several
An agent runs unattended, without youAn API keyBound to one tenant, never chosen

If in doubt: when a person is driving the assistant, the assistant should use that person’s login.

Claude.ai

  1. Go to Settings → Connectors → Add custom connector.
  2. Paste the endpoint: https://mcp.ledger17.com/mcp
  3. Complete the login in the window that opens.

The client discovers the authorization server itself from the protected-resource metadata — nothing else to configure.

Claude Code

With a browser login:

  claude mcp add --transport http ledger17 https://mcp.ledger17.com/mcp
  

Complete the login when prompted.

If you already hold a token — for example one obtained with an API key:

  claude mcp add --transport http ledger17 https://mcp.ledger17.com/mcp \
  --header "Authorization: Bearer YOUR_TOKEN"
  

Autonomous agent

An agent running with no person present exchanges its API key for a token and sends it as Authorization: Bearer <token> on every request to /mcp. The key is created and scoped in the Ledger17 admin console — see API keys.

Tokens are short-lived — the agent must fetch a fresh one before expiry.

Check that it works

Ask the client to list its tools. You should see eleven Ledger17 tools — balances, transaction lines, subledger, reports, organizations, and the two write tools. See the tool catalog.

A good first prompt: “List my organizations, then show the trial balance for this year.”

When it does not work

SymptomLikely cause
401 with WWW-AuthenticateNo login completed, or the token has expired. Log in again.
Tool list is emptyConnected, but without a valid token. Check the login.
Tools ask for an organizationIdNormal: your user belongs to several tenants. Let the assistant call organization_list and choose.
403 on a callLogin is fine, but the token lacks the permission — the response names exactly which one. See Authentication.

In short: 401 is a login problem, 403 is a permission problem.