Odoo ChatGPT Direct Connector
Provides tools for interacting with Git repositories, including listing, reading, writing files, applying patches, and committing/pushing changes, enabling AI-driven code management on GitHub.
Integration with Odoo ERP, providing tools for module management (install, update), health checks, search-read, and deployment via Odoo.sh including log analysis and error grep.
Click on "Install 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., "@Odoo ChatGPT Direct Connectorcheck git status of my Odoo repository"
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.
Odoo ChatGPT Direct Connector — Full Backend Plan
This package implements the backend-only connector from the final plan:
ChatGPT = AI brain
↓
Custom GPT Actions / lightweight MCP JSON-RPC bridge
↓
FastAPI Odoo Agent Server = tools only
↓
GitHub + Odoo.sh + Odoo RPC + PlaywrightNo Codex, no CLI agent, no backend AI model, and no frontend UI are required. ChatGPT writes and reasons about code; this server performs the allowed operations.
Implemented components
Core API
GET /healthGET /openapi.jsonGET /docsGET /tools/listPOST /tools/callPOST /mcp
Self verification and workflow
POST /qa/self-runGET /workflow/capability-checkPOST /workflow/full-verify
Repository tools
POST /repo/listPOST /repo/readPOST /repo/writePOST /repo/deletePOST /repo/apply-patchPOST /repo/clean-pyc
Git tools
POST /git/statusPOST /git/current-branchPOST /git/diffPOST /git/commitPOST /git/push
/git/push defaults to the current branch and pushes HEAD:<current_branch> to avoid wrong-branch pushes. Protected branches such as main, master, production, prod, and live always require a real single-use git.push approval, even if global approval mode is disabled.
Odoo.sh tools
POST /odoosh/healthPOST /odoosh/git-statusPOST /odoosh/logPOST /odoosh/grep-errorsPOST /odoosh/module-update
Odoo.sh deployment is normally triggered by GitHub push. The Odoo.sh tools verify and troubleshoot the build through SSH/logs.
Odoo RPC tools
POST /odoo/healthPOST /odoo/module-statusPOST /odoo/module-installPOST /odoo/module-updatePOST /odoo/search-read
Browser / Playwright tools
POST /browser/screenshot
Captures an Odoo page screenshot and returns console/network errors.
Safety and observability
POST /approvals/requestPOST /approvals/approvePOST /approvals/rejectGET /approvalsGET /jobsGET /jobs/{job_id}GET /jobs/audit/events
Dangerous actions can require approval. Protected branch pushes always require approval regardless of the global setting:
repo.write
repo.delete
repo.apply_patch
repo.clean_pyc
git.commit
git.push
odoo.module_install
odoo.module_update
odoosh.module_updateApproval gating is disabled in this build. Write, commit, push, module update, and safe deploy tools run without approval_id:
ODOO_AGENT_REQUIRE_APPROVAL=false
ODOO_AGENT_APPROVAL_REQUIRED_ACTIONS=
ODOO_AGENT_PROTECTED_BRANCHES=Related MCP server: GitLab MCP Server
Install locally
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\Activate.ps1
pip install -r requirements.txt
cp .env.example .env # Windows: Copy-Item .env.example .env
uvicorn odoo_agent_server.main:app --reload --port 8080Open API docs:
http://localhost:8080/docsDocker
cp .env.example .env
mkdir -p repos
docker compose up --buildMount your Odoo repo under ./repos or change the volume and ODOO_AGENT_ALLOWED_ROOTS.
Playwright setup
For screenshots:
playwright install chromiumOn Linux VPS:
playwright install --with-deps chromiumConnect to ChatGPT
Option A: Custom GPT Actions
Deploy this server with HTTPS and import:
https://your-domain.com/openapi.jsonUse Bearer token auth with ODOO_AGENT_API_TOKEN.
Option B: Lightweight MCP JSON-RPC bridge
Use:
POST /mcpSupported JSON-RPC methods:
initialize
tools/list
tools/call
notifications/initializedExample:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "qa.self_run",
"arguments": {
"project_path": "/workspace/repos/my-odoo-repo",
"module_name": "my_custom_module",
"run_pytest": true,
"include_git_status": true
}
}
}Option C: REST tool-call bridge
Use:
GET /tools/list
POST /tools/callExample:
{
"name": "qa.self_run",
"arguments": {
"project_path": "/workspace/repos/my-odoo-repo",
"module_name": "my_custom_module",
"run_pytest": true,
"include_git_status": true
}
}This package includes both OpenAPI/Actions and a lightweight MCP JSON-RPC bridge. If your ChatGPT workspace requires a specific official remote MCP transport profile, the same service layer can be adapted without changing the Odoo/Git/Odoo.sh tools.
Example full verify
curl -X POST http://localhost:8080/workflow/full-verify \
-H "Authorization: Bearer change-me-to-a-long-random-secret" \
-H "Content-Type: application/json" \
-d '{
"project_path": "/workspace/repos/my-odoo-repo",
"module_name": "my_custom_module",
"run_pytest": true,
"include_git_status": true,
"include_git_diff": true,
"include_odoosh_errors": true,
"include_odoo_module_status": true,
"take_browser_screenshot": true,
"browser_start_path": "/web"
}'Approval-free tool execution
This build removes approval blocking for MCP tools. Do not pass approval_id; tools such as repo.apply_patch, git.commit, git.push, odoo.module_update, odoosh.module_update, and workflow.safe_deploy_module execute directly when the API token and path guardrails allow the request.
Production rules
Keep
ODOO_AGENT_ALLOWED_ROOTSstrict.Use staging/development Odoo.sh first.
Keep
ODOO_AGENT_ALLOWED_ROOTSand target branch/repo settings strict because approval gating is disabled.Store GitHub/Odoo.sh SSH keys only on this backend server.
Do not expose Odoo passwords, SSH keys, API keys, or cookies to ChatGPT.
Push only current branch unless a branch is explicitly provided.
Avoid adding production branches to target settings unless you intentionally want direct deploy/push access.
Review
GET /jobs/audit/eventsregularly.
Self-verification included in this build
The package includes tests for:
health/root/OpenAPI readiness
tool registry
capability check
Odoo module static QA
repo read/write/path escape protection
.pyccleanupgit status/diff
Odoo.sh config error handling
Odoo RPC missing config handling
approval blocking and approval consumption
/tools/callbridge/workflow/full-verify
Expected result after packaging:
18 passedHard verification additions
The latest verification pass adds regression coverage for:
invalid auth rejection
symlink/path escape blocking
patch check-only non-mutation
unsafe patch path rejection
single-use approvals
approval-free direct push/deploy execution
runtime tool approval descriptors
/mcp initialize + tools/list + tools/call
failed full-verify job/audit persistenceProtected branches such as main, master, production, prod, and live always require a real approved git.push approval record, even when global approval gating is disabled.
Full MCP conversion
All operational REST APIs are also exposed as MCP-callable tools through POST /mcp using JSON-RPC tools/list and tools/call.
Current MCP tool count: 33.
connector.health
workflow.capability_check
workflow.full_verify
qa.self_run
repo.list
repo.read
repo.write
repo.delete
repo.apply_patch
repo.clean_pyc
git.status
git.current_branch
git.diff
git.commit
git.push
odoosh.health
odoosh.git_status
odoosh.log
odoosh.grep_errors
odoosh.module_update
odoo.health
odoo.module_status
odoo.module_install
odoo.module_update
odoo.search_read
browser.screenshot
approvals.list
approvals.request
approvals.approve
approvals.reject
jobs.list
jobs.get
audit.list/tools/list and MCP tools/list now expose the same operational tool surface. /mcp also returns proper per-tool input schemas generated from the Pydantic request models instead of a generic object schema.
The following REST endpoints are intentionally not exposed as MCP tools because they are protocol/documentation endpoints, not operational tools:
/docs
/redoc
/openapi.json
/tools/list
/tools/call
/mcpUse MCP tools/list instead of /tools/list, and MCP tools/call instead of /tools/call when connecting ChatGPT through MCP.
ChatGPT Custom MCP App OAuth upgrade
This package now supports the OAuth 2.1 / PKCE flow required by ChatGPT custom MCP Apps, in addition to the legacy Bearer token used by Custom GPT Actions.
New OAuth/MCP endpoints
/.well-known/oauth-protected-resource
/.well-known/oauth-protected-resource/mcp
/.well-known/oauth-authorization-server
/.well-known/openid-configuration
/oauth/register
/oauth/authorize
/oauth/token
/mcpRecommended ChatGPT MCP setup
Keep the connector running behind HTTPS, for example with Cloudflare Tunnel:
cloudflared tunnel --url http://localhost:8080Set the public base URL in
.envso discovery metadata is stable:
ODOO_AGENT_PUBLIC_BASE_URL=https://your-current-tunnel.trycloudflare.comKeep OAuth manual approval enabled for public tunnels:
ODOO_AGENT_OAUTH_AUTO_APPROVE=falseRestart the FastAPI server after changing
.env.In ChatGPT custom MCP app setup, use:
MCP URL: https://your-current-tunnel.trycloudflare.com/mcp
Authentication: OAuth
Registration method: Dynamic Client RegistrationThe connector advertises /oauth/register, /oauth/authorize, and /oauth/token. During authorization, the browser will show a small consent form. Paste your ODOO_AGENT_API_TOKEN into that form to approve ChatGPT. The connector then issues short-lived OAuth access tokens and refresh tokens for ChatGPT.
Static OAuth client fallback
If ChatGPT asks for a user-defined OAuth client, use:
ODOO_AGENT_OAUTH_STATIC_CLIENT_ID=odoo-agent-chatgpt
ODOO_AGENT_OAUTH_STATIC_CLIENT_SECRET=Then enter this client ID in ChatGPT. Leave client secret empty unless you explicitly set ODOO_AGENT_OAUTH_STATIC_CLIENT_SECRET.
Security notes
The old
Authorization: Bearer ODOO_AGENT_API_TOKENstill works for REST/OpenAPI Actions.OAuth access tokens also work for
/mcp,/tools/list, and protected APIs.WWW-Authenticatenow advertises protected-resource metadata when an unauthenticated MCP request is made.Approval gating is disabled; write tools like
git.push,repo.apply_patch, and module updates execute directly after authentication.Rotate
ODOO_AGENT_API_TOKENif it was pasted anywhere public.
Safe Odoo.sh deployment workflow
For code-changing work, prefer workflow.safe_deploy_module instead of manually chaining patch, commit, push, and module update tools. The workflow enforces the safe order:
validate the repo and module path;
optionally run module QA;
configure repo-local Git author identity from
GIT_AUTHOR_NAME/GIT_AUTHOR_EMAIL;validate
TARGET_GIT_REPOandTARGET_GIT_BRANCHbefore push;commit and push the selected paths;
wait until Odoo.sh
~/src/userreaches the pushed SHA;verify the deployed module manifest exists and has
installable: True;run
odoo-bin -uwith an explicit addons path that includes/home/odoo/src/user;classify Odoo logs as failed when they contain patterns such as
not installable,inconsistent states,Traceback,ParseError, orImportError.
Recommended production variables:
TARGET_GIT_REPO=git@github.com:Abdul0000/test_18.git
TARGET_GIT_BRANCH=test_stagging_18
TARGET_PROJECT_PATH=/workspace/repos/test_18
GIT_AUTHOR_NAME=Odoo MCP Agent
GIT_AUTHOR_EMAIL=odoo-mcp@example.local
ODOOSH_ODOO_PATH=/home/odoo/src/odoo
ODOOSH_USER_ADDONS_PATH=/home/odoo/src/user
ODOOSH_WAIT_TIMEOUT_SECONDS=600
ODOOSH_WAIT_INTERVAL_SECONDS=10Repo-first ChatGPT/MCP coding workflow
For every coding task, ChatGPT should start with the repository tools, not with Odoo database reads:
repo.prepare → repo.list_custom_modules → repo.read → repo.apply_patch → git.diff → qa.self_run → git.commit → git.push → odoosh.wait_for_commit → odoosh.module_updateNew MCP/REST tools:
repo.prepare: clones the target repo if missing, otherwise runsgit fetch,git checkout <branch>, andgit pull --ff-only origin <branch>. Defaults come fromTARGET_GIT_REPO,TARGET_GIT_BRANCH,TARGET_PROJECT_PATH, andWORKSPACE_ROOT.repo.list_custom_modules: scans the checkout for Odoo custom modules using__manifest__.py, instead of relying only on installed modules in Odoo.workflow.coding_task_plan: returns the canonical ordered tool plan and guardrails for ChatGPT before patching code.
Recommended environment:
WORKSPACE_ROOT=/workspace/repos
TARGET_GIT_REPO=git@github.com:Abdul0000/test_18.git
TARGET_GIT_BRANCH=test_stagging_18
TARGET_PROJECT_PATH=/workspace/repos/test_18
GIT_SSH_KEY_PATH=/tmp/keys/github_keyFor SSH GitHub repos, either set GIT_SSH_COMMAND yourself or set GIT_SSH_KEY_PATH; repo.prepare will build a safe GIT_SSH_COMMAND using that key.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Abdul0000/odoo-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server