Skip to main content
Glama

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.

presentation

Features

  • Dynamic Profile Selection: Switch between OCI profiles/tenancies without restarting the server

  • Connection to Oracle Cloud using standard OCI CLI configuration

  • 95 comprehensive tools to list and manage OCI resources across 11+ service categories

  • Instance lifecycle management (start, stop)

  • Database Systems and DB Nodes management

  • Exadata Cloud Service (Cloud Exadata Infrastructure, VM Clusters, Data Guard, backups, maintenance runs)

  • Container Engine for Kubernetes (OKE) cluster and node pool management

  • Integration with the MCP protocol to facilitate access from Claude Desktop

Related MCP server: Oracle Context MCP Server

Prerequisites

  • Python 3.10 or higher

  • OCI CLI configured (oci setup config)

  • Appropriate permissions in Oracle Cloud

Installation

Clone this repo

pip install git+https://github.com/modelcontextprotocol/python-sdk.git
pip install oci fastapi uvicorn click pydantic loguru
pip install -e .

Usage

Starting the Server

Option 1: Dynamic Profile Selection (Recommended)

Start without a profile and select it at runtime:

python -m mcp_server_oci.mcp_server

Then use the MCP tools to manage profiles:

  • list_oci_profiles - See available profiles from ~/.oci/config

  • set_oci_profile - Activate a specific profile

  • get_current_oci_profile - Check which profile is active

Option 2: With Default Profile

Start with a specific profile pre-loaded:

python -m mcp_server_oci.mcp_server --profile DEFAULT

With uv:

uv --directory /path/to/mcp-server-oci run python -m mcp_server_oci.mcp_server --profile DEFAULT

Switching Between Tenancies

You can switch between different OCI tenancies without restarting:

# In your MCP client (e.g., Claude):
# 1. List available profiles
"Show me available OCI profiles"

# 2. Switch to a different tenancy
"Switch to the 'production' OCI profile"

# 3. Verify current profile
"What OCI profile am I using?"

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):

"mcpServers": {
  "mcp-server-oci": {
    "command": "python",
    "args": [
      "-m",
      "mcp_server_oci.mcp_server"
    ],
    "env": {
      "PYTHONPATH": "/<PATH_TO_MCP>/mcp-server-oci",
      "FASTMCP_LOG_LEVEL": "INFO"
    }
  }
}

With fixed profile:

"mcpServers": {
  "mcp-server-oci": {
    "command": "python",
    "args": [
      "-m",
      "mcp_server_oci.mcp_server",
      "--profile", "DEFAULT"
    ],
    "env": {
      "PYTHONPATH": "/<PATH_TO_MCP>/mcp-server-oci",
      "FASTMCP_LOG_LEVEL": "INFO"
    }
  }
}

With uv and dynamic profiles:

"mcpServers": {
  "mcp-server-oci": {
    "command": "uv",
    "args": [
      "--directory",
      "/<PATH_TO_MCP>/mcp-server-oci",
      "run",
      "python",
      "-m",
      "mcp_server_oci.mcp_server"
    ],
    "env": {
      "FASTMCP_LOG_LEVEL": "INFO"
    }
  }
}

📋 Available MCP Tools

Profile Management 🆕

  • list_oci_profiles - List all available OCI profiles from ~/.oci/config

  • set_oci_profile - Activate a specific profile for API calls

  • get_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 status

  • get_user - Get detailed user information including group memberships

Groups

  • list_groups - List all IAM groups in a compartment with member count

  • get_group - Get detailed group information including members

Policies

  • list_policies - List all IAM policies in a compartment with statements

  • get_policy - Get detailed policy information with all policy statements

Dynamic Groups

  • list_dynamic_groups - List all dynamic groups with matching rules

  • get_dynamic_group - Get detailed dynamic group info with instance principal rules

Compute Resources

  • list_instances - List virtual machine instances in a compartment

  • get_instance - Get detailed information about a specific instance

  • start_instance - Start a stopped instance

  • stop_instance - Stop a running instance (supports soft/force stop)

Databases 🔥

DB Systems

  • list_db_systems - List DB Systems in a compartment

  • get_db_system - Get detailed DB System information

  • list_db_nodes - List DB Nodes in a compartment (optionally filtered by DB System)

  • get_db_node - Get detailed DB Node information

  • start_db_node - Start a stopped DB Node

  • stop_db_node - Stop a running DB Node (soft or hard stop)

  • reboot_db_node - Reboot a DB Node

  • reset_db_node - Reset (force reboot) a DB Node

  • softreset_db_node - Soft reset (graceful reboot) a DB Node

  • start_db_system - Start all nodes of a DB System

  • stop_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 info

  • get_autonomous_database - Get detailed ADB info including wallet info and auto-scaling settings

