Skip to main content

MCP server for Odoo SH — exposes ORM metadata, views, modules and logs to Claude Code via XML-RPC

Project description

odoo-sh-mcp

MCP server for Odoo SH that exposes ORM metadata and framework introspection to Claude Code via XML-RPC.

Unlike existing Odoo MCP servers that read business records (customers, invoices), this one reads the framework itself: model fields, view XML, installed modules, and server logs.

What it does

Claude Code (your machine)
       ↓ MCP protocol (stdio)
odoo-sh-mcp (Python, local)
       ↓ XML-RPC
Odoo SH (remote instance)

No SSH. No direct DB access. Only the XML-RPC API Odoo already exposes.

Tools

Tier 1 — ORM introspection

Tool Description
get_model_fields All fields for a model: type, label, required, relation, compute
get_model_info Model metadata: description, modules, inherited models
search_models Find models by partial name or description

Tier 2 — View inspection

Tool Description
get_views Full XML arch of all views (or a specific type) for a model
get_view_by_xmlid Resolve an xmlid and return its full arch
find_field_in_view Find which views contain a field and at which line

Tier 3 — Local scaffold (no Odoo connection)

Tool Description
scaffold_module Create a minimal module skeleton on disk
create_model_file Generate a Python model file inside an existing module
create_view_inheritance Generate an XML view inheritance file

Tier 4 — Module management

Tool Description
list_modules List modules with state and version
install_module Install a module via XML-RPC
upgrade_module Upgrade an installed module via XML-RPC

Tier 5 — Logs

Tool Description
get_server_logs Fetch recent server logs from ir.logging

Installation

# With uv (recommended)
uvx odoo-sh-mcp

# Or with pip
pip install odoo-sh-mcp

Configuration

Single instance

claude mcp add odoo-mycompany \
  --command uvx \
  --args odoo-sh-mcp \
  --env ODOO_URL=https://mycompany.odoo.com \
  --env ODOO_DB=mycompany \
  --env ODOO_API_KEY=your_key_here

Multi-instance (.claude/mcp.json)

{
  "mcpServers": {
    "odoo-company-a": {
      "command": "uvx",
      "args": ["odoo-sh-mcp"],
      "env": {
        "ODOO_URL": "https://company-a.odoo.com",
        "ODOO_DB": "company-a",
        "ODOO_API_KEY": "xxx"
      }
    },
    "odoo-company-b": {
      "command": "uvx",
      "args": ["odoo-sh-mcp"],
      "env": {
        "ODOO_URL": "https://company-b.odoo.com",
        "ODOO_DB": "company-b",
        "ODOO_API_KEY": "yyy"
      }
    }
  }
}

Environment variables

Variable Required Description
ODOO_URL Yes Instance URL, e.g. https://mycompany.odoo.com
ODOO_DB Yes Database name
ODOO_API_KEY Yes* API key (Settings > Technical > API Keys)
ODOO_USERNAME Yes* email address for API key auth
ODOO_PASSWORD No Password if not using API key

*API keys available in Odoo 14+. For older versions use ODOO_USERNAME + ODOO_PASSWORD.

Development

git clone https://github.com/nicoruiz/odoo-sh-mcp
cd odoo-sh-mcp
python3 -m venv .venv && source .venv/bin/activate
pip install -e "." pytest pytest-asyncio
pytest tests/ -v

License

MPL-2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

odoo_sh_mcp-0.2.0.tar.gz (13.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

odoo_sh_mcp-0.2.0-py3-none-any.whl (16.5 kB view details)

Uploaded Python 3

File details

Details for the file odoo_sh_mcp-0.2.0.tar.gz.

File metadata

  • Download URL: odoo_sh_mcp-0.2.0.tar.gz
  • Upload date:
  • Size: 13.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for odoo_sh_mcp-0.2.0.tar.gz
Algorithm Hash digest
SHA256 8e7d877b3a2fed75316192ea5a621a24521f2ff246276d55fd9b3ced02f1c7bf
MD5 c937a1fa0b565082142f71047037df0a
BLAKE2b-256 23d66ff259de15b34529a5dad82068f2220e86339d5955516f65e767f55a22e4

See more details on using hashes here.

Provenance

The following attestation bundles were made for odoo_sh_mcp-0.2.0.tar.gz:

Publisher: release.yml on IamNewInThis/odoo-sh-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file odoo_sh_mcp-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: odoo_sh_mcp-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 16.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for odoo_sh_mcp-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aa0a478d2f74baad55602fd0e6b85be018daf242c076e826ffd543112853d706
MD5 3dec38aa8663c88154e00eba2edbd864
BLAKE2b-256 5c56f7670f1e5f5589fc65567836f72093fbb750b963bd7bf569b924295d991e

See more details on using hashes here.

Provenance

The following attestation bundles were made for odoo_sh_mcp-0.2.0-py3-none-any.whl:

Publisher: release.yml on IamNewInThis/odoo-sh-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page