biszx-odoo-mcp 1.2.0__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.
Potentially problematic release.
This version of biszx-odoo-mcp might be problematic. Click here for more details.
- biszx_odoo_mcp/__init__.py +3 -0
- biszx_odoo_mcp/__main__.py +49 -0
- biszx_odoo_mcp/exceptions.py +226 -0
- biszx_odoo_mcp/main.py +134 -0
- biszx_odoo_mcp/server/__init__.py +0 -0
- biszx_odoo_mcp/server/context.py +19 -0
- biszx_odoo_mcp/server/resources.py +230 -0
- biszx_odoo_mcp/server/response.py +36 -0
- biszx_odoo_mcp/server/tools.py +431 -0
- biszx_odoo_mcp/tools/__init__.py +0 -0
- biszx_odoo_mcp/tools/config.py +98 -0
- biszx_odoo_mcp/tools/odoo_client.py +697 -0
- biszx_odoo_mcp-1.2.0.dist-info/METADATA +181 -0
- biszx_odoo_mcp-1.2.0.dist-info/RECORD +18 -0
- biszx_odoo_mcp-1.2.0.dist-info/WHEEL +5 -0
- biszx_odoo_mcp-1.2.0.dist-info/entry_points.txt +2 -0
- biszx_odoo_mcp-1.2.0.dist-info/licenses/LICENSE +21 -0
- biszx_odoo_mcp-1.2.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: biszx-odoo-mcp
|
|
3
|
+
Version: 1.2.0
|
|
4
|
+
Summary: MCP Server for Odoo Integration
|
|
5
|
+
Author-email: Biszx <isares.br@gmail.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://gitlab.com/biszx/biszx-odoo-mcp
|
|
8
|
+
Project-URL: Issues, https://gitlab.com/biszx/biszx-odoo-mcp/issues
|
|
9
|
+
Keywords: odoo,mcp,server
|
|
10
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
13
|
+
Classifier: Operating System :: OS Independent
|
|
14
|
+
Requires-Python: >=3.10
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
License-File: LICENSE
|
|
17
|
+
Requires-Dist: asyncio>=3.4.3
|
|
18
|
+
Requires-Dist: loguru>=0.7.3
|
|
19
|
+
Requires-Dist: mcp[cli]>=1.9.4
|
|
20
|
+
Requires-Dist: odoorpc>=0.10.1
|
|
21
|
+
Dynamic: license-file
|
|
22
|
+
|
|
23
|
+
# Odoo MCP Server
|
|
24
|
+
|
|
25
|
+
An MCP server implementation for Odoo ERP systems, providing a set of tools for managing Odoo records, models, and custom methods.
|
|
26
|
+
Inspired by [tuanle96/mcp-odoo](https://github.com/tuanle96/mcp-odoo).
|
|
27
|
+
|
|
28
|
+
## Tools
|
|
29
|
+
|
|
30
|
+
### Core CRUD Operations
|
|
31
|
+
|
|
32
|
+
- **create_record**: Create a single new record
|
|
33
|
+
|
|
34
|
+
- Inputs: `model_name` (string), `values` (object)
|
|
35
|
+
- Returns: Dictionary with created record ID
|
|
36
|
+
|
|
37
|
+
- **create_records**: Create multiple records at once
|
|
38
|
+
|
|
39
|
+
- Inputs: `model_name` (string), `values_list` (array of objects)
|
|
40
|
+
- Returns: Dictionary with created record IDs
|
|
41
|
+
|
|
42
|
+
- **read_records**: Read specific records by their IDs
|
|
43
|
+
|
|
44
|
+
- Inputs: `model_name` (string), `ids` (array), `fields` (optional array)
|
|
45
|
+
- Returns: Dictionary with record data
|
|
46
|
+
|
|
47
|
+
- **write_record**: Update a single record
|
|
48
|
+
|
|
49
|
+
- Inputs: `model_name` (string), `record_id` (number), `values` (object)
|
|
50
|
+
- Returns: Dictionary with operation result
|
|
51
|
+
|
|
52
|
+
- **write_records**: Update multiple records
|
|
53
|
+
|
|
54
|
+
- Inputs: `model_name` (string), `record_ids` (array), `values` (object)
|
|
55
|
+
- Returns: Dictionary with operation result
|
|
56
|
+
|
|
57
|
+
- **unlink_record**: Delete a single record
|
|
58
|
+
|
|
59
|
+
- Inputs: `model_name` (string), `record_id` (number)
|
|
60
|
+
- Returns: Dictionary with operation result
|
|
61
|
+
|
|
62
|
+
- **unlink_records**: Delete multiple records
|
|
63
|
+
- Inputs: `model_name` (string), `record_ids` (array)
|
|
64
|
+
- Returns: Dictionary with operation result
|
|
65
|
+
|
|
66
|
+
### Search and Query Operations
|
|
67
|
+
|
|
68
|
+
- **search_records**: Search for records with advanced filtering
|
|
69
|
+
|
|
70
|
+
- Inputs: `model_name` (string), `domain` (array), `fields` (optional array), `limit` (optional number), `offset` (optional number), `order` (optional string)
|
|
71
|
+
- Returns: Dictionary with matching records
|
|
72
|
+
|
|
73
|
+
- **search_ids**: Get only IDs of matching records
|
|
74
|
+
|
|
75
|
+
- Inputs: `model_name` (string), `domain` (array), `offset` (optional number), `limit` (optional number), `order` (optional string)
|
|
76
|
+
- Returns: Dictionary with list of IDs
|
|
77
|
+
|
|
78
|
+
- **search_count**: Count records matching a domain
|
|
79
|
+
- Inputs: `model_name` (string), `domain` (array)
|
|
80
|
+
- Returns: Dictionary with count
|
|
81
|
+
|
|
82
|
+
### Model Operations
|
|
83
|
+
|
|
84
|
+
- **search_models**: Search for available models in the Odoo system
|
|
85
|
+
|
|
86
|
+
- Inputs: `query` (string) - Search term for model names and display names
|
|
87
|
+
- Returns: Dictionary with matching models
|
|
88
|
+
|
|
89
|
+
- **get_model_info**: Get information about a specific model
|
|
90
|
+
|
|
91
|
+
- Inputs: `model_name` (string)
|
|
92
|
+
- Returns: Dictionary with model information
|
|
93
|
+
|
|
94
|
+
- **get_model_fields**: Get field definitions for a model
|
|
95
|
+
- Inputs: `model_name` (string), `query_field` (string)
|
|
96
|
+
- Returns: Dictionary with field definitions
|
|
97
|
+
|
|
98
|
+
### Utility Operations
|
|
99
|
+
|
|
100
|
+
- **search_and_update**: Search and update records in one operation
|
|
101
|
+
|
|
102
|
+
- Inputs: `model_name` (string), `domain` (array), `values` (object)
|
|
103
|
+
- Returns: Dictionary with affected record count and IDs
|
|
104
|
+
|
|
105
|
+
- **call_method**: Call custom methods on models
|
|
106
|
+
|
|
107
|
+
- Inputs: `model_name` (string), `method_name` (string), `args` (optional array), `kwargs` (optional object)
|
|
108
|
+
- Returns: Dictionary with method result
|
|
109
|
+
|
|
110
|
+
## Resources
|
|
111
|
+
|
|
112
|
+
### Model Information
|
|
113
|
+
|
|
114
|
+
- **odoo://models/search/{query}**: Search for models by name or description
|
|
115
|
+
- **odoo://models/{model_name}/info**: Information about a specific model
|
|
116
|
+
- **odoo://models/{model_name}/fields**: Field definitions for a specific model
|
|
117
|
+
|
|
118
|
+
### Documentation
|
|
119
|
+
|
|
120
|
+
- **odoo://help/domains**: Complete guide to Odoo domain syntax with examples
|
|
121
|
+
- **odoo://help/operations**: Documentation of all available MCP tools and workflows
|
|
122
|
+
|
|
123
|
+
## Configuration
|
|
124
|
+
|
|
125
|
+
### Odoo Connection Setup
|
|
126
|
+
|
|
127
|
+
To connect to your Odoo instance, set the following environment variables:
|
|
128
|
+
|
|
129
|
+
- `ODOO_URL`: Your Odoo server URL
|
|
130
|
+
- `ODOO_DB`: Database name
|
|
131
|
+
- `ODOO_USERNAME`: Login username
|
|
132
|
+
- `ODOO_PASSWORD`: Password or API key
|
|
133
|
+
- `ODOO_TIMEOUT`: Connection timeout in seconds (default: 30)
|
|
134
|
+
- `ODOO_VERIFY_SSL`: Whether to verify SSL certificates (default: true)
|
|
135
|
+
- `LOG_LEVEL`: Logging level (default: INFO)
|
|
136
|
+
|
|
137
|
+
### Usage with Claude Desktop
|
|
138
|
+
|
|
139
|
+
Add this to your `claude_desktop_config.json`:
|
|
140
|
+
|
|
141
|
+
```json
|
|
142
|
+
{
|
|
143
|
+
"mcpServers": {
|
|
144
|
+
"odoo": {
|
|
145
|
+
"command": "uvx",
|
|
146
|
+
"args": ["biszx-odoo-mcp"],
|
|
147
|
+
"env": {
|
|
148
|
+
"ODOO_URL": "https://your-odoo-instance.com",
|
|
149
|
+
"ODOO_DB": "your-database-name",
|
|
150
|
+
"ODOO_USERNAME": "your-username",
|
|
151
|
+
"ODOO_PASSWORD": "your-password-or-api-key"
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
## Installation
|
|
159
|
+
|
|
160
|
+
### Python Package
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
pip install biszx-odoo-mcp
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
### Running the Server
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
# Using the installed package
|
|
170
|
+
biszx-odoo-mcp
|
|
171
|
+
|
|
172
|
+
# Using uv for development
|
|
173
|
+
uv run biszx-odoo-mcp
|
|
174
|
+
|
|
175
|
+
# Using the MCP development tools
|
|
176
|
+
uv run mcp dev src/biszx_odoo_mcp/main.py
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
## License
|
|
180
|
+
|
|
181
|
+
This MCP server is licensed under the MIT License.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
biszx_odoo_mcp/__init__.py,sha256=J-K5_2GapE12EHcbhrotvjxKDYFS2aGa_eIpcsnHjIg,58
|
|
2
|
+
biszx_odoo_mcp/__main__.py,sha256=b7dX--Aowgjuvgr8Sh4aXa63TCwxPa_vLjh7JYReFz0,1256
|
|
3
|
+
biszx_odoo_mcp/exceptions.py,sha256=vVMyZekFmZIg2SsH53zcefWp_swqFkE4lxQin1OVgB0,6611
|
|
4
|
+
biszx_odoo_mcp/main.py,sha256=Rr2WNMscXqlIQUsKpEPVySQhy5BD6M8kGzLkV_zvp4Q,3889
|
|
5
|
+
biszx_odoo_mcp/server/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
+
biszx_odoo_mcp/server/context.py,sha256=PxyFxFXL3GDpUynm4j63RiUjjIagDfy1oLh1cjPfvVA,378
|
|
7
|
+
biszx_odoo_mcp/server/resources.py,sha256=EliQzuWDKibpd5MPWb2FyM65acll7EkvjYcxdLBFmsw,8389
|
|
8
|
+
biszx_odoo_mcp/server/response.py,sha256=VY85S0JPpR7F1lxweZV_lqB1cqhGtGRbsTkkBmPXimo,877
|
|
9
|
+
biszx_odoo_mcp/server/tools.py,sha256=yNYkzUg6aQ3U-f0EtBBvMHBkmCDknP4bd9JzZDphokA,14153
|
|
10
|
+
biszx_odoo_mcp/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
|
+
biszx_odoo_mcp/tools/config.py,sha256=xdV6L9CATO1PDSk6nenh1fCimONHGo25UAVuoulGFbo,2869
|
|
12
|
+
biszx_odoo_mcp/tools/odoo_client.py,sha256=jXJ88R0SfDIWqcAXq9uZlphnXEu5S80yIBMw6x3wQYc,23464
|
|
13
|
+
biszx_odoo_mcp-1.2.0.dist-info/licenses/LICENSE,sha256=_FwB4PGxcQWsToTqX33moF0HqnB45Ox6Fr0VPJiLyBI,1071
|
|
14
|
+
biszx_odoo_mcp-1.2.0.dist-info/METADATA,sha256=uF3FggYTMsxAjqq7ndgQ8vgZK_BoUJQGPT_Z28tWP74,5394
|
|
15
|
+
biszx_odoo_mcp-1.2.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
16
|
+
biszx_odoo_mcp-1.2.0.dist-info/entry_points.txt,sha256=vdIkuiVsddBLNV--8Wgaf8xHu6Pdi2DAia-ISGNdxP0,64
|
|
17
|
+
biszx_odoo_mcp-1.2.0.dist-info/top_level.txt,sha256=l6PxKyczED68V9LsRlWYClo1GfjSJaP9V-SDMnAUJbU,15
|
|
18
|
+
biszx_odoo_mcp-1.2.0.dist-info/RECORD,,
|
|
@@ -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 @@
|
|
|
1
|
+
biszx_odoo_mcp
|