Creating a Database Tools MCP Server

Note

MCP Servers and Clients are governed by IAM within an identity domain. When you create an MCP Server, you select the compartment and identity domain where it is managed and where access is controlled. Registered MCP clients are created as Integrated applications in the same identity domain and use OAuth to authenticate and request access tokens. Ensure you choose an identity domain where you have permission to create and manage these IAM resources and assign the required application roles. For more information, see IAM with Identity Domains.

    1. Open the navigation menu and select Developer Services.
    2. In the Database Tools section, select Model Context Protocol Servers.
    3. In the Model Context Protocol servers page, click Create Model Context Protocol server.
    4. Enter a name for the Server, select the compartment and identity domain where the MCP Server is managed.
    5. Select the database connection for the Server.
    6. Object Storage bucket and Object Storage bucket in compartment: Select the object storage compartment and bucket where you want to store the MCP Server resources.
    7. Advanced Options: Expand Advanced options to view the following settings:
      • Custom roles: Use this setting to add custom roles for the MCP Server. Enter a name and description for the custom role and click Add. To know more about custom roles for Database Tools MCP Server, see Application roles.
      • OAuth Options
        • Access token expiration (seconds): Determines how long a personal access token is valid after it is issued.
          Note

          Increase the Access token expiration from the default value (1 hour) if users must download a Personal Access Token to configure their MCP Client.
        • Refresh token expiration (seconds): Determines how long users can continue to renew access tokens without signing in again. After it expires, the user must reauthenticate.
      • Settings
        • Runtime Identity: Select Authenticated principal to run requests under the user’s identity, or Resource principal to run requests under the MCP Server’s workload identity governed by IAM policies.
    8. Click Create. The new MCP Server appears on the Model Context Protocol Servers page.

      After the server is created, you manage access by assigning application roles to the appropriate users, groups, or client applications in the selected identity domain.

      For more information, see Application roles and Registering an MCP Client.

  • Use the oci dbtools mcp-server create-mcp-server-default command to create a Database Tools MCP Server.

    oci dbtools mcp-server create-mcp-server-default 
    --compartment-id <compartment_id> --connection-id <connection_id> 
    --display-name <display_name> --domain-id <domain_ocid>

    For a complete list of parameters and values for CLI commands, see the Command Line Interface (CLI).

  • Use the DatabaseToolsMcpServer Reference API to create an MCP Server.

    For information about using the API and signing requests, see REST API and Security Credentials. For information about SDKs, see Software Development Kits and Command Line Interface.