Exadata Cloud Service 🆕

  • list_cloud_exadata_infrastructures - List Cloud Exadata Infrastructures (fleet hardware) in a compartment

  • get_cloud_exadata_infrastructure - Get infra details: shape, activated/max CPU-memory-storage, maintenance windows

  • list_cloud_vm_clusters - List Cloud VM Clusters (Exadata Cloud Service RAC)

  • get_cloud_vm_cluster - Get VM cluster details: RAC nodes, SCAN DNS/VIPs, GI/system versions, subnets, NSGs

  • list_cloud_autonomous_vm_clusters - List Cloud Autonomous VM Clusters (Exadata for Autonomous DB)

Data Guard 🆕

  • list_data_guard_associations - List DG associations for a Database (query on the primary DB OCID)

  • get_data_guard_association - Get a specific DG association: role, peer role, apply lag/rate, protection mode

Backups & Maintenance 🆕

  • list_backups - List database backups by compartment or database

  • list_maintenance_runs - List maintenance runs, optionally filtered by target resource

  • get_maintenance_run - Get details of a specific maintenance run

Networking

Virtual Cloud Networks (VCNs)

  • list_vcns - List all VCNs in a compartment with CIDR blocks and DNS info

  • get_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 rules

  • list_network_security_groups - List Network Security Groups (NSGs) in a compartment

  • get_network_security_group - Get detailed NSG information with all security rules

Storage 🆕

Object Storage

  • get_namespace - Get the Object Storage namespace for the tenancy

  • list_buckets - List all Object Storage buckets in a compartment

  • get_bucket - Get detailed bucket information including public access settings and versioning

Block Storage

  • list_volumes - List all Block Storage volumes in a compartment

  • get_volume - Get detailed volume information including size, performance tier, and backup policy

  • list_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 AD

  • get_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 compartment

  • get_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 compartment

  • get_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 compartment

  • list_fault_domains - List all fault domains in an availability domain

Compute Images

  • list_images - List all compute images with OS, version, and size

  • get_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 regions

  • get_tenancy_info - Get tenancy details including name and home region

Security & Encryption 🆕

KMS Vaults

  • list_vaults - List all KMS vaults in a compartment

  • get_vault - Get detailed vault information including crypto and management endpoints

Encryption Keys

  • list_keys - List all encryption keys in a vault's compartment

  • get_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 granularity

  • get_cost_by_service - Get cost breakdown by service for a specified time period

  • get_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 spend

  • get_budget - Get detailed budget information including targets and alert rules

Monitoring & Observability 🆕

Alarms

  • list_alarms - List all alarms with query, severity, and destinations

  • get_alarm - Get detailed alarm information including thresholds and notification settings

  • get_alarm_history - Get alarm state history with timestamps and state transitions

Metrics

  • list_metrics - List available metrics with namespaces and dimensions

  • query_metric_data - Query metric data for a time range using MQL

Logs

  • search_logs - Search logs using the Logging Search API

  • list_log_groups - List all log groups in a compartment

  • list_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 endpoints

  • get_oke_cluster - Get detailed cluster info including network config, add-ons, and available upgrades

  • get_oke_cluster_kubeconfig - Get kubeconfig file content for kubectl access

Node Pools

  • list_oke_node_pools - List node pools with shape, image, and placement configuration

  • get_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 resources

  • get_oke_work_request - Get detailed work request status and progress

💡 Usage Examples

Profile Management

# From Claude or any MCP client:

# List available profiles
"Show me all available OCI profiles"

# Activate a specific profile
"Set the OCI profile to 'production'"

# Check current profile
"What OCI profile am I currently using?"

# Switch between tenancies
"Switch to the DEFAULT profile"

Identity & Access Management 🆕

# Users
"List all IAM users in my tenancy"
"Show me details for user ocid1.user.oc1..."
"Does this user have MFA enabled?"
"What groups is this user a member of?"

# Groups
"List all IAM groups in compartment X"
"Show me members of group 'Administrators'"
"Get details for group ocid1.group.oc1..."

# Policies
"List all IAM policies in the root compartment"
"Show me policy statements for 'network-admins-policy'"
"What permissions does this policy grant?"
"Get details for policy ocid1.policy.oc1..."

# Dynamic Groups
"List all dynamic groups in my tenancy"
"Show me matching rules for dynamic group 'instance-principals'"
"What instances match this dynamic group?"
"Get details for dynamic group ocid1.dynamicgroup.oc1..."

# Security auditing
"Which users have admin access?"
"Show me all policies that grant object storage access"
"What dynamic groups allow instance principals?"

Compute Instance Management

# List instances
"Show me all compute instances in compartment ocid1.compartment.oc1..."

# Get instance details
"Get details for instance ocid1.instance.oc1..."

# Start/stop instances
"Start the instance ocid1.instance.oc1..."
"Stop the instance ocid1.instance.oc1... with force stop"

Database Management

# DB Systems
"Show me all DB Systems in compartment ocid1.compartment.oc1..."
"Get details for DB System ocid1.dbsystem.oc1..."

# DB Nodes management
"List all DB Nodes for DB System ocid1.dbsystem.oc1..."
"Start DB Node ocid1.dbnode.oc1..."
"Stop all nodes of DB System ocid1.dbsystem.oc1..."
"Reboot DB Node ocid1.dbnode.oc1..."
"Soft reset DB Node ocid1.dbnode.oc1..."

# Regular Databases 🆕
"List all databases in compartment X"
"Show me databases in DB System Y"
"Get connection strings for database ocid1.database.oc1..."
"What is the character set and PDB name of this database?"

# Autonomous Databases 🆕
"List all Autonomous Databases in compartment Z"
"Show me details for ADB ocid1.autonomousdatabase.oc1..."
"What workload type is this Autonomous Database?"
"Get connection strings and wallet info for this ADB"
"Is auto-scaling enabled on this Autonomous Database?"

Networking Management

# VCN operations
"List all VCNs in compartment ocid1.compartment.oc1..."
"Show me details for VCN ocid1.vcn.oc1..."

# Subnet operations
"List all subnets in VCN ocid1.vcn.oc1..."
"Get details for subnet ocid1.subnet.oc1..."

# Security operations
"Show me all security lists in compartment X"
"List all network security groups in VCN Y"
"Get security rules for security list ocid1.securitylist.oc1..."

# VNIC operations
"List all VNICs for instance ocid1.instance.oc1..."
"Show me details for VNIC ocid1.vnic.oc1..."

Storage Management 🆕

# Object Storage operations
"What is my Object Storage namespace?"
"List all buckets in compartment X"
"Show me details for bucket 'my-data-bucket'"
"Is bucket 'public-bucket' publicly accessible?"

# Block Storage operations
"List all volumes in compartment Y"
"Show me details for volume ocid1.volume.oc1..."
"List all boot volumes in compartment Z"
"What is the size and performance tier of this volume?"

# File Storage operations
"List all file systems in compartment W and AD-1"
"Show me details for file system ocid1.filesystem.oc1..."
"How many bytes is this file system using?"

Load Balancer Management 🆕

# Classic Load Balancers
"List all load balancers in compartment X"
"Show me details for load balancer ocid1.loadbalancer.oc1..."
"What backend sets and listeners does this load balancer have?"
"Show me health check configuration for this load balancer"

# Network Load Balancers
"List all network load balancers in compartment Y"
"Show me details for network load balancer ocid1.networkloadbalancer.oc1..."
"What is the backend configuration for this NLB?"
"Is source IP preservation enabled on this network load balancer?"

# Load balancer analysis
"Show me all load balancers and their IP addresses"
"Which load balancers are private vs public?"

Infrastructure Utilities 🆕

# Availability and Fault Domains
"List all availability domains in my tenancy"
"Show me fault domains in availability domain AD-1"
"What availability domains are available in region us-ashburn-1?"

# Compute Images
"List all compute images in compartment X"
"Show me details for image ocid1.image.oc1..."
"What Oracle Linux images are available?"
"What is the size and OS version of this image?"

# Compute Shapes
"List all compute shapes available in compartment Y"
"What shapes support GPU?"
"Show me flexible shapes with configurable OCPUs"
"What is the memory and network bandwidth for shape VM.Standard.E4.Flex?"

# Regions and Tenancy
"List all available OCI regions"
"What is my tenancy name and home region?"
"Show me tenancy information"

Security & Encryption 🆕

# KMS Vaults
"List all vaults in compartment X"
"Show me details for vault ocid1.vault.oc1..."
"What is the management endpoint for this vault?"
"Is this vault primary or replica?"

# Encryption Keys
"List all encryption keys in vault Y"
"Show me details for key ocid1.key.oc1..."
"What algorithm and protection mode does this key use?"
"What is the current key version?"

# Key management workflow
"First, get vault details to obtain the management_endpoint"
"Then, use that endpoint to list or get keys in that vault"

Cost Management 🆕

# Usage and Cost Analysis
"Show me cost and usage summary for the last 30 days"
"Get cost breakdown by service from 2024-01-01 to 2024-01-31"
"What are my costs by compartment for this month?"
"Show me daily cost summary for my tenancy"

# Cost analysis queries
"Which services are costing the most?"
"What compartment has the highest spend?"
"Show me monthly cost trends"

# Budgets
"List all budgets in compartment X"
"Show me budget details for budget ocid1.budget.oc1..."
"What is my actual spend vs budget?"
"Show me forecasted spend for this budget"
"Which budgets have alert rules configured?"

Monitoring & Observability 🆕

# Alarms
"List all alarms in compartment X"
"Show me details for alarm ocid1.alarm.oc1..."
"What alarms are currently firing?"
"Show me alarm history for the last 24 hours"
"Which alarms have critical severity?"

# Metrics
"List all available metrics in compartment Y"
"Show me CPU metrics for compute instances"
"Query CpuUtilization for the last hour"
"What metrics are available for namespace oci_computeagent?"

# Logs
"Search logs for errors in the last hour"
"List all log groups in compartment Z"
"Show me logs in log group ocid1.loggroup.oc1..."
"Search for 'ERROR' in application logs"

# Troubleshooting workflows
"Show me all firing alarms and their metric queries"
"Get CPU utilization data for instance X in the last 2 hours"
"Search logs for errors related to database connections"

