mseep-odoo-mcp 0.0.3__py3-none-any.whl → 0.0.4__py3-none-any.whl
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.
- {mseep_odoo_mcp-0.0.3.dist-info → mseep_odoo_mcp-0.0.4.dist-info}/METADATA +14 -60
- mseep_odoo_mcp-0.0.4.dist-info/RECORD +10 -0
- {mseep_odoo_mcp-0.0.3.dist-info → mseep_odoo_mcp-0.0.4.dist-info}/WHEEL +1 -1
- odoo_mcp/odoo_client.py +9 -18
- mseep_odoo_mcp-0.0.3.dist-info/RECORD +0 -10
- {mseep_odoo_mcp-0.0.3.dist-info → mseep_odoo_mcp-0.0.4.dist-info}/entry_points.txt +0 -0
- {mseep_odoo_mcp-0.0.3.dist-info → mseep_odoo_mcp-0.0.4.dist-info}/licenses/LICENSE +0 -0
- {mseep_odoo_mcp-0.0.3.dist-info → mseep_odoo_mcp-0.0.4.dist-info}/top_level.txt +0 -0
@@ -1,13 +1,12 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: mseep-odoo-mcp
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.4
|
4
4
|
Summary: MCP Server for Odoo Integration
|
5
5
|
Home-page:
|
6
6
|
Author: mseep
|
7
|
-
Author-email:
|
7
|
+
Author-email: mseep <support@skydeck.ai>
|
8
|
+
Maintainer-email: mseep <support@skydeck.ai>
|
8
9
|
License: MIT
|
9
|
-
Project-URL: Homepage, https://github.com/tuanle96/mcp-odoo
|
10
|
-
Project-URL: Issues, https://github.com/tuanle96/mcp-odoo/issues
|
11
10
|
Keywords: odoo,mcp,server
|
12
11
|
Classifier: License :: OSI Approved :: MIT License
|
13
12
|
Classifier: Programming Language :: Python :: 3
|
@@ -18,7 +17,7 @@ Description-Content-Type: text/markdown
|
|
18
17
|
License-File: LICENSE
|
19
18
|
Requires-Dist: mcp>=0.1.1
|
20
19
|
Requires-Dist: requests>=2.31.0
|
21
|
-
Requires-Dist: xmlrpc
|
20
|
+
Requires-Dist: pypi-xmlrpc==2020.12.3
|
22
21
|
Provides-Extra: dev
|
23
22
|
Requires-Dist: black; extra == "dev"
|
24
23
|
Requires-Dist: isort; extra == "dev"
|
@@ -45,45 +44,6 @@ An MCP server implementation that integrates with Odoo ERP systems, enabling AI
|
|
45
44
|
|
46
45
|
## Tools
|
47
46
|
|
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
47
|
* **execute_method**
|
88
48
|
* Execute a custom method on an Odoo model
|
89
49
|
* Inputs:
|
@@ -91,28 +51,22 @@ An MCP server implementation that integrates with Odoo ERP systems, enabling AI
|
|
91
51
|
* `method` (string): Method name to execute
|
92
52
|
* `args` (optional array): Positional arguments
|
93
53
|
* `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
|
54
|
+
* Returns: Dictionary with the method result and success indicator
|
101
55
|
|
102
56
|
* **search_employee**
|
103
|
-
* Search for employees by name
|
57
|
+
* Search for employees by name
|
104
58
|
* 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:
|
59
|
+
* `name` (string): The name (or part of the name) to search for
|
60
|
+
* `limit` (optional number): The maximum number of results to return (default 20)
|
61
|
+
* Returns: Object containing success indicator, list of matching employee names and IDs, and any error message
|
108
62
|
|
109
63
|
* **search_holidays**
|
110
|
-
* Searches for holidays within a specified date range
|
64
|
+
* Searches for holidays within a specified date range
|
111
65
|
* 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:
|
66
|
+
* `start_date` (string): Start date in YYYY-MM-DD format
|
67
|
+
* `end_date` (string): End date in YYYY-MM-DD format
|
68
|
+
* `employee_id` (optional number): Optional employee ID to filter holidays
|
69
|
+
* Returns: Object containing success indicator, list of holidays found, and any error message
|
116
70
|
|
117
71
|
## Resources
|
118
72
|
|
@@ -0,0 +1,10 @@
|
|
1
|
+
mseep_odoo_mcp-0.0.4.dist-info/licenses/LICENSE,sha256=_FwB4PGxcQWsToTqX33moF0HqnB45Ox6Fr0VPJiLyBI,1071
|
2
|
+
odoo_mcp/__init__.py,sha256=fw0VD6ow8QmzQ4L8DxyneEMqC6bgAEde62nvEUqiGgQ,102
|
3
|
+
odoo_mcp/__main__.py,sha256=H_46LG58iV38bLXANKQW-Hzi5iQ7Ww34RtgIVe3YMHk,1834
|
4
|
+
odoo_mcp/odoo_client.py,sha256=dc8QgFrYC_sLt0dAIE_iCkXd9WLrbtuNTAwBkNMQzfs,14534
|
5
|
+
odoo_mcp/server.py,sha256=f5ukjDgYLTN4wL96xJWTyoMak6qF-LV6AO8bYs16PvA,14995
|
6
|
+
mseep_odoo_mcp-0.0.4.dist-info/METADATA,sha256=_N3ul69tfgs6EUaCFXGwzWX4xxAXOT-EltoHtLJXfTg,6399
|
7
|
+
mseep_odoo_mcp-0.0.4.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
|
8
|
+
mseep_odoo_mcp-0.0.4.dist-info/entry_points.txt,sha256=VAFapQ2i2fiMrM5fRcxVz1c9M3j-5RZ6QCJJT6taxQk,52
|
9
|
+
mseep_odoo_mcp-0.0.4.dist-info/top_level.txt,sha256=U9N8tvrkBgl0wl-xe8OmrJhxfpOdynRAVA7XFJIi7rk,9
|
10
|
+
mseep_odoo_mcp-0.0.4.dist-info/RECORD,,
|
odoo_mcp/odoo_client.py
CHANGED
@@ -88,26 +88,22 @@ class OdooClient:
|
|
88
88
|
|
89
89
|
# Xác thực và lấy user ID
|
90
90
|
print(
|
91
|
-
f"Authenticating with database: {
|
92
|
-
self.db}, username: {self.username}",
|
91
|
+
f"Authenticating with database: {self.db}, username: {self.username}",
|
93
92
|
file=os.sys.stderr,
|
94
93
|
)
|
95
94
|
try:
|
96
95
|
print(
|
97
|
-
f"Making request to {
|
98
|
-
self.hostname}/xmlrpc/2/common (attempt 1)",
|
96
|
+
f"Making request to {self.hostname}/xmlrpc/2/common (attempt 1)",
|
99
97
|
file=os.sys.stderr,
|
100
98
|
)
|
101
99
|
self.uid = self._common.authenticate(
|
102
100
|
self.db, self.username, self.password, {}
|
103
101
|
)
|
104
102
|
if not self.uid:
|
105
|
-
raise ValueError(
|
106
|
-
"Authentication failed: Invalid username or password")
|
103
|
+
raise ValueError("Authentication failed: Invalid username or password")
|
107
104
|
except (socket.error, socket.timeout, ConnectionError, TimeoutError) as e:
|
108
105
|
print(f"Connection error: {str(e)}", file=os.sys.stderr)
|
109
|
-
raise ConnectionError(
|
110
|
-
f"Failed to connect to Odoo server: {str(e)}")
|
106
|
+
raise ConnectionError(f"Failed to connect to Odoo server: {str(e)}")
|
111
107
|
except Exception as e:
|
112
108
|
print(f"Authentication error: {str(e)}", file=os.sys.stderr)
|
113
109
|
raise ValueError(f"Failed to authenticate with Odoo: {str(e)}")
|
@@ -161,8 +157,7 @@ class OdooClient:
|
|
161
157
|
|
162
158
|
# Then read the model data with only the most basic fields
|
163
159
|
# that are guaranteed to exist in all Odoo versions
|
164
|
-
result = self._execute(
|
165
|
-
"ir.model", "read", model_ids, ["model", "name"])
|
160
|
+
result = self._execute("ir.model", "read", model_ids, ["model", "name"])
|
166
161
|
|
167
162
|
# Extract and sort model names alphabetically
|
168
163
|
models = sorted([rec["model"] for rec in result])
|
@@ -337,11 +332,9 @@ class RedirectTransport(xmlrpc.client.Transport):
|
|
337
332
|
)
|
338
333
|
else:
|
339
334
|
if self.use_https:
|
340
|
-
connection = http.client.HTTPSConnection(
|
341
|
-
host, timeout=self.timeout)
|
335
|
+
connection = http.client.HTTPSConnection(host, timeout=self.timeout)
|
342
336
|
else:
|
343
|
-
connection = http.client.HTTPConnection(
|
344
|
-
host, timeout=self.timeout)
|
337
|
+
connection = http.client.HTTPConnection(host, timeout=self.timeout)
|
345
338
|
|
346
339
|
return connection
|
347
340
|
|
@@ -370,8 +363,7 @@ class RedirectTransport(xmlrpc.client.Transport):
|
|
370
363
|
print(f"Error during request: {str(e)}", file=os.sys.stderr)
|
371
364
|
raise
|
372
365
|
|
373
|
-
raise xmlrpc.client.ProtocolError(
|
374
|
-
host + handler, 310, "Too many redirects", {})
|
366
|
+
raise xmlrpc.client.ProtocolError(host + handler, 310, "Too many redirects", {})
|
375
367
|
|
376
368
|
|
377
369
|
def load_config():
|
@@ -425,8 +417,7 @@ def get_odoo_client():
|
|
425
417
|
timeout = int(
|
426
418
|
os.environ.get("ODOO_TIMEOUT", "30")
|
427
419
|
) # Increase default timeout to 30 seconds
|
428
|
-
verify_ssl = os.environ.get("ODOO_VERIFY_SSL", "1").lower() in [
|
429
|
-
"1", "true", "yes"]
|
420
|
+
verify_ssl = os.environ.get("ODOO_VERIFY_SSL", "1").lower() in ["1", "true", "yes"]
|
430
421
|
|
431
422
|
# Print detailed configuration
|
432
423
|
print("Odoo client configuration:", file=os.sys.stderr)
|
@@ -1,10 +0,0 @@
|
|
1
|
-
mseep_odoo_mcp-0.0.3.dist-info/licenses/LICENSE,sha256=_FwB4PGxcQWsToTqX33moF0HqnB45Ox6Fr0VPJiLyBI,1071
|
2
|
-
odoo_mcp/__init__.py,sha256=fw0VD6ow8QmzQ4L8DxyneEMqC6bgAEde62nvEUqiGgQ,102
|
3
|
-
odoo_mcp/__main__.py,sha256=H_46LG58iV38bLXANKQW-Hzi5iQ7Ww34RtgIVe3YMHk,1834
|
4
|
-
odoo_mcp/odoo_client.py,sha256=tmZs_keeuRBQ77pPHpJ4f4wVCTjhZeahLZ_rZIAruNQ,14699
|
5
|
-
odoo_mcp/server.py,sha256=f5ukjDgYLTN4wL96xJWTyoMak6qF-LV6AO8bYs16PvA,14995
|
6
|
-
mseep_odoo_mcp-0.0.3.dist-info/METADATA,sha256=REwngGo1B5exHphpV8TCWgtmqZklbniZIVN2wj4VjtU,7884
|
7
|
-
mseep_odoo_mcp-0.0.3.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
8
|
-
mseep_odoo_mcp-0.0.3.dist-info/entry_points.txt,sha256=VAFapQ2i2fiMrM5fRcxVz1c9M3j-5RZ6QCJJT6taxQk,52
|
9
|
-
mseep_odoo_mcp-0.0.3.dist-info/top_level.txt,sha256=U9N8tvrkBgl0wl-xe8OmrJhxfpOdynRAVA7XFJIi7rk,9
|
10
|
-
mseep_odoo_mcp-0.0.3.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|