OCI MCP Server

OCI MCP Server

An MCP server that exposes Oracle Cloud Infrastructure (OCI) control plane to LLM clients, enabling management of compute, networking, storage, databases, and more through natural language.

Category
访问服务器

README

OCI MCP Server

License: Apache 2.0 Python 3.10+ MCP Author

Created and maintained by Sarthak Pansare · open-source under Apache-2.0

Drive Oracle Cloud Infrastructure from any MCP-aware LLM client.

A Model Context Protocol server that exposes the OCI control plane — compute, networking, storage, databases, Kubernetes (OKE), load balancers, KMS vaults, functions, monitoring, and cross-service search — to any LLM tool that speaks MCP: Claude Code, Claude Desktop, Cursor, Codex CLI, Continue, VS Code, Zed, Antigravity, and others.

Token-efficient by design: one-line tool descriptions, compact summaries, pagination defaults, null-stripped responses.


What you can do

> Deploy a public web server called demo using my SSH key.
> Show me every resource in compartment XYZ grouped by type.
> Create a flexible Load Balancer fronting subnets A and B.
> List my OKE clusters and their kubernetes versions.
> Summarize CpuUtilization on instance ocid1.instance... for the last hour.
> Tear down the VCN we just created and the instance attached to it.

Tool surface (50+ tools across 12 modules)

Module Highlights
iam whoami, health_check, list_compartments, list_users, list_availability_domains, list_regions
compute list/get/launch/action/terminate instances, list_images, list_shapes, list_instance_vnics
networking VCNs, subnets, internet/NAT/service gateways, route tables, security lists
storage Object Storage buckets, list_objects, block volumes
database DB Systems, Autonomous DB
loadbalancer Load Balancer + Network Load Balancer (create/list/delete)
oke OKE clusters, node pools (Container Engine for Kubernetes)
vault KMS vaults + keys (read)
functions Applications + functions (read)
monitoring Alarms, metric definitions, metric summaries (MQL)
search find_resources across every OCI resource type
composite deploy_web_server (full stack in one shot), teardown_stack

Install

1. Prerequisites

  • Python 3.10+
  • uv (recommended) or pip
  • An OCI account (cloud.oracle.com — Always-Free tier works)

2. Configure OCI credentials

In the OCI Console: avatar → My profileAPI keysAdd API keyGenerate API key pair.

Save the files:

~/.oci/oci_api_key.pem      # private key
~/.oci/config               # config (paste the snippet from the console)

Example ~/.oci/config:

[DEFAULT]
user=ocid1.user.oc1..xxxx
fingerprint=aa:bb:cc:...
tenancy=ocid1.tenancy.oc1..xxxx
region=us-ashburn-1
key_file=~/.oci/oci_api_key.pem

3. Clone + install

git clone https://github.com/sarthak-pansare/oci-mcp-server
cd oci-mcp-server
uv sync

Connect to your LLM client

The server is a standard MCP server that speaks stdio by default. Most clients only need a small JSON snippet.

Claude Code (CLI)

claude mcp add oci -s user -- uv --directory /absolute/path/to/oci-mcp-server run oci-mcp-server

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "oci": {
      "command": "uv",
      "args": ["--directory", "/absolute/path/to/oci-mcp-server", "run", "oci-mcp-server"]
    }
  }
}

Cursor

Settings → MCP → + Add new MCP server:

{
  "mcpServers": {
    "oci": {
      "command": "uv",
      "args": ["--directory", "/absolute/path/to/oci-mcp-server", "run", "oci-mcp-server"]
    }
  }
}

Codex CLI

Edit ~/.codex/config.toml:

[mcp_servers.oci]
command = "uv"
args = ["--directory", "/absolute/path/to/oci-mcp-server", "run", "oci-mcp-server"]

Continue (VS Code / JetBrains)

In your .continue/config.yaml:

mcpServers:
  - name: oci
    command: uv
    args: ["--directory", "/absolute/path/to/oci-mcp-server", "run", "oci-mcp-server"]

VS Code (native MCP)

In .vscode/mcp.json:

{
  "servers": {
    "oci": {
      "type": "stdio",
      "command": "uv",
      "args": ["--directory", "/absolute/path/to/oci-mcp-server", "run", "oci-mcp-server"]
    }
  }
}

Zed

In ~/.config/zed/settings.json:

{
  "context_servers": {
    "oci": {
      "command": {
        "path": "uv",
        "args": ["--directory", "/absolute/path/to/oci-mcp-server", "run", "oci-mcp-server"]
      }
    }
  }
}

Antigravity / generic MCP clients

Any client that supports stdio MCP can launch:

command: uv
args:    ["--directory", "/abs/path/to/oci-mcp-server", "run", "oci-mcp-server"]

Remote mode (HTTP/SSE)

For shared deployments or web-based clients:

uv run oci-mcp-server --transport sse --host 0.0.0.0 --port 3000
# or
uv run oci-mcp-server --transport streamable-http --host 0.0.0.0 --port 3000

Put it behind an authenticating reverse proxy. See SECURITY.md.

Docker

docker build -t oci-mcp-server .
docker run --rm -p 3000:3000 \
  -v ~/.oci:/root/.oci:ro \
  -e OCI_MCP_TRANSPORT=sse \
  oci-mcp-server

Configuration

Env var Purpose Default
OCI_CONFIG_FILE Override OCI config path ~/.oci/config
OCI_PROFILE Config profile name DEFAULT
OCI_REGION Override region from config (from file)
OCI_MCP_TRANSPORT stdio | sse | streamable-http stdio
OCI_MCP_HOST Host for HTTP/SSE transports 127.0.0.1
OCI_MCP_PORT Port for HTTP/SSE transports 3000
OCI_MCP_ENABLE Comma-separated module list, or all all

Reduce token surface further

If you only need a subset of OCI services, register fewer tools — every tool's description is sent to the LLM on every turn:

uv run oci-mcp-server --enable iam,compute,networking,composite

Token-efficiency strategy

Designed to minimize the cost of using OCI tools with an LLM:

  1. One-line docstrings. Every tool's description fits on a single line. Across all 50+ tools the schema fits in roughly 2 000 tokens.
  2. Compact summaries by default. list_* calls return {id, name, state, ...} — not the full SDK object. Use verbose=True or get_* for full detail.
  3. Pagination + limits. Every list call defaults to limit=50 (max 200) and accepts a page token.
  4. Null-stripping. None / empty fields are removed from every response.
  5. Module gating. --enable lets users register only the services they need.

Smoke test

After installing and restarting your client:

1. Run mcp__oci__whoami         → confirms credentials work
2. Run mcp__oci__list_regions   → confirms network path
3. Run mcp__oci__find_resources query: "query all resources"

For a full end-to-end deployment:

Deploy a web server called demo with this SSH key: ssh-ed25519 AAAAC3...

Roadmap

  • v0.2: Logging, DNS, Events, Notifications, Streaming, Vault crypto, full Tagging UX
  • v0.3: Instance-principal / resource-principal auth, work-request polling helpers
  • v0.4: Terraform-style diffs, cost estimation tool, multi-region fan-out

Contributing

See CONTRIBUTING.md. PRs welcome.

Author

Sarthak Pansare@sarthak-pansare

If this project saves you time, a ⭐ on the GitHub repo is appreciated.

License

Apache-2.0 — see LICENSE. Copyright © 2026 Sarthak Pansare.

Acknowledgements

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选