Container Engine for Kubernetes (OKE) 🆕

# Clusters
"List all OKE clusters in compartment X"
"Show me details for cluster ocid1.cluster.oc1..."
"What Kubernetes version is this cluster running?"
"What upgrades are available for my cluster?"
"Get the kubeconfig for cluster ocid1.cluster.oc1..."
"What are the public and private endpoints for this cluster?"

# Node Pools
"List all node pools in compartment Y"
"Show me node pools for cluster Z"
"Get details for node pool ocid1.nodepool.oc1..."
"What is the shape and size of this node pool?"
"Show me individual nodes in this node pool"
"What is the Kubernetes version of the node pool?"

# Work Requests
"List all OKE work requests in compartment A"
"Show me work requests for cluster B"
"Get details for work request ocid1.clustersworkrequest.oc1..."
"What operations are currently in progress?"
"Show me the status of cluster creation"

# Kubernetes cluster management workflows
"List all clusters and their Kubernetes versions"
"Show me clusters that have available upgrades"
"Get kubeconfig for all clusters in my compartment"
"Which node pools are running outdated Kubernetes versions?"
"Show me all work requests that failed"

Resource Discovery

# List compartments
"List all compartments in my tenancy"

# Cross-resource queries
"Show me all running instances in compartment X"
"List all DB Systems and their current states"
"Show me the complete network topology for compartment X"

🚀 Recent Improvements

v1.16 - Exadata Cloud Service Tools (Latest) 🗄️

  • 10 new tools: Cloud Exadata Infrastructure, Cloud VM Clusters, Cloud Autonomous VM Clusters, Data Guard, Backups, and Maintenance Runs

  • Exadata Cloud Service: List/get Cloud Exadata Infrastructures and Cloud VM Clusters with RAC, SCAN DNS, and GI/system version details

  • Data Guard: List/get Data Guard associations with role, apply lag/rate, and protection mode

  • Backups & Maintenance: List backups by compartment/database, list/get maintenance runs

  • Total MCP tools increased from 85 to 95

  • Bug fixes: list_compartments now derives the tenancy OCID from config instead of get_user, fixing 404 errors for federated/IAM-Domain users; list_available_profiles now includes the [DEFAULT] profile section

  • Added comprehensive Exadata Cloud Service usage examples in README

v1.15 - Container Engine for Kubernetes (OKE) Tools ☸️

  • 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_profile

  • Profile requirement validation in all OCI tools

  • Optional --profile argument (lazy initialization)

  • Complete documentation in DYNAMIC_PROFILE_SELECTION.md

  • Updated README with accurate tool listing

v1.4 - Centralized Configuration

  • Created centralized config.py with all configuration constants

  • Eliminated magic numbers throughout the codebase

  • Improved maintainability and discoverability of configuration values

v1.3 - Async Operations

  • Removed all blocking time.sleep() calls

  • Made 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_wrapper decorator

  • Eliminated ~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

🤝 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]

Available Tools

85 tools
get_alarmB
Get detailed information about a specific alarm.

Args:
    alarm_id: OCID of the alarm to retrieve

Returns:
    Detailed alarm information including query, thresholds, and notification settings

Inputs: alarm_id (required).

get_alarm_historyB
Get alarm state history.

Args:
    alarm_id: OCID of the alarm
    alarm_historytype: Type of history (STATE_TRANSITION_HISTORY, STATE_HISTORY, RULE_HISTORY)

Returns:
    List of alarm history entries with timestamps and state changes

Inputs: alarm_id (required), alarm_historytype.

get_autonomous_databaseB
Get detailed information about a specific Autonomous Database.

Args:
    autonomous_database_id: OCID of the Autonomous Database to retrieve

Returns:
    Detailed Autonomous Database information including connection strings, wallet info, and auto-scaling settings

Inputs: autonomous_database_id (required).

get_boot_volumeB
Get detailed information about a specific boot volume.

Args:
    boot_volume_id: OCID of the boot volume to retrieve

Returns:
    Detailed boot volume information including size, performance, and source image

Inputs: boot_volume_id (required).

get_bucketB
Get detailed information about a specific Object Storage bucket.

Args:
    bucket_name: Name of the bucket
    namespace: Optional namespace (if not provided, will be fetched automatically)

Returns:
    Detailed bucket information including public access settings and versioning

Inputs: bucket_name (required), namespace.

get_budgetB
Get detailed information about a specific budget.

Args:
    budget_id: OCID of the budget to retrieve

Returns:
    Detailed budget information including targets, alert rules, and spend tracking

Inputs: budget_id (required).

get_cost_by_compartmentB
Get cost breakdown by compartment for a tenancy.

Args:
    tenant_id: OCID of the tenancy
    time_usage_started: Start time in ISO format (YYYY-MM-DD)
    time_usage_ended: End time in ISO format (YYYY-MM-DD)

Returns:
    List of costs grouped by compartment with total cost per compartment

Inputs: tenant_id (required), time_usage_started (required), time_usage_ended (required).

get_cost_by_serviceB
Get cost breakdown by service for a tenancy.

