odoo-bookkeeping-mcp
This MCP server provides an LLM agent with full read/write access to an Odoo instance's accounting and optional project budget data via Odoo's standard XML-RPC API, without requiring any Odoo module installation.
Generic CRUD: Search, read, create, update, delete (if enabled), and call any method on any Odoo model using
odoo_search_read,odoo_fields_get,odoo_create,odoo_write,odoo_unlink, andodoo_call_method.Accounting: Create, update, post, and reverse customer invoices, vendor bills, and journal entries; register payments; reconcile lines; and search unreconciled items.
Financial Reporting: Generate profit & loss, balance sheet, trial balance, general ledger, and aged receivable/payable reports from posted data.
BOQ/Project Budget (if
project_budget_boq_sunderlandis installed): Manage budgets and BOQ lines (create, update), control workflow states (submit, approve, activate), and view budget vs. actual summaries.Safety & Connectivity: Safety valves via environment variables control deletion (disabled by default), posting, and reconciliation (enabled by default). Runs over stdio or HTTP with bearer token authentication.
Provides full read/write access to an Odoo accounting instance, including invoices, vendor bills, journal entries, payments, reconciliation, and financial reports, as well as BOQ/Project Budget data when the corresponding addon is installed.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@odoo-bookkeeping-mcp What are the outstanding vendor bills as of today?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
odoo-bookkeeping-mcp
An MCP (Model Context Protocol) server that gives an LLM agent -- Claude,
ChatGPT, or any other MCP-compatible client -- full read/write access to one
Odoo instance's accounting (invoices, vendor bills, journal entries,
payments, reconciliation, P&L/balance sheet/aged reports) and, if the
instance has the project_budget_boq_sunderland addon installed, its
BOQ/Project Budget data.
It is not an Odoo addon. It talks to Odoo the same way any external
integration does: Odoo's standard /xmlrpc/2/* API, authenticated as a
normal Odoo user via an API key. No code needs to be installed on the Odoo
server.
⚠️ Read this before pointing it at a real database
This server was built with no restrictions by explicit request: every tool that can create, edit, post, or reconcile a real accounting record will do so immediately when called, with no draft/review/approval gate and no human-in-the-loop step. That is a deliberate choice, not an oversight -- but it means:
A wrong or hallucinated tool call becomes a real entry in your books. A posted journal entry cannot be edited or un-posted -- correcting it needs a reversal or credit note (this server can do that too, but the original mistake still shows up in every report until it's reversed).
Whoever/whatever can reach this server can act as its Odoo user. Give it a dedicated Odoo user (not an admin's personal login) scoped to exactly the access rights, companies, and record rules you want an agent to have -- Odoo's own security model is still the only thing standing between "the agent read this wrong" and "the books are wrong."
Deletion (
odoo_unlink) is the one thing still off by default -- seeODOO_MCP_ALLOW_UNLINKbelow. Everything else (create/write/post/ reconcile) is on by default per the request that led to this server.Treat the
.envfile / API key like a production database password, because functionally it is one.
Related MCP server: odoo-mcp-server
What's inside
src/odoo_mcp/
client.py Odoo XML-RPC wrapper (auth, generic CRUD, error mapping)
config.py Reads connection + safety-valve settings from the environment
server.py MCP server entrypoint; registers every tool module below;
dispatches to stdio or HTTP transport
http_auth.py Bearer-token ASGI middleware, used only in HTTP transport
tools/
generic.py odoo_search_read / odoo_create / odoo_write / odoo_unlink /
odoo_call_method / odoo_fields_get -- works against ANY
model, the "no restrictions" escape hatch every other
tool module is really just a friendlier wrapper over.
accounting.py Customer invoices, vendor bills, journal entries,
posting, reversal, payment registration, reconciliation.
reports.py P&L, balance sheet, trial balance, general ledger,
aged receivable/payable -- computed from posted
account.move.line data (not Odoo's PDF report engine).
boq.py project.budget / project.budget.line: list/get budgets,
create/update BOQ lines, submit/approve/activate
workflow, budget-vs-actual. Only useful if your Odoo
instance has project_budget_boq_sunderland installed;
otherwise fall back to the generic tools for whatever
budgeting model it does have.
tests/ Unit tests against a mocked XML-RPC server (no live Odoo
instance is available while building this) -- verify
request shaping, auth caching, and error handling. They do
NOT prove your specific Odoo instance/version behaves
identically; test against a real (ideally staging) database
before trusting this in production.Setup
python3 -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
cp .env.example .env
# edit .env with your real Odoo URL / DB / username / API key
python -m pytest tests/ -vGetting an Odoo API key
In Odoo: click your avatar → My Profile → Account Security → New API Key. Do this for the dedicated integration user you created for this server, not your own login.
Environment variables
See .env.example for the full list with comments. Required:
ODOO_URL, ODOO_DB, ODOO_USERNAME, ODOO_API_KEY.
Safety valves (optional, all env-var controlled so you never need to edit code to change them):
Variable | Default | Gates |
|
|
|
|
| posting invoices/journal entries, registering payments |
|
|
|
Transport (optional):
Variable | Default | Notes |
|
|
|
| (none) | required when |
|
| HTTP bind address |
|
| HTTP bind port |
Connecting it to Claude
Claude Desktop / Claude Code -- add to your MCP config
(claude_desktop_config.json or the CLI's .mcp.json):
{
"mcpServers": {
"odoo-bookkeeping": {
"command": "odoo-mcp",
"env": {
"ODOO_URL": "https://your-instance.odoo.com",
"ODOO_DB": "your-db",
"ODOO_USERNAME": "mcp-integration@yourcompany.com",
"ODOO_API_KEY": "your-api-key"
}
}
}
}(Run pip install -e . first so the odoo-mcp command exists on PATH, or
use the full path to python -m odoo_mcp.server instead of odoo-mcp.)
Running it on a server (HTTP transport, for ChatGPT or remote access)
ChatGPT's MCP/connector support (and any remote Claude session) needs a server reachable over HTTP, not a local stdio process. Set the transport and a bearer token, then run it:
export ODOO_MCP_TRANSPORT=http
export ODOO_MCP_BEARER_TOKEN=$(python3 -c "import secrets; print(secrets.token_urlsafe(32))")
echo "Save this token -- callers must send it as: Authorization: Bearer $ODOO_MCP_BEARER_TOKEN"
odoo-mcp
# or: python -m odoo_mcp.serverThis serves POST /mcp (streamable-HTTP) on ODOO_MCP_HOST:ODOO_MCP_PORT
(default 127.0.0.1:8000), gated by a self-contained ASGI middleware
(http_auth.py) that rejects any request without an exact
Authorization: Bearer <token> match -- the server refuses to start
over HTTP at all if ODOO_MCP_BEARER_TOKEN is unset, since this server
has no other access control of its own.
Before pointing a real client at it:
Keep the bind address at
127.0.0.1and put a reverse proxy (nginx, Caddy, Cloudflare Tunnel) in front for TLS + a real domain -- this process speaks plain HTTP and does not terminate TLS itself.The bearer token is the entire network-facing security boundary here (Odoo's own access rights are the boundary behind it). Rotate it if it ever leaks, and don't put it in a URL, query string, or client-side code -- header only.
Configure your MCP client (ChatGPT connector settings, or a remote Claude MCP config) to call
https://your-domain/mcpwith that bearer token as its auth header.
What is NOT here
No Odoo module/addon changes -- this only uses Odoo's existing external API, so it works against any reasonably recent Odoo version without touching the target instance at all.
No real Odoo test run -- this development environment has no reachable Odoo/Postgres instance. Everything above
tests/is verified with a mocked XML-RPC backend (request shaping, auth, error handling) and a live tool-registration smoke test against the actual MCP server object; none of it has been exercised against a real database. Test against a staging Odoo database before pointing this at production.No UI, no scheduling, no webhook listener -- it only responds to tool calls a connected MCP client makes.
Available Tools
34 toolsactivate_budgetA
Activate an approved budget so it can receive real transactions (action_activate).
Inputs: budget_id (required).
aged_payableA
Aged payable: open vendor bill balances, bucketed by days overdue as of a date.
Inputs: as_of_date (required), partner_id.
aged_receivableB
Aged receivable: open customer invoice balances, bucketed by days overdue as of a date.
Inputs: as_of_date (required), partner_id.
approve_budgetC
Approve a submitted budget (action_approve).
Inputs: budget_id (required).
balance_sheetA
Balance Sheet (assets / liabilities / equity) as of a date, from posted journal items only, computed as cumulative balances from the earliest entry up to as_of_date.
Inputs: as_of_date (required), company_id.
budget_vs_actualA
Budget-vs-actual summary for one budget: per line and totals for planned cost, actual cost, effective ETC, forecast EAC and available budget -- all read straight from Odoo's own computed fields, never recalculated here.
Inputs: budget_id (required).
create_budget_lineA
Add a new BOQ line to a budget. Either give planned_qty + planned_unit_cost, or set is_lump_sum=True with planned_total_cost.
Inputs: name (required), budget_id (required), section_id (required), cost_category_id (required), +10 more.
create_invoiceA
Create a DRAFT customer invoice or vendor bill.
move_type: "out_invoice" (customer invoice), "out_refund" (credit note), "in_invoice" (vendor bill), "in_refund" (vendor credit note). lines: list of dicts, each with at least "name" (description), "quantity", "price_unit". Optional per line: "product_id", "account_id", "tax_ids" (list of tax ids), "analytic_distribution" (e.g. {"<analytic_account_id>": 100.0}). Always created in draft -- call post_invoice() to post it once you're satisfied.
Inputs: lines (required), partner_id (required), ref, move_type, +4 more.
create_journal_entryA
Create a DRAFT manual journal entry (move_type='entry').
lines: list of dicts, each with "account_id" and either "debit" or "credit" (or both, defaulting to 0) plus optional "name" (label), "partner_id", "analytic_distribution". Must balance (total debit == total credit) -- Odoo enforces this on post.
Inputs: date (required), lines (required), journal_id (required), ref, +1 more.
general_ledgerA
All posted journal items on one account for a period, in date order, with a running balance.
Inputs: date_to (required), date_from (required), account_id (required).
get_budgetA
Full detail of one budget, including every BOQ line with its planned/actual/ETC/EAC figures -- read directly from Odoo, never recomputed here.
Inputs: budget_id (required).
get_invoiceA
Full detail of one invoice/bill including its lines.
Inputs: move_id (required).
list_budgetsA
List project budgets, optionally filtered by project and/or state (e.g. "draft", "submitted", "approved", "active").
Inputs: limit, state, project_id.
odoo_call_methodA
Call ANY method on an Odoo model -- the universal escape hatch.
Use this for workflow actions the dedicated tools don't wrap yet, e.g. odoo_call_method("account.move", "button_draft", [123]) or odoo_call_method("project.budget", "action_approve", [7]). ids may be empty for @api.model methods that don't act on records.
Inputs: model (required), method (required), ids, args, +1 more.
odoo_createA
Create ONE record on any model. Returns the new record's id.
Example: odoo_create("res.partner", {"name": "Acme LLC"}). For accounting documents prefer the dedicated accounting.* tools (they set up lines/taxes/journals correctly) -- use this for anything they don't cover.
Inputs: model (required), values (required).
odoo_fields_getA
List every field on an Odoo model: type, label, required, readonly, relation target, selection options. Use this before create/write on an unfamiliar model instead of guessing field names.
Inputs: model (required).
odoo_search_readA
Search and read records of ANY Odoo model in one call.
model: technical model name, e.g. "account.move", "res.partner", "project.budget.line". domain: Odoo domain, e.g. [["state", "=", "draft"]]. Empty/omitted matches all records (subject to record rules). fields: field names to return; omit for all fields. limit: max records to return (default 80, use 0 for no limit -- careful on large models). order: e.g. "date desc, id desc".
Inputs: model (required), limit, order, domain, +2 more.
odoo_unlinkA
Permanently delete one or more records. THIS CANNOT BE UNDONE.
Disabled by default (ODOO_MCP_ALLOW_UNLINK=false) because Odoo has no "undo" for a deleted record -- unlike posted accounting entries, which can always be reversed with a credit note / reversal entry. Set ODOO_MCP_ALLOW_UNLINK=true in the server's environment to allow this tool to actually delete anything.
Inputs: ids (required), model (required).
odoo_writeC
Update one or more existing records with the given field values.
Inputs: ids (required), model (required), values (required).
post_invoiceA
Post (confirm) a draft invoice/vendor bill. Irreversible in the sense that a posted move must be reversed/credited, not edited, to correct it afterwards.
Inputs: move_id (required).
post_journal_entryA
Post a draft journal entry. Same irreversibility caveat as post_invoice -- correct a posted entry with a reversal, not a write.
Inputs: move_id (required).
profit_and_lossA
Profit & Loss (income statement) for a date range: income and expense accounts, from posted journal items only.
Inputs: date_to (required), date_from (required), company_id.
reconcile_linesA
Reconcile a set of account.move.line ids against each other (e.g. a payment line against an invoice line). All lines must share the same partner and a reconcilable account.
Inputs: line_ids (required).
register_paymentA
Register a payment against a posted invoice/bill via Odoo's standard account.payment.register wizard model (keeps reconciliation correct -- never write account.payment directly).
Inputs: move_id (required), journal_id (required), amount, payment_date, +1 more.
reverse_journal_entryA
Create and post a reversal of an already-posted move -- the correct way to undo a posted entry (never edit or delete a posted move directly).
Inputs: move_id (required), date, reason.
search_budget_linesA
Search BOQ lines across any budget/project. Example domain: [["category_type", "=", "labor"], ["budget_state", "=", "active"]].
Inputs: limit, domain.
search_invoicesC
Search customer invoices / vendor bills / credit notes. Example domain: [["move_type", "=", "in_invoice"], ["state", "=", "draft"]].
Inputs: limit, domain.
search_journal_entriesB
Search journal entries/invoices/bills of any move_type. Example domain: [["move_type", "=", "entry"], ["date", ">=", "2026-01-01"]].
Inputs: limit, domain.
search_unreconciled_linesA
Find open (unreconciled) receivable/payable move lines, e.g. to match a payment to its invoice.
Inputs: limit, account_id, partner_id.
submit_budgetB
Move a draft budget to Submitted (action_submit).
Inputs: budget_id (required).
trial_balanceB
Trial balance: opening + period debit/credit + closing balance per account, for a period.
Inputs: date_to (required), date_from (required), company_id.
update_budget_lineA
Update any field(s) on a BOQ line: planned_qty, planned_unit_cost, planned_total_cost, etc_mode ("auto"/"manual"), manual_etc, name, section_id, cost_category_id, task_id, work_package_id, etc.
Never write "auto_etc", "effective_etc" or "forecast_cost_at_completion" directly -- they are always computed by Odoo from planned/actual/manual_etc; Odoo will simply ignore or reject an attempt to write them. To move the forecast, set etc_mode="manual" and manual_etc= instead.
Inputs: values (required), line_id (required).
update_invoiceA
Update a draft invoice/bill's header fields and/or replace its lines entirely. Odoo will reject this once the move is posted -- use a reversal/credit note for posted documents instead.
lines, if given, REPLACES all existing lines (same line-dict shape
as create_invoice's lines argument).
Inputs: move_id (required), lines, values.
update_journal_entryA
Update a draft journal entry's header and/or replace its lines
entirely (same line-dict shape as create_journal_entry's lines).
Inputs: move_id (required), lines, values.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 34 tools
The generic odoo_* tools (odoo_create, odoo_search_read, odoo_write) overlap with domain-specific ones like create_invoice, search_invoices, and update_invoice, though descriptions clearly prefer the dedicated tools for accounting. Search tools are distinct per entity, but the broad generic tools introduce ambiguity about which to use.
Naming is a mix of verb_noun patterns (create_invoice, post_invoice), a consistent odoo_ prefix group (odoo_create, odoo_write), and noun-phrase report names (balance_sheet, profit_and_loss). Subgroups are internally consistent, but the overall convention is inconsistent.
With 34 tools, this exceeds the typical well-scoped range of 3-15. The six generic odoo_* tools inflate the count, and the budget/invoice/report tools could be streamlined. It feels heavy for a bookkeeping server.
The toolset covers the full bookkeeping lifecycle: invoices (create/post/search/get/update), journal entries (create/update/post/reverse), payments and reconciliation, financial reports (P&L, balance sheet, trial balance, GL, aged), and budgets (list/get/create/update/approve/activate/vs actual). Minor gaps exist, such as a dedicated tax report, but generic odoo_call_method fills most gaps.
Maintenance
Related MCP Connectors
MCP server for Codat — companies, connections, invoices, bills and financial statements.
MCP server for Flex on the Job: inventory, jobs, customers, invoices, purchasing, sales orders.
Headless API-first double-entry accounting & bookkeeping engine. 84 MCP tools over HTTP.
Hosted MCP connector for QuickBooks Online: records, reports and writes with per-company access
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that bridges Odoo ERP systems with AI agents, enabling them to access and manipulate partner information, accounting data, invoices, and perform financial reconciliation through a standardized interface.MIT
- AlicenseNot gradedqualityCmaintenanceEnables interaction with Odoo ERP systems for product, customer, order, invoice, and payment management using MCP tools.7MIT
- AlicenseNot gradedqualityCmaintenanceAn MCP server that enables AI assistants to interact with Odoo ERP systems, allowing natural language access to business data, CRUD operations, and instance management without requiring Odoo module installation.1MIT
- FlicenseAqualityCmaintenanceMCP server that provides an AI assistant with access to Odoo business data, enabling read operations and human-approved record creation.3-