Skip to content

Upgrade oracle-mcp to MCP v2 and the modern protocol #360

Description

@fredluz

Summary

Upgrade Oracle’s MCP integration to the TypeScript SDK v2 and the modern MCP protocol.

This would replace Oracle’s older MCP foundation with the current server abstractions, simplify several parts of the existing implementation, strengthen schema and transport behavior, and make newer MCP capabilities available for future Oracle features.

Compatibility with clients using the previous MCP protocol should be maintained.

Why Oracle should upgrade

Oracle currently uses the monolithic v1 MCP SDK and manually manages parts of the stdio server lifecycle and tool-handler plumbing that are handled more directly by SDK v2.

The upgrade would be useful even if Oracle added no new tools or user-facing behavior. It would reduce bespoke protocol code, improve validation and transport handling, and provide a better foundation for features that are awkward to implement against the existing integration.

Immediate improvements include:

  • Current MCP protocol support
    Modern MCP clients could negotiate and use the current protocol rather than Oracle remaining limited to the previous protocol generation.

  • Simpler server lifecycle management
    SDK v2 provides supported abstractions for stdio startup, protocol negotiation, connection handling, shutdown, and transport errors. Oracle would no longer need to reproduce as much of that lifecycle itself.

  • Smaller runtime dependency surface
    The v2 SDK separates server and client packages. Oracle’s runtime needs only the server package, while the client package can remain limited to tests and development tooling.

  • Cleaner schema definitions
    Oracle’s MCP tools currently use raw Zod-shape patterns partly to accommodate the older SDK. V2 supports explicit Standard Schema objects, allowing tool input and output schemas to be defined and reused directly.

  • Stronger structured-output validation
    Existing structuredContent responses can be validated against their declared output schemas before crossing the protocol boundary, making malformed tool results easier to catch at their source.

  • Less low-level server plumbing in tool handlers
    Request-scoped context can provide logging, notifications, cancellation signals, and client information without passing internal server objects into tool implementations or reaching through private server properties.

  • More robust stdio behavior
    The modern transport improves input buffering, closed-stream handling, shutdown behavior, and transport error handling.

  • Clearer separation of server definition and transport
    Oracle’s tools and resources can be registered through a reusable server factory rather than being coupled directly to one transport startup path.

Existing Oracle behavior to preserve

The upgrade should preserve Oracle’s current MCP interface and execution behavior:

  • consult
  • chatgpt_image
  • project_sources
  • sessions
  • oracle-session://{id}/{kind} resources

Tool names, descriptions, parameters, defaults, structured outputs, resource identifiers, dry-run behavior, and session behavior should remain equivalent after the migration.

Further improvements enabled by MCP v2

The migration would also make the following focused improvements possible in later work:

  • Semantic progress events
    Report stages such as launching the browser, uploading attachments, selecting the model, waiting for the response, and downloading artifacts.

  • Request cancellation
    Propagate the request-scoped abort signal into foreground browser and provider operations.

  • Resource subscriptions
    Allow compatible clients to subscribe to session metadata, log, result, or artifact changes instead of repeatedly polling resources.

  • In-band confirmations
    Represent approval-required operations as protocol interactions rather than special Boolean retry fields understood only by Oracle-aware callers.

  • Interactive authentication flows
    Support resumable login, OTP, and manual-action-required states through structured protocol interactions.

  • Cacheable tool discovery
    Allow compatible clients to cache Oracle’s largely static tool and resource catalog.

  • Deterministic discovery responses
    Keep tool and resource definitions stable across connections, improving reproducibility and potential host-side prompt caching.

  • Standard asynchronous tasks
    Evaluate the MCP Tasks extension for long-running consultations, standardized task status, cancellation, and result retrieval.

  • Durable task handles
    Associate MCP task identifiers with Oracle sessions so results can be retrieved after the original request connection ends.

  • Completion subscriptions
    Notify compatible clients when long-running tasks or session resources change state.

  • Cleaner separation of logs and progress
    Keep detailed diagnostics in Oracle logs or stderr while exposing concise, structured progress through MCP.

  • Modern HTTP transport
    Reuse the same MCP server definition for a future HTTP transport without duplicating Oracle’s tool-registration logic.

  • Stateless hosted deployment
    Support future remote Oracle deployments where independent MCP requests can be routed across service instances.

  • Per-request capability handling
    Adapt behavior using the identity and capabilities supplied with each request.

  • Gateway-level routing and authorization
    Allow future HTTP deployments to route or authorize specific MCP methods using standard protocol metadata.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low-risk cleanup, docs, polish, ergonomics, or speculative feature.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.issue-rating: 🌊 off-meta tidepoolIssue quality rating does not apply to this item.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions