OCI MCP Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
OCI MCP Server
A professional-grade Oracle Cloud Infrastructure (OCI) MCP server built with FastMCP, implementing Anthropic's best practices for AI agent tool integration.
Features
Progressive Disclosure - Tools are discoverable on-demand, not loaded upfront
Dual Response Formats - Markdown (human-readable) and JSON (machine-readable)
Skills Architecture - High-level workflow skills combining multiple tools
Context Efficiency - Pagination, filtering, and summarization built-in
Multiple Domains - Cost, Compute, Observability (extensible to more)
Secure by Default - Environment-based configuration, no hardcoded credentials
Related MCP server: oci-mcp-server
Quick Start
Prerequisites
Python 3.11+
OCI CLI configured (
~/.oci/config)uv package manager (recommended)
Installation
# Clone the repository
git clone https://github.com/your-org/mcp-oci-new.git
cd mcp-oci-new
# Create virtual environment and install dependencies
uv sync
# Copy and configure environment
cp .env.example .env.local
# Edit .env.local with your settingsConfiguration
Configure your environment in .env.local:
# Required: OCI SDK configuration
OCI_CONFIG_FILE=~/.oci/config
OCI_CLI_PROFILE=DEFAULT
# Optional: Override region/tenancy
# OCI_REGION=us-ashburn-1
# OCI_TENANCY_OCID=ocid1.tenancy.oc1..xxxRunning the Server
# Standard I/O mode (for MCP clients)
uv run python -m mcp_server_oci.server
# HTTP mode (for testing/debugging)
OCI_MCP_TRANSPORT=streamable_http uv run python -m mcp_server_oci.serverMCP Client Configuration
Add to your MCP client configuration (e.g., Claude Desktop, Cline):
{
"mcpServers": {
"oci-mcp": {
"command": "uv",
"args": ["run", "--directory", "/path/to/mcp-oci-new", "python", "-m", "mcp_server_oci.server"],
"env": {
"OCI_CLI_PROFILE": "DEFAULT"
}
}
}
}Architecture
src/mcp_server_oci/
├── server.py # FastMCP server entry point
├── config.py # Configuration management
├── core/
│ ├── client.py # OCI SDK client wrapper
│ ├── errors.py # Structured error handling
│ ├── formatters.py # Response formatters
│ ├── models.py # Base Pydantic models
│ └── observability.py # Tracing and logging
├── tools/
│ ├── discovery.py # Tool discovery (search_tools, list_domains)
│ ├── compute/ # Compute domain tools
│ ├── cost/ # Cost/FinOps domain tools
│ └── observability/ # Monitoring/Logging tools
└── skills/
└── troubleshoot.py # High-level workflow skillsAvailable Tools
Discovery Tools
Tool | Description |
| Search for tools by keyword with detail levels |
| List available OCI tool domains |
| Get complete schema for a specific tool |
| Health check and connectivity test |
Compute Domain
Tool | Description |
| List compute instances with filtering |
| Start a stopped instance |
| Stop a running instance |
| Restart an instance |
| Get instance performance metrics |
Cost Domain
Tool | Description |
| Get cost summary for time period |
| Cost breakdown by compartment |
| Cost breakdown by OCI service |
| Monthly trend with forecast |
| Detect cost spikes and anomalies |
Observability Domain
Tool | Description |
| Query OCI Monitoring metrics |
| Query Logging Analytics |
| List monitoring alarms |
Skills (Workflows)
Skill | Description |
| Comprehensive instance troubleshooting |
Usage Examples
Progressive Discovery
# 1. Search for relevant tools
result = await oci_search_tools(query="cost", detail_level="summary")
# 2. Get full schema for selected tool
schema = await oci_get_tool_schema(tool_name="oci_cost_get_summary")
# 3. Execute the tool
summary = await oci_cost_get_summary(
tenancy_ocid="ocid1.tenancy...",
time_start="2024-01-01T00:00:00Z",
time_end="2024-01-31T23:59:59Z",
response_format="markdown"
)Response Formats
# Human-readable markdown (default)
result = await oci_compute_list_instances(
compartment_id="ocid1.compartment...",
response_format="markdown"
)
# Returns: "## Instances\n| Name | State | Shape |..."
# Machine-readable JSON
result = await oci_compute_list_instances(
compartment_id="ocid1.compartment...",
response_format="json"
)
# Returns: {"items": [...], "total": 10, "has_more": false}Development
Running Tests
# Unit tests
uv run pytest tests/
# Smoke test (tool registration check)
uv run python tests/smoke_test.pyCode Quality
# Linting
uv run ruff check src/
# Type checking
uv run mypy src/Adding a New Domain
Create directory structure:
src/mcp_server_oci/tools/newdomain/ ├── __init__.py ├── SKILL.md ├── models.py ├── tools.py └── formatters.pyRegister in
server.py:from mcp_server_oci.tools.newdomain.tools import register_newdomain_tools register_newdomain_tools(mcp)
Environment Variables
Variable | Required | Default | Description |
| No |
| Path to OCI config file |
| No |
| OCI config profile name |
| No | From config | Override region |
| No | From config | Override tenancy |
| No | - | Default compartment |
| No |
| Enable write operations |
| No |
| Transport: stdio or streamable_http |
| No |
| HTTP port (if using HTTP transport) |
| No |
| Logging level |
Security
No hardcoded credentials - All sensitive data via environment variables
Config file isolation - Uses OCI SDK standard config locations
Mutation protection - Write operations disabled by default
Input validation - Pydantic v2 models with strict validation
License
MIT License - see LICENSE for details.
Contributing
Contributions welcome! Please read the CONTRIBUTING guide first.
Related Resources
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Discover, compare, route, and execute machine-accessible capabilities for AI agents.
Discover, inspect and run 63,000+ agent tools from one balance. Pay per call, no subscriptions.
214 tools for AI agents over one MCP endpoint: image, video, audio, 3D, data, storage, mail, GPUs.
See, price, and control every tool call your AI agents make: policy checks, cost, and audit tools.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides AI agents with secure, natural-language access to Oracle Cloud Infrastructure through 69 tools covering services like compute, storage, networking, and databases. It features deep IAM integration and supports deployment across platforms like Claude Desktop, Cursor, and OCI Generative AI.MIT
- AlicenseNot gradedqualityDmaintenanceEnables natural-language access to Oracle Cloud Infrastructure resources, allowing users to query compute instances, OKE clusters, networking, and Object Storage via MCP tools.MIT
- FlicenseNot gradedqualityDmaintenanceEnables agents to securely discover and invoke a centrally governed catalog of tools from distributed internal and external providers, with policy enforcement, quotas, inspection, and audit controls.-
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to query Oracle Integration Cloud read-only across multiple environments in plain language, covering integrations, runtime instances, errors, schedules, connections and flow design through 36 GET-based tools.MIT