list_oci_profilesLABSCO SUMMARY
Several tenancies, one conversation.
The profile switch is what sets it apart: anyone running a production and a staging tenancy spends real time restarting tools to change which one they are pointed at. Here it is a call, and a follow-up call tells you which tenancy you are currently talking to — worth making before anything that changes state, because the same connection can stop a DB node or reboot a cluster.
What it is
A read-and-manage layer over Oracle Cloud Infrastructure that authenticates through your existing OCI CLI config. Profiles can be switched at runtime, so one session can cross tenancies without a restart, and the surface reaches well past compute — identity, networking, storage, databases including Exadata, Kubernetes, cost and monitoring.
What you get
- Profiles handled live: list_oci_profiles reads what is in your OCI config, set_oci_profile activates one, and get_current_oci_profile says which tenancy you are actually talking to.
- Identity: list_compartments, plus users, groups, policies and dynamic groups listed and read in detail — get_user returns group memberships, get_policy returns the statements themselves.
- Compute: list_instances and get_instance, with start_instance and stop_instance for lifecycle, and list_images, list_shapes, list_availability_domains and list_fault_domains for what you can launch and where.
- Databases at every level: DB Systems and DB Nodes with start, stop, reboot and reset; list_databases and list_autonomous_databases for the databases themselves; Data Guard associations with apply lag and protection mode; list_backups and maintenance runs.
- Exadata Cloud Service: cloud Exadata infrastructures, VM clusters with their RAC nodes, SCAN DNS and versions, and autonomous VM clusters.
- Networking: VCNs and subnets, VNICs, security lists with their ingress and egress rules, and network security groups.
- Storage: Object Storage namespace and buckets, block volumes and boot volumes, and File Storage file systems.
- Load balancers, both classic and network, with their backend sets and listeners.
- Kubernetes: list_oke_clusters and get_oke_cluster with add-ons and available upgrades, node pools down to individual nodes, work requests for async operations, and get_oke_cluster_kubeconfig for kubectl access.
- Cost and monitoring: cost summaries by service or compartment, budgets with actual and forecast spend, alarms with their history, list_metrics and query_metric_data over MQL, and search_logs across log groups.
- KMS vaults and encryption keys, with algorithm, shape and versions.
Requirements
A configured OCI CLI — the server reads its profiles and credentials from your OCI config — and permissions in the tenancy for whatever you ask it to do. Python 3.10 or newer. You can start it without naming a profile and choose one in conversation, or preload one at launch.
Setup effort
Build from source — git clone https://github.com/jopsis/mcp-server-oci.git
USE CASES
Moving between production and staging without restarting
List the profiles from your config, activate the one you need, then confirm which is active. The confirmation is the step that prevents acting on the wrong tenancy.
Getting oriented in an unfamiliar tenancy
List the compartments first — almost every other question in OCI is scoped by one, so an audit or a cost review starts here.
Answering who has access to what
List users and groups, read the ones that come up, and pull the policy statements that grant them anything — an access review without the console.
Explaining last month's bill
Get the usage summary, break it down by service and by compartment, then check it against the budgets and their forecasts.
Working out why a service is unreachable
Trace the path — the subnet, the security list rules, the network security groups — then check the load balancer's backend sets.
Checking a database's shape before a maintenance window
Read the DB system and its nodes, the Data Guard association's role and lag, and what maintenance is already scheduled.
Getting into an OKE cluster
Find the cluster, read its version, add-ons and available upgrades, check the node pools, and pull the kubeconfig for kubectl.
Chasing an alarm that fired overnight
Read the alarm and its state history, then query the metric behind it over the same window and search the logs around it.
95 tools
Listed in project docs. Your client may show a different list.
set_oci_profileget_current_oci_profilelist_compartmentslist_usersget_userlist_groupsget_grouplist_policiesget_policylist_dynamic_groupsget_dynamic_grouplist_instancesget_instancestart_instancestop_instancelist_db_systemsget_db_systemlist_db_nodesget_db_nodestart_db_nodestop_db_nodereboot_db_nodereset_db_nodesoftreset_db_nodestart_db_systemstop_db_systemlist_databasesget_databaselist_autonomous_databasesget_autonomous_databaselist_cloud_exadata_infrastructuresget_cloud_exadata_infrastructurelist_cloud_vm_clustersget_cloud_vm_clusterlist_cloud_autonomous_vm_clusterslist_data_guard_associationsget_data_guard_associationlist_backupslist_maintenance_runsget_maintenance_runlist_vcnsget_vcnlist_subnetsget_subnetlist_vnicsget_vniclist_security_listsget_security_listlist_network_security_groupsget_network_security_groupget_namespacelist_bucketsget_bucketlist_volumesget_volumelist_boot_volumesget_boot_volumelist_file_systemsget_file_systemlist_load_balancersget_load_balancerlist_network_load_balancersget_network_load_balancerlist_availability_domainslist_fault_domainslist_imagesget_imagelist_shapeslist_regionsget_tenancy_infolist_vaultsget_vaultlist_keysget_keyget_cost_usage_summaryget_cost_by_serviceget_cost_by_compartmentlist_budgetsget_budgetlist_alarmsget_alarmget_alarm_historylist_metricsquery_metric_datasearch_logslist_log_groupslist_logslist_oke_clustersget_oke_clusterget_oke_cluster_kubeconfiglist_oke_node_poolsget_oke_node_poollist_oke_work_requestsget_oke_work_requestBEFORE YOU INSTALL
What to know first
Tools you get
95 tools named in the project's documentation. list_available_profiles, mentioned in the v1.16 changelog, is not a tool; the profile tool is list_oci_profiles.
Requires
- Python 3.10 or higher
- OCI CLI configured (oci setup config)
- Appropriate permissions in Oracle Cloud
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
This one is built from source rather than installed with a single command.
Server setup
git clone https://github.com/jopsis/mcp-server-oci.git
cd mcp-server-oci
pip install git+https://github.com/modelcontextprotocol/python-sdk.git
pip install oci fastapi uvicorn click pydantic loguru
pip install -e .MCP Clients
Claude Desktop — macOS
{
"mcpServers": {
"mcp-server-oci": {
"command": "python",
"args": [
"-m",
"mcp_server_oci.mcp_server"
],
"env": {
"PYTHONPATH": "/<YOUR_PATH_TO_MCP>/mcp-server-oci",
"FASTMCP_LOG_LEVEL": "INFO"
}
}
}
}PYTHONPATH is the full path of your mcp-server-oci clone; <YOUR_PATH_TO_MCP> is the folder that holds it. The server uses the profile in ~/.oci/config, created with oci setup config.