Oracle Database MCP server provides tools to interact with Oracle Database

A [Model Context Protocol (MCP) server](https://modelcontextprotocol.io/docs/learn/server-concepts) acts as a proxy between an external service that provides context, data, or capabilities to a Large Language Model (LLM) or AI application. MCP servers connect AI applications to external systems such as databases and web services, translating their responses into a format that the AI application can understand.

### Server Setup


You must [enable MCP servers](https://docs.cloud.google.com/mcp/enable-disable-mcp-servers) and [set up authentication](https://docs.cloud.google.com/mcp/authenticate-mcp) before use. For more information about using Google and Google Cloud remote MCP servers, see [Google Cloud MCP servers overview](https://docs.cloud.google.com/mcp/overview).

### Server Endpoints

An MCP service endpoint is the network address and communication interface (usually a URL) of the MCP server that an AI application (the Host for the MCP client) uses to establish a secure, standardized connection. It is the point of contact for the LLM to request context, call a tool, or access a resource. Google MCP endpoints can be global or regional.

The Oracle [Database@Google](mailto:Database@Google) Cloud API MCP server has the following global MCP endpoint:

- https://oracledatabase.googleapis.com/mcp

## MCP Tools

An [MCP tool](https://modelcontextprotocol.io/legacy/concepts/tools) is a function or executable capability that an MCP server exposes to a LLM or AI application to perform an action in the real world.

### Tools

The oracledatabase.googleapis.com MCP server has the following tools:

| MCP Tools ||
|---|---|
| `https://docs.cloud.google.com/oracle/database/docs/reference/mcp/tools_list/list_autonomous_databases` | List autonomous databases (ADBs) in a Google Cloud project in the given location. |
| `https://docs.cloud.google.com/oracle/database/docs/reference/mcp/tools_list/create_autonomous_database` | Create an Autonomous Database (ADB). This request can be used to create a new ADB instance or a clone of an existing ADB or an ADB Disaster Recovery (DR) instance. If the source config is not specified, a new ADB instance is created. If the source config is specified, a clone of the source is created. If the source is specified and the source is an ADB DR instance, then a new ADB DR instance is created. While creating a new ADB instance, it can have Public IP support or Private IP support. In case of Private IP support, the request should contain the ODBSubnetwork details. If a request is Public IP mLTS is required mandatorily. To enable local (in-region) Data Guard for Disaster Recovery, set `local_data_guard_enabled` to true. You can also specify the maximum data loss limit in seconds using `local_adg_auto_failover_max_data_loss_limit_duration`. |
| `https://docs.cloud.google.com/oracle/database/docs/reference/mcp/tools_list/get_autonomous_database` | Get details for an autonomous database (ADB) in a Google Cloud project in the given location. |
| `https://docs.cloud.google.com/oracle/database/docs/reference/mcp/tools_list/create_exadata_infrastructure` | Create a Cloud Exadata Infrastructure. A user needs a Cloud Exadata Infrastructure to create a Cloud Exadata VM cluster. |
| `https://docs.cloud.google.com/oracle/database/docs/reference/mcp/tools_list/get_exadata_infrastructure` | Get details for an Exadata Infrastructure in a Google Cloud project in the given location. |
| `https://docs.cloud.google.com/oracle/database/docs/reference/mcp/tools_list/list_exadata_infrastructures` | List Exadata Infrastructures in a Google Cloud project in the given location. |
| `https://docs.cloud.google.com/oracle/database/docs/reference/mcp/tools_list/list_db_servers` | List Db Servers in a Google Cloud project in the given location for a given Cloud Exadata Infrastructure. For creation of a Cloud Vm Cluster, we need to know the Db Servers in a Cloud Exadata Infrastructure. This API will be used by the MCP service to get the Db Servers. |
| `https://docs.cloud.google.com/oracle/database/docs/reference/mcp/tools_list/create_cloud_vm_cluster` | Create a Cloud Vm Cluster. A Cloud Vm Cluster is a set of Virtual Machines (VMs) on a Cloud Exadata Infrastructure. |
| `https://docs.cloud.google.com/oracle/database/docs/reference/mcp/tools_list/get_cloud_vm_cluster` | Get details for a Cloud Vm Cluster in a Google Cloud project in the given location. |
| `https://docs.cloud.google.com/oracle/database/docs/reference/mcp/tools_list/list_cloud_vm_clusters` | List Cloud Vm Clusters in a Google Cloud project in the given location. |
| `https://docs.cloud.google.com/oracle/database/docs/reference/mcp/tools_list/create_exascale_db_storage_vault` | Create an Exascale Db Storage Vault. |
| `https://docs.cloud.google.com/oracle/database/docs/reference/mcp/tools_list/get_exascale_db_storage_vault` | Get details for an Exascale DB Storage Vault in a Google Cloud project in the given location. |
| `https://docs.cloud.google.com/oracle/database/docs/reference/mcp/tools_list/list_exascale_db_storage_vaults` | List Exascale DB Storage Vaults in a Google Cloud project in the given location. |
| `https://docs.cloud.google.com/oracle/database/docs/reference/mcp/tools_list/create_exadb_vm_cluster` | Create an Exadb Vm Cluster. An Exadb Vm Cluster is a set of Virtual Machines (VMs) on an Exadata Infrastructure. |
| `https://docs.cloud.google.com/oracle/database/docs/reference/mcp/tools_list/get_exadb_vm_cluster` | Get details for an Exadb Vm Cluster in a Google Cloud project in the given location. |
| `https://docs.cloud.google.com/oracle/database/docs/reference/mcp/tools_list/list_exadb_vm_clusters` | List Exadb Vm Clusters in a Google Cloud project in the given location. |
| `https://docs.cloud.google.com/oracle/database/docs/reference/mcp/tools_list/create_db_system` | Create a DbSystem (BaseDB). |
| `https://docs.cloud.google.com/oracle/database/docs/reference/mcp/tools_list/get_db_system` | Get details for a Db system in a Google Cloud project in the given location. |
| `https://docs.cloud.google.com/oracle/database/docs/reference/mcp/tools_list/list_db_systems` | List Db systems in a Google Cloud project in the given location. |
| `https://docs.cloud.google.com/oracle/database/docs/reference/mcp/tools_list/create_odb_network` | Creates a new ODB Network (OdbNetwork) resource in a Google Cloud project and location. An ODB Network connects a Google Cloud VPC network to Oracle Database resources. ### Requirements \& Prerequisites: - **Network Attachment** : If configuring `service_connectivity_config` for Private Service Connect (PSC-I) connectivity (required for Database Connections / Service Integrations), provide a valid `network_attachment` within the same region. ### Parameters: - `parent` (string, required): The parent resource name. Format: `projects/{project}/locations/{location}` - `odb_network_id` (string, required): The unique ID for the ODB Network (e.g., `my-odb-network`). - `odb_network` (object, required): - `network` (string, required): The name of the VPC network. Format: `projects/{project}/global/networks/{network}` - `gcp_oracle_zone` (string, optional): The GCP Oracle zone where the ODB Network is hosted (e.g., `us-east4-b-r2`). - `service_connectivity_config` (object, optional): Configuration to enable the service ([Oracledatabase@Google](mailto:Oracledatabase@Google) Cloud) to establish connectivity to the database. - `psc_interface_config` (object, optional): Configuration for Private Service Connect (PSC) interface. - `network_attachment` (string, optional): The resource name of the Network Attachment. Format: `projects/{project}/regions/{region}/networkAttachments/{network_attachment}` |
| `https://docs.cloud.google.com/oracle/database/docs/reference/mcp/tools_list/get_odb_network` | Get details for an ODB Network in a Google Cloud project in the given location. |
| `https://docs.cloud.google.com/oracle/database/docs/reference/mcp/tools_list/list_odb_networks` | List ODB Networks in a Google Cloud project in the given location. |
| `https://docs.cloud.google.com/oracle/database/docs/reference/mcp/tools_list/create_odb_subnet` | Create an ODB Subnet. An ODB Subnet is a subnetwork within an ODB Network. |
| `https://docs.cloud.google.com/oracle/database/docs/reference/mcp/tools_list/get_odb_subnet` | Get details for an ODB Subnet in a Google Cloud project in the given location. |
| `https://docs.cloud.google.com/oracle/database/docs/reference/mcp/tools_list/list_odb_subnets` | List ODB Subnets in a Google Cloud project in the given location. |
| `https://docs.cloud.google.com/oracle/database/docs/reference/mcp/tools_list/list_goldengate_connections` | List Goldengate Connections in a Google Cloud project in the given location. |
| `https://docs.cloud.google.com/oracle/database/docs/reference/mcp/tools_list/get_goldengate_connection` | Get details for a Goldengate Connection in a Google Cloud project in the given location. |
| `https://docs.cloud.google.com/oracle/database/docs/reference/mcp/tools_list/create_goldengate_connection` | Create a Goldengate Connection. |
| `https://docs.cloud.google.com/oracle/database/docs/reference/mcp/tools_list/delete_goldengate_connection` | Delete a Goldengate Connection in a Google Cloud project in the given location. |
| `https://docs.cloud.google.com/oracle/database/docs/reference/mcp/tools_list/list_goldengate_deployments` | List Goldengate Deployments in a Google Cloud project in the given location. |
| `https://docs.cloud.google.com/oracle/database/docs/reference/mcp/tools_list/get_goldengate_deployment` | Get details for a Goldengate Deployment in a Google Cloud project in the given location. |
| `https://docs.cloud.google.com/oracle/database/docs/reference/mcp/tools_list/create_goldengate_deployment` | Create a Goldengate Deployment. |
| `https://docs.cloud.google.com/oracle/database/docs/reference/mcp/tools_list/delete_goldengate_deployment` | Delete a Goldengate Deployment in a Google Cloud project in the given location. |
| `https://docs.cloud.google.com/oracle/database/docs/reference/mcp/tools_list/list_goldengate_assignments` | List Goldengate Connection Assignments in a Google Cloud project in the given location. |
| `https://docs.cloud.google.com/oracle/database/docs/reference/mcp/tools_list/get_goldengate_assignment` | Get details for a Goldengate Connection Assignment in a Google Cloud project in the given location. |
| `https://docs.cloud.google.com/oracle/database/docs/reference/mcp/tools_list/create_goldengate_assignment` | Create a Goldengate Connection Assignment. |
| `https://docs.cloud.google.com/oracle/database/docs/reference/mcp/tools_list/delete_goldengate_assignment` | Delete a Goldengate Connection Assignment in a Google Cloud project in the given location. |
| `https://docs.cloud.google.com/oracle/database/docs/reference/mcp/tools_list/configure_exascale` | Configures Exascale on a Cloud Exadata Infrastructure by specifying the total storage size in GBs. Use this tool when Exascale storage size needs to be provisioned/configured on a specific infrastructure in order to create a dedicated Exascale DB Storage Vault on it. Note that this is a non-reversible operation; Deconfiguring Exascale Storage is not supported. |
| `https://docs.cloud.google.com/oracle/database/docs/reference/mcp/tools_list/get_operation` | Get the status of a long-running operation. A long-running operation can take several minutes to complete. If an operation takes an extended amount of time, then use a command line tool to pause for 30 seconds before rechecking the status of the operation. |
| `https://docs.cloud.google.com/oracle/database/docs/reference/mcp/tools_list/create_database_connection` | Creates a new Database Connection (DatabaseConnection / DBC) resource in a Google Cloud project and location. A Database Connection (DatabaseConnection / DBC) represents secure connectivity details (credentials, network routing, and connection strings) used to connect to an Oracle Database (such as Autonomous Database, Exadata VM Cluster, or DB System) and execute queries via `database_connection_executesql`. ### Requirements \& Prerequisites: - **Service Account Permissions** : The Oracle Database service's Per-Product Per-Project Service Account (P4SA, e.g. `service-<PROJECT_NUMBER>@gcp-sa-oracledatabase.iam.gserviceaccount.com`) must have the `Secret Manager Secret Accessor` role (`roles/secretmanager.secretAccessor`) on the password secret and optional wallet secret. - **Network Connectivity** : An ODB Network (`odb_network`) in `AVAILABLE` state is required for private network connectivity to the database. ### Parameters: - `parent` (string, required): The parent resource name. Format: `projects/{project}/locations/{location}` - `database_connection_id` (string, required): The unique ID for the DatabaseConnection (e.g., `my-db-conn`). - `database_connection` (object, required): - `username` (string, required): The database username to authenticate with (e.g. `SYSTEM`, `ADMIN`, or custom app user). - `password_secret_version` (string, required): Secret Manager resource name containing the database user password. Format: `projects/{project}/secrets/{secret_id}/versions/{version_id}` - `connection_string` (string, required): Oracle Easy Connect or TNS descriptor (e.g. `hostname.domain.com:1521/SERVICE_NAME`). - `display_name` (string, optional): A user-friendly display name for the connection. - `wallet_secret_version` (string, optional): Secret Manager resource name containing the base64-encoded Oracle Wallet ZIP file. Required for mTLS / TLS connections (e.g. Autonomous Database). Format: `projects/{project}/secrets/{secret_id}/versions/{version_id}` - `odb_network` (string, optional): The resource name of the ODB Network for private routing. Format: `projects/{project}/locations/{location}/odbNetworks/{odb_network}` |
| `https://docs.cloud.google.com/oracle/database/docs/reference/mcp/tools_list/list_database_connections` | Lists all Database Connection (DatabaseConnection / DBC) resources within a specified Google Cloud project and location. Use this tool to discover existing database connections (DBCs) and retrieve their resource names (`name`), display names, database usernames, connection strings, and associated ODB networks. ### Parameters: - `parent` (string, required): The parent project and location. Format: `projects/{project}/locations/{location}` - `page_size` (integer, optional): The maximum number of DatabaseConnections (DBCs) to return per page. - `page_token` (string, optional): A pagination token returned from a previous `list_database_connections` call. - `filter` (string, optional): An expression to filter results (e.g. by display_name or state). - `order_by` (string, optional): An expression to sort results. |
| `https://docs.cloud.google.com/oracle/database/docs/reference/mcp/tools_list/get_database_connection` | Retrieves the configuration details, status, and metadata of a specific Database Connection (DatabaseConnection / DBC). Use this tool to inspect connection parameters, verify the DBC state (e.g., `ACTIVE`), and check configured Secret Manager secret versions and ODB network paths before executing SQL queries. ### Parameters: - `name` (string, required): The fully-qualified resource name of the DatabaseConnection (DBC). Format: `projects/{project}/locations/{location}/databaseConnections/{database_connection}` |
| `https://docs.cloud.google.com/oracle/database/docs/reference/mcp/tools_list/database_connection_executesql` | Executes a SQL statement (query, DDL, or DML) synchronously on the target Oracle Database using an active Database Connection (DatabaseConnection / DBC). This tool connects to the database via the credentials, Oracle Wallet (if configured), and ODB Network specified on the DatabaseConnection (DBC), and returns execution results, column metadata, affected row counts, and durations. ### Requirements \& Prerequisites: - The DatabaseConnection (DBC) must exist and be in the `ACTIVE` state. - The database user must have appropriate privileges on the database to run the provided SQL statement. - For parameterized queries, use bind parameters with leading colon notation in the SQL (e.g. `SELECT * FROM users WHERE user_id = :id`) and pass matching `params`. ### Parameters: - `name` (string, required): The fully-qualified resource name of the DatabaseConnection (DBC) to execute against. Format: `projects/{project}/locations/{location}/databaseConnections/{database_connection}` - `sql_statement` (string, required): The SQL query or command to execute (e.g., `SELECT * FROM employees WHERE department_id = :dept_id` or `CREATE TABLE ...`). - `params` (array of objects, optional): Bind variables for the SQL statement. Each object contains: - `name` (string, optional): The parameter name without the leading colon (e.g., `dept_id`). - `value` (Value, required): The parameter value (string, number, boolean, etc.). - `type_name` (string, optional): Datatype hint (e.g., `VARCHAR2`, `NUMBER`, `DATE`). |

### Get MCP tool specifications


To get the MCP tool specifications for all tools in an MCP server, use the `tools/list` method. The following example demonstrates how to use `curl` to list all tools and their specifications currently available within the MCP server.

| Curl Request |
|---|
| ```bash curl --location 'https://oracledatabase.googleapis.com/mcp' \ --header 'content-type: application/json' \ --header 'accept: application/json, text/event-stream' \ --data '{ "method": "tools/list", "jsonrpc": "2.0", "id": 1 }' ``` |