Skip to main content
Glama
tylerjharden

odoo-json2

by tylerjharden

odoo-json2

Cursor plugin that exposes Odoo 19 External JSON-2 as two MCP tools. The domain type is a single OdooCall — not one tool per model, and not XML-RPC or JSON-RPC.

OdooCall = { model, method, ids?, context?, params }
POST {ODOO_URL}/json/2/{model}/{method}
Authorization: bearer {ODOO_API_KEY}
X-Odoo-Database: {ODOO_DATABASE}

Tools

Tool

What it does

odoo_call

One JSON-2 call. Named kwargs only.

odoo_version

GET /web/version — connectivity, no API key.

The odoo-json2 skill documents search, search_read, read, create, write, unlink, and search_count, plus the one-transaction-per-call rule.

Related MCP server: odoo-mcp

Requirements

  • Cursor IDE (desktop). Grok Bot cannot load ~/.cursor/plugins/local. Grok Bot plugins are account-wide marketplace connectors, not this local folder.

  • Node.js 18 or newer (global fetch, no npm dependencies).

  • An Odoo 19 database on a Custom pricing plan (the external API is not available on One App Free or Standard).

  • A user API key and the database name.

Install in Cursor IDE

  1. Copy this directory to ~/.cursor/plugins/local/odoo-json2.

  2. Reload the window (Developer: Reload Window).

  3. Open Plugins → Configure and set the variables below.

  4. Confirm the odoo-json2 MCP server and the odoo-json2 skill appear under Customize.

  5. After changing plugin variables, toggle the odoo-json2 MCP server off and on. Reload Window alone does not pick up new env values.

Do not put API keys in this repo. The plugin only declares variable names.

Plugin variables

Declared in .cursor-plugin/plugin.json and substituted into mcp.json:

Variable

Required

Meaning

ODOO_URL

yes

Host or origin. https:// is added if omitted. No path.

ODOO_API_KEY

yes

User API key (see below).

ODOO_DATABASE

yes

Database name. Sent as X-Odoo-Database on every JSON-2 call.

mcp.json launches ./server.mjs as a plugin-relative executable. Cursor's local plugin loader does not expand ${PLUGIN_ROOT} in args.

Mint an API key

In Odoo: Preferences → Account Security → New API Key.

Give the key a description and a duration (maximum three months). The value is shown once — copy it into the Cursor plugin variable. For integrations, Odoo recommends a dedicated bot user with the minimum access rights rather than a personal admin account.

The server sends Authorization: bearer … with a lowercase bearer, matching the Odoo 19 docs.

Example: search_read

This request and result are the deco / company example from the official Odoo 19.0 External JSON-2 documentation (dummy host mycompany.example.com). They are not live data from this plugin.

HTTP (docs):

POST /json/2/res.partner/search_read HTTP/1.1
Host: mycompany.example.com
X-Odoo-Database: mycompany
Authorization: bearer …
Content-Type: application/json; charset=utf-8

{
    "context": { "lang": "en_US" },
    "domain": [
        ["name", "ilike", "%deco%"],
        ["is_company", "=", true]
    ],
    "fields": ["name"]
}

Documented success body:

[{ "id": 25, "name": "Deco Addict" }]

Same call through odoo_call:

{
  "model": "res.partner",
  "method": "search_read",
  "context": { "lang": "en_US" },
  "params": {
    "domain": [
      ["name", "ilike", "%deco%"],
      ["is_company", "=", true]
    ],
    "fields": ["name"]
  }
}

Prefer search_read over search then read. Each JSON-2 request is its own SQL transaction.

Run locally (dev)

export ODOO_URL=https://mycompany.odoo.com
export ODOO_API_KEY=your-key
export ODOO_DATABASE=mycompany
node server.mjs

The process speaks MCP over stdin/stdout (newline-delimited JSON-RPC). Logs go to stderr.

npm run check   # node --check server.mjs
npm test        # stdio initialize + tools/list; mocked odoo_call (no live Odoo)

Tests never use a real API key or a public Odoo instance.

Layout

.cursor-plugin/plugin.json
mcp.json
server.mjs
skills/odoo-json2/SKILL.md
package.json
LICENSE

License

MIT

Available Tools

2 tools
odoo_callA

Call one Odoo 19 External JSON-2 method: POST /json/2/{model}/{method}. Body is named kwargs only (ids, context, plus params). One SQL transaction per call.

