A FastMCP server providing read-only access to Odoo 18.3+e Accounting data
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fastmcp_odoo_accounting-1.0.0.tar.gz.
File metadata
- Download URL: fastmcp_odoo_accounting-1.0.0.tar.gz
- Upload date:
- Size: 29.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f077db50a8a87675057104d166b01310ff3dc38bef94a8c8be1ca3ea7953a09
|
|
| MD5 |
274c6add1814a990149e8d553ec9b841
|
|
| BLAKE2b-256 |
d95f4435802de51643c34adfc87c0aa24dccf73d39bd838a75c77c76f74638cc
|
File details
Details for the file fastmcp_odoo_accounting-1.0.0-py3-none-any.whl.
File metadata
- Download URL: fastmcp_odoo_accounting-1.0.0-py3-none-any.whl
- Upload date:
- Size: 35.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f94acf7aa22a9719e572a899c9eac6759022ab482a5c850443afd4caeb921f7
|
|
| MD5 |
30a8c0bec145ac7d1fc5fdb295e9d4a0
|
|
| BLAKE2b-256 |
dceb4e8ed45f6b26e4e81136e378172df7a631a1bd1fabcb2cb5ae592754c8eb
|