mcp-oci
Enables MCP-capable clients to discover live Oracle Cloud Infrastructure resources, map their dependencies, and generate reproducible Terraform configurations, all while enforcing security modes, compartment/region allowlists, and secret redaction.
README
mcp-oci
A Model Context Protocol server for Oracle Cloud Infrastructure (OCI). It gives an MCP-capable client (Claude Desktop, Claude Code, Cursor, Copilot, …) the ability to discover live OCI resources, map how they relate, and generate reproducible Terraform — with behaviour controlled entirely by flags.
Think of it as a Playwright-MCP for your cloud: instead of rebuilding infrastructure knowledge by hand, the model can ask "show all VCNs in the prod compartment" and "generate Terraform for this compartment" and get structured, secret-free answers.
Features
- Live discovery — compartments, regions, and any resource via OCI Resource Search.
- Terraform generation — faithful HCL for known types (VCN, subnet, instance, bucket, compartment) and annotated skeletons for the rest; whole-compartment modules with provider variables.
- Dependency graph — nodes/edges plus a suggested provisioning order (dependencies first).
- Secrets never reach the model — every payload is redacted before return.
- Security flags — access modes, compartment/region allowlists, provisioning gate, dry-run, and JSON audit logging (see below).
- Standard auth — OCI config file (
~/.oci/config) or instance principals. No credentials stored by the server.
Security model
| Concern | Flag | Default | Effect |
|---|---|---|---|
| What can the server do? | OCI_MODE |
read-only |
All shipped tools are read-only. read-write/admin are reserved for future provisioning and currently expose no extra tools. |
| Which compartments are in scope? | OCI_COMPARTMENT_ALLOWLIST |
(all) | When set, operations on other compartments are refused. |
| Which regions are reachable? | OCI_REGION_ALLOWLIST |
(configured region) | When set, only these regions may be targeted. |
Can it run terraform apply? |
OCI_ALLOW_APPLY |
false |
Reserved gate for provisioning (not yet shipped). |
| Preview without executing | OCI_DRY_RUN |
false |
For future write tools: validate + log intent without executing. |
| Audit trail | OCI_AUDIT_LOG |
true |
Emits a JSON line to stderr per guarded operation. |
| Secret redaction | (always on) | — | Secret-shaped fields are replaced with ***REDACTED*** before any result is returned. |
Tools
Discovery (read): list_compartments, list_regions, search_resources, list_compartment_resources, get_resource
Terraform (read): generate_terraform, generate_compartment_terraform, build_dependency_graph
Quickstart — add to your agent
Published on npm as @dockndevai/mcp-oci. No clone or build needed — your MCP client runs it on demand with npx. Start in read-only mode; see .env.example for every variable and docs/CLIENTS.md for the full per-client guide.
Claude Code (CLI)
claude mcp add oci -e OCI_PROFILE="DEFAULT" -e OCI_MODE="read-only" -- npx -y @dockndevai/mcp-oci
Claude Desktop · Cursor · Windsurf — same block in claude_desktop_config.json, .cursor/mcp.json, or ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"oci": {
"command": "npx",
"args": [
"-y",
"@dockndevai/mcp-oci"
],
"env": {
"OCI_PROFILE": "DEFAULT",
"OCI_MODE": "read-only"
}
}
}
}
OpenAI Codex CLI — in ~/.codex/config.toml:
[mcp_servers.oci]
command = "npx"
args = ["-y", "@dockndevai/mcp-oci"]
env = { OCI_PROFILE = "DEFAULT", OCI_MODE = "read-only" }
VS Code (GitHub Copilot, Agent mode) — in .vscode/mcp.json:
{
"servers": {
"oci": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@dockndevai/mcp-oci"
],
"env": {
"OCI_PROFILE": "DEFAULT",
"OCI_MODE": "read-only"
}
}
}
}
Configure
Point it at a standard OCI config profile. For safety, use an IAM user/policy with
read-only (inspect/read) permissions on the compartments you want the agent to see.
Example prompts
- "List all compartments, then show every resource in the
prodcompartment." - "Generate Terraform for VCN
ocid1.vcn.oc1..…." - "Build a dependency graph for compartment
…and tell me the provisioning order."
Run from source (development)
Prefer the published package above. To run from a clone:
npm install
npm run build
node dist/index.js # with the environment variables set
Develop
npm run dev # watch mode
npm test # security policy + terraform generation + graph + redaction
npm run typecheck
Roadmap
terraform plan/applyexecution behindread-write/admin+OCI_ALLOW_APPLY.- More resource-type mappers (load balancers, databases, DRGs, IAM policies).
- Cross-environment drift comparison.
Publishing
This server ships a server.json for the official MCP registry and an mcpName for npm ownership validation. See PUBLISHING.md for publishing to npm and listing on the MCP registry, Smithery, Glama, Cursor, and PulseMCP.
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。