Skip to content

Request for a 15.0 branch to backport ai_tool and ai_oca_mcp #114

Description

@ffiedl

Request

Could a 15.0 branch be created in this repository, so that ai_tool and
ai_oca_mcp can be backported to Odoo 15.0?

There is currently no branch older than 16.0 here, so there is no target a
pull request could be opened against.

Motivation

A number of Odoo 15.0 installations are still in production and maintained, and
the MCP server is exactly the kind of module that is needed there: it lets an
external assistant read data through a standard protocol, with per client keys
and without any custom integration. The two modules are also the least coupled
ones in this repository, which makes them a realistic backport.

What is already prepared

The work is done and tested against Odoo 15.0. It is split into three branches
on a fork, so the migration can be reviewed on its own:

  1. 15.0-mig-ai_oca_mcp
    the backport itself, without any new feature. All 16 existing tests pass on
    Odoo 15.0.
  2. 15.0-imp-ai_tool
    read-only tools to search and read records, and tool input schemas that
    reject undeclared arguments.
  3. 15.0-imp-ai_oca_mcp-security
    hardening of the endpoint and of the access keys, with 26 additional tests.
    42 tests pass in total.

Every branch was installed and tested on its own in a clean database, and
pre-commit run --all-files passes on all of them.

The branch preparation follows the usual convention: the whole tree is kept and
the addons that are not backported are marked as not installable, so that they
can be migrated one by one later. Only ai_tool and ai_oca_mcp are
installable.

Notable differences on Odoo 15.0

  • Odoo 15 chooses the request class from the Content-Type header before a
    route is matched, so a JSON body is always handled as a JSON-RPC call and the
    /mcp/<key> route could never be reached. A small adapter restores the plain
    HTTP request for that route only, in the same way base_rest does it on this
    series.
  • request.make_json_response() does not exist yet, so the controller builds
    its JSON responses itself.

Offer

I am willing to maintain the backported modules on the 15.0 branch and to keep
them in sync with the changes made on 16.0.

Happy to adapt the split of the pull requests, or to drop the two improvement
branches from the initial submission, if that is preferred.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions