mseep-odoo-mcp 0.0.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Lê Anh Tuấn
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,270 @@
1
+ Metadata-Version: 2.4
2
+ Name: mseep-odoo-mcp
3
+ Version: 0.0.3
4
+ Summary: MCP Server for Odoo Integration
5
+ Home-page:
6
+ Author: mseep
7
+ Author-email: Lê Anh Tuấn <justin.le.1105@gmail.com>
8
+ License: MIT
9
+ Project-URL: Homepage, https://github.com/tuanle96/mcp-odoo
10
+ Project-URL: Issues, https://github.com/tuanle96/mcp-odoo/issues
11
+ Keywords: odoo,mcp,server
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Operating System :: OS Independent
16
+ Requires-Python: >=3.6
17
+ Description-Content-Type: text/markdown
18
+ License-File: LICENSE
19
+ Requires-Dist: mcp>=0.1.1
20
+ Requires-Dist: requests>=2.31.0
21
+ Requires-Dist: xmlrpc>=0.4.1
22
+ Provides-Extra: dev
23
+ Requires-Dist: black; extra == "dev"
24
+ Requires-Dist: isort; extra == "dev"
25
+ Requires-Dist: mypy; extra == "dev"
26
+ Requires-Dist: ruff; extra == "dev"
27
+ Requires-Dist: build; extra == "dev"
28
+ Requires-Dist: twine; extra == "dev"
29
+ Dynamic: author
30
+ Dynamic: license-file
31
+ Dynamic: requires-python
32
+
33
+ # Odoo MCP Server
34
+
35
+ An MCP server implementation that integrates with Odoo ERP systems, enabling AI assistants to interact with Odoo data and functionality through the Model Context Protocol.
36
+
37
+ ## Features
38
+
39
+ * **Comprehensive Odoo Integration**: Full access to Odoo models, records, and methods
40
+ * **XML-RPC Communication**: Secure connection to Odoo instances via XML-RPC
41
+ * **Flexible Configuration**: Support for config files and environment variables
42
+ * **Resource Pattern System**: URI-based access to Odoo data structures
43
+ * **Error Handling**: Clear error messages for common Odoo API issues
44
+ * **Stateless Operations**: Clean request/response cycle for reliable integration
45
+
46
+ ## Tools
47
+
48
+ * **search_records**
49
+ * Search for records in any Odoo model
50
+ * Inputs:
51
+ * `model` (string): The model name (e.g., 'res.partner')
52
+ * `domain` (array): Search domain (e.g., [['is_company', '=', true]])
53
+ * `fields` (optional array): Optional fields to fetch
54
+ * `limit` (optional number): Maximum number of records to return
55
+ * Returns: Matching records with requested fields
56
+
57
+ * **read_record**
58
+ * Read details of a specific record
59
+ * Inputs:
60
+ * `model` (string): The model name (e.g., 'res.partner')
61
+ * `id` (number): The record ID
62
+ * `fields` (optional array): Optional fields to fetch
63
+ * Returns: Record data with requested fields
64
+
65
+ * **create_record**
66
+ * Create a new record in Odoo
67
+ * Inputs:
68
+ * `model` (string): The model name (e.g., 'res.partner')
69
+ * `values` (object): Dictionary of field values
70
+ * Returns: Dictionary with the new record ID
71
+
72
+ * **update_record**
73
+ * Update an existing record
74
+ * Inputs:
75
+ * `model` (string): The model name (e.g., 'res.partner')
76
+ * `id` (number): The record ID
77
+ * `values` (object): Dictionary of field values to update
78
+ * Returns: Dictionary indicating success
79
+
80
+ * **delete_record**
81
+ * Delete a record from Odoo
82
+ * Inputs:
83
+ * `model` (string): The model name (e.g., 'res.partner')
84
+ * `id` (number): The record ID
85
+ * Returns: Dictionary indicating success
86
+
87
+ * **execute_method**
88
+ * Execute a custom method on an Odoo model
89
+ * Inputs:
90
+ * `model` (string): The model name (e.g., 'res.partner')
91
+ * `method` (string): Method name to execute
92
+ * `args` (optional array): Positional arguments
93
+ * `kwargs` (optional object): Keyword arguments
94
+ * Returns: Dictionary with the method result
95
+
96
+ * **get_model_fields**
97
+ * Get field definitions for a model
98
+ * Inputs:
99
+ * `model` (string): The model name (e.g., 'res.partner')
100
+ * Returns: Dictionary with field definitions
101
+
102
+ * **search_employee**
103
+ * Search for employees by name.
104
+ * Inputs:
105
+ * `name` (string): The name (or part of the name) to search for.
106
+ * `limit` (optional number): The maximum number of results to return (default 20).
107
+ * Returns: List of matching employee names and IDs.
108
+
109
+ * **search_holidays**
110
+ * Searches for holidays within a specified date range.
111
+ * Inputs:
112
+ * `start_date` (string): Start date in YYYY-MM-DD format.
113
+ * `end_date` (string): End date in YYYY-MM-DD format.
114
+ * `employee_id` (optional number): Optional employee ID to filter holidays.
115
+ * Returns: List of holidays found.
116
+
117
+ ## Resources
118
+
119
+ * **odoo://models**
120
+ * Lists all available models in the Odoo system
121
+ * Returns: JSON array of model information
122
+
123
+ * **odoo://model/{model_name}**
124
+ * Get information about a specific model including fields
125
+ * Example: `odoo://model/res.partner`
126
+ * Returns: JSON object with model metadata and field definitions
127
+
128
+ * **odoo://record/{model_name}/{record_id}**
129
+ * Get a specific record by ID
130
+ * Example: `odoo://record/res.partner/1`
131
+ * Returns: JSON object with record data
132
+
133
+ * **odoo://search/{model_name}/{domain}**
134
+ * Search for records that match a domain
135
+ * Example: `odoo://search/res.partner/[["is_company","=",true]]`
136
+ * Returns: JSON array of matching records (limited to 10 by default)
137
+
138
+ ## Configuration
139
+
140
+ ### Odoo Connection Setup
141
+
142
+ 1. Create a configuration file named `odoo_config.json`:
143
+
144
+ ```json
145
+ {
146
+ "url": "https://your-odoo-instance.com",
147
+ "db": "your-database-name",
148
+ "username": "your-username",
149
+ "password": "your-password-or-api-key"
150
+ }
151
+ ```
152
+
153
+ 2. Alternatively, use environment variables:
154
+ * `ODOO_URL`: Your Odoo server URL
155
+ * `ODOO_DB`: Database name
156
+ * `ODOO_USERNAME`: Login username
157
+ * `ODOO_PASSWORD`: Password or API key
158
+ * `ODOO_TIMEOUT`: Connection timeout in seconds (default: 30)
159
+ * `ODOO_VERIFY_SSL`: Whether to verify SSL certificates (default: true)
160
+ * `HTTP_PROXY`: Force the ODOO connection to use an HTTP proxy
161
+
162
+ ### Usage with Claude Desktop
163
+
164
+ Add this to your `claude_desktop_config.json`:
165
+
166
+ ```json
167
+ {
168
+ "mcpServers": {
169
+ "odoo": {
170
+ "command": "python",
171
+ "args": [
172
+ "-m",
173
+ "odoo_mcp"
174
+ ],
175
+ "env": {
176
+ "ODOO_URL": "https://your-odoo-instance.com",
177
+ "ODOO_DB": "your-database-name",
178
+ "ODOO_USERNAME": "your-username",
179
+ "ODOO_PASSWORD": "your-password-or-api-key"
180
+ }
181
+ }
182
+ }
183
+ }
184
+ ```
185
+
186
+ ### Docker
187
+
188
+ ```json
189
+ {
190
+ "mcpServers": {
191
+ "odoo": {
192
+ "command": "docker",
193
+ "args": [
194
+ "run",
195
+ "-i",
196
+ "--rm",
197
+ "-e",
198
+ "ODOO_URL",
199
+ "-e",
200
+ "ODOO_DB",
201
+ "-e",
202
+ "ODOO_USERNAME",
203
+ "-e",
204
+ "ODOO_PASSWORD",
205
+ "mcp/odoo"
206
+ ],
207
+ "env": {
208
+ "ODOO_URL": "https://your-odoo-instance.com",
209
+ "ODOO_DB": "your-database-name",
210
+ "ODOO_USERNAME": "your-username",
211
+ "ODOO_PASSWORD": "your-password-or-api-key"
212
+ }
213
+ }
214
+ }
215
+ }
216
+ ```
217
+
218
+ ## Installation
219
+
220
+ ### Python Package
221
+
222
+ ```bash
223
+ pip install odoo-mcp
224
+ ```
225
+
226
+ ### Running the Server
227
+
228
+ ```bash
229
+ # Using the installed package
230
+ odoo-mcp
231
+
232
+ # Using the MCP development tools
233
+ mcp dev odoo_mcp/server.py
234
+
235
+ # With additional dependencies
236
+ mcp dev odoo_mcp/server.py --with pandas --with numpy
237
+
238
+ # Mount local code for development
239
+ mcp dev odoo_mcp/server.py --with-editable .
240
+ ```
241
+
242
+ ## Build
243
+
244
+ Docker build:
245
+
246
+ ```bash
247
+ docker build -t mcp/odoo:latest -f Dockerfile .
248
+ ```
249
+
250
+ ## Parameter Formatting Guidelines
251
+
252
+ When using the MCP tools for Odoo, pay attention to these parameter formatting guidelines:
253
+
254
+ 1. **Domain Parameter**:
255
+ * The following domain formats are supported:
256
+ * List format: `[["field", "operator", value], ...]`
257
+ * Object format: `{"conditions": [{"field": "...", "operator": "...", "value": "..."}]}`
258
+ * JSON string of either format
259
+ * Examples:
260
+ * List format: `[["is_company", "=", true]]`
261
+ * Object format: `{"conditions": [{"field": "date_order", "operator": ">=", "value": "2025-03-01"}]}`
262
+ * Multiple conditions: `[["date_order", ">=", "2025-03-01"], ["date_order", "<=", "2025-03-31"]]`
263
+
264
+ 2. **Fields Parameter**:
265
+ * Should be an array of field names: `["name", "email", "phone"]`
266
+ * The server will try to parse string inputs as JSON
267
+
268
+ ## License
269
+
270
+ This MCP server is licensed under the MIT License.
@@ -0,0 +1,238 @@
1
+ # Odoo MCP Server
2
+
3
+ An MCP server implementation that integrates with Odoo ERP systems, enabling AI assistants to interact with Odoo data and functionality through the Model Context Protocol.
4
+
5
+ ## Features
6
+
7
+ * **Comprehensive Odoo Integration**: Full access to Odoo models, records, and methods
8
+ * **XML-RPC Communication**: Secure connection to Odoo instances via XML-RPC
9
+ * **Flexible Configuration**: Support for config files and environment variables
10
+ * **Resource Pattern System**: URI-based access to Odoo data structures
11
+ * **Error Handling**: Clear error messages for common Odoo API issues
12
+ * **Stateless Operations**: Clean request/response cycle for reliable integration
13
+
14
+ ## Tools
15
+
16
+ * **search_records**
17
+ * Search for records in any Odoo model
18
+ * Inputs:
19
+ * `model` (string): The model name (e.g., 'res.partner')
20
+ * `domain` (array): Search domain (e.g., [['is_company', '=', true]])
21
+ * `fields` (optional array): Optional fields to fetch
22
+ * `limit` (optional number): Maximum number of records to return
23
+ * Returns: Matching records with requested fields
24
+
25
+ * **read_record**
26
+ * Read details of a specific record
27
+ * Inputs:
28
+ * `model` (string): The model name (e.g., 'res.partner')
29
+ * `id` (number): The record ID
30
+ * `fields` (optional array): Optional fields to fetch
31
+ * Returns: Record data with requested fields
32
+
33
+ * **create_record**
34
+ * Create a new record in Odoo
35
+ * Inputs:
36
+ * `model` (string): The model name (e.g., 'res.partner')
37
+ * `values` (object): Dictionary of field values
38
+ * Returns: Dictionary with the new record ID
39
+
40
+ * **update_record**
41
+ * Update an existing record
42
+ * Inputs:
43
+ * `model` (string): The model name (e.g., 'res.partner')
44
+ * `id` (number): The record ID
45
+ * `values` (object): Dictionary of field values to update
46
+ * Returns: Dictionary indicating success
47
+
48
+ * **delete_record**
49
+ * Delete a record from Odoo
50
+ * Inputs:
51
+ * `model` (string): The model name (e.g., 'res.partner')
52
+ * `id` (number): The record ID
53
+ * Returns: Dictionary indicating success
54
+
55
+ * **execute_method**
56
+ * Execute a custom method on an Odoo model
57
+ * Inputs:
58
+ * `model` (string): The model name (e.g., 'res.partner')
59
+ * `method` (string): Method name to execute
60
+ * `args` (optional array): Positional arguments
61
+ * `kwargs` (optional object): Keyword arguments
62
+ * Returns: Dictionary with the method result
63
+
64
+ * **get_model_fields**
65
+ * Get field definitions for a model
66
+ * Inputs:
67
+ * `model` (string): The model name (e.g., 'res.partner')
68
+ * Returns: Dictionary with field definitions
69
+
70
+ * **search_employee**
71
+ * Search for employees by name.
72
+ * Inputs:
73
+ * `name` (string): The name (or part of the name) to search for.
74
+ * `limit` (optional number): The maximum number of results to return (default 20).
75
+ * Returns: List of matching employee names and IDs.
76
+
77
+ * **search_holidays**
78
+ * Searches for holidays within a specified date range.
79
+ * Inputs:
80
+ * `start_date` (string): Start date in YYYY-MM-DD format.
81
+ * `end_date` (string): End date in YYYY-MM-DD format.
82
+ * `employee_id` (optional number): Optional employee ID to filter holidays.
83
+ * Returns: List of holidays found.
84
+
85
+ ## Resources
86
+
87
+ * **odoo://models**
88
+ * Lists all available models in the Odoo system
89
+ * Returns: JSON array of model information
90
+
91
+ * **odoo://model/{model_name}**
92
+ * Get information about a specific model including fields
93
+ * Example: `odoo://model/res.partner`
94
+ * Returns: JSON object with model metadata and field definitions
95
+
96
+ * **odoo://record/{model_name}/{record_id}**
97
+ * Get a specific record by ID
98
+ * Example: `odoo://record/res.partner/1`
99
+ * Returns: JSON object with record data
100
+
101
+ * **odoo://search/{model_name}/{domain}**
102
+ * Search for records that match a domain
103
+ * Example: `odoo://search/res.partner/[["is_company","=",true]]`
104
+ * Returns: JSON array of matching records (limited to 10 by default)
105
+
106
+ ## Configuration
107
+
108
+ ### Odoo Connection Setup
109
+
110
+ 1. Create a configuration file named `odoo_config.json`:
111
+
112
+ ```json
113
+ {
114
+ "url": "https://your-odoo-instance.com",
115
+ "db": "your-database-name",
116
+ "username": "your-username",
117
+ "password": "your-password-or-api-key"
118
+ }
119
+ ```
120
+
121
+ 2. Alternatively, use environment variables:
122
+ * `ODOO_URL`: Your Odoo server URL
123
+ * `ODOO_DB`: Database name
124
+ * `ODOO_USERNAME`: Login username
125
+ * `ODOO_PASSWORD`: Password or API key
126
+ * `ODOO_TIMEOUT`: Connection timeout in seconds (default: 30)
127
+ * `ODOO_VERIFY_SSL`: Whether to verify SSL certificates (default: true)
128
+ * `HTTP_PROXY`: Force the ODOO connection to use an HTTP proxy
129
+
130
+ ### Usage with Claude Desktop
131
+
132
+ Add this to your `claude_desktop_config.json`:
133
+
134
+ ```json
135
+ {
136
+ "mcpServers": {
137
+ "odoo": {
138
+ "command": "python",
139
+ "args": [
140
+ "-m",
141
+ "odoo_mcp"
142
+ ],
143
+ "env": {
144
+ "ODOO_URL": "https://your-odoo-instance.com",
145
+ "ODOO_DB": "your-database-name",
146
+ "ODOO_USERNAME": "your-username",
147
+ "ODOO_PASSWORD": "your-password-or-api-key"
148
+ }
149
+ }
150
+ }
151
+ }
152
+ ```
153
+
154
+ ### Docker
155
+
156
+ ```json
157
+ {
158
+ "mcpServers": {
159
+ "odoo": {
160
+ "command": "docker",
161
+ "args": [
162
+ "run",
163
+ "-i",
164
+ "--rm",
165
+ "-e",
166
+ "ODOO_URL",
167
+ "-e",
168
+ "ODOO_DB",
169
+ "-e",
170
+ "ODOO_USERNAME",
171
+ "-e",
172
+ "ODOO_PASSWORD",
173
+ "mcp/odoo"
174
+ ],
175
+ "env": {
176
+ "ODOO_URL": "https://your-odoo-instance.com",
177
+ "ODOO_DB": "your-database-name",
178
+ "ODOO_USERNAME": "your-username",
179
+ "ODOO_PASSWORD": "your-password-or-api-key"
180
+ }
181
+ }
182
+ }
183
+ }
184
+ ```
185
+
186
+ ## Installation
187
+
188
+ ### Python Package
189
+
190
+ ```bash
191
+ pip install odoo-mcp
192
+ ```
193
+
194
+ ### Running the Server
195
+
196
+ ```bash
197
+ # Using the installed package
198
+ odoo-mcp
199
+
200
+ # Using the MCP development tools
201
+ mcp dev odoo_mcp/server.py
202
+
203
+ # With additional dependencies
204
+ mcp dev odoo_mcp/server.py --with pandas --with numpy
205
+
206
+ # Mount local code for development
207
+ mcp dev odoo_mcp/server.py --with-editable .
208
+ ```
209
+
210
+ ## Build
211
+
212
+ Docker build:
213
+
214
+ ```bash
215
+ docker build -t mcp/odoo:latest -f Dockerfile .
216
+ ```
217
+
218
+ ## Parameter Formatting Guidelines
219
+
220
+ When using the MCP tools for Odoo, pay attention to these parameter formatting guidelines:
221
+
222
+ 1. **Domain Parameter**:
223
+ * The following domain formats are supported:
224
+ * List format: `[["field", "operator", value], ...]`
225
+ * Object format: `{"conditions": [{"field": "...", "operator": "...", "value": "..."}]}`
226
+ * JSON string of either format
227
+ * Examples:
228
+ * List format: `[["is_company", "=", true]]`
229
+ * Object format: `{"conditions": [{"field": "date_order", "operator": ">=", "value": "2025-03-01"}]}`
230
+ * Multiple conditions: `[["date_order", ">=", "2025-03-01"], ["date_order", "<=", "2025-03-31"]]`
231
+
232
+ 2. **Fields Parameter**:
233
+ * Should be an array of field names: `["name", "email", "phone"]`
234
+ * The server will try to parse string inputs as JSON
235
+
236
+ ## License
237
+
238
+ This MCP server is licensed under the MIT License.
@@ -0,0 +1,76 @@
1
+ [build-system]
2
+ requires = [
3
+ "setuptools>=61.0",
4
+ ]
5
+ build-backend = "setuptools.build_meta"
6
+
7
+ [project]
8
+ name = "mseep-odoo-mcp"
9
+ version = "0.0.3"
10
+ description = "MCP Server for Odoo Integration"
11
+ readme = "README.md"
12
+ requires-python = ">=3.10"
13
+ classifiers = [
14
+ "License :: OSI Approved :: MIT License",
15
+ "Programming Language :: Python :: 3",
16
+ "Programming Language :: Python :: 3.10",
17
+ "Operating System :: OS Independent",
18
+ ]
19
+ keywords = [
20
+ "odoo",
21
+ "mcp",
22
+ "server",
23
+ ]
24
+ authors = [
25
+ { name = "Lê Anh Tuấn", email = "justin.le.1105@gmail.com" },
26
+ ]
27
+ dependencies = [
28
+ "mcp>=0.1.1",
29
+ "requests>=2.31.0",
30
+ "xmlrpc>=0.4.1",
31
+ ]
32
+
33
+ [project.license]
34
+ text = "MIT"
35
+
36
+ [project.urls]
37
+ Homepage = "https://github.com/tuanle96/mcp-odoo"
38
+ Issues = "https://github.com/tuanle96/mcp-odoo/issues"
39
+
40
+ [project.optional-dependencies]
41
+ dev = [
42
+ "black",
43
+ "isort",
44
+ "mypy",
45
+ "ruff",
46
+ "build",
47
+ "twine",
48
+ ]
49
+
50
+ [project.scripts]
51
+ odoo-mcp = "odoo_mcp.__main__:main"
52
+
53
+ [tool.setuptools]
54
+ packages = [
55
+ "odoo_mcp",
56
+ ]
57
+
58
+ [tool.setuptools.package-dir]
59
+ "" = "src"
60
+
61
+ [tool.black]
62
+ line-length = 88
63
+ target-version = [
64
+ "py310",
65
+ ]
66
+
67
+ [tool.isort]
68
+ profile = "black"
69
+ line_length = 88
70
+
71
+ [tool.mypy]
72
+ python_version = "3.10"
73
+ warn_return_any = true
74
+ warn_unused_configs = true
75
+ disallow_untyped_defs = true
76
+ disallow_incomplete_defs = true
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,20 @@
1
+
2
+ from setuptools import setup, find_packages
3
+
4
+ setup(
5
+ name="mseep-odoo-mcp",
6
+ version="0.0.3",
7
+ description="MCP Server for Odoo Integration",
8
+ author="mseep",
9
+ author_email="support@skydeck.ai",
10
+ url="",
11
+ packages=find_packages(),
12
+ classifiers=[
13
+ "Programming Language :: Python :: 3",
14
+ "License :: OSI Approved :: MIT License",
15
+ "Operating System :: OS Independent",
16
+ ],
17
+ python_requires=">=3.6",
18
+ install_requires=['mcp>=0.1.1', 'requests>=2.31.0', 'xmlrpc>=0.4.1'],
19
+ keywords=["mseep"] + ['odoo', 'mcp', 'server'],
20
+ )