Leverages the official OCI Python SDK for direct API access to Oracle Cloud Infrastructure Core Services with complete type safety and connection pooling
OCI Core Services FastMCP Server
A dedicated FastMCP server for Oracle Cloud Infrastructure (OCI) Core Services, specifically designed for compute instance management and network operations.
🚀 Features
✅ Dedicated Core Services Focus
- Compute Instance Management: List, query, and manage compute instances
- Instance Lifecycle Control: Start, stop, and restart compute instances with graceful/forced options
- Network Information: Complete VNIC details including IP addresses, hostnames, and MAC addresses
- Instance Details: Comprehensive instance configuration and metadata
- LLM-Friendly Output: Structured JSON responses optimized for AI/LLM consumption
✅ Official OCI Python SDK Integration
- Primary SDK Access: Direct API calls using
oci>=2.157.0
Python SDK - CLI Fallback: Automatic fallback to OCI CLI for maximum compatibility
- Authenticated Access: Uses standard OCI configuration files
- Regional Support: Multi-region support with automatic region detection
✅ FastMCP Framework
- Modern Architecture: Built on FastMCP 2.10.6 for optimal performance
- Type Safety: Complete Python typing for reliable operations
- Async Operations: Non-blocking async/await patterns
- Error Handling: Comprehensive error handling with graceful fallbacks
📋 Available Tools
📊 Instance Information Tools
1. list_compute_instances
Lists all compute instances in the compartment with basic details.
Parameters:
compartment_id
(optional): OCI compartment IDlifecycle_state
(optional): Filter by state (RUNNING, STOPPED, etc.)
Returns:
2. get_instance_details
Get comprehensive details about a specific compute instance.
Parameters:
instance_id
(required): OCI instance OCIDcompartment_id
(optional): OCI compartment IDinclude_network
(optional): Include network interface details
Returns:
3. list_instances_with_network
List compute instances with complete network information.
Parameters:
compartment_id
(optional): OCI compartment IDlifecycle_state
(optional): Filter by state
Returns:
4. get_compute_instance_state
Get the current lifecycle state of a specific compute instance.
Parameters:
instance_id
(required): OCI instance OCID
Returns:
⚡ Instance Lifecycle Management Tools
5. start_compute_instance
Start a stopped compute instance.
Parameters:
instance_id
(required): OCI instance OCIDcompartment_id
(optional): OCI compartment ID
Returns:
6. stop_compute_instance
Stop a running compute instance with graceful or forced shutdown.
Parameters:
instance_id
(required): OCI instance OCIDcompartment_id
(optional): OCI compartment IDsoft_stop
(optional): Use graceful shutdown (SOFTSTOP) if True, force stop (STOP) if False. Default: True
Returns:
7. restart_compute_instance
Restart a compute instance with graceful or forced restart.
Parameters:
instance_id
(required): OCI instance OCIDcompartment_id
(optional): OCI compartment IDsoft_restart
(optional): Use graceful restart (SOFTRESET) if True, force restart (RESET) if False. Default: True
Returns:
🔧 Diagnostic Tools
8. test_core_services_connection
Test connectivity to OCI Core Services and validate configuration.
Returns connection status for:
- OCI SDK configuration
- Compute service access
- Virtual Network service access
🛠️ Installation & Setup
Prerequisites
Configuration
The server uses standard OCI configuration:
- Config file:
~/.oci/config
(default) - Environment:
OCI_COMPARTMENT_ID
for default compartment - Authentication: OCI config file with API keys
Running the Server
Option 1: Direct execution
Option 2: Using the launcher script
📊 Current Test Results
✅ Successfully tested with production OCI tenancy:
Instance Discovery
- 13 running instances discovered
- Instance names: ArkimeGOAD, Caldera, Ludus, Suricata, TPOT, Victim1, braavos, etc.
- Shapes: VM.Standard.E4.Flex, VM.Standard.E5.Flex, VM.Standard.E6.Flex
- All with complete OCIDs and lifecycle states
Network Information
- Private IPs: 192.168.56.x, 192.168.57.x networks
- Public IPs: Available where configured
- Hostnames: arkimegoad, ludus, etc.
- MAC addresses: Complete network interface details
- Security groups: NSG associations included
Performance
- Primary Method: OCI Python SDK
- Response time: ~500ms for 13 instances with network info
- Fallback: CLI method available for compatibility
- LLM-friendly: Optimized JSON structure for AI consumption
🔄 SDK vs CLI Approach
Primary: OCI Python SDK
- ✅ Direct API access to OCI Core Services
- ✅ Type-safe responses with proper data structures
- ✅ Better performance with connection pooling
- ✅ Rich metadata including detailed configurations
- ✅ Network information via VirtualNetworkClient
- ✅ Real-time data with immediate API responses
Fallback: OCI CLI
- ✅ Universal compatibility where SDK isn't available
- ✅ Same data format for seamless switching
- ⚠️ Limited network info (requires additional calls)
- ⚠️ JSON parsing overhead
🎯 LLM-Friendly JSON Format
Key Design Principles:
- Human-readable summaries: Every response includes a
summary
field - Consistent structure: All responses follow the same pattern
- Clear success indicators:
success
boolean for easy parsing - Comprehensive data: Both summary and detailed data included
- ISO timestamps: Standardized time format
- Error handling: Consistent error response format
Response Structure:
🔧 Technical Architecture
FastMCP Integration
OCI SDK Integration
Error Handling & Fallbacks
📈 Usage Examples
Basic Instance Listing
Instance Details with Network
Complete Network Inventory
Start a Stopped Instance
Graceful Stop Instance
Force Restart Instance
Check Instance State
🌐 Integration Notes
With Other MCP Servers
- Metrics Server: Complements OCI monitoring/metrics server
- Logan MCP: Compatible timestamp and data formats
- Security Analysis: Network data perfect for security correlation
Claude/LLM Integration
- Optimized responses: Designed for AI consumption
- Clear summaries: Human-readable context for LLMs
- Structured data: Detailed data for programmatic access
- Error resilience: Graceful handling of failures
🎯 Benefits Over Generic Solutions
Specialized Focus
- ✅ Core Services Only: Dedicated to compute and network operations with lifecycle management
- ✅ Complete Instance Control: Start, stop, restart with graceful/forced options
- ✅ Optimized Performance: Targeted for specific use cases
- ✅ Clean Architecture: No mixing of concerns with monitoring/metrics
- ✅ LLM-First Design: Built specifically for AI assistant consumption
Production Ready
- ✅ Tested: Verified with 13 running instances in production
- ✅ Reliable: SDK primary with CLI fallback ensures availability
- ✅ Scalable: Efficient async operations for multiple instances
- ✅ Maintainable: Clean separation of concerns
This OCI Core Services FastMCP Server provides dedicated compute instance management with LLM-optimized responses, perfect for AI assistants needing OCI infrastructure data.
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
A dedicated server for Oracle Cloud Infrastructure (OCI) Core Services that enables management of compute instances and network operations with LLM-friendly structured responses.
Related MCP Servers
- -securityAlicense-qualityA server for task orchestration and coordination, facilitating task management with dependencies, multi-instance collaboration, and persistent task tracking.Last updated -722JavaScriptMIT License
- -securityFlicense-qualityA server that enables seamless integration between local Ollama LLM instances and MCP-compatible applications, providing advanced task decomposition, evaluation, and workflow management capabilities.Last updated -6Python
- -securityAlicense-qualityA Model Context Protocol Server that enables LLMs to interact with Oracle Database by providing database tables/columns as context, allowing users to generate SQL statements and retrieve results using natural language prompts.Last updated -27PythonApache 2.0
- -securityAlicense-qualityThis project builds a read-only MCP server. For full read, write, update, delete, and action capabilities and a simplified setup, check out our free CData MCP Server for Oracle SCM (beta): https://www.cdata.com/download/download.aspx?sku=KSZK-V&type=betaLast updated -MIT License