This MCP server enables LLMs like Claude to interact with Oracle Cloud Infrastructure (OCI) resources through 85+ comprehensive tools across 11+ service categories.
Core Capabilities:
Profile & Tenancy Management: Dynamically list, set, and switch between OCI profiles/tenancies without restarting the server
Compute Management: List, get details, start, and stop virtual machine instances with soft/force stop options
Database Management: Comprehensive control over DB Systems, DB Nodes, Regular Databases, and Autonomous Databases including start/stop/reboot/reset operations with workload types and auto-scaling info
Container Engine (OKE): Manage Kubernetes clusters and node pools, retrieve kubeconfig files, and track work requests
Networking Infrastructure: Discover and manage VCNs, Subnets, VNICs, Security Lists, Network Security Groups, and both Classic (Layer 7) and Network (Layer 4) Load Balancers
Storage Services: Manage Object Storage buckets, Block Storage volumes, Boot Volumes, and File Storage systems with usage metrics
Identity & Access Management (IAM): Audit users, groups, policies, and dynamic groups for security reviews and access troubleshooting
Security & Encryption: Manage KMS Vaults and Encryption Keys with algorithm and protection mode details
Monitoring & Observability: List alarms, query metric data using MQL, and search/list logs for troubleshooting and incident response
Cost Management: Analyze usage and costs by service or compartment with daily/monthly granularity, and track budgets with actual and forecasted spend
Infrastructure Utilities: Browse availability domains, fault domains, compute images, shapes with specs, and region information
Key Features: Multi-tenancy support, async operations, comprehensive error handling, and production-ready logging leveraging standard OCI CLI configuration for secure authentication.
MCP Server for Oracle Cloud Infrastructure (OCI)
This project implements a Model Context Protocol (MCP) server for Oracle Cloud Infrastructure, allowing LLMs like Claude to interact directly with OCI resources.