ParametersJSON Schema
NameRequiredDescriptionDefault
idsNoRecord ids for record methods (read, write, unlink, …). Omit for @api.model methods.
debugNoIf true, include Odoo error.debug traceback on HTTP errors. Default false.
modelYesTechnical model name, e.g. res.partner
methodYesModel method, e.g. search_read
paramsNoExtra named kwargs for the method: domain, fields, limit, offset, values, … Do not use positional args.
contextNoOdoo context object, e.g. {"lang": "en_US"}

TDQS

A3.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It discloses that it uses named kwargs and runs one SQL transaction per call, but it does not mention potential data mutation, error handling, authentication requirements, or side effects. For a generic method caller, this is a significant gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences with zero fluff. The main action (calling a method) is front-loaded, followed by the key request format and transaction detail. Every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a generic method-call tool with no output schema and no annotations, the description is too sparse. It does not explain the response format, error behavior, or how to construct complex params (e.g., domain, fields). The agent would have to infer too much from the schema alone, which is insufficient for a tool that can invoke arbitrary methods.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. The description adds the note that only named kwargs (ids, context, plus params) are allowed, clarifying the relationship between parameters and going beyond the schema's individual descriptions. This raises the score to 4.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States exactly what it does: calls one Odoo 19 External JSON-2 method via a specific HTTP endpoint. Clear verb+resource, and the sibling odoo_version is obviously different, so no ambiguity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies this is the tool for making method calls, and the only sibling is odoo_version which serves a different purpose. However, it does not explicitly state when not to use this tool or mention alternatives, so it falls short of a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

odoo_versionA

GET {ODOO_URL}/web/version — connectivity check. No API key. Returns { version, version_info }.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It discloses the HTTP method, the lack of API key requirement, and the expected response structure ({ version, version_info }). This is sufficient for a simple connectivity check, though it does not mention error behavior or idempotency, which are minor omissions for a GET endpoint.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, concise sentence that front-loads the endpoint, method, and purpose. Every word adds value, with no extraneous information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter, read-only connectivity check, the description provides the endpoint, authentication requirement, and return fields. With no output schema, this is complete enough for an agent to invoke correctly. The low complexity means no additional context is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There are zero parameters, so the schema already fully covers parameter semantics (100% coverage vacuously). The baseline for 0 parameters is 4, and the description correctly omits any parameter-specific details since none exist.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states a specific verb (GET) and resource ({ODOO_URL}/web/version) with an explicit purpose of connectivity checking. It distinguishes from the sibling tool odoo_call by indicating this is a dedicated version/connectivity endpoint rather than a general call tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for connectivity checks and indicates no API key is needed, which is helpful context. It does not explicitly state when not to use it or name alternatives, but the sibling odoo_call suggests a clear separation of concerns for version checks versus general calls.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 2 tool updatesv0.1.1
    • First observedodoo_call
    • First observedodoo_version

TDQS

A4.1/5.0

Scored across 2 tools

Disambiguation5/5

The two tools are clearly distinct: one is a generic RPC caller for Odoo model methods, and the other is a simple version/connectivity check. There is no overlap or ambiguity between them.

Naming Consistency5/5

Both tool names follow the consistent odoo_ prefix with lowercase snake_case. While one uses a verb (call) and the other a noun (version), the pattern is uniform and predictable.

Tool Count3/5

Only two tools is thin for a server exposing an Odoo API, but the generic odoo_call tool is broad and intentional. This makes it borderline rather than severely under-scoped.

Completeness4/5

The generic odoo_call can invoke any Odoo model method, covering common CRUD and workflows, so there are no fatal dead ends. However, dedicated convenience tools for frequent operations are absent, which is a minor gap.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    Enables AI assistants to interact with Odoo data using natural language to search, read, create, and update records. It acts as a secure bridge between MCP clients and Odoo instances version 17.0 through 19.0.
    11
    Apache 2.0
  • A
    license
    A
    quality
    D
    maintenance
    Enables AI agents to interact with Odoo 19 via JSON-2 API, supporting CRUD operations on Odoo models through MCP tools.
    1
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    Provides tools to interact with Odoo 19's External JSON-2 API, enabling CRUD operations and complex queries on Odoo databases with multi-company support.
    4
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables interaction with Odoo 18 (JSON-RPC API) via MCP, supporting model exploration, CRUD operations, and secure API key authentication.
    Apache 2.0