关于 Mcp Server For Oracle Cloud Infrastructure (oci)
此 MCP 服务允许 LLM 与 Oracle Cloud Infrastructure 资源交互,面向需要检查或管理 OCI 基础设施的运维人员。它支持运行时切换配置档案和租户,并涵盖数据库、网络、OKE 等服务。
主要功能
- 01运行时切换 OCI 配置档案
- 02查看和管理计算资源
- 03管理数据库和 Exadata
- 04检查网络与存储
- 05查看成本、告警、指标和日志
- 06管理 OKE 集群和节点池
适用场景
- 01在不同 OCI 租户间切换
- 02启动或检查计算与数据库资源
- 03查看云成本和预算
- 04检查 OKE 集群和节点池
MCP 相关
该服务向 MCP 客户端提供 OCI 资源管理工具,包括配置档案选择及多个 OCI 服务类别的操作。
配置
本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。
暂未收录安装方式
我们还没有获取到这个服务的安装包或远程地址,请按项目 README 中的说明安装。
工具
还没有获取到工具列表
本地服务需要在你的电脑上运行后才能读取工具,维护者暂未提供工具列表。
详细介绍
Oracle Cloud Infrastructure(OCI)MCP 服务
本项目为 Oracle Cloud Infrastructure 实现了 Model Context Protocol(MCP)服务,让 Claude 等大模型能够直接与 OCI 资源交互。

