Integrations · MCP
Use Nefin from Claude Code
Nefin runs an MCP server, so Claude Code can work with your books directly. Ask for a report, look up who owes you, or draft an invoice from the terminal. Claude acts as you and can do only what you can do.
Before you start
- Claude Code installed and signed in. See Anthropic’s setup guide.
- A Nefin account with two-step verification. If you haven’t set it up, Nefin walks you through it the first time you connect.
- AI switched on for at least one company. An owner turns it on in Settings → Company. Claude can only reach companies where AI is on.
- The Professional or Business plan in Nefin. Starter companies show up as locked, with an upgrade link.
Connect with sign-in
We recommend this way for your own machine. There is no token to copy or store: you sign in to Nefin in your browser and Claude Code keeps the session.
Add the server
Run this in your terminal:
claude mcp add --transport http --scope user nefin https://api-books.nefin.app/mcp
--scope user makes Nefin available in every project on this machine. To keep it to one project, leave the flag out.
Sign in
Start claude, type /mcp, choose nefin and pick Authenticate. Your browser opens Nefin.
Allow access
Sign in as usual, including your two-step code. Nefin shows which companies Claude Code will reach and what it can do. The connection is read-only unless you turn on Allow changes. Click Allow access and you go back to the terminal, where /mcp now shows nefin as connected.
The session renews itself while you use it. If you don’t use it for 30 days, run /mcp → Authenticate again.
Try it
Ask in plain language:
- “List my Nefin companies.”
- “Which invoices in Acme Ltd are overdue, and who owes the most?”
- “In Acme Ltd, run the profit and loss for last quarter and compare it with the quarter before.”
- “In Acme Ltd, draft an invoice for Bardhi SHPK: 10 hours of consulting at 45.00, standard VAT.”
- “In Acme Ltd, show me every bill from Bardhi SHPK this year and the total we paid.”
- “Get Nefin's guide for bank statements, then reconcile this statement for Acme Ltd.”
- “Get Nefin's guide for payroll, then show me last month's payroll run in Acme Ltd.”
Start with the company, such as “in Acme Ltd, …”. If you have only one company, Claude picks it for you. If you have several and don’t say which, Claude asks you before it does anything.
Every answer says which company it used and links to the record in Nefin, so you can check it in one click.
Bigger jobs take several steps in a fixed order. Nefin keeps those steps in short guides that Claude reads on demand with the get_guide tool. Nefin tells Claude to fetch one before bank statement, payroll or tax payment work, and you can ask for one yourself. Claude then follows the guide instead of guessing the order. The guides are:
bank_statements: importing a bank statement and reconciling itpayroll: running payrolltax_payments: paying income tax, pension, VAT or a tax debterrors: what to do when Nefin refuses something
For example: “Get Nefin’s guide for bank statements, then reconcile this statement for Acme Ltd.”
Amounts go in and come back as exact decimals, such as "1234.56", so nothing gets rounded along the way.
Share with your team
To set Nefin up for everyone who works in a repository, add it with --scope project. Claude Code writes an .mcp.json file that you can commit:
{
"mcpServers": {
"nefin": {
"type": "http",
"url": "https://api-books.nefin.app/mcp"
}
}
}The file holds only the URL, with no credentials. Each teammate signs in with their own Nefin login and gets their own access, and the audit log shows who did what.
Use a token instead
Where no browser can open, such as CI, a remote box or a scheduled claude -p job, use a personal token.
Create a token
In Nefin, open Account → AI connectors and click Create token. Tokens are read-only unless you turn on Allow changes, and expire after 90 days unless you pick another lifetime. Copy it right away, because Nefin shows it only once.
Add the server with the token
claude mcp add --transport http --scope user nefin https://api-books.nefin.app/mcp \ --header "Authorization: Bearer <your-token>"
In a shared .mcp.json, read the token from an environment variable so it never ends up in the repository:
{
"mcpServers": {
"nefin": {
"type": "http",
"url": "https://api-books.nefin.app/mcp",
"headers": {
"Authorization": "Bearer ${NEFIN_TOKEN}"
}
}
}
}A token has the same access as you. Treat it like a password, give each machine its own, and revoke any you no longer use. The same page has ready-made setup for Cursor, VS Code and Gemini CLI.
What Claude can do
Nefin gives Claude Code 26 tools. Each one works in one company at a time, so name the company in your request. With one company Claude uses it automatically. With several, Claude asks which one you mean.
Read
Never changes anything.| list_companies | See the companies you can work in and your role in each |
| get_guide | Read the step-by-step guide for a bigger job, such as a bank statement or payrolltopic: bank_statements · payroll · tax_payments · errors |
| run_report | Run a financial report, such as profit and loss, balance sheet or agingtype: trial-balance · profit-loss · balance-sheet · aging-receivable · aging-payable · general-ledger · tax-summary · cash-flow · budget-vs-actuals · cash-projection · sales-book · purchase-book |
| search_records | Find a contact, document, item or account by name or number |
| list_contacts | List customers and vendors with what they owe or are owed, or open onetype: customer · vendor |
| list_documents | List invoices and bills, or open one with its lines and paymentsdocType: invoice · bill |
| list_setup | List your accounts, items, VAT rates and stock levelskind: account · item · vat_rate · stock_level |
| list_journals | List journal entries, optionally for a date range or status |
| list_payments | List payments received and paid, including drafts waiting to be connected |
| list_bank_accounts | List your bank accounts with their balances and open statement lines |
| list_bank_transactions | List imported bank statement lines and whether each one is matched |
| get_bank_reconciliation | Check a bank account against its statement and see what explains the difference |
| get_payroll | Read salaries, adjustments, payroll runs and payslips, or calculate a salary |
Create and update drafts
Records and drafts. Nothing reaches the ledger yet.| save_contact | Add a customer or vendor, or update an existing onetype: customer · vendor · both |
| create_setup | Add a ledger account, an item or a VAT ratekind: account · item · vat_rate |
| create_document | Create a draft invoice or billdocType: invoice · bill |
| import_bank_statement | Import bank statement lines for matching; nothing is posted yet |
| set_salary | Set or change how an employee is paid |
Post, correct or delete
Flagged as destructive, so the AI app should confirm with you first.| update_document | Change an invoice or bill; new lines on an activated one reverse and re-post its entrydocType: invoice · bill |
| delete_document | Delete a draft or void invoice or billdocType: invoice · bill |
| activate_document | Finalize a draft invoice or bill and post it to the booksdocType: invoice · bill |
| record_payment | Record a payment received or paid and apply it to invoices or bills |
| manage_journal | Create a manual journal entry as a draft, or post a draft to the books |
| reconcile_bank_lines | Book imported statement lines as payments, transfers, fees or journal entries |
| mark_bank_period_reconciled | Mark a bank account as reconciled up to a statement date and lock that period |
| run_payroll | Create, approve and pay a payroll run, and manage recurring payroll adjustments |
Tools that were renamed
Old names keep working for now, so saved prompts and scripts don’t break. Permissions and allowlist entries belong to a tool’s name, so set them again on the new tool.
- get_contact → list_contacts
- get_document → list_documents
- list_accounts → list_setup
- list_items → list_setup
- list_vat_rates → list_setup
- list_stock_levels → list_setup
- list_draft_payments → list_payments
- create_contact → save_contact
- update_contact → save_contact
- create_account → create_setup
- create_item → create_setup
- create_vat_rate → create_setup
- create_invoice → create_document
- create_bill → create_document
- update_invoice → update_document
- update_bill → update_document
- delete_invoice → delete_document
- delete_bill → delete_document
- send_invoice → activate_document
- receive_bill → activate_document
- create_journal → manage_journal
- post_journal → manage_journal
- connect_draft_payment → record_payment
Staying in control
- Your permissions, nothing more. Claude works as you in each company. If your role can’t post journals, neither can Claude.
- Everything is on the record. Changes appear in the audit log under your name.
- Claude Code asks first. Before it calls a tool you haven’t allowed, Claude Code asks your permission. To stop it asking about lookups, allow only the read tools in
.claude/settings.jsonand keep the ones that create or post things on ask:
{
"permissions": {
"allow": [
"mcp__nefin__list_companies",
"mcp__nefin__get_guide",
"mcp__nefin__run_report",
"mcp__nefin__search_records",
"mcp__nefin__list_contacts",
"mcp__nefin__list_documents",
"mcp__nefin__list_setup",
"mcp__nefin__list_journals",
"mcp__nefin__list_payments",
"mcp__nefin__list_bank_accounts",
"mcp__nefin__list_bank_transactions",
"mcp__nefin__get_bank_reconciliation",
"mcp__nefin__get_payroll"
]
}
}This list allows every read tool. That includes salaries (get_payroll) and bank account details (list_bank_accounts), which Claude Code will then read without asking. If those should still ask, delete the mcp__nefin__get_payroll and mcp__nefin__list_bank_accounts entries. Tools that create, change or post things are not on the list, so Claude Code still asks before using them.
To cut off access, go to Account → AI connectors and click Disconnect next to Claude Code, or Revoke next to a token. It takes effect immediately. To remove the server from Claude Code as well, run claude mcp remove --scope user nefin.
Limits in each AI app
Every AI app has its own limits. This table shows what each one means for Nefin and what to do about it. The app on this page is first.
In Claude Code, server instructions and each tool description are cut at 2 KB. That is why Nefin keeps long workflows out of the tool descriptions and serves them through get_guide instead.
| AI app | Tool names | Long instructions | Signing in | Approving actions | After a change |
|---|---|---|---|---|---|
| Claude Code | No limit to manage for Nefin's tools. | Server instructions and each tool description are cut at 2 KB, so Nefin keeps long workflows behind get_guide. Ask Claude to get the guide before a big job. | Run /mcp, choose nefin and pick Authenticate. Where no browser can open, send a personal token in the Authorization header instead. | Claude Code asks before each tool you have not allowed. Allow the ones you trust in .claude/settings.json. | Run /mcp and reconnect nefin after anything changes. A running session keeps the tool list it started with. |
| Claude apps | Nothing to set. Tool names are capped at 64 characters and every Nefin tool name fits. | Nothing to work around. For a long job, ask Claude to get Nefin's guide first. | Choose Register automatically when you add the connector. Do not pick Use Claude's published identity, which Nefin does not support yet. | Set each Nefin tool to Always allow, Needs approval or Blocked in Customize, Connectors. | Start a new chat after anything changes. Each conversation keeps the tool list it started with. |
| ChatGPT | Nothing to set for Nefin's tools. | Nefin keeps its most important rules in the first 512 characters of its instructions and puts long workflows behind get_guide. Ask ChatGPT to get the guide before a big job. | Choose OAuth and leave the client ID and secret empty, so ChatGPT registers itself with Nefin. | ChatGPT asks you to confirm actions that change data. Nefin marks its read tools as read-only, so lookups run without a prompt. | Refresh the app in ChatGPT's connector settings after anything changes, then start a new chat. |
| Cursor, VS Code, Gemini CLI | Cursor loads about 40 tools across all connected servers and drops the rest. Turn off Nefin tools you don't use, or other servers. VS Code and Gemini CLI have no such cap for Nefin. | Nothing to work around. For a long job, ask the agent to get Nefin's guide first. | Add the server URL and sign in when the app opens Nefin in your browser. A personal token in the headers works in all three. | Each app asks before it runs a tool unless you told it to trust or auto-run that tool. Leave that off for the tools that post. | Toggle the server off and on in Cursor or VS Code, or restart Gemini CLI, after anything changes. |
| Gemini | Gemini Enterprise recommends at most 100 enabled actions per server, well above what Nefin has. | No cut-off is documented. For a long job, ask Gemini to get Nefin's guide first. | Nefin registers the app for you where the console supports it. Where it asks for a client ID and secret, register one with the command in the guide. | The connection is read-only unless you turn on Allow changes when you connect. Check what Gemini proposes before you approve a change. | Disconnect and reconnect Nefin in the app's settings after anything changes. |
Troubleshooting
- /mcp shows nefin as “needs authentication”
- You haven’t signed in yet, or your session lapsed after 30 days without use. Choose nefin → Authenticate.
- The sign-in page says AI features are not enabled
- None of your companies has AI switched on. Ask an owner to turn it on in Settings → Company, then try again.
- Claude says it can’t find a company
- Claude only sees companies where AI is on and where you are an active member. Ask Claude to run
list_companiesto see exactly what it can reach. - Claude asked which company to use
- You belong to more than one company, so Claude asks before it does anything. Name one, for example “in Acme Ltd, …”. With only one company Claude picks it for you.
- Claude Code doesn’t see a tool or uses an old tool name
- A session keeps the tool list it started with. Run
/mcp, choose nefin and reconnect, or start a new session. - A tool I allowed keeps asking for permission
- Allow entries match a tool’s exact name. If the tool was renamed (see the renamed tools), replace the old
mcp__nefin__entry with one for the new name. - A tool call is refused with a permission error
- Your role in that company doesn’t allow the action. The same action would be refused in the app. An owner or admin can change your role.
- Nothing works with a token
- Check that the header is exactly
Authorization: Bearer nef_pat_…and that the token hasn’t been revoked.claude mcp listshows whether the server connects.
Using a different AI app?
The same server works elsewhere. Nefin has a setup guide for Claude apps, ChatGPT, Cursor, VS Code, Gemini CLI and Gemini. See all of them on the integrations page.