Args:
    tenant_id: OCID of the tenancy
    time_usage_started: Start time in ISO format (YYYY-MM-DD)
    time_usage_ended: End time in ISO format (YYYY-MM-DD)

Returns:
    List of costs grouped by service with total cost per service

Inputs: tenant_id (required), time_usage_started (required), time_usage_ended (required).

get_cost_usage_summaryB
Get cost and usage summary for a tenancy.

Args:
    tenant_id: OCID of the tenancy
    time_usage_started: Start time in ISO format (YYYY-MM-DD)
    time_usage_ended: End time in ISO format (YYYY-MM-DD)
    granularity: Granularity of the data (DAILY or MONTHLY), defaults to DAILY

Returns:
    List of cost and usage summaries with amounts, services, and compartments

Inputs: tenant_id (required), time_usage_started (required), time_usage_ended (required), granularity.

get_current_oci_profileB

Get the currently active OCI profile.

Returns information about which profile is currently being used for API calls.

Inputs: no named parameters.

get_databaseB
Get detailed information about a specific database.

Args:
    database_id: OCID of the database to retrieve

Returns:
    Detailed database information including connection strings, character set, and PDB name

Inputs: database_id (required).

get_db_nodeD

Get DB Node details.

Inputs: db_node_id (required).

get_db_systemD

Get DB System details.

Inputs: db_system_id (required).

get_dynamic_groupB
Get detailed information about a specific dynamic group.

Args:
    dynamic_group_id: OCID of the dynamic group to retrieve

Returns:
    Detailed dynamic group information including matching rules for instance principals

Inputs: dynamic_group_id (required).

get_file_systemB
Get detailed information about a specific File Storage file system.

Args:
    file_system_id: OCID of the file system to retrieve

Returns:
    Detailed file system information including metered bytes and snapshots

Inputs: file_system_id (required).

get_groupB
Get detailed information about a specific IAM group.

Args:
    group_id: OCID of the group to retrieve

Returns:
    Detailed group information including members and description

Inputs: group_id (required).

get_imageB
Get detailed information about a specific compute image.

Args:
    image_id: OCID of the image to retrieve

Returns:
    Detailed image information including launch options and OS details

Inputs: image_id (required).

get_instanceD

Get details of a specific instance.

Inputs: instance_id (required).

get_keyA
Get detailed information about a specific encryption key.

Note: You must first get a vault to obtain its management_endpoint.

Args:
    key_id: OCID of the key to retrieve
    management_endpoint: Management endpoint from the vault (get from vault details)

Returns:
    Detailed key information including algorithm, shape, and versions

Inputs: key_id (required), management_endpoint (required).

get_load_balancerB
Get detailed information about a specific classic load balancer.

Args:
    load_balancer_id: OCID of the load balancer to retrieve

Returns:
    Detailed load balancer information including backend sets, listeners, and certificates

Inputs: load_balancer_id (required).

get_namespaceA
Get the Object Storage namespace for the tenancy.

The namespace is a unique identifier for the tenancy in Object Storage.
It's required for all Object Storage operations.

Returns:
    Dictionary with namespace information

Inputs: no named parameters.

get_network_load_balancerB
Get detailed information about a specific network load balancer.

Args:
    network_load_balancer_id: OCID of the network load balancer to retrieve

Returns:
    Detailed network load balancer information including backend sets and listeners

Inputs: network_load_balancer_id (required).

get_network_security_groupB
Get detailed information about a specific Network Security Group.

Args:
    nsg_id: OCID of the NSG to retrieve

Returns:
    Detailed NSG information with all security rules

Inputs: nsg_id (required).

get_oke_clusterA
Get detailed information about a specific OKE cluster.

Args:
    cluster_id: OCID of the cluster

Returns:
    Detailed cluster information including:
    - Kubernetes version and available upgrades
    - Cluster endpoints (public/private)
    - Network configuration (VCN, subnets, CIDR blocks)
    - Add-ons configuration (dashboard, tiller)
    - Image policy settings
    - Cluster metadata and options

Inputs: cluster_id (required).

get_oke_cluster_kubeconfigA
Get the kubeconfig file content for accessing an OKE cluster.

Args:
    cluster_id: OCID of the cluster

Returns:
    Kubeconfig content in YAML format that can be saved to ~/.kube/config
    or used with kubectl --kubeconfig flag

Inputs: cluster_id (required).

get_oke_node_poolA
Get detailed information about a specific node pool.

Args:
    node_pool_id: OCID of the node pool

Returns:
    Detailed node pool information including:
    - Node configuration (shape, image, SSH keys)
    - Individual node details (IPs, state, fault domains)
    - Placement configuration across ADs
    - Node eviction settings
    - Node pool cycling details
    - Initial node labels
    - Security settings (NSGs, encryption)

Inputs: node_pool_id (required).

get_oke_work_requestB
Get detailed information about a specific OKE work request.

Args:
    work_request_id: OCID of the work request

Returns:
    Detailed work request information including:
    - Operation type and status
    - Completion percentage
    - Associated resources and actions
    - Timing information

Inputs: work_request_id (required).

get_policyB
Get detailed information about a specific IAM policy.

Args:
    policy_id: OCID of the policy to retrieve

Returns:
    Detailed policy information including all policy statements

Inputs: policy_id (required).

get_security_listB
Get detailed information about a specific security list.

Args:
    security_list_id: OCID of the security list to retrieve

Returns:
    Detailed security list with all ingress and egress rules

Inputs: security_list_id (required).

get_subnetB
Get detailed information about a specific subnet.

Args:
    subnet_id: OCID of the subnet to retrieve

Returns:
    Detailed subnet information including CIDR, security lists, and routing

Inputs: subnet_id (required).

get_tenancy_infoB
Get detailed information about a tenancy.

Args:
    tenancy_id: OCID of the tenancy

Returns:
    Tenancy details including name, home region, and description

Inputs: tenancy_id (required).

get_userB
Get detailed information about a specific IAM user.

Args:
    user_id: OCID of the user to retrieve

Returns:
    Detailed user information including capabilities, MFA status, and group memberships

Inputs: user_id (required).

get_vaultB
Get detailed information about a specific KMS vault.

Args:
    vault_id: OCID of the vault to retrieve

Returns:
    Detailed vault information including crypto and management endpoints

Inputs: vault_id (required).

get_vcnB
Get detailed information about a specific VCN.

Args:
    vcn_id: OCID of the VCN to retrieve

Returns:
    Detailed VCN information including CIDR blocks, DNS configuration, and default resources

Inputs: vcn_id (required).

get_vnicB
Get detailed information about a specific VNIC.

Args:
    vnic_id: OCID of the VNIC to retrieve

Returns:
    Detailed VNIC information including IP addresses, subnet, and NSG associations

Inputs: vnic_id (required).

get_volumeB
Get detailed information about a specific Block Storage volume.

Args:
    volume_id: OCID of the volume to retrieve

Returns:
    Detailed volume information including size, performance tier, and backup policy

Inputs: volume_id (required).

list_alarmsA
List all alarms in a compartment.

Args:
    compartment_id: OCID of the compartment to list alarms from

Returns:
    List of alarms with their query, severity, state, and destinations

Inputs: compartment_id (required).

list_autonomous_databasesB
List all Autonomous Databases in a compartment.

Args:
    compartment_id: OCID of the compartment to list Autonomous Databases from

Returns:
    List of Autonomous Databases with their configuration, workload type, and connection info

Inputs: compartment_id (required).

list_availability_domainsA
List all availability domains in a compartment.

Args:
    compartment_id: OCID of the compartment (typically use tenancy OCID for root)

Returns:
    List of availability domains with their names and IDs

Inputs: compartment_id (required).

list_boot_volumesB
List all boot volumes in a compartment.

Args:
    compartment_id: OCID of the compartment to list boot volumes from
    availability_domain: Optional AD to filter boot volumes

Returns:
    List of boot volumes with their size, state, and source image information

Inputs: compartment_id (required), availability_domain.

list_bucketsA
List all Object Storage buckets in a compartment.

Args:
    compartment_id: OCID of the compartment to list buckets from
    namespace: Optional namespace (if not provided, will be fetched automatically)

Returns:
    List of buckets with their configurations and metadata

Inputs: compartment_id (required), namespace.

list_budgetsA
List all budgets in a compartment.

Args:
    compartment_id: OCID of the compartment to list budgets from

Returns:
    List of budgets with amount, reset period, actual spend, and forecasted spend

Inputs: compartment_id (required).

list_compartmentsB

List all compartments accessible to the user.

Inputs: no named parameters.

list_databasesB
List all databases in a compartment, optionally filtered by DB System.

Args:
    compartment_id: OCID of the compartment to list databases from
    db_system_id: Optional OCID of the DB System to filter databases

Returns:
    List of databases with their state, version, and connection information

Inputs: compartment_id (required), db_system_id.

list_db_nodesB
List DB Nodes in a compartment, optionally filtered by DB System.
Note: compartment_id is always required by the SDK.

Inputs: compartment_id (required), db_system_id.

list_db_systemsC

List DB Systems in a compartment.

Inputs: compartment_id (required).

list_dynamic_groupsB
List all dynamic groups in a compartment.

Args:
    compartment_id: OCID of the compartment to list dynamic groups from

Returns:
    List of dynamic groups with their matching rules and state

Inputs: compartment_id (required).

list_fault_domainsB
List all fault domains in an availability domain.

Args:
    compartment_id: OCID of the compartment
    availability_domain: Name of the availability domain

Returns:
    List of fault domains with their names and IDs

Inputs: compartment_id (required), availability_domain (required).

list_file_systemsC
List all File Storage file systems in a compartment and availability domain.

Args:
    compartment_id: OCID of the compartment to list file systems from
    availability_domain: Name of the availability domain

Returns:
    List of file systems with their state and metadata

Inputs: compartment_id (required), availability_domain (required).

list_groupsB
List all IAM groups in a compartment.

