OCI
- python
0
GitHub Stars
python
Language
7 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"jopsis-mcp-server-oci": {
"command": "python",
"args": [
"-m",
"mcp_server_oci.mcp_server"
],
"env": {
"PYTHONPATH": "/<PATH_TO_MCP>/mcp-server-oci",
"FASTMCP_LOG_LEVEL": "INFO"
}
}
}
}You deploy and run an MCP server that lets large language models interact with Oracle Cloud Infrastructure (OCI) resources. This server exposes a set of MCP tools to manage OCI compartments, compute resources, databases, networking, storage, and more, enabling you to perform actions from your MCP client without leaving the chat or automation environment.
How to use
You use an MCP client to connect to the OCI MCP server and execute the available OCI-related tools. Start the server locally, then instruct your MCP client to call the tools by name. You can operate in two modes: dynamic profile selection (recommended) where you choose an OCI profile at runtime, or a fixed profile loaded at startup. You can switch between OCI tenancies without restarting the server by selecting a different profile from your MCP client.
How to install
Prerequisites: install Python 3.10 or higher and ensure you have OCI CLI configured with valid credentials.
Install the required Python packages and the MCP server itself using the following commands.
pip install git+https://github.com/modelcontextprotocol/python-sdk.git
pip install oci fastapi uvicorn click pydantic loguru
pip install -e .
Starting the server
Choose a startup method based on whether you want to select OCI profiles at runtime or preload a default profile.
# Option 1: Dynamic Profile Selection (Recommended)
python -m mcp_server_oci.mcp_server
# After startup, manage profiles from your MCP client with:
# - list_oci_profiles
# - set_oci_profile
# - get_current_oci_profile
# Option 2: With Default Profile
python -m mcp_server_oci.mcp_server --profile DEFAULT
Switching between tenancies
Use your MCP client to switch OCI profiles without restarting the server. List available profiles, activate a different one, then verify the current profile.
# In your MCP client:
"Show me available OCI profiles"
# Switch to another tenancy
"Switch to the 'production' OCI profile"
# Verify the active profile
"What OCI profile am I using?"
Available tools
list_oci_profiles
List all available OCI profiles from ~/.oci/config.
set_oci_profile
Activate a specific OCI profile for subsequent API calls.
get_current_oci_profile
Show the currently active OCI profile.
list_compartments
List compartments accessible to you.
list_users
List IAM users in a compartment with MFA status and capabilities.
get_user
Get detailed information for a specific IAM user including group memberships.
list_groups
List IAM groups in a compartment with member counts.
get_group
Get detailed group information including members.
list_policies
List all IAM policies in a compartment with policy statements.
get_policy
Get detailed policy information with all statements.
list_dynamic_groups
List dynamic groups with matching rules.
get_dynamic_group
Get detailed dynamic group information including instance principal rules.
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.
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.
get_db_node
Get detailed DB Node information.
start_db_node
Start a stopped DB Node.
stop_db_node
Stop a running DB Node.
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.
list_databases
List databases in a compartment.
get_database
Get detailed database information including connection strings.
list_autonomous_databases
List Autonomous Databases with workload type and wallet info.
get_autonomous_database
Get detailed Autonomous Database information.
list_vcns
List all Virtual Cloud Networks in a compartment.
get_vcn
Get detailed VCN information.
list_subnets
List subnets in a compartment.
get_subnet
Get detailed subnet information.
list_vnics
List VNICs in a compartment.
get_vnic
Get detailed VNIC information.
list_security_lists
List security lists with rules.
get_security_list
Get detailed security list information.
list_network_security_groups
List Network Security Groups.
get_network_security_group
Get detailed NSG information.
get_namespace
Get Object Storage namespace for the tenancy.
list_buckets
List Object Storage buckets in a compartment.
get_bucket
Get detailed bucket information.
list_volumes
List Block Storage volumes in a compartment.
get_volume
Get detailed volume information.
list_boot_volumes
List boot volumes in a compartment.
get_boot_volume
Get detailed boot volume information.
list_file_systems
List File Storage file systems in a compartment.
get_file_system
Get detailed file system information.
list_load_balancers
List classic load balancers with details.
get_load_balancer
Get detailed classic load balancer information.
list_network_load_balancers
List network load balancers.
get_network_load_balancer
Get detailed network load balancer information.
list_alarms
List alarms with configuration and destinations.
get_alarm
Get detailed alarm information.
get_alarm_history
Get alarm state history.
list_metrics
List available metrics.
query_metric_data
Query metric data with MQL.
search_logs
Search logs using the Logging API.
list_log_groups
List log groups in a compartment.
list_logs
List logs in a log group.
list_oke_clusters
List OKE clusters with details.
get_oke_cluster
Get detailed OKE cluster information.
get_oke_cluster_kubeconfig
Get kubeconfig content for kubectl access.
list_oke_node_pools
List node pools in OKE.
get_oke_node_pool
Get detailed OKE node pool information.
list_oke_work_requests
List OKE work requests.
get_oke_work_request
Get detailed OKE work request status.