MCP Odoo
Provides API endpoints for querying Odoo ERP data via XML-RPC, including leads (crm.lead), customers (res.partner), and activities (mail.activity) with support for filtering, pagination, and custom field selection.
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., "@MCP Odooshow me the 5 most recent leads"
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.
MCP Odoo — Middleware (TypeScript)
Mục đích
Một MCP (middleware) nhỏ viết bằng TypeScript để kết nối tới Odoo (XML-RPC) và expose API HTTP cho các tác vụ phổ biến:
Truy vấn Lead (crm.lead)
Truy vấn Customer (res.partner)
Truy vấn Activities (mail.activity)
Kiến trúc ngắn gọn
src/odooService.ts: wrapper XML-RPC cho Odoo (authenticate + execute_kw + helpers).src/server.ts: Express API endpoints cho các truy vấn.bin/workers-mcp.CMDvàbin/workers-mcp.js: launcher để gọidist/server.jstheo kiểu mà orchestrator (ví dụ Claude worker runner) yêu cầu.
Yêu cầu
Node.js (>= 18 recommended)
npm
Cấu hình (environment)
Copy file
.env.example->.envrồi điền các giá trị sau:URL_ODOO: URL Odoo (ví dụ https://app.x-or.cloud)
PORT_ODOO: port (thường 443)
DBNAME_ODOO: tên database Odoo
USERNAME_ODOO: username Odoo
PASSWORD_ODOO: password Odoo
MCP_PORT: (tuỳ chọn) port để server nghe, default 3000
(Tuỳ chọn nếu dùng LLM/Discord) LLM_API_KEY, LLM_MODEL, DISCORD_WEBHOOK_URL
Cài đặt & build
Cài dependency và build TypeScript:
cd "C:\Project\MCP Odoo"
npm install
npm run buildSau khi build sẽ có
dist/server.js.
Chạy server (local/test)
Chạy trực tiếp:
node dist/server.jsHoặc dùng launcher CMD (nếu bạn muốn truyền args theo format orchestrator):
& "C:\Project\MCP Odoo\bin\workers-mcp.CMD" run mcp-demo https://mcp-demo.mcpdemo.workers.dev "C:\Project\MCP Odoo"Chạy production (gợi ý)
Dùng PM2 (cross-platform):
npm install -g pm2
pm2 start dist/server.js --name mcp-odoo -- run mcp-demo https://mcp-demo.mcpdemo.workers.dev "C:\Project\MCP Odoo"
pm2 saveHoặc trên Windows dùng nssm để tạo service chạy node
dist/server.js.
MCP launcher / tích hợp với orchestrator
Trong một số hệ thống, orchestrator sẽ gọi một command kèm args giống ví dụ bạn đưa. Project này cung cấp hai file trong
bin/:workers-mcp.CMD: shim cho Windows, chạydist/server.jsvới các arg.workers-mcp.js: launcher Node.js (UNIX/Windows friendly).
Ví dụ cấu hình orchestrator (JSON):
{
"mcpServers": {
"mcp-demo": {
"command": "C:\\Project\\MCP\\mcp-demo\\bin\\workers-mcp.CMD",
"args": [
"run",
"mcp-demo",
"https://mcp-demo.mcpdemo.workers.dev",
"C:\\Project\\MCP\\mcp-demo"
],
"env": {}
}
}
}Ghi chú: bạn có thể thay đổi command để trỏ trực tiếp tới node dist/server.js nếu thích.
Endpoints hiện có
GET /mcp/leads?limit=10&offset=0
query params: domain (JSON-encoded), fields (JSON-encoded), limit, offset
GET /mcp/customers?limit=10
GET /mcp/activities?limit=10
Ví dụ gọi:
curl "http://localhost:3000/mcp/leads?limit=5"Bảo mật
Không commit
.envhoặc API keys vào git..gitignoređã được thêm.Đặt biến môi trường trên server (System Environment) khi chạy như service.
Troubleshooting
Nếu thiếu
dist/server.js: chạynpm run build.Nếu lỗi kết nối Odoo: kiểm tra
URL_ODOO,DBNAME_ODOO, username/password, và network/firewall.Nếu orchestrator không tìm thấy
workers-mcp.CMD: sửacommandtrỏ tớibin\\workers-mcp.CMDtrong repo hoặc copy shim vàonode_modules\\.bin.
Các việc tiếp theo (gợi ý)
Thêm endpoint health
/mcp/healthđể orchestrator kiểm tra trạng thái.Thêm caching cho uid Odoo để tránh authenticate mỗi lần gọi.
Thêm adapter LLM (OpenAI/Claude) nếu muốn xử lý văn bản/tóm tắt; hoặc tích hợp Discord webhook (đã có code mẫu trước đó nếu bạn cần tôi phục hồi).
Liên hệ
Nếu muốn tôi thêm
/mcp/healthvà đọc args từ launcher (MCP name / public URL / root), nói "thêm health"; tôi sẽ cập nhật và build.
MCP Odoo TypeScript Client
Simple TypeScript wrapper to query Leads, Customers, and Activities from an Odoo instance via XML-RPC.
Usage:
Copy
.env.exampleto.envand fill values.npm install
npm run build
npm start
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.
Related MCP Servers
- AlicenseAqualityDmaintenanceA TypeScript server that acts as a bridge to the Strava API, enabling LLMs to access users' activities, routes, segments, and athlete data through natural language interaction.Last updated24262464MIT
- Alicense-qualityCmaintenanceA TypeScript implementation of a Model Context Protocol server that enables LLMs to interact with Salesforce data through SOQL queries, SOSL searches, and CRUD operations.Last updated2MIT
- -license-quality-maintenanceEnables AI assistants to interact with Odoo ERP systems through natural language to search records, create entries, update data, and manage business operations. Supports secure authentication and configurable access controls for production environments.Last updated
- Alicense-qualityCmaintenanceEnables AI assistants to interact with Odoo ERP systems through natural language, allowing users to search, create, update, and manage business records like customers, products, and invoices across any Odoo instance.Last updated1Mozilla Public 2.0
Related MCP Connectors
LeadConnector / GoHighLevel MCP Pack — wraps the GoHighLevel CRM for AI agents.
Self-hosted MCP gateway: turn any API, database or MCP server into AI connectors — no code.
Managed LinkedIn MCP server for AI agents: search, connect, message and enrich on accounts you own.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/TungND2k2/MCP-Odoo'
If you have feedback or need assistance with the MCP directory API, please join our Discord server