Skip to main content

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.

Add to Cursor

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

  1. Clone and set up:

    git clone https://github.com/markov-kernel/Odoo-mcp.git
    cd Odoo-mcp
    ./setup.sh
    
  2. 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"
    
  3. 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 filtering
  • get_partner - Get detailed partner information
  • get_partner_balance - Get partner's account balance

Account Operations

  • list_accounts - Browse chart of accounts
  • get_account - Get account details
  • get_account_balance - Calculate account balance for date range
  • list_account_types - List available account types

Journal & Entries

  • list_journals - List accounting journals
  • list_journal_entries - Browse journal entries
  • get_journal_entry - Get detailed entry with lines
  • get_journal_summary - Journal activity summary

Invoices & Bills

  • list_customer_invoices - List sales invoices
  • list_vendor_bills - List purchase bills
  • get_invoice - Get detailed invoice/bill
  • get_overdue_invoices - Find overdue receivables

Payments

  • list_payments - List payments with filters
  • get_payment - Get payment details
  • get_unreconciled_payments - Find unmatched payments

Financial Reports

  • get_trial_balance - Generate trial balance
  • get_profit_and_loss - P&L statement
  • get_aged_receivables - Aging report
  • get_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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fastmcp_odoo_accounting-1.0.0.tar.gz (29.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fastmcp_odoo_accounting-1.0.0-py3-none-any.whl (35.0 kB view details)

Uploaded Python 3

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

Hashes for fastmcp_odoo_accounting-1.0.0.tar.gz
Algorithm Hash digest
SHA256 0f077db50a8a87675057104d166b01310ff3dc38bef94a8c8be1ca3ea7953a09
MD5 274c6add1814a990149e8d553ec9b841
BLAKE2b-256 d95f4435802de51643c34adfc87c0aa24dccf73d39bd838a75c77c76f74638cc

See more details on using hashes here.

File details

Details for the file fastmcp_odoo_accounting-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for fastmcp_odoo_accounting-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7f94acf7aa22a9719e572a899c9eac6759022ab482a5c850443afd4caeb921f7
MD5 30a8c0bec145ac7d1fc5fdb295e9d4a0
BLAKE2b-256 dceb4e8ed45f6b26e4e81136e378172df7a631a1bd1fabcb2cb5ae592754c8eb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page