odoo_mcp
Enables agents to interact with self-hosted Odoo project tasks, chatter, and timesheets through nine typed tools for viewing, updating, and logging work.
README
Odoo MCP server for OpenCode
This workspace ships a local stdio MCP server (odoo_mcp) that exposes your
self-hosted Odoo project tasks, chatter, and timesheets as nine typed tools an
agent can call directly. The same repository still contains the original
odoo_tasks.py CLI — unchanged behaviorally — which shares the service layer
with the MCP server.
Prerequisites
- Python 3.10+ (workspace developed against 3.12)
- uv on PATH (
pip install uvif missing)
Install everything once:
uv sync
Credentials (environment variables)
| Variable | Purpose | Default |
|---|---|---|
ODOO_URL |
Base URL of your Odoo instance | https://odoo.geosigmoid.group |
ODOO_DB |
Database name | odoo |
ODOO_USERNAME |
Your login email | required |
ODOO_PASSWORD |
Password or external API key | required |
ODOO_URL must be an absolute HTTPS URL so credentials are never sent over
cleartext HTTP.
An API key is strongly recommended over a password (Odoo: Preferences →
Account Security → New API Key): it is revocable and cannot be used for web
login. Copy .env.example to .env, fill it in, and load it into your shell,
or set the variables however you manage secrets. The MCP server and CLI helper
both auto-load a workspace-root .env when it is present; environment
variables already set by OpenCode or the shell take precedence. Never commit
.env.
Interpolation caveat: opencode.json uses {env:VAR} placeholders. If a
variable is missing when OpenCode starts, it becomes an empty string, and
every tool call will fail with a clear error naming the missing variable(s)
(Missing required environment variables: ODOO_USERNAME, ...) instead of
sending bad credentials anywhere. Values are never echoed to logs or results.
Registering with OpenCode
opencode.json in this workspace already contains:
{
"mcp": {
"odoo": {
"type": "local",
"command": ["uv", "run", "python", "-m", "odoo_mcp"],
"environment": { "...": "{env:ODOO_*} placeholders" },
"enabled": true
}
}
}
OpenCode loads config at startup — after changing credentials or this file, quit and restart OpenCode for them to take effect. The server is spawned once per session over stdio; nothing listens on any network port.
Tools
Mutating tools execute immediately by default; every one accepts a
dry_run=true flag that returns a preview without writing anything.
| Tool | What it does |
|---|---|
list_my_tasks |
Tasks assigned to you; filter by project, stage, state, due dates |
get_task |
Full detail of one task (planned/logged hours included) |
update_task |
Set name/description/priority/deadline/hours/state/stage; append_description merges text into the existing description |
post_task_message |
Post to a task's chatter (followers get notified) |
get_task_states |
Valid workflow state codes on this server + which are terminal |
list_stages |
Task stage ids/names for filtering |
list_timesheets |
Your timesheet entries; filter by task or recent days |
create_timesheet |
Log hours on a task (date defaults to today) |
update_timesheet |
Change hours/date/description/task of an entry |
State codes vary per Odoo build — call get_task_states first rather than
guessing; invalid states are rejected with the list of valid ones.
Verifying the install
uv sync # deps resolve
uv run pytest tests -q # protocol + service suites
uv run python -m unittest discover -s tests -v # CLI characterization suite
uv run python odoo_tasks.py --help # legacy CLI still intact
The stdio handshake itself is covered by tests/test_stdio_smoke.py.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。