Serves OCI data sources and actions via MCP for seamless cloud automation and LLM-driven management.
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.
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.
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 .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 DEFAULTUse 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?"List all available OCI profiles from ~/.oci/config.
Activate a specific OCI profile for subsequent API calls.
Show the currently active OCI profile.
List compartments accessible to you.
List IAM users in a compartment with MFA status and capabilities.
Get detailed information for a specific IAM user including group memberships.
List IAM groups in a compartment with member counts.
Get detailed group information including members.
List all IAM policies in a compartment with policy statements.
Get detailed policy information with all statements.
List dynamic groups with matching rules.
Get detailed dynamic group information including instance principal rules.
List virtual machine instances in a compartment.
Get detailed information about a specific instance.
Start a stopped instance.
Stop a running instance.
List DB Systems in a compartment.
Get detailed DB System information.
List DB Nodes in a compartment.
Get detailed DB Node information.
Start a stopped DB Node.
Stop a running DB Node.
Reboot a DB Node.
Reset (force reboot) a DB Node.
Soft reset (graceful reboot) a DB Node.
Start all nodes of a DB System.
Stop all nodes of a DB System.
List databases in a compartment.
Get detailed database information including connection strings.
List Autonomous Databases with workload type and wallet info.
Get detailed Autonomous Database information.
List all Virtual Cloud Networks in a compartment.
Get detailed VCN information.
List subnets in a compartment.
Get detailed subnet information.
List VNICs in a compartment.
Get detailed VNIC information.
List security lists with rules.
Get detailed security list information.
List Network Security Groups.
Get detailed NSG information.
Get Object Storage namespace for the tenancy.
List Object Storage buckets in a compartment.
Get detailed bucket information.
List Block Storage volumes in a compartment.
Get detailed volume information.
List boot volumes in a compartment.
Get detailed boot volume information.
List File Storage file systems in a compartment.
Get detailed file system information.
List classic load balancers with details.
Get detailed classic load balancer information.
List network load balancers.
Get detailed network load balancer information.
List alarms with configuration and destinations.
Get detailed alarm information.
Get alarm state history.
List available metrics.
Query metric data with MQL.
Search logs using the Logging API.
List log groups in a compartment.
List logs in a log group.
List OKE clusters with details.
Get detailed OKE cluster information.
Get kubeconfig content for kubectl access.
List node pools in OKE.
Get detailed OKE node pool information.
List OKE work requests.
Get detailed OKE work request status.