$ 156.94
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
Discuss (mail)
|
| Lines of code | 2130 |
| Technical Name |
sm_mcp_server |
| License | OPL-1 |
| Website | https://apps.odoo.com/apps/modules/browse?author=Steven Marp |
| Versions | 18.0 19.0 |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
Discuss (mail)
|
| Lines of code | 2130 |
| Technical Name |
sm_mcp_server |
| License | OPL-1 |
| Website | https://apps.odoo.com/apps/modules/browse?author=Steven Marp |
| Versions | 18.0 19.0 |
MCP Server for Odoo
Let AI Read Approved Odoo Data Safely
MCP and REST Endpoints
Expose selected Odoo models through MCP JSON-RPC, connector search and fetch tools, and REST endpoints for search, read, count, and fields.
Secure API Keys
Create token-based access per user, restrict allowed models, allow only selected operations, and keep Odoo ACLs active.
Audit and Monitoring
Track every request, denied call, model operation, session message, response status, and duration from Odoo.
Compatible with MCP-Capable AI Clients
SM MCP Server is built on MCP-style JSON-RPC tools and HTTP endpoints, so it can be connected to AI tools that support custom MCP servers, HTTP tools, or MCP-compatible connectors.
Compatibility depends on the AI client supporting remote MCP over HTTP/SSE, custom headers, API key query parameters, or equivalent tool connector configuration.
MCP, Security, Logs, Dashboard
Built for teams who want AI access to Odoo without opening the whole database.Controlled Model Access
Enable only approved Odoo models, define read/search/create/write/delete rules, set maximum limits, and whitelist safe fields.
AI Tool Compatibility
Use MCP tools such as models, fields, search read, count, name search, read, search, and fetch with ChatGPT, Claude, Gemini CLI, Cursor, Windsurf, and other MCP-capable AI clients.
Operational Visibility
Dashboard cards, recent request tables, top model usage, API key history, and session records help administrators monitor usage.
MCP Server Preview
From Odoo setup to AI connector testing and request monitoring.
Live MCP Server Dashboard
The dashboard summarizes requests today, success rate, denied calls, errors, connector status, active models, active keys, open sessions, recent requests, and top model usage.
AI Connector Setup
Configure an AI connector with the MCP URL and authentication token. The connector can call approved Odoo tools after the token is validated.
Enabled Models and Operations
Administrators choose which Odoo models are exposed to AI and control search, read, create, write, delete, max limit, and active state per model.
API Key Permission Control
Each API key belongs to a user and can be limited to selected models. Permission toggles define whether that token can search, read, create, write, or delete data.
API Key List
The API key list displays token prefix, owner, active state, expiration date, last used time, and last IP address for quick security review.
Generate and Revoke Tokens
Create secure tokens from the API key form, review prefix and usage metadata, and revoke access when a token should no longer be used.
Token Generated Notification
When a new MCP token is generated, Odoo shows the token once in a sticky notification so the administrator can place it in the external connector.
Enable Models Wizard
The wizard helps administrators enable selected Odoo models in bulk and apply default search, read, create, write, delete, and max limit rules.
MCP Sessions
Every AI session can be tracked with user, client name, IP address, state, request count, error count, start time, and last activity.
Session Messages
The session form stores each MCP message with method, request ID, duration, request payload, response payload, and error details for troubleshooting.
Audit Logs
The audit log records endpoint, event type, user, session, IP address, model, operation, status code, duration, and payload tabs for every MCP call.
Detailed Request Trace
Open an audit log to inspect the exact endpoint, model, operation, record IDs, duration, request payload, response payload, errors, and user agent.
AI Reads Partner Data
After the connector is configured, the assistant can answer Odoo questions such as partner counts and record summaries by calling approved MCP tools.
Odoo Records Stay Clickable
Search and fetch results include record links, so users can jump back to Odoo forms or lists after the AI finds relevant records.
Ask Operational Questions
The assistant can inspect approved manufacturing, sales, purchase, inventory, accounting, or contact models depending on the administrator's model rules.
Works with Standard Odoo Views
MCP responses are based on real Odoo records, while users can still verify the same data directly in standard Odoo list and form views.
From Installation to AI Query
1. Enable Models
Open MCP Server, enable only safe models, select allowed fields, and set operation permissions.
2. Generate API Key
Create a token for the Odoo user that should be used by the external AI connector.
3. Connect AI Tool
Use the MCP endpoint with the generated token, then test tools such as model list, search, fetch, count, and read.
4. Monitor Usage
Use dashboard, sessions, and audit logs to review what the AI accessed and which requests were denied.
MCP Server for Odoo - User and Technical Guide
Table of Contents
1. Overview
The MCP Server for Odoo module exposes selected Odoo data to AI assistants through secure MCP-style JSON-RPC tools and HTTP endpoints.
It helps administrators:
- Connect AI assistants to Odoo through a controlled gateway.
- Enable only approved Odoo models.
- Restrict fields, operations, and result limits.
- Generate API keys for external AI clients.
- Keep Odoo user ACLs active.
- Review audit logs, sessions, request payloads, and errors.
- Monitor usage from an Odoo dashboard.
The module is designed for Odoo teams that want AI access to operational data without exposing the full database.
2. Compatible AI Clients
The module can be used by AI clients that support remote MCP servers, HTTP tools, JSON-RPC tools, custom headers, or API key query parameters.
Common compatible targets include:
- ChatGPT custom apps or connectors.
- Claude Desktop or Claude-compatible MCP clients.
- Gemini CLI with MCP server configuration.
- Cursor, Windsurf, and other IDE AI tools with MCP support.
- OpenAI-compatible or Anthropic-compatible local agent frameworks.
- Custom internal AI agents that can call HTTP JSON-RPC tools.
Compatibility depends on the AI client feature set. Some web chat interfaces do not allow custom MCP servers directly, while their CLI, desktop, IDE, or developer editions may support MCP configuration.
Recommended connection endpoint:
https://your-odoo-domain.com/sm_mcp/mcp
Supported authentication methods:
- X-API-Key: TOKEN_HERE header.
- Authorization: Bearer TOKEN_HERE header.
- ?api_key=TOKEN_HERE query parameter for clients that cannot send custom headers.
3. What the Module Adds
MCP Endpoints
The module provides:
- /sm_mcp/health for service health checks.
- /sm_mcp/auth/validate for API key validation.
- /sm_mcp/models for enabled model metadata.
- /sm_mcp/mcp for MCP JSON-RPC.
- /sm_mcp/jsonrpc as an alternate JSON-RPC endpoint.
- /sm_mcp/sse for SSE-style MCP clients.
- REST endpoints for fields, search read, count, name search, read, create, write, and unlink.
MCP Tools
The JSON-RPC endpoint exposes AI-callable tools such as:
- odoo_models
- odoo_fields
- odoo_search_read
- odoo_count
- odoo_name_search
- odoo_read
- odoo_create
- odoo_write
- odoo_unlink
- search
- fetch
The search and fetch tools are useful for AI clients that expect connector-style document search and record retrieval.
Security Controls
Administrators can configure:
- Enabled Odoo models.
- Allowed operations per model.
- Allowed fields per model.
- Maximum result limit per model.
- API key owner user.
- Allowed models per API key.
- Operation permissions per API key.
- Expiration date.
- Token revoke action.
Monitoring
The module includes:
- MCP Server Dashboard.
- Audit Logs.
- Sessions.
- Session Messages.
- API Key last used timestamp.
- API Key last IP address.
- Request payload, response payload, error message, and user agent logs.
4. Installation
- Copy the sm_mcp_server folder into an Odoo addons path.
- Restart Odoo.
- Update Apps List.
- Install MCP Server.
Command-line example:
python3 ~/odoo/odoo-18/odoo-server \ -c ~/odoo/conf/odoo.conf \ -d your_database \ -i sm_mcp_server \ --stop-after-init \ --no-http
5. Initial Setup
Enable Models
- Open MCP Server -> Enable Models Wizard.
- Select a preset, or select models manually.
- Keep Search and Read enabled for the first test.
- Keep Create, Write, and Unlink disabled for the first test.
- Click Enable Models.
Create API Key
- Open MCP Server -> API Keys.
- Create a new key.
- Select the Odoo user that should own the AI access.
- Restrict allowed models if needed.
- Enable only required operations.
- Click Generate Token.
- Copy the generated smcp_ token.
Recommended first test policy:
- Enable Search and Read.
- Disable Create, Write, and Unlink.
- Limit API key access to a few models.
- Use allowed fields for sensitive data.
- Keep audit logging enabled.
6. ChatGPT Connection
For ChatGPT custom apps or connectors, use the MCP JSON-RPC endpoint.
Recommended server URL when the UI does not support custom headers:
https://your-odoo-domain.com/sm_mcp/mcp?api_key=TOKEN_HERE
Set authentication to No Auth if the token is included in the URL.
If the ChatGPT connector supports custom headers, use:
{ "url": "https://your-odoo-domain.com/sm_mcp/mcp", "headers": { "X-API-Key": "TOKEN_HERE" } }
Do not use /sm_mcp/sse unless the ChatGPT UI explicitly asks for an SSE URL.
Test prompts:
Use Odoo MCP. Count res.partner records.
Use Odoo MCP. Search five customers and show name and email.
7. Claude Connection
Claude Desktop and Claude-compatible MCP clients can connect when they support a remote HTTP/SSE MCP server or a bridge command.
Use this endpoint when remote HTTP MCP is supported:
https://your-odoo-domain.com/sm_mcp/mcp
Use this header:
X-API-Key: TOKEN_HERE
For clients that only support SSE URL configuration, use:
https://your-odoo-domain.com/sm_mcp/sse?api_key=TOKEN_HERE
If a Claude client only supports local stdio MCP servers, use a small local proxy or bridge that forwards MCP JSON-RPC calls to the Odoo /sm_mcp/mcp endpoint.
8. Gemini Connection
Gemini web chat may not expose custom MCP server configuration. Use Gemini CLI or a Gemini-capable agent environment that supports MCP.
Gemini CLI example:
gemini mcp add --transport http sm-odoo-mcp \ "https://your-odoo-domain.com/sm_mcp/mcp" \ --header "Authorization: Bearer TOKEN_HERE"
Check configured MCP servers:
gemini mcp list
Inside Gemini CLI, inspect MCP tools:
/mcp /mcp desc /mcp schema
Test prompt:
Use Odoo MCP. Count res.partner records.
9. IDE AI Clients
For Cursor, Windsurf, and other IDE AI tools with MCP support, configure a remote MCP server if the client supports HTTP/SSE transport.
Generic configuration values:
Name: Odoo MCP URL: https://your-odoo-domain.com/sm_mcp/mcp Header: X-API-Key: TOKEN_HERE
If the IDE only supports local stdio MCP servers, use an MCP proxy that forwards local tool calls to the Odoo HTTP endpoint.
10. Manual API Tests
Set reusable variables:
export BASE_URL="https://your-odoo-domain.com" export MCP_TOKEN="TOKEN_HERE"
Health check:
curl -s "$BASE_URL/sm_mcp/health"
Validate token:
curl -s -X POST "$BASE_URL/sm_mcp/auth/validate" \ -H "Content-Type: application/json" \ -H "X-API-Key: $MCP_TOKEN" \ -d '{}'
List MCP tools:
curl -s -X POST "$BASE_URL/sm_mcp/mcp" \ -H "Content-Type: application/json" \ -H "X-API-Key: $MCP_TOKEN" \ -d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'
Count records:
curl -s -X POST "$BASE_URL/sm_mcp/mcp" \ -H "Content-Type: application/json" \ -H "X-API-Key: $MCP_TOKEN" \ -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"odoo_count","arguments":{"model":"res.partner","domain":[]}}}'
Search and read records:
curl -s -X POST "$BASE_URL/sm_mcp/mcp" \ -H "Content-Type: application/json" \ -H "X-API-Key: $MCP_TOKEN" \ -d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"odoo_search_read","arguments":{"model":"res.partner","fields":["name","email"],"limit":5}}}'
11. Troubleshooting
Missing API Key
The client did not send a token. Configure X-API-Key, Authorization: Bearer, or ?api_key=.
Model Not Enabled
Enable the model from MCP Server -> Enabled Models or the wizard.
API Key Not Allowed for Model
Open the API key and either clear model restrictions or add the enabled model to the allowed models list.
Operation Not Allowed
Enable the operation on both the model configuration and API key.
AI Client Cannot Connect
Check that:
- Odoo is reachable over HTTPS.
- The endpoint uses /sm_mcp/mcp for JSON-RPC clients.
- The endpoint uses /sm_mcp/sse only for SSE clients.
- The token is active and not expired.
- The AI client supports remote MCP or has a local proxy bridge.
Review Logs
Open these menus:
- MCP Server -> Dashboard
- MCP Server -> Audit Logs
- MCP Server -> Sessions
- MCP Server -> API Keys
12. License
This module is released under the Odoo Proprietary License v1.0 (OPL-1). Usage is governed by Odoo Apps Store licensing terms.
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module