Python MCP server for OCI API Gateway management with programmatic and LLM-powered clients
oci-mcp-server is a specialized Python-based MCP (Model Context Protocol) server designed to streamline and standardize the interaction between AI applications such as Claude Desktop, Continue, Cursor, and others, with Oracle Cloud Infrastructure (OCI) API Gateway resources. This server serves as a bridge, enabling these applications to access and manage API Gateway tools through a standardized protocol, offering both programmatic and natural language interactions.
oci-mcp-server supports key features that encompass the core capabilities of the Model Context Protocol (MCP). These include:
The architecture of oci-mcp-server is designed to seamlessly integrate with MCP clients like Cursor and other AI applications. It leverages Python for its implementation, ensuring compatibility with a wide range of environments. The protocol flow diagram provides insight into how data moves between the AI application, the MCP client, and the server.
graph TD
A[AI Application] -->|MCP Client| B[MCP Protocol]
B --> C[MCP Server]
C --> D[Data Source/Tool]
style A fill:#e1f5fe
style C fill:#f3e5f5
style D fill:#e8f5e8
graph TD
A[OCI Compartment] -->|API Gateways| B[MCP Server]
B --> C[GATEWAY_ID_1]
B --> D[GATEWAY_ID_2]
style A fill:#e8f5e8
style B fill:#f3e5f5
style C fill:#dce4ff
style D fill:#dce4ff
To set up and run the oci-mcp-server, you need to meet a few prerequisites:
~/.oci/sessions/DEFAULT/token
and oci_api_key.pem
)Follow these steps to install the necessary components:
curl -Ls https://astral.sh/uv/install.sh | sh
Alternatively, you can use pip:
pip install uv
# or with pipx
pipx install uv
You can also update uv
if installed from the standalone installer:
uv self-update
More installation methods are available in the uv documentation.
uv venv --python 3.11
source .venv/bin/activate
uv pip install -r pyproject.toml
# or with `uv`
uv pip install -e .
oci-mcp-server facilitates several AI workflows by providing a robust and flexible interface between the client applications and API Gateway resources. Two realistic use cases are:
Listing APIs for DevOps Team: A development team can use this server to list all APIs within their OCI tenancy, quickly identifying and managing API gateways.
Gateway Management for API Teams: An API management team can utilize natural language queries via the LlamaIndex/Ollama client to get detailed information about specific gateway configurations without writing complex code.
Integration with MCP clients like Cursor is seamless, offering both programmatic and natural language interaction capabilities. Here are steps to integrate:
Install Cursor:
Update mcp.json
Configuration:
Cursor > Settings... > Cursor Settings
.MCP > + Add new global MCP server
.src/mcp_template.json
to ~/.cursor/mcp.json
or directly in the editor.Run the MCP Server:
python src/server.py
This will start the MCP server, exposing tools like list_gateways_tool
and get_gateway_tool
.
OCI-mcp-server ensures compatibility across multiple MCP clients, providing a seamless experience for developers. The compatibility matrix includes support for popular AI applications:
MCP Client | Resources | Tools | Prompts | Status |
---|---|---|---|---|
Claude Desktop | ✅ | ✅ | ✅ | Full Support |
Continue | ✅ | ✅ | ✅ | Full Support |
Cursor | ❌ | ✅ | ❌ | Tools Only |
For advanced configuration and security, you can edit the src/config.py
file to set your OCI compartment and gateway OCIDs, region, and profile as needed:
PROFILE_NAME = 'DEFAULT'
REGION = 'ap-mumbai-1'
SERVICE_ENDPOINT = '<SERVICE ENDPOINT>'
COMPARTMENT_ID = '<COMPARTMENT_ID>'
GATEWAY_ID = '<GATEWAY_ID>' # For Programmatic Client
Ensure you have valid OCI session files in ~/.oci/sessions/DEFAULT/
.
You can authenticate your session using:
oci session authenticate --tenancy-name <TENANCY_NAME> --profile-name DEFAULT --region $REGION
uv
and create a virtual environment.All source code resides in the src/
directory. Dependencies are managed via pyproject.toml
. To add new tools, edit src/server.py
and implement logic in src/gateway_services.py
.
To contribute or report issues, please refer to the project repository's contributing guidelines.
The oci-mcp-server is part of a broader ecosystem focused on integrating AI applications with specific data sources using standardized protocols. Explore other resources such as:
This comprehensive documentation serves as a valuable resource, providing detailed guidance on setting up and utilizing the oci-mcp-server with Oracle Cloud Infrastructure API Gateway tools.
Discover seamless cross-platform e-commerce link conversion and product promotion with Taobao MCP Service supporting Taobao JD and Pinduoduo integrations
Implement a customizable Python-based MCP server for Windsurf IDE with plugins and flexible configuration
Discover efficient methods for mcp_stdio2sse integration to enhance data streaming and system performance
MCP server for accessing and managing IMDB data with notes, summaries, and tools
Model Context Protocol server for Twitter interaction and analysis
Configure NOAA tides currents API tools via FastMCP server for real-time and historical marine data