Skip to content

Conversation

@shyam2511
Copy link
Member

@shyam2511 shyam2511 commented Dec 19, 2025

Description

This PR introduces the OCI DB Dynamic MCP Server, a fully functional Model Context Protocol server that enables LLMs to interact with Oracle Cloud Infrastructure Database services.

Unlike static tool definitions, this server dynamically loads OCI specifications to generate tools on the fly, ensuring up-to-date compatibility with OCI APIs.

Key Features Implemented:

  • Dynamic Tool Loading: Automatically parses OCI Python SDK specs to generate MCP tools.
  • Resource Filtering: Startup logic to filter loaded tools via Env Vars (OCI_ALLOWED_RESOURCES ) filter to optimize context size and startup time.
  • Type Mapping & Unflattening: Robust logic to map OCI complex objects to flat LLM-friendly arguments and reconstruction of payloads.
  • Authentication: Integrated OCI SecurityTokenSigner and config file authentication.
  • Comprehensive Testing: Added a full test suite covering all generated tools and core logic.

Fixes # (Initial Release / Feature Request ID)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

I have implemented a comprehensive test suite that validates both the dynamic tool generation and the API invocation logic.

  • Unit Tests: Verified that build_tools_from_latest_spec correctly parses OCI specs and handles schema flattening.
  • Integration Tests: Ran tests against live/mock OCI endpoints for key resources (database, db_system, autonomous_database) to verify payload reconstruction.
  • Filter Logic: Verified that passing OCI_ALLOWED_RESOURCES filter as env var restricts the loaded toolset correctly.
  • End-to-End: Validated the server connection using the FastMCP inspector and Cline Desktop.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Dec 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant