Metadata-Version: 2.4
Name: odoorpc-mcp
Version: 0.1.2
Summary: MCP server that exposes Odoo database records to LLMs via Model Context Protocol
Project-URL: Homepage, https://github.com/benagricola/odoo-mcp
Project-URL: Repository, https://github.com/benagricola/odoo-mcp
Project-URL: Issues, https://github.com/benagricola/odoo-mcp/issues
Project-URL: Documentation, https://github.com/benagricola/odoo-mcp#readme
Author-email: Ben A <717328+benagricola@users.noreply.github.com>
License: MIT
License-File: LICENSE
Keywords: ai,llm,mcp,model-context-protocol,odoo
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Office/Business
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.12
Requires-Dist: fastmcp>=0.6.0
Requires-Dist: odoorpc>=0.9.0
Requires-Dist: python-dotenv>=1.1.0
Provides-Extra: dev
Requires-Dist: black>=24.0.0; extra == 'dev'
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Requires-Dist: ruff>=0.6.0; extra == 'dev'
Description-Content-Type: text/markdown

# Odoo MCP Server

A Model Context Protocol (MCP) server that provides LLMs with read-only access to Odoo databases. This server exposes Odoo models and records through the MCP protocol, allowing AI assistants to query and analyze your Odoo data.

## Features

- **Read-only access** to Odoo databases via OdooRPC
- **Model discovery** - List all available Odoo models
- **Field introspection** - Get detailed field information for any model
- **Flexible querying** - Search records with Odoo's domain syntax
- **Record reading** - Fetch specific records by ID
- **Count operations** - Get record counts without fetching data
- **Environment-based configuration** - Secure credential management
- **MCP compliance** - Works with any MCP-compatible client

## Installation

Install directly with uvx (recommended):

# Odoo MCP Server

A Model Context Protocol (MCP) server that provides LLMs with read-only access to Odoo databases. This server exposes Odoo models and records through the MCP protocol, allowing AI assistants to query and analyze your Odoo data.

## Features

- Read-only access to Odoo databases via OdooRPC
- Model discovery – list all available Odoo models
- Field introspection – get detailed field information for any model
- Flexible querying – search records with Odoo's domain syntax
- Record reading – fetch specific records by ID
- Count operations – get record counts without fetching data
- Environment-based configuration – secure credential management
- MCP compliance – works with any MCP-compatible client

## Installation

Install directly with uvx (recommended):

```bash
uvx odoorpc-mcp
```

## VS Code MCP setup

Create a `.vscode/mcp.json` in your workspace with:

```jsonc
{
	"servers": {
		"odoo": {
			"type": "stdio",
			"command": "uvx",
			"args": [
				"odoorpc-mcp"
			],
			"env": {
				"ODOO_URL": "${input:odoo_url}",
				"ODOO_DB": "${input:odoo_db}",
				"ODOO_USERNAME": "${input:odoo_username}",
				"ODOO_PASSWORD": "${input:odoo_password}"
			}
		}
	},
	"inputs": [
		{
			"id": "odoo_url",
			"type": "promptString",
			"description": "Odoo Server URL (e.g., https://your-odoo.com)"
		},
		{
			"id": "odoo_db",
			"type": "promptString",
			"description": "Odoo Database Name"
		},
		{
			"id": "odoo_username",
			"type": "promptString",
			"description": "Odoo Username"
		},
		{
			"id": "odoo_password",
			"type": "promptString",
			"description": "Odoo Password",
			"password": true
		}
	]
}
```

Alternatively, put credentials in a `.env` file in your workspace:

```bash
ODOO_URL=https://your-odoo-instance.com
ODOO_DB=your_database
ODOO_USERNAME=your_username
ODOO_PASSWORD=your_password
```

## Usage

- Show config example:

```bash
odoorpc-mcp --config-example
```

- Print version:

```bash
odoorpc-mcp --version
```

- Start the MCP server (requires environment variables):

```bash
odoorpc-mcp
```

## Development

Build locally:

```bash
uv build
```

Run from source:

```bash
PYTHONPATH=src python3 -m odoo_mcp.cli --config-example
```

## License

MIT