Args:
    compartment_id: OCID of the compartment to list groups from

Returns:
    List of groups with their members count and state

Inputs: compartment_id (required).

list_imagesB
List all compute images in a compartment.

Args:
    compartment_id: OCID of the compartment to list images from

Returns:
    List of images with OS, version, size, and lifecycle state

Inputs: compartment_id (required).

list_instancesC

List all instances in a compartment.

Inputs: compartment_id (required).

list_keysA
List all encryption keys in a vault's compartment.

Note: You must first get a vault to obtain its management_endpoint.

Args:
    compartment_id: OCID of the compartment
    management_endpoint: Management endpoint from the vault (get from vault details)

Returns:
    List of keys with their algorithm, protection mode, and state

Inputs: compartment_id (required), management_endpoint (required).

list_load_balancersA
List all classic load balancers in a compartment.

Args:
    compartment_id: OCID of the compartment to list load balancers from

Returns:
    List of load balancers with their IP addresses, shape, and state

Inputs: compartment_id (required).

list_log_groupsB
List all log groups in a compartment.

Args:
    compartment_id: OCID of the compartment to list log groups from

Returns:
    List of log groups with their display names and lifecycle states

Inputs: compartment_id (required).

list_logsB
List all logs in a log group.

Args:
    log_group_id: OCID of the log group

Returns:
    List of logs with their types, retention, and enabled state

Inputs: log_group_id (required).

list_metricsB
List available metrics in a compartment.

Args:
    compartment_id: OCID of the compartment
    namespace: Optional namespace to filter metrics (e.g., oci_computeagent, oci_blockstore)

Returns:
    List of available metrics with their namespaces and dimensions

Inputs: compartment_id (required), namespace.

list_network_load_balancersA
List all network load balancers in a compartment.

Args:
    compartment_id: OCID of the compartment to list network load balancers from

Returns:
    List of network load balancers with their IP addresses and state

Inputs: compartment_id (required).

list_network_security_groupsB
List all Network Security Groups (NSGs) in a compartment.

Args:
    compartment_id: OCID of the compartment to list NSGs from
    vcn_id: Optional OCID of the VCN to filter NSGs

Returns:
    List of NSGs with their security rules

Inputs: compartment_id (required), vcn_id.

list_oci_profilesA
List all available OCI profiles from ~/.oci/config file.

Returns a list of profiles with their configuration details.
Use this when you need to select a profile before making OCI API calls.

Inputs: no named parameters.

list_oke_clustersA
List all OKE (Container Engine for Kubernetes) clusters in a compartment.

Args:
    compartment_id: OCID of the compartment

Returns:
    List of OKE clusters with their details including Kubernetes version, endpoints, and lifecycle state

Inputs: compartment_id (required).

list_oke_node_poolsA
List all node pools in a compartment, optionally filtered by cluster.

Args:
    compartment_id: OCID of the compartment
    cluster_id: Optional OCID of the cluster to filter by

Returns:
    List of node pools with their details including:
    - Node shape and image information
    - Kubernetes version
    - Placement configuration (ADs, subnets)
    - Node count per subnet
    - Lifecycle state

Inputs: compartment_id (required), cluster_id.

list_oke_work_requestsA
List work requests (async operations) for OKE resources in a compartment.

Args:
    compartment_id: OCID of the compartment
    resource_id: Optional OCID of a specific resource (cluster or node pool) to filter by

Returns:
    List of work requests with their details including:
    - Operation type (create, update, delete, etc.)
    - Status and completion percentage
    - Associated resources
    - Timestamps (accepted, started, finished)

Inputs: compartment_id (required), resource_id.

list_policiesB
List all IAM policies in a compartment.

Args:
    compartment_id: OCID of the compartment to list policies from

Returns:
    List of policies with their statements and state

Inputs: compartment_id (required).

list_regionsB
List all available OCI regions.

Returns:
    List of regions with their keys and names

Inputs: no named parameters.

list_security_listsB
List all security lists in a compartment, optionally filtered by VCN.

Args:
    compartment_id: OCID of the compartment to list security lists from
    vcn_id: Optional OCID of the VCN to filter security lists

Returns:
    List of security lists with their ingress and egress rules

Inputs: compartment_id (required), vcn_id.

list_shapesB
List all compute shapes available in a compartment.

Args:
    compartment_id: OCID of the compartment

Returns:
    List of shapes with CPU, memory, network, and GPU specifications

Inputs: compartment_id (required).

list_subnetsA
List all subnets in a compartment, optionally filtered by VCN.

Args:
    compartment_id: OCID of the compartment to list subnets from
    vcn_id: Optional OCID of the VCN to filter subnets

Returns:
    List of subnets with CIDR blocks, security lists, and routing information

Inputs: compartment_id (required), vcn_id.

list_usersA
List all IAM users in a compartment.

Args:
    compartment_id: OCID of the compartment to list users from

Returns:
    List of users with their state, capabilities, and MFA status

Inputs: compartment_id (required).

list_vaultsA
List all KMS vaults in a compartment.