Features
Dynamic Profile Selection: Switch between OCI profiles/tenancies without restarting the server
Connection to Oracle Cloud using standard OCI CLI configuration
85 comprehensive tools to list and manage OCI resources across 11+ service categories
Instance lifecycle management (start, stop)
Database Systems and DB Nodes management
Container Engine for Kubernetes (OKE) cluster and node pool management
Integration with the MCP protocol to facilitate access from Claude Desktop
Prerequisites
Python 3.10 or higher
OCI CLI configured (
oci setup config)Appropriate permissions in Oracle Cloud
Installation
Clone this repo
Usage
Starting the Server
Option 1: Dynamic Profile Selection (Recommended)
Start without a profile and select it at runtime:
Then use the MCP tools to manage profiles:
list_oci_profiles- See available profiles from ~/.oci/configset_oci_profile- Activate a specific profileget_current_oci_profile- Check which profile is active
Option 2: With Default Profile
Start with a specific profile pre-loaded:
With uv:
Switching Between Tenancies
You can switch between different OCI tenancies without restarting:
Configuration for Claude Desktop (MacOS)
Add this configuration to your file:
/Users/<usuario>/Library/Application Support/Claude/claude_desktop_config.json
With dynamic profile selection (recommended):
With fixed profile:
With
π Available MCP Tools
Profile Management π
list_oci_profiles- List all available OCI profiles from ~/.oci/configset_oci_profile- Activate a specific profile for API callsget_current_oci_profile- Show currently active profile
Identity & Access Management π
Compartments
list_compartments- List all compartments accessible to you
Users
list_users- List all IAM users in a compartment with capabilities and MFA statusget_user- Get detailed user information including group memberships
Groups
list_groups- List all IAM groups in a compartment with member countget_group- Get detailed group information including members
Policies
list_policies- List all IAM policies in a compartment with statementsget_policy- Get detailed policy information with all policy statements
Dynamic Groups
list_dynamic_groups- List all dynamic groups with matching rulesget_dynamic_group- Get detailed dynamic group info with instance principal rules
Compute Resources
list_instances- List virtual machine instances in a compartmentget_instance- Get detailed information about a specific instancestart_instance- Start a stopped instancestop_instance- Stop a running instance (supports soft/force stop)
Databases π₯
DB Systems
list_db_systems- List DB Systems in a compartmentget_db_system- Get detailed DB System informationlist_db_nodes- List DB Nodes in a compartment (optionally filtered by DB System)get_db_node- Get detailed DB Node informationstart_db_node- Start a stopped DB Nodestop_db_node- Stop a running DB Node (soft or hard stop)reboot_db_node- Reboot a DB Nodereset_db_node- Reset (force reboot) a DB Nodesoftreset_db_node- Soft reset (graceful reboot) a DB Nodestart_db_system- Start all nodes of a DB Systemstop_db_system- Stop all nodes of a DB System
Regular Databases π
list_databases- List databases in a compartment (optionally filtered by DB System)get_database- Get detailed database information including connection strings and PDB name
Autonomous Databases π
list_autonomous_databases- List Autonomous Databases with workload type and connection infoget_autonomous_database- Get detailed ADB info including wallet info and auto-scaling settings
Networking
Virtual Cloud Networks (VCNs)
list_vcns- List all VCNs in a compartment with CIDR blocks and DNS infoget_vcn- Get detailed VCN information including IPv6 CIDR blocks
Subnets
list_subnets- List all subnets in a compartment (optionally filtered by VCN)get_subnet- Get detailed subnet information with security lists and routing
Virtual Network Interface Cards (VNICs)
list_vnics- List all VNICs in a compartment (optionally filtered by instance)get_vnic- Get detailed VNIC information including IP addresses and NSG associations
Security
list_security_lists- List security lists with ingress/egress rules (optionally filtered by VCN)get_security_list- Get detailed security list with all ruleslist_network_security_groups- List Network Security Groups (NSGs) in a compartmentget_network_security_group- Get detailed NSG information with all security rules
Storage π
Object Storage
get_namespace- Get the Object Storage namespace for the tenancylist_buckets- List all Object Storage buckets in a compartmentget_bucket- Get detailed bucket information including public access settings and versioning
Block Storage
list_volumes- List all Block Storage volumes in a compartmentget_volume- Get detailed volume information including size, performance tier, and backup policylist_boot_volumes- List all boot volumes in a compartment (optionally filtered by AD)get_boot_volume- Get detailed boot volume information including source image
File Storage
list_file_systems- List all File Storage file systems in a compartment and ADget_file_system- Get detailed file system information including metered bytes and snapshots
Load Balancers π
Classic Load Balancers
list_load_balancers- List all classic load balancers in a compartmentget_load_balancer- Get detailed load balancer information including backend sets, listeners, and certificates
Network Load Balancers
list_network_load_balancers- List all network load balancers in a compartmentget_network_load_balancer- Get detailed network load balancer information including backend sets and listeners
Infrastructure Utilities π
Availability and Fault Domains
list_availability_domains- List all availability domains in a compartmentlist_fault_domains- List all fault domains in an availability domain
Compute Images
list_images- List all compute images with OS, version, and sizeget_image- Get detailed image information including launch options
Compute Shapes
list_shapes- List all compute shapes with CPU, memory, network, and GPU specs
Regions and Tenancy
list_regions- List all available OCI regionsget_tenancy_info- Get tenancy details including name and home region
Security & Encryption π
KMS Vaults
list_vaults- List all KMS vaults in a compartmentget_vault- Get detailed vault information including crypto and management endpoints
Encryption Keys
list_keys- List all encryption keys in a vault's compartmentget_key- Get detailed key information including algorithm, shape, and versions
Cost Management π
Usage and Cost Analysis
get_cost_usage_summary- Get cost and usage summary for a tenancy with daily or monthly granularityget_cost_by_service- Get cost breakdown by service for a specified time periodget_cost_by_compartment- Get cost breakdown by compartment for a specified time period
Budgets
list_budgets- List all budgets with amount, actual spend, and forecasted spendget_budget- Get detailed budget information including targets and alert rules
Monitoring & Observability π
Alarms
list_alarms- List all alarms with query, severity, and destinationsget_alarm- Get detailed alarm information including thresholds and notification settingsget_alarm_history- Get alarm state history with timestamps and state transitions
Metrics
list_metrics- List available metrics with namespaces and dimensionsquery_metric_data- Query metric data for a time range using MQL
Logs
search_logs- Search logs using the Logging Search APIlist_log_groups- List all log groups in a compartmentlist_logs- List all logs in a log group with types and retention
Container Engine for Kubernetes (OKE) π
Clusters
list_oke_clusters- List all OKE clusters with Kubernetes version and endpointsget_oke_cluster- Get detailed cluster info including network config, add-ons, and available upgradesget_oke_cluster_kubeconfig- Get kubeconfig file content for kubectl access
Node Pools
list_oke_node_pools- List node pools with shape, image, and placement configurationget_oke_node_pool- Get detailed node pool info including individual nodes, eviction settings, and cycling details
Work Requests
list_oke_work_requests- List async operations (create, update, delete) for OKE resourcesget_oke_work_request- Get detailed work request status and progress
π‘ Usage Examples
Profile Management
Identity & Access Management π
Compute Instance Management
Database Management
Networking Management
Storage Management π
Load Balancer Management π
Infrastructure Utilities π
Security & Encryption π
Cost Management π
Monitoring & Observability π
Container Engine for Kubernetes (OKE) π
Resource Discovery
π Recent Improvements
v1.15 - Container Engine for Kubernetes (OKE) Tools (Latest) βΈοΈ
7 new OKE tools: Clusters, Node Pools, and Work Requests
Clusters: List/get clusters with Kubernetes version, endpoints, network config, and available upgrades
Kubeconfig: Get kubeconfig file content for kubectl access to clusters
Node Pools: List/get node pools with detailed node information, placement config, and eviction settings
Work Requests: Track async operations (create, update, delete) for OKE resources
Essential for managing Kubernetes infrastructure on OCI
Total MCP tools increased from 78 to 85
Added comprehensive OKE usage examples in README
v1.14 - Monitoring & Observability Tools π
8 new monitoring tools: Alarms, Metrics, and Logs
Alarms: List/get alarms with severity, query history, and state transitions
Metrics: List metrics, query time-series data with MQL for performance analysis
Logs: Search logs, list log groups and logs for troubleshooting
Essential for real-time monitoring, troubleshooting, and incident response
Total MCP tools increased from 70 to 78
Added comprehensive monitoring & observability usage examples in README
v1.13 - Cost Management Tools π°
5 new cost management tools: Usage/Cost Analysis and Budgets
Usage Analysis: Get cost summaries with daily/monthly granularity
Cost Breakdown: Analyze costs by service or compartment for any time period
Budget Management: List/get budgets with actual spend, forecasted spend, and alert rules
Essential for cost optimization, budget tracking, and financial governance
Total MCP tools increased from 65 to 70
Added comprehensive cost management usage examples in README
v1.12 - Security & Encryption Tools π
4 new security tools: KMS Vaults and Encryption Keys
KMS Vaults: List/get vaults with crypto and management endpoints
Encryption Keys: List/get keys with algorithm, protection mode, and key shape
Complete KMS coverage: Vault management and key discovery
Dynamic KMS Management client creation using vault endpoints
Total MCP tools increased from 61 to 65
Added comprehensive security & encryption usage examples in README
v1.11 - Infrastructure Utilities ποΈ
7 new infrastructure tools: Availability Domains, Fault Domains, Images, Shapes, Regions, and Tenancy
Availability/Fault Domains: List ADs and FDs for high availability planning
Compute Images: List/get images with OS versions and launch options
Compute Shapes: List shapes with CPU, memory, network, and GPU specifications
Regions & Tenancy: List all regions and get tenancy information
Essential for resource planning, capacity management, and infrastructure discovery
Total MCP tools increased from 54 to 61
Added comprehensive infrastructure utilities usage examples in README
v1.10 - Load Balancer Tools βοΈ
4 new load balancer tools: Classic Load Balancers and Network Load Balancers
Classic Load Balancers: List/get LBs with backend sets, listeners, and certificates
Network Load Balancers: List/get NLBs with backend configuration and IP preservation
Complete load balancing coverage: Layer 7 (classic) and Layer 4 (network) load balancers
Total MCP tools increased from 50 to 54
Added comprehensive load balancer usage examples in README
v1.9 - Identity & Access Management Tools π
8 new IAM tools: Users, Groups, Policies, Dynamic Groups
Security auditing: Review user capabilities, MFA status, and group memberships
Policy management: List and inspect all IAM policy statements
Dynamic groups: View instance principal matching rules
Essential for compliance, security audits, and access troubleshooting
Total MCP tools increased from 42 to 50
Added comprehensive IAM usage examples in README
v1.8 - Database Tools ποΈ
4 new database tools: Regular Databases and Autonomous Databases
Regular Databases: List/get databases with connection strings and PDB names
Autonomous Databases: List/get ADB with workload type, wallet info, and auto-scaling
Complete database ecosystem coverage: DB Systems, DB Nodes, Databases, and ADB
Total MCP tools increased from 38 to 42
Added comprehensive database usage examples in README
v1.7 - Storage Tools πΎ
9 new storage tools: Object Storage, Block Storage, File Storage
Object Storage: Get namespace, list/get buckets with public access info
Block Storage: List/get volumes and boot volumes with performance tiers
File Storage: List/get file systems with metered bytes
Total MCP tools increased from 29 to 38
Added comprehensive storage usage examples in README
v1.6 - Comprehensive Networking Tools π
10 new networking tools: VCNs, Subnets, VNICs, Security Lists, NSGs
Network topology discovery: Complete visibility of network infrastructure
Security auditing: Review security rules and network access controls
Connectivity troubleshooting: VNIC and routing information
Total MCP tools increased from 19 to 29
Added comprehensive networking usage examples in README
v1.5 - Dynamic Profile Selection π₯
Multi-tenancy support: Switch between OCI profiles without restarting
New MCP tools:
list_oci_profiles,set_oci_profile,get_current_oci_profileProfile requirement validation in all OCI tools
Optional
--profileargument (lazy initialization)Complete documentation in
DYNAMIC_PROFILE_SELECTION.mdUpdated README with accurate tool listing
v1.4 - Centralized Configuration
Created centralized
config.pywith all configuration constantsEliminated magic numbers throughout the codebase
Improved maintainability and discoverability of configuration values
v1.3 - Async Operations
Removed all blocking
time.sleep()callsMade all operations truly asynchronous
Improved server responsiveness
v1.2 - Standardized Error Handling
Implemented Hybrid Error Handling Pattern
Technical errors β raise exceptions
Business states β return success dictionaries
Comprehensive documentation in
ERROR_HANDLING_PATTERN.md
v1.1 - DRY Principle
Created
mcp_tool_wrapperdecoratorEliminated ~150 lines of repetitive code
Consistent error handling and logging across all tools
v1.0 - Code Cleanup
Removed unused/obsolete files
Cleaned up commented code
Established clean baseline
π Documentation
Dynamic Profile Selection Guide - Complete guide for multi-tenancy support
Error Handling Pattern - Developer guide for error handling
Error Handling Examples - Practical examples
π€ Contributing
Contributions are welcome! The codebase follows these patterns:
Hybrid error handling (raise for technical errors, return dict for business states)
Async operations (no blocking calls)
Centralized configuration (constants in
config.py)DRY principle (use decorators for common patterns)
π License
[Add your license here]