Oci MCP Server

This project implements a Model Context Protocol (MCP) server for Oracle Cloud Infrastructure, allowing LLMs like Claude to interact directly with

Local serverstdioPython

What is the Oci MCP server?

This project implements a Model Context Protocol (MCP) server for Oracle Cloud Infrastructure, allowing LLMs like Claude to interact directly with OCI resources. The oci mcp server wraps that behind the Model Context Protocol, so an assistant can use it through 14 defined tools rather than through you.

What it actually does

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

Its toolset

Everything the assistant can do here goes through one of these:

  • 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
  • Clusters — List/get clusters with Kubernetes version, endpoints, network config, and available upgrades
  • Kubeconfig — Get kubeconfig file content for kubectl access to clusters
  • 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
  • Compartments — The Compartments tool exposed by this server
  • Users — The Users tool exposed by this server
  • Groups — The Groups tool exposed by this server
  • Policies — The Policies tool exposed by this server

Configuration

You will need 2 environment variables: PYTHONPATH, FASTMCP_LOG_LEVEL. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

  • Python 3.10 or higher - OCI CLI configured (oci setup config) - Appropriate permissions in Oracle Cloud

Adding it to your client

The server ships on PyPI as git, so your MCP client can launch it on demand — there is no separate build step. Add the server block to your client's configuration, restart it, and the tools register themselves.

When to reach for it

Among the cloud and infrastructure options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. Oci's toolset — get_cost_usage_summary, get_cost_by_service, get_cost_by_compartment and 11 more — is a fair guide to whether it matches your workflow. It is maintained by jopsis; worth a glance at recent repository activity before you build anything load-bearing on it.

This entry was verified against Oci's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.

Caveats

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 14 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Oci.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the oci mcp server does with a few real requests.

Available tools

ToolWhat it does
get_cost_usage_summaryGet cost and usage summary for a tenancy with daily or monthly granularity
get_cost_by_serviceGet cost breakdown by service for a specified time period
get_cost_by_compartmentGet cost breakdown by compartment for a specified time period
ClustersList/get clusters with Kubernetes version, endpoints, network config, and available upgrades
KubeconfigGet kubeconfig file content for kubectl access to clusters
AlarmsList/get alarms with severity, query history, and state transitions
MetricsList metrics, query time-series data with MQL for performance analysis
LogsSearch logs, list log groups and logs for troubleshooting
CompartmentsThe Compartments tool exposed by this server.
UsersThe Users tool exposed by this server.
GroupsThe Groups tool exposed by this server.
PoliciesThe Policies tool exposed by this server.
SubnetsThe Subnets tool exposed by this server.
SecurityThe Security tool exposed by this server.

How to install the Oci MCP server

**With fixed profile:**

```json
"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"
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

  • Python 3.10 or higher - OCI CLI configured (oci setup config) - Appropriate permissions in Oracle Cloud
VariableDescriptionRequired
PYTHONPATHFilesystem location the server is allowed to use.Optional
FASTMCP_LOG_LEVELConfiguration value read at startup.Optional

Example prompts to try

  • Use Oci to get cost usage summary.
  • Use Oci to get cost by service.
  • Use Oci to get cost by compartment.

Frequently asked questions

It connects Oci to MCP-compatible AI assistants such as Claude and Cursor, exposing 14 tools (get_cost_usage_summary, get_cost_by_service, get_cost_by_compartment, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Oci directly.