Connect a client
Choose the right credential
| Situation | Credential | Tenant |
|---|---|---|
| You are talking to the assistant yourself | Your own Ledger17 login | Chosen in conversation if you belong to several |
| An agent runs unattended, without you | An API key | Bound 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
- Go to Settings → Connectors → Add custom connector.
- Paste the endpoint:
https://mcp.ledger17.com/mcp - 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
| Symptom | Likely cause |
|---|---|
401 with WWW-Authenticate | No login completed, or the token has expired. Log in again. |
| Tool list is empty | Connected, but without a valid token. Check the login. |
Tools ask for an organizationId | Normal: your user belongs to several tenants. Let the assistant call organization_list and choose. |
403 on a call | Login 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.