功能
- 动态配置文件选择:无需重启服务即可在 OCI 配置文件/租户之间切换
- 使用标准 OCI CLI 配置连接 Oracle Cloud
- 提供 95 个全面的工具,可列出和管理 11 种以上服务类别中的 OCI 资源
- 实例生命周期管理(启动、停止)
- 数据库系统和数据库节点管理
- Exadata Cloud Service(Cloud Exadata Infrastructure、VM Clusters、Data Guard、备份、维护运行)
- Container Engine for Kubernetes(OKE) 集群和节点池管理
- 集成 MCP 协议,方便从 Claude Desktop 访问
前提条件
- Python 3.10 或更高版本
- 已配置 OCI CLI(
oci setup config) - 在 Oracle Cloud 中拥有适当的权限
安装
克隆此代码库
pip install git+https://github.com/modelcontextprotocol/python-sdk.git
pip install oci fastapi uvicorn click pydantic loguru
pip install -e .
使用方法
启动服务
选项 1:动态配置文件选择(推荐)
不指定配置文件启动,然后在运行时选择:
python -m mcp_server_oci.mcp_server
然后使用 MCP 工具管理配置文件:
list_oci_profiles- 查看 ~/.oci/config 中可用的配置文件set_oci_profile- 激活指定的配置文件get_current_oci_profile- 查看当前激活的配置文件
选项 2:使用默认配置文件
启动时预先加载指定的配置文件:
python -m mcp_server_oci.mcp_server --profile DEFAULT
使用 uv:
uv --directory /path/to/mcp-server-oci run python -m mcp_server_oci.mcp_server --profile DEFAULT
在不同租户之间切换
无需重启即可在不同的 OCI 租户之间切换:
# In your MCP client (e.g., Claude):
# 1. List available profiles
"Show me available OCI profiles"
# 2. Switch to a different tenancy
"Switch to the 'production' OCI profile"
# 3. Verify current profile
"What OCI profile am I using?"
Claude Desktop 配置(MacOS)
将此配置添加到文件:
/Users/<usuario>/Library/Application Support/Claude/claude_desktop_config.json
使用动态配置文件选择(推荐):
"mcpServers": {
"mcp-server-oci": {
"command": "python",
"args": [
"-m",
"mcp_server_oci.mcp_server"
],
"env": {
"PYTHONPATH": "/<PATH_TO_MCP>/mcp-server-oci",
"FASTMCP_LOG_LEVEL": "INFO"
}
}
}
使用固定配置文件:
"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"
}
}
}
使用 uv 和动态配置文件:
"mcpServers": {
"mcp-server-oci": {
"command": "uv",
"args": [
"--directory",
"/<PATH_TO_MCP>/mcp-server-oci",
"run",
"python",
"-m",
"mcp_server_oci.mcp_server"
],
"env": {
"FASTMCP_LOG_LEVEL": "INFO"
}
}
}
📋 可用的 MCP 工具
配置文件管理 🆕
list_oci_profiles- 列出 ~/.oci/config 中所有可用的 OCI 配置文件set_oci_profile- 激活指定的配置文件以进行 API 调用get_current_oci_profile- 显示当前激活的配置文件
身份与访问管理 🆕
区间
list_compartments- 列出你有权访问的所有区间
用户
list_users- 列出区间中的所有 IAM 用户及其功能和 MFA 状态get_user- 获取详细的用户信息,包括组成员身份
组
list_groups- 列出区间中的所有 IAM 组及成员数量get_group- 获取详细的组信息,包括成员
策略
list_policies- 列出区间中的所有 IAM 策略及其语句get_policy- 获取详细的策略信息及所有策略语句
动态组
list_dynamic_groups- 列出所有动态组及其匹配规则get_dynamic_group- 获取详细的动态组信息及实例主体规则
计算资源
list_instances- 列出区间中的虚拟机实例get_instance- 获取指定实例的详细信息start_instance- 启动已停止的实例stop_instance- 停止正在运行的实例(支持软停止/强制停止)
数据库 🔥
数据库系统
list_db_systems- 列出区间中的数据库系统get_db_system- 获取数据库系统的详细信息list_db_nodes- 列出区间中的数据库节点(可按数据库系统筛选)get_db_node- 获取数据库节点的详细信息start_db_node- 启动已停止的数据库节点stop_db_node- 停止正在运行的数据库节点(软停止或硬停止)reboot_db_node- 重启数据库节点reset_db_node- 重置(强制重启)数据库节点softreset_db_node- 软重置(正常重启)数据库节点start_db_system- 启动数据库系统的所有节点stop_db_system- 停止数据库系统的所有节点
常规数据库 🆕
list_databases- 列出某个区间中的数据库(可选择按 DB System 筛选)get_database- 获取数据库详细信息,包括连接字符串和 PDB 名称
自治数据库 🆕
list_autonomous_databases- 列出自治数据库及其工作负载类型和连接信息get_autonomous_database- 获取 ADB 详细信息,包括钱包信息和自动扩缩设置
Exadata 云服务 🆕
list_cloud_exadata_infrastructures- 列出某个区间中的 Cloud Exadata Infrastructure(机群硬件)get_cloud_exadata_infrastructure- 获取基础设施详细信息:形状、已启用/最大 CPU、内存和存储、维护时段list_cloud_vm_clusters- 列出 Cloud VM Cluster(Exadata Cloud Service RAC)get_cloud_vm_cluster- 获取 VM 集群详细信息:RAC 节点、SCAN DNS/VIP、GI/系统版本、子网、NSGlist_cloud_autonomous_vm_clusters- 列出 Cloud Autonomous VM Cluster(用于自治数据库的 Exadata)
Data Guard 🆕
list_data_guard_associations- 列出数据库的 DG 关联(使用主数据库 OCID 查询)get_data_guard_association- 获取特定 DG 关联:角色、对等角色、应用延迟/速率、保护模式
备份与维护 🆕
list_backups- 按区间或数据库列出数据库备份list_maintenance_runs- 列出维护运行记录,可选择按目标资源筛选get_maintenance_run- 获取特定维护运行记录的详细信息
网络
虚拟云网络(VCN)
list_vcns- 列出某个区间中的所有 VCN,以及 CIDR 块和 DNS 信息get_vcn- 获取 VCN 详细信息,包括 IPv6 CIDR 块
子网
list_subnets- 列出某个区间中的所有子网(可选择按 VCN 筛选)get_subnet- 获取子网详细信息,包括安全列表和路由
虚拟网络接口卡(VNIC)
list_vnics- 列出某个区间中的所有 VNIC(可选择按实例筛选)get_vnic- 获取 VNIC 详细信息,包括 IP 地址和 NSG 关联
安全
list_security_lists- 列出安全列表及其入站/出站规则(可选择按 VCN 筛选)get_security_list- 获取安全列表及其所有规则的详细信息list_network_security_groups- 列出某个区间中的网络安全组(NSG)get_network_security_group- 获取 NSG 详细信息,包括所有安全规则
存储 🆕
对象存储
get_namespace- 获取租户的对象存储命名空间list_buckets- 列出某个区间中的所有对象存储存储桶get_bucket- 获取存储桶详细信息,包括公共访问设置和版本控制
块存储
list_volumes- 列出某个区间中的所有块存储卷get_volume- 获取卷的详细信息,包括大小、性能层级和备份策略list_boot_volumes- 列出某个区间中的所有启动卷(可选择按 AD 筛选)get_boot_volume- 获取启动卷详细信息,包括源映像
文件存储
list_file_systems- 列出某个区间和 AD 中的所有文件存储文件系统get_file_system- 获取文件系统详细信息,包括计量字节数和快照
负载均衡器 🆕
经典负载均衡器
list_load_balancers- 列出某个区间中的所有经典负载均衡器get_load_balancer- 获取负载均衡器详细信息,包括后端集、侦听器和证书
网络负载均衡器
list_network_load_balancers- 列出某个区间中的所有网络负载均衡器get_network_load_balancer- 获取网络负载均衡器详细信息,包括后端集和侦听器
基础设施工具 🆕
可用性域和故障域
list_availability_domains- 列出某个区间中的所有可用性域list_fault_domains- 列出某个可用性域中的所有故障域
计算映像
list_images- 列出所有计算映像及其操作系统、版本和大小get_image- 获取映像详细信息,包括启动选项
计算形状
list_shapes- 列出所有计算形状及其 CPU、内存、网络和 GPU 规格
区域与租户
list_regions- 列出所有可用的 OCI 区域get_tenancy_info- 获取租户详细信息,包括名称和主区域
安全与加密 🆕
KMS 密钥库
list_vaults- 列出某个区间中的所有 KMS 密钥库get_vault- 获取密钥库详细信息,包括加密和管理端点
加密密钥
list_keys- 列出密钥库所在区间中的所有加密密钥get_key- 获取密钥详细信息,包括算法、形状和版本
成本管理 🆕
使用情况与成本分析
get_cost_usage_summary- 获取租户的成本与使用情况摘要,支持按日或按月统计get_cost_by_service- 获取指定时间段内按服务划分的成本明细get_cost_by_compartment- 获取指定时间段内按区间划分的成本明细
预算
list_budgets- 列出所有预算及其金额、实际支出和预测支出get_budget- 获取预算详细信息,包括目标和警报规则
监控与可观测性 🆕
警报
list_alarms- 列出所有警报及其查询、严重性和目标get_alarm- 获取警报详细信息,包括阈值和通知设置get_alarm_history- 获取警报状态历史记录,包括时间戳和状态转换
指标
list_metrics- 列出可用指标及其命名空间和维度query_metric_data- 使用 MQL 查询指定时间范围内的指标数据
日志
search_logs- 使用 Logging Search API 搜索日志list_log_groups- 列出某个区间中的所有日志组list_logs- 列出日志组中的所有日志及其类型和保留期限
Kubernetes 容器引擎(OKE) 🆕
集群
list_oke_clusters- 列出所有 OKE 集群及其 Kubernetes 版本和端点get_oke_cluster- 获取集群详细信息,包括网络配置、附加组件和可用升级get_oke_cluster_kubeconfig- 获取用于 kubectl 访问的 kubeconfig 文件内容
节点池
list_oke_node_pools- 列出节点池及其形状、映像和放置配置get_oke_node_pool- 获取节点池详细信息,包括各个节点、驱逐设置和轮换详情
工作请求
list_oke_work_requests- 列出 OKE 资源的异步操作(创建、更新、删除)get_oke_work_request- 获取工作请求的详细状态和进度
💡 使用示例
配置文件管理
# From Claude or any MCP client:
# List available profiles
"Show me all available OCI profiles"
# Activate a specific profile
"Set the OCI profile to 'production'"
# Check current profile
"What OCI profile am I currently using?"
# Switch between tenancies
"Switch to the DEFAULT profile"
身份与访问管理 🆕
# Users
"List all IAM users in my tenancy"
"Show me details for user ocid1.user.oc1..."
"Does this user have MFA enabled?"
"What groups is this user a member of?"
# Groups
"List all IAM groups in compartment X"
"Show me members of group 'Administrators'"
"Get details for group ocid1.group.oc1..."
# Policies
"List all IAM policies in the root compartment"
"Show me policy statements for 'network-admins-policy'"
"What permissions does this policy grant?"
"Get details for policy ocid1.policy.oc1..."
# Dynamic Groups
"List all dynamic groups in my tenancy"
"Show me matching rules for dynamic group 'instance-principals'"
"What instances match this dynamic group?"
"Get details for dynamic group ocid1.dynamicgroup.oc1..."
# Security auditing
"Which users have admin access?"
"Show me all policies that grant object storage access"
"What dynamic groups allow instance principals?"
计算实例管理
# List instances
"Show me all compute instances in compartment ocid1.compartment.oc1..."
# Get instance details
"Get details for instance ocid1.instance.oc1..."
# Start/stop instances
"Start the instance ocid1.instance.oc1..."
"Stop the instance ocid1.instance.oc1... with force stop"
数据库管理
# DB Systems
"Show me all DB Systems in compartment ocid1.compartment.oc1..."
"Get details for DB System ocid1.dbsystem.oc1..."
# DB Nodes management
"List all DB Nodes for DB System ocid1.dbsystem.oc1..."
"Start DB Node ocid1.dbnode.oc1..."
"Stop all nodes of DB System ocid1.dbsystem.oc1..."
"Reboot DB Node ocid1.dbnode.oc1..."
"Soft reset DB Node ocid1.dbnode.oc1..."
# Regular Databases 🆕
"List all databases in compartment X"
"Show me databases in DB System Y"
"Get connection strings for database ocid1.database.oc1..."
"What is the character set and PDB name of this database?"
# Autonomous Databases 🆕
"List all Autonomous Databases in compartment Z"
"Show me details for ADB ocid1.autonomousdatabase.oc1..."
"What workload type is this Autonomous Database?"
"Get connection strings and wallet info for this ADB"
"Is auto-scaling enabled on this Autonomous Database?"
网络管理
# VCN operations
"List all VCNs in compartment ocid1.compartment.oc1..."
"Show me details for VCN ocid1.vcn.oc1..."
# Subnet operations
"List all subnets in VCN ocid1.vcn.oc1..."
"Get details for subnet ocid1.subnet.oc1..."
# Security operations
"Show me all security lists in compartment X"
"List all network security groups in VCN Y"
"Get security rules for security list ocid1.securitylist.oc1..."
# VNIC operations
"List all VNICs for instance ocid1.instance.oc1..."
"Show me details for VNIC ocid1.vnic.oc1..."
存储管理 🆕
# Object Storage operations
"What is my Object Storage namespace?"
"List all buckets in compartment X"
"Show me details for bucket 'my-data-bucket'"
"Is bucket 'public-bucket' publicly accessible?"
# Block Storage operations
"List all volumes in compartment Y"
"Show me details for volume ocid1.volume.oc1..."
"List all boot volumes in compartment Z"
"What is the size and performance tier of this volume?"
# File Storage operations
"List all file systems in compartment W and AD-1"
"Show me details for file system ocid1.filesystem.oc1..."
"How many bytes is this file system using?"
负载均衡器管理 🆕
# Classic Load Balancers
"List all load balancers in compartment X"
"Show me details for load balancer ocid1.loadbalancer.oc1..."
"What backend sets and listeners does this load balancer have?"
"Show me health check configuration for this load balancer"
# Network Load Balancers
"List all network load balancers in compartment Y"
"Show me details for network load balancer ocid1.networkloadbalancer.oc1..."
"What is the backend configuration for this NLB?"
"Is source IP preservation enabled on this network load balancer?"
# Load balancer analysis
"Show me all load balancers and their IP addresses"
"Which load balancers are private vs public?"
基础设施实用工具 🆕
# Availability and Fault Domains
"List all availability domains in my tenancy"
"Show me fault domains in availability domain AD-1"
"What availability domains are available in region us-ashburn-1?"
# Compute Images
"List all compute images in compartment X"
"Show me details for image ocid1.image.oc1..."
"What Oracle Linux images are available?"
"What is the size and OS version of this image?"
# Compute Shapes
"List all compute shapes available in compartment Y"
"What shapes support GPU?"
"Show me flexible shapes with configurable OCPUs"
"What is the memory and network bandwidth for shape VM.Standard.E4.Flex?"
# Regions and Tenancy
"List all available OCI regions"
"What is my tenancy name and home region?"
"Show me tenancy information"
安全与加密 🆕
# KMS Vaults
"List all vaults in compartment X"
"Show me details for vault ocid1.vault.oc1..."
"What is the management endpoint for this vault?"
"Is this vault primary or replica?"
# Encryption Keys
"List all encryption keys in vault Y"
"Show me details for key ocid1.key.oc1..."
"What algorithm and protection mode does this key use?"
"What is the current key version?"
# Key management workflow
"First, get vault details to obtain the management_endpoint"
"Then, use that endpoint to list or get keys in that vault"
成本管理 🆕
# Usage and Cost Analysis
"Show me cost and usage summary for the last 30 days"
"Get cost breakdown by service from 2024-01-01 to 2024-01-31"
"What are my costs by compartment for this month?"
"Show me daily cost summary for my tenancy"
# Cost analysis queries
"Which services are costing the most?"
"What compartment has the highest spend?"
"Show me monthly cost trends"
# Budgets
"List all budgets in compartment X"
"Show me budget details for budget ocid1.budget.oc1..."
"What is my actual spend vs budget?"
"Show me forecasted spend for this budget"
"Which budgets have alert rules configured?"
监控与可观测性 🆕
# Alarms
"List all alarms in compartment X"
"Show me details for alarm ocid1.alarm.oc1..."
"What alarms are currently firing?"
"Show me alarm history for the last 24 hours"
"Which alarms have critical severity?"
# Metrics
"List all available metrics in compartment Y"
"Show me CPU metrics for compute instances"
"Query CpuUtilization for the last hour"
"What metrics are available for namespace oci_computeagent?"
# Logs
"Search logs for errors in the last hour"
"List all log groups in compartment Z"
"Show me logs in log group ocid1.loggroup.oc1..."
"Search for 'ERROR' in application logs"
# Troubleshooting workflows
"Show me all firing alarms and their metric queries"
"Get CPU utilization data for instance X in the last 2 hours"
"Search logs for errors related to database connections"
Kubernetes 容器引擎(OKE) 🆕
# Clusters
"List all OKE clusters in compartment X"
"Show me details for cluster ocid1.cluster.oc1..."
"What Kubernetes version is this cluster running?"
"What upgrades are available for my cluster?"
"Get the kubeconfig for cluster ocid1.cluster.oc1..."
"What are the public and private endpoints for this cluster?"
# Node Pools
"List all node pools in compartment Y"
"Show me node pools for cluster Z"
"Get details for node pool ocid1.nodepool.oc1..."
"What is the shape and size of this node pool?"
"Show me individual nodes in this node pool"
"What is the Kubernetes version of the node pool?"
# Work Requests
"List all OKE work requests in compartment A"
"Show me work requests for cluster B"
"Get details for work request ocid1.clustersworkrequest.oc1..."
"What operations are currently in progress?"
"Show me the status of cluster creation"
# Kubernetes cluster management workflows
"List all clusters and their Kubernetes versions"
"Show me clusters that have available upgrades"
"Get kubeconfig for all clusters in my compartment"
"Which node pools are running outdated Kubernetes versions?"
"Show me all work requests that failed"
资源发现
# List compartments
"List all compartments in my tenancy"
# Cross-resource queries
"Show me all running instances in compartment X"
"List all DB Systems and their current states"
"Show me the complete network topology for compartment X"
🚀 近期改进
v1.16 - Exadata Cloud Service 工具(最新)🗄️
- 新增 10 个工具:Cloud Exadata Infrastructure、Cloud VM Clusters、Cloud Autonomous VM Clusters、Data Guard、备份和维护运行
- Exadata Cloud Service:列出/获取 Cloud Exadata Infrastructure 和 Cloud VM Clusters,以及 RAC、SCAN DNS 和 GI/系统版本详情
- Data Guard:列出/获取 Data Guard 关联信息,包括角色、应用延迟/速率和保护模式
- 备份与维护:按区间或数据库列出备份,列出/获取维护运行
- MCP 工具总数从 85 个增至 95 个
- 错误修复:
list_compartments现在从配置中获取租户 OCID,而不再使用get_user,修复联合/IAM-Domain 用户遇到的 404 错误;list_available_profiles现在包含[DEFAULT]配置文件区段 - 在 README 中添加了全面的 Exadata Cloud Service 使用示例
v1.15 - Kubernetes 容器引擎(OKE)工具 ☸️
- 新增 7 个 OKE 工具:集群、节点池和工作请求
- 集群:列出/获取集群,以及 Kubernetes 版本、端点、网络配置和可用升级
- Kubeconfig:获取 kubeconfig 文件内容,以便通过 kubectl 访问集群
- 节点池:列出/获取节点池,以及详细节点信息、放置配置和驱逐设置
- 工作请求:跟踪 OKE 资源的异步操作(创建、更新、删除)
- 对管理 OCI 上的 Kubernetes 基础设施至关重要
- MCP 工具总数从 78 个增至 85 个
- 在 README 中添加了全面的 OKE 使用示例
v1.14 - 监控与可观测性工具 🔍
- 新增 8 个监控工具:警报、指标和日志
- 警报:列出/获取警报,以及严重性、查询历史记录和状态转换
- 指标:列出指标,使用 MQL 查询时间序列数据以分析性能
- 日志:搜索日志,列出日志组和日志以排查问题
- 对实时监控、问题排查和事件响应至关重要
- MCP 工具总数从 70 个增至 78 个
- 在 README 中添加了全面的监控与可观测性使用示例
v1.13 - 成本管理工具 💰
- 新增 5 个成本管理工具:用量/成本分析和预算
- 用量分析:按日/月粒度获取成本汇总
- 成本明细:按服务或区间分析任意时间段的成本
- 预算管理:列出/获取预算,以及实际支出、预测支出和警报规则
- 对成本优化、预算跟踪和财务治理至关重要
- MCP 工具总数从 65 个增至 70 个
- 在 README 中添加了全面的成本管理使用示例
v1.12 - 安全与加密工具 🔐
- 新增 4 个安全工具:KMS Vault 和加密密钥
- KMS Vault:列出/获取 Vault,以及加密和管理端点
- 加密密钥:列出/获取密钥,以及算法、保护模式和密钥形态
- 完整覆盖 KMS:Vault 管理和密钥发现
- 使用 Vault 端点动态创建 KMS Management 客户端
- MCP 工具总数从 61 个增至 65 个
- 在 README 中添加了全面的安全与加密使用示例
v1.11 - 基础设施实用工具 🏗️
- 新增 7 个基础设施工具:可用性域、故障域、映像、形状、区域和租户
- 可用性域/故障域:列出 AD 和 FD,以便规划高可用性
- 计算映像:列出/获取映像,以及操作系统版本和启动选项
- 计算形状:列出形状,以及 CPU、内存、网络和 GPU 规格
- 区域与租户:列出所有区域并获取租户信息
- 对资源规划、容量管理和基础设施发现至关重要
- MCP 工具总数从 54 个增至 61 个
- 在 README 中添加了全面的基础设施实用工具使用示例
v1.10 - 负载均衡器工具 ⚖️
- 新增 4 个负载均衡器工具:经典负载均衡器和网络负载均衡器
- 经典负载均衡器:列出/获取负载均衡器及其后端集、侦听器和证书
- 网络负载均衡器:列出/获取网络负载均衡器及其后端配置和 IP 保留设置
- 全面覆盖负载均衡:第 7 层(经典)和第 4 层(网络)负载均衡器
- MCP 工具总数从 50 个增至 54 个
- 在 README 中添加了全面的负载均衡器使用示例
v1.9 - 身份与访问管理工具 🔐
- 新增 8 个 IAM 工具:用户、组、策略、动态组
- 安全审计:检查用户权限、MFA 状态和组成员资格
- 策略管理:列出并检查所有 IAM 策略声明
- 动态组:查看实例主体匹配规则
- 是合规审查、安全审计和访问故障排查的必备工具
- MCP 工具总数从 42 个增至 50 个
- 在 README 中添加了全面的 IAM 使用示例
v1.8 - 数据库工具 🗄️
- 新增 4 个数据库工具:常规数据库和自治数据库
- 常规数据库:列出/获取数据库及其连接字符串和 PDB 名称
- 自治数据库:列出/获取 ADB,包括工作负载类型、钱包信息和自动扩展设置
- 全面覆盖数据库生态系统:DB Systems、DB Nodes、Databases 和 ADB
- MCP 工具总数从 38 个增至 42 个
- 在 README 中添加了全面的数据库使用示例
v1.7 - 存储工具 💾
- 新增 9 个存储工具:对象存储、块存储、文件存储
- 对象存储:获取命名空间,列出/获取存储桶及其公开访问信息
- 块存储:列出/获取卷和启动卷及其性能层级
- 文件存储:列出/获取文件系统及其计量字节数
- MCP 工具总数从 29 个增至 38 个
- 在 README 中添加了全面的存储使用示例
v1.6 - 全面的网络工具 🌐
- 新增 10 个网络工具:VCN、子网、VNIC、安全列表、NSG
- 网络拓扑发现:全面了解网络基础设施
- 安全审计:检查安全规则和网络访问控制
- 连接故障排查:VNIC 和路由信息
- MCP 工具总数从 19 个增至 29 个
- 在 README 中添加了全面的网络使用示例
v1.5 - 动态配置文件选择 🔥
- 多租户支持:无需重启即可在 OCI 配置文件之间切换
- 新增 MCP 工具:
list_oci_profiles、set_oci_profile、get_current_oci_profile - 在所有 OCI 工具中验证配置文件要求
- 可选的
--profile参数(延迟初始化) - 在
DYNAMIC_PROFILE_SELECTION.md中提供完整文档 - 更新 README,准确列出工具
v1.4 - 集中式配置
- 创建了集中式
config.py,包含所有配置常量 - 移除了整个代码库中的魔法数字
- 提高了配置项的可维护性和可发现性
v1.3 - 异步操作
- 移除了所有阻塞式
time.sleep()调用 - 使所有操作真正实现异步
- 提高了服务响应速度
v1.2 - 标准化错误处理
- 实施混合错误处理模式
- 技术错误 → 引发异常
- 业务状态 → 返回成功字典
- 在
ERROR_HANDLING_PATTERN.md中提供完整文档
v1.1 - DRY 原则
- 创建了
mcp_tool_wrapper装饰器 - 消除了约 150 行重复代码
- 所有工具采用一致的错误处理和日志记录
v1.0 - 代码清理
- 移除了未使用/过时的文件
- 清理了注释掉的代码
- 建立了整洁的基线
📚 文档
- 动态配置文件选择指南 - 多租户支持完整指南
- 错误处理模式 - 面向开发者的错误处理指南
- 错误处理示例 - 实用示例
🤝 贡献
欢迎贡献!代码库遵循以下模式:
- 混合错误处理(技术错误时抛出异常,业务状态则返回字典)
- 异步操作(不使用阻塞调用)
- 集中式配置(常量定义在
config.py中) - DRY 原则(使用装饰器实现通用模式)
📝 许可证
[在此添加许可证]
评论
支持 Markdown
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。