Skip to main content

OPERA Cloud MCP Server

Code style: crackerjack Runtime: oneiric Framework: FastMCP uv Python: 3.14+

Unofficial Model Context Protocol (MCP) server for Oracle OPERA Cloud API integration, enabling AI agents to interact with hospitality management systems.

Features

  • Complete OPERA Cloud Integration: Access to reservations, guests, rooms, operations, and financial data
  • FastMCP Framework: Built on FastMCP for high-performance MCP protocol support
  • Production Ready: Security, monitoring, rate limiting, and Docker deployment
  • 56 Tools: Comprehensive API coverage across 5 core domains (plus 3 server/auth tools)
  • Enterprise Security: OAuth2 authentication, token refresh, and audit logging

Quick Start

Installation

# Clone the repository
git clone https://github.com/lesleslie/opera-cloud-mcp.git
cd opera-cloud-mcp

# Install dependencies
uv sync

# Copy environment template
cp .env.example .env

Configuration

Edit .env with your OPERA Cloud credentials:

OPERA_BASE_URL=https://api.oracle-hospitality.com
OPERA_TOKEN_URL=https://api.oracle-hospitality.com/oauth/v1/tokens
OPERA_API_VERSION=v1
OPERA_CLIENT_ID=your_client_id
OPERA_CLIENT_SECRET=your_client_secret
OPERA_ENVIRONMENT=production

Authentication uses OAuth2 client credentials only — there are no OPERA_CLOUD_USERNAME / OPERA_CLOUD_PASSWORD variables. See .env.example for the full list including optional OPERA_SECURITY_* knobs.

Running the Server

# Development
python -m opera_cloud_mcp

# Or with uv
uv run python -m opera_cloud_mcp

MCP Integration

Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "opera-cloud-mcp": {
      "command": "python",
      "args": ["-m", "opera_cloud_mcp"],
      "cwd": "/path/to/opera-cloud-mcp",
      "env": {
        "OPERA_BASE_URL": "https://api.oracle-hospitality.com",
        "OPERA_TOKEN_URL": "https://api.oracle-hospitality.com/oauth/v1/tokens",
        "OPERA_API_VERSION": "v1",
        "OPERA_CLIENT_ID": "your_client_id",
        "OPERA_CLIENT_SECRET": "your_client_secret",
        "OPERA_ENVIRONMENT": "production"
      }
    }
  }
}

Other MCP Clients

See example.mcp.json and example.mcp.dev.json for configuration templates.

Available Tools

The server provides 56 tools across 5 domains (plus 3 server/auth tools in main.py):

Reservation Management (10 tools)

  • search_reservations, get_reservation, create_reservation, modify_reservation, cancel_reservation
  • check_room_availability, get_reservation_history
  • bulk_create_reservations, get_bulk_operation_status
  • get_reservation_client_metrics

Guest Management (9 tools)

  • search_guests, get_guest_profile, create_guest_profile, update_guest_profile
  • get_guest_preferences, update_guest_preferences
  • get_guest_stay_history
  • merge_guest_profiles
  • get_guest_loyalty_info

Room Management (13 tools)

  • get_room_status, update_room_status, check_room_availability
  • get_housekeeping_tasks, create_housekeeping_task, complete_housekeeping_task
  • get_inventory_levels, update_inventory, get_inventory_status, update_inventory_stock
  • get_room_inspection, create_maintenance_request
  • get_cleaning_schedule

Operations Management (12 tools)

  • check_in_guest, check_out_guest, process_walk_in
  • get_arrivals_report, get_departures_report, get_occupancy_report, get_no_show_report, get_front_desk_summary
  • assign_room, get_in_house_guests
  • create_activity_booking, create_dining_reservation

Financial Management (9 tools)

  • get_guest_folio, post_charge_to_room
  • process_payment, process_refund
  • generate_folio_report, get_daily_revenue_report, get_outstanding_balances
  • transfer_charges, void_transaction

Server / Auth (3 tools, in main.py)

  • get_auth_status, validate_auth_credentials
  • get_server_info

For full input/output schemas see AGENTS.md or query the live server with opera-cloud-mcp mcp list-tools.

Development

Code Quality

# Run all quality checks
uv run crackerjack

# Individual tools
uv run ruff check --fix
uv run mypy .
uv run pytest --cov=opera_cloud_mcp

Testing

# Run tests
uv run pytest

# With coverage
uv run pytest --cov=opera_cloud_mcp --cov-report=html

# The `--cov-fail-under` threshold (currently 39%) is set in `pyproject.toml` under
# `[tool.pytest.ini_options].addopts`. Raise it as you add tests.

Production Deployment

Docker

# Build image
docker build -t opera-cloud-mcp .

# Run container
docker run -d \
  --name opera-cloud-mcp \
  -p 3037:3037 \
  --env-file .env \
  opera-cloud-mcp

Docker Compose

For full stack with monitoring:

docker-compose up -d

Includes:

  • OPERA Cloud MCP Server
  • Redis (optional caching)
  • Prometheus (metrics)
  • Grafana (monitoring dashboards)

Environment Variables

