Monynha Odoo MCP
Security-focused MCP gateway for authorized Odoo read operations plus policy-gated create/update.
Get server/backend info and list or test accessible Odoo connections.
Discover Odoo models and read their accessible field definitions.
Read records by ID, search/filter with Odoo domains, page/order results, count matches, and fetch grouped aggregates.
Create or update records only when server-wide writes and per-connection policy grants allow it; deletion and nested relational writes are not supported.
Operate over authenticated HTTP/OIDC or local stdio with tenant policies, audit, rate/concurrency limits, and response-size controls.
Provides tools for interacting with Odoo 19 through its JSON-2 API, including connection checks, model and field discovery, record reading, search, count, grouping, controlled creation, and update operations, with per-model grants and audit controls.
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., "@Monynha Odoo MCP Show me the fields on the res.partner model in my Odoo connection"
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.
Monynha Odoo MCP
An original, open-source and security-focused MCP gateway for Odoo, built in Python for the Monynha Softwares ecosystem. v0.1 alpha; review required before production use.
The gateway serves MCP over authenticated Streamable HTTP and local stdio,
with an Odoo 19 JSON-2 adapter and explicit policies for multiple instances.
What works
11 MCP tools: server info, connection listing/checks, model and field discovery, record reading/search/counting/grouping, controlled creation and update.
Odoo 19 JSON-2 API with bearer API key, database header, typed/redacted errors and no automatic write retries. Large responses are stopped while streaming.
PostgreSQL tenant metadata, memberships, per-model operation grants, audit, versioned migration and administrative CLI.
OAuth protected resource metadata, remote OIDC/JWKS verification, optional Supabase OAuth 2.1 client/identity admission, and
stdio.Public-destination validation and DNS-pinned outbound HTTPS.
Compact default record fields, request/concurrency budgets, blocked nested x2many write commands and write-intent audit events.
Not yet available: XML-RPC legacy compatibility, generic public methods, record deletion, business wizards, attachments, multi-step workflows, billing or web UI. The external JSON-2 API requires a compatible Odoo installation/plan.
Related MCP server: Odoo 18 MCP Server
Prerequisites
Python 3.12+,
uv, PostgreSQL for remotely hosted environments.An external OIDC provider issuing RS256/ES256 tokens with an audience equal to the MCP resource URL. Generic OIDC mode also requires
mcp:odooscope. Supabase OAuth mode requires a top-level OAuthclient_id, the signed user roleauthenticated(neverservice_roleoranon), a dedicated MCP-bound audience, and private Monynha onboarding.A dedicated low-privilege Odoo technical user and API key, stored in a deployment secret manager.
Local development and tests
uv sync --locked --extra dev
uv run --locked ruff check .
uv run --locked ruff format --check src tests
uv run --locked mypy --ignore-missing-imports src/monynha_odoo_mcp
uv run --locked pytest -qCI uses only mock Odoo calls. No production credentials are needed.
Local stdio
Configure the environment in your shell or secret manager (never commit real values):
export MONYNHA_MCP_MODE=stdio
export MONYNHA_MCP_LOCAL_PRINCIPAL_ID=local-developer
export MONYNHA_MCP_LOCAL_CONNECTION_ID=my-odoo
export MONYNHA_MCP_LOCAL_ODOO_URL=https://odoo.example.com
export MONYNHA_MCP_LOCAL_SECRET_REF=env:MONYNHA_ODOO_KEY_LOCAL
export MONYNHA_ODOO_KEY_LOCAL=replace-with-a-secret-from-your-vault
uv run --locked monynha-odoo-mcpThis local profile starts read-only and uses the same validated Odoo client.
Your MCP host can launch the command via stdio.
Remote HTTP gateway
The public URL must be the full HTTPS resource path, for example
https://mcp.example.com/mcp. Supply these environment variables:
Variable | Meaning |
| Enable remote transport |
| PostgreSQL SQLAlchemy URL; secret-managed |
| Public HTTPS MCP resource URL |
| Trusted external OIDC issuer |
| Must equal public URL |
| Issuer's HTTPS signing keys |
|
|
| In Supabase mode, a required JSON list of pre-registered OAuth client IDs (e.g., |
|
|
| Interface behind reverse proxy, normally |
| Optional JSON array of trusted browser HTTPS origins |
| Maximum Odoo response, default 2 MiB |
| Per principal/connection/operation budget, default 60 |
| Per-connection in-process limit, default 4 |
| Secret value referenced by each connection |
Before the first launch, run migrations with the same database URL:
uv run --locked alembic upgrade headCreate an organization, principal, membership, connection and read grant from an administrative shell:
uv run --locked monynha-odoo-admin organization add --id my-org
uv run --locked monynha-odoo-admin principal add --id oidc-subject
uv run --locked monynha-odoo-admin membership grant --principal oidc-subject --org my-org
uv run --locked monynha-odoo-admin connection add --id my-odoo --org my-org --url https://odoo.example.com --secret-ref env:MONYNHA_ODOO_KEY_LOCAL
uv run --locked monynha-odoo-admin policy grant --principal oidc-subject --connection my-odoo --operation read --model res.partner
uv run --locked monynha-odoo-admin connection test --id my-odoo --principal oidc-subjectThe CLI stores a reference to the API key. Supply its value separately
through an approved secret source. In generic OIDC mode, the token subject
must match the registered principal. In Supabase OAuth mode, authenticate
using the OAuth server but explicitly bind a verified (issuer, subject) to
the existing private principal, then admit the OAuth client separately:
uv run --locked monynha-odoo-admin principal add --id my-internal-principal
uv run --locked monynha-odoo-admin identity bind --principal my-internal-principal --issuer https://identity.example.com/auth/v1 --subject external-user-uuid
uv run --locked monynha-odoo-admin oauth-client admit --id approved-client-uuid
# Revoke without changing FACODI users or OAuth credentials:
uv run --locked monynha-odoo-admin oauth-client revoke --id approved-client-uuidThese commands update only Monynha's private metadata PostgreSQL. They do
not create FACODI OAuth clients, change Supabase Auth, or grant access to any
organization/connection automatically. Also grant explicit Monynha memberships
and read policies to that internal principal. Unknown external identities
and unadmitted/revoked clients are rejected even with valid signed tokens.
Every Supabase-mode Odoo access audit includes the verified OAuth client_id
and private Monynha principal, never the external user token or subject.
All create/update tools are disabled at the server boundary by default.
Enabling writes requires MONYNHA_MCP_WRITES_ENABLED=true, an explicit
Monynha policy grant, and separate security/deployment review. Deletion and
nested relational write commands remain unavailable. Non-idempotent writes
persist an audit intent before dispatch when explicitly enabled.
If an Odoo write times out, check its records before retrying.
Run the service only behind HTTPS reverse proxy:
uv run --locked monynha-odoo-mcpMCP endpoint:
/mcpOAuth resource metadata:
/.well-known/oauth-protected-resource/mcpLiveness/readiness:
/healthz,/readyz
For a containerized starting point, see Dockerfile and
docker-compose.example.yml. Apply migrations as a separate deployment
step and inject all secrets through Coolify, Vault or your platform's secret
manager. The rate limiter is in-process: run a single application worker or
enforce shared limits at the reverse proxy/API gateway when scaling to multiple
replicas. Configure browser origins only for clients you trust; that setting
does not replace OIDC authentication.
FACODI integration readiness: Supabase OAuth 2.1 discovery was not available at the documented public URL during the read-only probe on 2026-10-27 (HTTP 404), although JWKS/OIDC discovery responded. The gateway's Supabase mode is implemented and locally tested using synthetic keys, but not end-to-end activated against the live FACODI project. Review the compatibility report and rollout checklist. OAuth Server enablement, a client, consent UI, resource-bound token hook, staging selection and rollout require separate approval. Coolify deployment proposals in PR #3 remain independent of this implementation branch.
For Coolify production deployment, use docker-compose.coolify.yml
instead of the integrated database example. It runs Alembic before starting,
expects a separately managed private PostgreSQL database and delegates HTTPS
domain routing to Coolify without publishing a host port. Follow the
Coolify deployment guide before deploying.
Architecture, limits and security
This project is an independent behavioral implementation. It does not use private code from third-party MCP services.
Available Tools
11 toolsconnection_listB
List connections accessible to the authenticated client.
Inputs: no named parameters.
connection_testC
Check connectivity to an authorized Odoo instance.
Inputs: connection_id (required).
model_fields_getC
Read accessible field definitions of one model.
Inputs: model (required), connection_id (required).
model_listC
Find Odoo models available to this connection.
Inputs: connection_id (required), limit, domain.
record_aggregateC
Read grouped aggregates via the Odoo ORM.
Inputs: model (required), domain (required), fields (required), groupby (required), +3 more.
record_countC
Count Odoo records matching a domain.
Inputs: model (required), connection_id (required), domain.
record_createC
Create a record only when the connection policy allows it.
Inputs: model (required), values (required), connection_id (required).
record_getC
Read selected Odoo record IDs.
Inputs: ids (required), model (required), connection_id (required), fields.
record_searchC
Search records by Odoo domain and page through the results.
Inputs: model (required), connection_id (required), limit, order, +3 more.
record_updateC
Update records only when the connection policy allows it.
Inputs: ids (required), model (required), values (required), connection_id (required).
server_info_getA
Show supported backend and version.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
Each tool targets a distinct Odoo operation: connection lifecycle, model introspection, or a specific record operation (create, update, get, search, count, aggregate). The record-oriented tools share a resource but have clearly separated semantics and input shapes, so an agent should not misselect. No two tools appear interchangeable.
All 11 tools follow a consistent noun_verb pattern (record_create, model_list, connection_test, server_info_get). Compound nouns like server_info and model_fields are handled predictably, with no mixing of camelCase, vague verbs, or inconsistent ordering.
Eleven tools is well-scoped for a generic Odoo MCP server covering connection checks, schema introspection, and core record operations. Each tool earns its place without obvious redundancy or filler.
The surface covers create, update, read, search, count, and aggregate, but there is no record_delete or bulk operation, leaving a notable gap in the CRUD lifecycle. Connection creation and model-level schema mutations are also absent, though those may be intentionally out of scope.
Related MCP Connectors
Odoo MCP Pack — ERP/CRM via Odoo's external JSON-RPC API.
Odoo virtual employee via MCP: query, create, modify records, workflows, PDFs, and activities.
Hosted MCP server for AI-driven data ops. Create apps, manage schemas, and CRUD structured data.
Query, browse, and automate OmegaAI workspaces from any MCP client. Streamable HTTP with OAuth 2.0.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables 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.11Apache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables interaction with Odoo 18 (JSON-RPC API) via MCP, supporting model exploration, CRUD operations, and secure API key authentication.Apache 2.0
- AlicenseNot gradedqualityCmaintenanceEnables interacting with Odoo ERP through a stateless HTTP MCP server, providing CRUD and execution tools via JSON-RPC.MIT
- AlicenseAqualityBmaintenanceEnables interaction with Odoo 19 databases through the External JSON-2 API, allowing model operations such as search, read, create, write, and unlink via MCP tools.2MIT