Args:
    compartment_id: OCID of the compartment to list vaults from

Returns:
    List of vaults with their type, endpoints, and state

Inputs: compartment_id (required).

list_vcnsA
List all Virtual Cloud Networks (VCNs) in a compartment.

Args:
    compartment_id: OCID of the compartment to list VCNs from

Returns:
    List of VCNs with their CIDR blocks, DNS labels, and default resources

Inputs: compartment_id (required).

list_vnicsA
List all Virtual Network Interface Cards (VNICs) in a compartment.

Args:
    compartment_id: OCID of the compartment to list VNICs from
    instance_id: Optional OCID of the instance to filter VNICs

Returns:
    List of VNICs with their IP addresses, subnet information, and security groups

Inputs: compartment_id (required), instance_id.

list_volumesB
List all Block Storage volumes in a compartment.

Args:
    compartment_id: OCID of the compartment to list volumes from

Returns:
    List of volumes with their size, state, and attachment information

Inputs: compartment_id (required).

query_metric_dataB
Query metric data for a time range using MQL.

Args:
    compartment_id: OCID of the compartment
    query: Metric query in MQL format (e.g., "CpuUtilization[1m].mean()")
    start_time: Start time in ISO format (YYYY-MM-DDTHH:MM:SSZ)
    end_time: End time in ISO format (YYYY-MM-DDTHH:MM:SSZ)
    resolution: Data resolution (1m, 5m, 1h)

Returns:
    List of metric data points with timestamps and values

Inputs: compartment_id (required), query (required), start_time (required), end_time (required), +1 more.

reboot_db_nodeC

Reboot a DB Node.

Inputs: db_node_id (required).

reset_db_nodeC

Reset (force reboot) a DB Node.

Inputs: db_node_id (required).

search_logsB
Search logs using the Logging Search API.

Args:
    time_start: Start time in ISO format (YYYY-MM-DDTHH:MM:SSZ)
    time_end: End time in ISO format (YYYY-MM-DDTHH:MM:SSZ)
    search_query: Search query string

Returns:
    List of log entries matching the search criteria

Inputs: time_start (required), time_end (required), search_query (required).

set_oci_profileB
Set the active OCI profile to use for API calls.

Args:
    profile_name: Name of the profile to activate (e.g., "DEFAULT", "production")

This will initialize or reinitialize OCI clients with the selected profile.

Inputs: profile_name (required).

softreset_db_nodeC

Soft reset (graceful reboot) a DB Node.

Inputs: db_node_id (required).

start_db_nodeC

Start a DB Node.

Inputs: db_node_id (required).

start_db_systemB
Start all nodes of a DB System.
Note: compartment_id required to enumerate nodes correctly.

Inputs: db_system_id (required), compartment_id (required).

start_instanceD

Start an instance.

Inputs: instance_id (required).

stop_db_nodeC

Stop a DB Node.

Inputs: db_node_id (required), soft.

stop_db_systemC
Stop all nodes of a DB System.
Note: compartment_id required to enumerate nodes correctly.

Inputs: db_system_id (required), compartment_id (required), soft.

stop_instanceC

Stop an instance.

Inputs: instance_id (required), force.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3/5.0

    Scored across 85 tools

    Disambiguation4/5

    Most tools are clearly distinct, targeting specific OCI resources (e.g., get_alarm vs. get_bucket). However, some overlap exists in database-related tools (e.g., get_database, get_db_node, get_db_system) and reboot/reset/start/stop operations for DB nodes/instances, which could cause confusion without careful reading of descriptions. Overall, the domain is broad but well-partitioned.

    Naming Consistency5/5

    Tool names follow a highly consistent verb_noun pattern throughout (e.g., get_alarm, list_autonomous_databases, start_instance, query_metric_data). All tools use snake_case with clear, descriptive names, making the set predictable and easy to navigate.

    Tool Count2/5

    With 85 tools, the count is excessive for a single server, even given OCI's broad scope. This creates cognitive overload and makes it difficult for agents to efficiently select the right tool. A more modular approach (e.g., splitting into sub-servers for compute, storage, networking) would be more appropriate.

    Completeness5/5

    The tool set provides comprehensive coverage of OCI services, including compute, storage, networking, databases, identity, monitoring, and cost management. It supports full CRUD-like operations (get/list for retrieval, start/stop/reboot for management) and includes essential utilities like profile management and metric/log queries, leaving no obvious gaps for the domain.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      C
      quality
      D
      maintenance
      Enables interaction with Oracle Cloud Infrastructure services through a unified interface. Supports comprehensive OCI resource management including compute instances, storage, networking, databases, and monitoring through natural language commands in VS Code.
      1
      3
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides AI agents with secure, natural-language access to Oracle Cloud Infrastructure through 69 tools covering services like compute, storage, networking, and databases. It features deep IAM integration and supports deployment across platforms like Claude Desktop, Cursor, and OCI Generative AI.
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables natural-language access to Oracle Cloud Infrastructure resources, allowing users to query compute instances, OKE clusters, networking, and Object Storage via MCP tools.
      MIT