All variables use the OPERA_ env_prefix defined in opera_cloud_mcp/config/settings.py. See .env.example for the authoritative list. The most-used ones:

Variable Description Required
OPERA_BASE_URL OPERA Cloud API base URL Yes
OPERA_TOKEN_URL OAuth2 token endpoint URL Yes
OPERA_API_VERSION OPERA Cloud API version (e.g. v1) Yes
OPERA_CLIENT_ID OAuth2 client ID Yes
OPERA_CLIENT_SECRET OAuth2 client secret Yes
OPERA_ENVIRONMENT production, staging, or development Yes
OPERA_DEFAULT_HOTEL_ID Default hotel identifier when none is supplied No
OPERA_REQUEST_TIMEOUT HTTP request timeout (seconds) No (default: 30)
OPERA_MAX_RETRIES Retry attempts for transient HTTP errors No (default: 3)
OPERA_OAUTH_MAX_RETRIES Retry attempts for OAuth token fetches No (default: 3)
OPERA_OAUTH_RETRY_BACKOFF OAuth retry backoff (seconds) No (default: 1.0)
OPERA_ENABLE_CACHE Enable in-memory response caching No (default: true)
OPERA_CACHE_TTL Cache TTL (seconds) No (default: 300)
OPERA_ENABLE_PERSISTENT_TOKEN_CACHE Persist OAuth tokens across restarts No (default: true)
OPERA_LOG_LEVEL Log level (DEBUG/INFO/WARNING/ERROR) No (default: INFO)
OPERA_LOG_FORMAT Log record format string No
OPERA_ENABLE_STRUCTURED_LOGGING Emit JSON logs No (default: true)
OPERA_SECURITY_* Production security knobs (rate limiting, audit, anomaly detection, etc.) — see .env.example No

Authentication is OAuth2 client-credentials only. There is no OPERA_USERNAME / OPERA_PASSWORD pair.

Monitoring

Health Checks

  • Health: GET /health - Basic health status
  • Ready: GET /ready - Readiness probe for K8s
  • Metrics: GET /metrics - Prometheus metrics

Observability

  • Structured Logging: JSON logs with correlation IDs
  • Metrics: Request rates, latencies, error rates
  • Tracing: Distributed tracing support
  • Alerting: Prometheus alerting rules

Security

Authentication

  • OAuth2 with automatic token refresh
  • Secure credential storage
  • Token binding for enhanced security

Security Features

  • Rate limiting with token bucket algorithm
  • Circuit breaker for service resilience
  • Input validation and sanitization
  • Audit logging for compliance

Production Security

See docs/security-implementation.md for detailed security configuration.

Installation via Bodai Marketplace

This repo ships a Bodai Claude Code plugin. The plugin manifest (.claude-plugin/plugin.json) registers the local MCP server (.mcp.json, default http://localhost:3037/mcp) under the opera-cloud namespace and exposes three slash commands: /opera-cloud-reservations, /opera-cloud-guests, /opera-cloud-rooms. To install, add the Bodai marketplace once and then install the plugin: claude plugin marketplace add /Users/les/Projects/bodai-plugins followed by claude plugin install opera-cloud --marketplace bodai-plugins. Once installed, start the server with opera-cloud-mcp (HTTP on port 3037) and the slash commands will see the live mcp__opera-cloud__* tools.

Documentation

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Run quality checks: uv run crackerjack
  5. Submit a pull request

License

BSD 3-Clause License - see LICENSE for details.

Support

  • Issues: GitHub Issues
  • Documentation: See /docs directory
  • Examples: See /examples directory

Built for the hospitality industry using FastMCP and Oracle OPERA Cloud.

Metadata

Release files for opera-cloud-mcp 0.6.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for opera-cloud-mcp 0.6.2
File Size Uploaded
opera_cloud_mcp-0.6.2.tar.gz 323.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for opera-cloud-mcp 0.6.2
File Interpreter ABI Platform
opera_cloud_mcp-0.6.2-py3-none-any.whl Python 3 none any Details

Total release size: 534.1 kB

Release files / opera_cloud_mcp-0.6.2.tar.gz

Download URL opera_cloud_mcp-0.6.2.tar.gz
Size 323.3 kB
Tags Source
SHA-256 checksum
How to use checksums
8b8692224ee3b27aaccab195fed43dfb7d538ca030da92cfa824d5a979d3863e
BLAKE2b-256 checksum
How to use checksums
6de1d83cbffeb0b440e5676bd8de5d902d057425aa7dad09f6a355a85d76b6ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / opera_cloud_mcp-0.6.2-py3-none-any.whl

Download URL opera_cloud_mcp-0.6.2-py3-none-any.whl
Size 210.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4d8f5d51b4029a5e6bd74f2f7cb5f111101439cf854b8dbbecb8e5a7f99c6e54
BLAKE2b-256 checksum
How to use checksums
e37707a3d73e96e16b8363ec7ec47e5a78d7d2be034bfbd87dd80e7cd88a382f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

0.6.5

2 release files

0.6.4

2 release files

0.6.3

2 release files

This release

0.6.2 This release

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.7

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page