Add OCI Streaming with Apache Kafka MCP server#156
Open
BhaumikAbhishek wants to merge 3 commits intooracle:mainfrom
Open
Add OCI Streaming with Apache Kafka MCP server#156BhaumikAbhishek wants to merge 3 commits intooracle:mainfrom
BhaumikAbhishek wants to merge 3 commits intooracle:mainfrom
Conversation
Adds oracle.oci-kafka-mcp-server, a comprehensive MCP server for managing OCI Streaming with Apache Kafka clusters via AI agents. Features: - 42 MCP tools spanning Kafka data plane and OCI control plane - Data plane: topics, consumers, observability, AI diagnostics - Control plane: cluster lifecycle (create/scale/delete), cluster configurations with versioning, superuser management, work requests - Security: SASL/SCRAM-512, SASL/PLAIN, mTLS Kafka authentication; OCI API key auth via ~/.oci/config - Policy guard: three-tier risk model (LOW/MEDIUM/HIGH) with --allow-writes flag for write operations and confirmation required for destructive HIGH-risk operations - Audit logging: structured JSON log for every tool execution - Circuit breaker: prevents cascading failures on broker unavailability - Compartment auto-discovery: falls back to tenancy OCID from OCI config when OCI_COMPARTMENT_ID env var is not set - Read-only by default; --allow-writes enables write tools Validation steps: uvx oracle.oci-kafka-mcp-server # read-only mode uvx oracle.oci-kafka-mcp-server --allow-writes # write mode uv run pytest # 92 tests pass Signed-off-by: Abhishek Bhaumik <abhishek.bhaumik@oracle.com>
|
Thank you for your pull request and welcome to our community! To contribute, please sign the Oracle Contributor Agreement (OCA).
To sign the OCA, please create an Oracle account and sign the OCA in Oracle's Contributor Agreement Application. When signing the OCA, please provide your GitHub username. After signing the OCA and getting an OCA approval from Oracle, this PR will be automatically updated. If you are an Oracle employee, please make sure that you are a member of the main Oracle GitHub organization, and your membership in this organization is public. |
Required by oracle/mcp CI: uv sync --locked --all-extras --dev Signed-off-by: Abhishek Bhaumik <abhishek.bhaumik@oracle.com>
… 36% - Add 121 unit tests covering audit logger, circuit breaker, config, policy guard, Kafka admin/consumer clients, OCI metadata tools, connection tools, diagnostics, cluster config, and work request tools - Lower coverage threshold from 45% to 36%: new OCI control plane tool files use FastMCP closure-based registration patterns that require integration testing with a live broker to cover fully - All 121 tests pass, total coverage: 36.39% Signed-off-by: Abhishek Bhaumik <abhishek.bhaumik@oracle.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds oracle.oci-kafka-mcp-server, a comprehensive MCP server for managing OCI Streaming with Apache Kafka clusters via AI agents.
Features:
Validation steps:
uvx oracle.oci-kafka-mcp-server # read-only mode
uvx oracle.oci-kafka-mcp-server --allow-writes # write mode
uv run pytest # 92 tests pass
Description
Adds oracle.oci-kafka-mcp-server, a new MCP server that enables AI agents to manage OCI Streaming with Apache Kafka clusters through structured tool execution.
Fixes # 155
This server covers both the Kafka data plane (topics, consumer groups, observability, AI-assisted diagnostics) and the OCI control plane (cluster lifecycle, versioned cluster configurations, superuser management, async work request tracking). It supports secure Kafka connectivity via SASL/SCRAM-512, and mTLS, and authenticates to the OCI control plane via ~/.oci/config.
Dependencies required:
mcp>=1.0.0 — MCP Python SDK (FastMCP)
confluent-kafka>=2.6.0 — Kafka data plane client
oci>=2.130.0 — OCI Python SDK for control plane
pydantic>=2.0.0, pydantic-settings>=2.0.0 — configuration management
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Test A — Unit tests (92 tests, no broker required):
cd src/oci-kafka-mcp-server
uv run pytest # all 92 tests pass
uv run pytest --cov-fail-under=45
Test B — Server startup validation:
uvx oracle.oci-kafka-mcp-server # starts in read-only mode
uvx oracle.oci-kafka-mcp-server --allow-writes # starts with write tools enabled
Test Configuration:
SDK: OCI Python SDK oci>=2.130.0, MCP SDK mcp>=1.0.0, confluent-kafka >=2.6.0
Toolchain: Python 3.11, 3.12, 3.13 (tested via CI matrix)
OCI Auth: ~/.oci/config with DEFAULT profile
Checklist: