mcp_odoo_jsonrpc
v1.0.0
Published
MCP server for Odoo via JSON-RPC (authenticate + execute_kw) using RPC API key as password
Maintainers
Readme
mcp_odoo_jsonrpc
MCP (stdio) server that talks to Odoo over JSON-RPC (POST …/jsonrpc) using the same auth style as scripts/test_odoo_jsonrpc_api_key.py: common.authenticate and object.execute_kw with an RPC API key as the password.
Requirements: Node.js 18+, and an Odoo instance where your user can authenticate with an API key (no ai_odoo_mcp HTTP bridge required).
Install
cd mcp_odoo_jsonrpc
npm installGlobal install (optional):
npm install -g .The CLI binary is mcp-odoo-jsonrpc (hyphenated).
Configuration
Configure one of these:
| Mode | Environment |
|------|-------------|
| Multi-tenant file | ODOO_JSONRPC_COMPANIES_FILE → JSON array of { "id", "url", "db", "login", "api_key" } plus optional "io_log_file" (NDJSON audit path per tenant) |
| Inline JSON | ODOO_JSONRPC_COMPANIES → same array as a string |
| Single instance | ODOO_URL + ODOO_DB + ODOO_LOGIN + ODOO_API_KEY (or ODOO_PASSWORD) — same names as the Python smoke test |
Optional:
io_log_file(per company) inodoo_jsonrpc_companies.json— append-only NDJSON log of each MCP tool call:ts,tool,companyId,input,output,error. Relative paths are resolved from the directory of the companies JSON file (same asODOO_JSONRPC_COMPANIES_FILE). Creates parent directories as needed.ODOO_JSONRPC_IO_LOG— fallback log path when a tool has no resolved tenant (e.g.odoo_jsonrpc_list_companies) or for single-tenant env config (ODOO_URL+…) instead ofio_log_file.ODOO_JSONRPC_PATH— default/jsonrpcODOO_INSECURE_SSL— set to1,true, oryesto skip TLS certificate verification (self-signed, private CA, or hostname mismatch; same values asscripts/test_odoo_jsonrpc_api_key.py). Optional alias:ODOO_JSONRPC_INSECURE_SSL(same values).ODOO_JSONRPC_TIMEOUT_MS— HTTP timeout (default 120000)ODOO_JSONRPC_HTTP_USER_AGENT— custom User-Agent
Copy odoo_jsonrpc_companies.example.json and .env.example as templates; never commit real API keys.
Cursor / Claude Desktop (stdio)
{
"mcpServers": {
"odoo-jsonrpc": {
"command": "node",
"args": ["/Users/vm/work/ocip/mcp_odoo_jsonrpc/src/index.js"],
"env": {
"ODOO_JSONRPC_COMPANIES_FILE": "/Users/vm/work/ocip/odoo_jsonrpc_companies.json"
}
}
}
}If the working directory contains a .env, dotenv loads it when the server starts.
MCP tools
| Tool | Purpose |
|------|---------|
| odoo_jsonrpc_list_companies | List tenants (id, url, db only; optional refresh). |
| odoo_jsonrpc_version | common.version (quick connectivity check). |
| odoo_jsonrpc_ping | search_read one res.partner row. |
| odoo_jsonrpc_call | Low-level execute_kw for any model/method. |
| odoo_jsonrpc_search_read | search_read with domain, fields, limit, offset, order. |
| odoo_jsonrpc_search | search → ids. |
| odoo_jsonrpc_read | read ids + optional fields. |
| odoo_jsonrpc_read_group | read_group aggregations. |
With multiple tenants, pass optional company (the tenant id in your JSON). With a single tenant, omit it.
Difference from mcp_odoo_ai
| | mcp_odoo_ai | mcp_odoo_jsonrpc |
|--|-------------|------------------|
| Transport | HTTP POST /mcp/admin + module token | Odoo JSON-RPC + user API key |
| Odoo module | Needs ai_odoo_mcp | Standard RPC (no extra MCP module) |
