OPERA Cloud MCP Server
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_reservationcheck_room_availability,get_reservation_historybulk_create_reservations,get_bulk_operation_statusget_reservation_client_metrics
Guest Management (9 tools)
search_guests,get_guest_profile,create_guest_profile,update_guest_profileget_guest_preferences,update_guest_preferencesget_guest_stay_historymerge_guest_profilesget_guest_loyalty_info
Room Management (13 tools)
get_room_status,update_room_status,check_room_availabilityget_housekeeping_tasks,create_housekeeping_task,complete_housekeeping_taskget_inventory_levels,update_inventory,get_inventory_status,update_inventory_stockget_room_inspection,create_maintenance_requestget_cleaning_schedule
Operations Management (12 tools)
check_in_guest,check_out_guest,process_walk_inget_arrivals_report,get_departures_report,get_occupancy_report,get_no_show_report,get_front_desk_summaryassign_room,get_in_house_guestscreate_activity_booking,create_dining_reservation
Financial Management (9 tools)
get_guest_folio,post_charge_to_roomprocess_payment,process_refundgenerate_folio_report,get_daily_revenue_report,get_outstanding_balancestransfer_charges,void_transaction
Server / Auth (3 tools, in main.py)
get_auth_status,validate_auth_credentialsget_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 Claude Code marketplace
This repo ships a 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, register the www-mcp-servers marketplace once with Claude Code and then install the plugin: claude plugin install opera-cloud --marketplace www-mcp-servers. 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
- Implementation Plan - Development roadmap
- Production Monitoring - Monitoring setup
- Security Implementation - Security configuration
- AGENTS.md - Complete tool reference for AI agents
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Run quality checks:
uv run crackerjack - Submit a pull request
License
BSD 3-Clause License - see LICENSE for details.
Support
- Issues: GitHub Issues
- Documentation: See
/docsdirectory - Examples: See
/examplesdirectory
Built for the hospitality industry using FastMCP and Oracle OPERA Cloud.
Built on Oneiric for runtime configuration and mcp-common for the FastMCP baseline. Crackerjack gates every commit.
Metadata
Release files for opera-cloud-mcp 0.6.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| opera_cloud_mcp-0.6.5.tar.gz | 325.4 kB | Without provenance | Details for opera_cloud_mcp-0.6.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| opera_cloud_mcp-0.6.5-py3-none-any.whl | Python 3 | none | any | Details for opera_cloud_mcp-0.6.5-py3-none-any.whl |
Total release size: 535.6 kB
Release files / opera_cloud_mcp-0.6.5.tar.gz
| Download URL | opera_cloud_mcp-0.6.5.tar.gz |
|---|---|
| Size | 325.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
922da7d40cde957cfd82f31f64ca70db9d5e96a46f9ed9c36923196804eff72b
|
|
BLAKE2b-256 checksum How to use checksums |
45bbc9bed2fa389f6c7a0ba70645a704135f88c307379de18862cd56d7478403
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","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.5-py3-none-any.whl
| Download URL | opera_cloud_mcp-0.6.5-py3-none-any.whl |
|---|---|
| Size | 210.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
76cd3845667a78e0dc8eb5c81ee546ff3c057ff56b6ad1114faaa5bed8bda8f3
|
|
BLAKE2b-256 checksum How to use checksums |
3d0b66d283e45a9509ed99806d20763a1123cb050da50a6fea0350ff164cac79
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","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}
|
Security for opera-cloud-mcp 0.6.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.