FastMCP Odoo Accounting Server
A FastMCP server providing secure, read-only access to Odoo 18.3+ Accounting data through the Model Context Protocol.
Overview
This MCP server acts as a secure gateway to Odoo Accounting data, providing comprehensive read-only access to partners, accounts, journals, invoices, payments, and financial reports through a clean, type-safe API.
Features
- 100% Read-Only: Architecturally incapable of writing data
- Comprehensive Coverage: All core Odoo Accounting entities
- Secure by Design: OAuth 2.1/Bearer JWT authentication
- Production-Grade: Full type hints, >90% test coverage
- Multiple Transports: HTTP, SSE, and stdio support
Installation
Via Cursor (Recommended)
Click the "Add to Cursor" button above, then configure your Odoo credentials in Cursor's MCP settings.
Via pip/uvx
# Using uvx (recommended)
uvx fastmcp-odoo-accounting
# Or using pip
pip install fastmcp-odoo-accounting
From Source
-
Clone and set up:
git clone https://github.com/markov-kernel/Odoo-mcp.git cd Odoo-mcp ./setup.sh
-
Configure your environment variables:
export ODOO_URL="https://your-company.odoo.com" export ODOO_DB="your_database" export ODOO_USER="api-user@company.com" export ODOO_API_KEY="your_api_key"
-
Run the server:
source venv/bin/activate odoo-accounting-mcp run
Configuration
The server requires the following environment variables:
| Variable | Description | Example |
|---|---|---|
ODOO_URL |
Your Odoo instance URL | https://company.odoo.com |
ODOO_DB |
Odoo database name | company |
ODOO_USER |
API user email | api@company.com |
ODOO_API_KEY |
API key from Odoo | your-api-key |
Available Tools
Partner Management
list_partners- List customers/vendors with filteringget_partner- Get detailed partner informationget_partner_balance- Get partner's account balance
Account Operations
list_accounts- Browse chart of accountsget_account- Get account detailsget_account_balance- Calculate account balance for date rangelist_account_types- List available account types
Journal & Entries
list_journals- List accounting journalslist_journal_entries- Browse journal entriesget_journal_entry- Get detailed entry with linesget_journal_summary- Journal activity summary
Invoices & Bills
list_customer_invoices- List sales invoiceslist_vendor_bills- List purchase billsget_invoice- Get detailed invoice/billget_overdue_invoices- Find overdue receivables
Payments
list_payments- List payments with filtersget_payment- Get payment detailsget_unreconciled_payments- Find unmatched payments
Financial Reports
get_trial_balance- Generate trial balanceget_profit_and_loss- P&L statementget_aged_receivables- Aging reportget_cash_flow_summary- Cash flow analysis
Development
Testing
# Run all tests
pytest
# Run only integration tests
pytest -m integration
# Run with coverage
pytest --cov=src
Code Quality
# Lint and format
ruff check src/
black src/
mypy src/
Architecture
- Framework: FastMCP with FastAPI/Uvicorn
- Odoo Integration: Async XML-RPC with retry logic
- Authentication: JWT Bearer tokens (optional)
- Type Safety: Full Pydantic v2 models
- Testing: 60+ integration tests
Requirements
- Python 3.10+
- Odoo 18.3+ with API access enabled
- Read access to accounting modules
Security
- Read-Only: Cannot modify any Odoo data
- Scoped Access: Each tool requires specific JWT scopes
- Input Validation: All inputs sanitized via Pydantic
- Error Handling: Sensitive errors are sanitized
License
MIT License - see LICENSE file for details.
Contributing
Contributions welcome! Please ensure:
- All tests pass (
pytest) - Code is formatted (
black src/) - Type hints are correct (
mypy src/) - New features include tests
Metadata
Release files for fastmcp-odoo-accounting 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| fastmcp_odoo_accounting-1.0.0.tar.gz | 29.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fastmcp_odoo_accounting-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 64.5 kB
Release files / fastmcp_odoo_accounting-1.0.0.tar.gz
| Download URL | fastmcp_odoo_accounting-1.0.0.tar.gz |
|---|---|
| Size | 29.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0f077db50a8a87675057104d166b01310ff3dc38bef94a8c8be1ca3ea7953a09
|
|
BLAKE2b-256 checksum How to use checksums |
d95f4435802de51643c34adfc87c0aa24dccf73d39bd838a75c77c76f74638cc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Release files / fastmcp_odoo_accounting-1.0.0-py3-none-any.whl
| Download URL | fastmcp_odoo_accounting-1.0.0-py3-none-any.whl |
|---|---|
| Size | 35.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7f94acf7aa22a9719e572a899c9eac6759022ab482a5c850443afd4caeb921f7
|
|
BLAKE2b-256 checksum How to use checksums |
dceb4e8ed45f6b26e4e81136e378172df7a631a1bd1fabcb2cb5ae592754c8eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|