mcp_odoo_ai
v1.0.0
Published
MCP server for Odoo via ai_odoo_mcp HTTP admin API (/mcp/admin token + ORM)
Maintainers
Readme
mcp_odoo_ai
MCP (stdio) server that talks to Odoo through the ai_odoo_mcp HTTP admin API: token-authenticated POST /mcp/admin and ORM-style calls (search_read, read, read_group, etc.), same idea as the Python external MCP tests.
Requirements: Node.js 18+, and an Odoo instance with ai_odoo_mcp configured and an MCP admin token.
Install
npm install -g mcp_odoo_aiOr use npx (no global install):
npx mcp_odoo_aiThe CLI binary is mcp-odoo-ai (hyphenated).
Configuration
Configure one of these:
| Mode | Environment |
|------|-------------|
| Multi-tenant file | ODOO_AI_COMPANIES_FILE or ODOO_COMPANIES_FILE → path to a JSON array of { "id", "url", "token" } |
| Inline JSON | ODOO_AI_COMPANIES → same JSON array as a string |
| Single instance | ODOO_AI_BASE_URL + ODOO_AI_TOKEN |
Optional:
ODOO_AI_INSECURE_SSL=1— allow staging/self-signed TLS (hostname mismatch).ODOO_AI_TIMEOUT_MS— HTTP timeout (default is handled by the client).ODOO_AI_HTTP_USER_AGENT— custom User-Agent.
Copy odoo_ai_companies.example.json and .env.example as templates; never commit real tokens.
Cursor / Claude Desktop (stdio)
Point the MCP runner at the package entry and pass env (or a .env file next to the working directory, via dotenv):
{
"mcpServers": {
"odoo-ai": {
"command": "npx",
"args": ["mcp_odoo_ai"],
"env": {
"ODOO_AI_COMPANIES_FILE": "/absolute/path/to/odoo_ai_companies.json"
}
}
}
}If you run from a project folder that contains .env, dotenv loads it automatically.
MCP tools
| Tool | Purpose |
|------|---------|
| odoo_ai_list_companies | List configured tenants (id + url only; optional refresh to re-read file). |
| odoo_ai_ping | Connectivity check: search_read one res.partner. |
| odoo_ai_call | Low-level: arbitrary model, method, args, kwargs. |
| odoo_ai_search_read | search_read with domain, fields, limit, offset, order. |
| odoo_ai_search | search → record ids. |
| odoo_ai_read | read ids + optional field list. |
| odoo_ai_read_group | read_group aggregations. |
With multiple tenants, tools accept optional company (the tenant id from your JSON). With a single tenant, omit it.
Development
cd mcp_odoo_ai
npm install
npm startSyntax check (also runs automatically before publish):
npm run prepublishOnlyPublish to npm
Create an npm account and log in:
npm loginBump
versioninpackage.json(semver), then publish:cd mcp_odoo_ai npm publishFor a scoped package name (e.g.
@your-org/mcp-odoo-ai), the first public publish needs:npm publish --access publicWith npm 2FA, you may need a one-time password:
npm publish --otp=123456
Dry-run tarball contents (no upload):
npm pack --dry-runThis package is JavaScript on npm, not Python on PyPI. For PyPI you would use twine upload after building a wheel/sdist; that does not apply here unless you ship a separate Python project.
