Tool: create-connection
Creates a new Connection in a given project and location.
The following code sample shows how to use curl to call the create-connection MCP tool.
| Curl Request |
|---|
curl --location 'https://developerconnect.googleapis.com/mcp' \ --header 'content-type: application/json' \ --header 'accept: application/json, text/event-stream' \ --data '{ "method": "tools/call", "params": { "name": "create-connection", "arguments": { // Provide these details according to the MCP tool specification. } }, "jsonrpc": "2.0", "id": 1 }' |
Input Schema
Message for creating a Connection
CreateConnectionRequest
| JSON representation |
|---|
{
"parent": string,
"connectionId": string,
"connection": {
object ( |
| Fields | |
|---|---|
parent |
Required. Value for parent. |
connectionId |
Required. The ID to use for the connection, which becomes the final component of the connection's resource name. |
connection |
Required. The resource being created |
requestId |
Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). |
validateOnly |
Optional. If set, validate the request, but do not actually post it. |
Connection
| JSON representation |
|---|
{ "name": string, "createTime": string, "updateTime": string, "deleteTime": string, "labels": { string: string, ... }, "installationState": { object ( |
| Fields | |
|---|---|
name |
Identifier. The resource name of the connection, in the format |
createTime |
Output only. Create timestamp. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
updateTime |
Output only. Update timestamp. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
deleteTime |
Output only. Delete timestamp. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
labels |
Optional. Labels as key value pairs An object containing a list of |
installationState |
Output only. Installation state of the Connection. |
disabled |
Optional. If disabled is set to true, functionality is disabled for this connection. Repository based API methods and webhooks processing for repositories in this connection will be disabled. |
reconciling |
Output only. Set to true when the connection is being set up or updated in the background. |
annotations |
Optional. Allows clients to store small amounts of arbitrary data. An object containing a list of |
etag |
Optional. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. |
uid |
Output only. A system-assigned unique identifier for the Connection. |
cryptoKeyConfig |
Optional. The crypto key configuration. This field is used by the Customer-Managed Encryption Keys (CMEK) feature. |
gitProxyConfig |
Optional. Configuration for the Git proxy feature. Enabling the Git proxy allows clients to perform Git operations on the repositories linked in the connection. Learn more. |
Union field connection_config. Configuration for the connection depending on the type of provider. connection_config can be only one of the following: |
|
githubConfig |
Configuration for connections to github.com. |
githubEnterpriseConfig |
Configuration for connections to an instance of GitHub Enterprise. |
gitlabConfig |
Configuration for connections to gitlab.com. |
gitlabEnterpriseConfig |
Configuration for connections to an instance of GitLab Enterprise. |
bitbucketDataCenterConfig |
Configuration for connections to an instance of Bitbucket Data Center. |
bitbucketCloudConfig |
Configuration for connections to an instance of Bitbucket Clouds. |
secureSourceManagerInstanceConfig |
Configuration for connections to an instance of Secure Source Manager. |
httpConfig |
Optional. Configuration for connections to an HTTP service provider. |
GitHubConfig
| JSON representation |
|---|
{ "githubApp": enum ( |
| Fields | |
|---|---|
githubApp |
Required. Immutable. The GitHub Application that was installed to the GitHub user or organization. |
authorizerCredential |
Optional. OAuth credential of the account that authorized the GitHub App. It is recommended to use a robot account instead of a human user account. The OAuth token must be tied to the GitHub App of this config. |
appInstallationId |
Optional. GitHub App installation id. |
installationUri |
Output only. The URI to navigate to in order to manage the installation associated with this GitHubConfig. |
OAuthCredential
| JSON representation |
|---|
{ "oauthTokenSecretVersion": string, "username": string } |
| Fields | |
|---|---|
oauthTokenSecretVersion |
Required. A SecretManager resource containing the OAuth token that authorizes the connection. Format: |
username |
Output only. The username associated with this token. |
GitHubEnterpriseConfig
| JSON representation |
|---|
{
"hostUri": string,
"appId": string,
"appSlug": string,
"privateKeySecretVersion": string,
"webhookSecretSecretVersion": string,
"appInstallationId": string,
"installationUri": string,
"serviceDirectoryConfig": {
object ( |
| Fields | |
|---|---|
hostUri |
Required. The URI of the GitHub Enterprise host this connection is for. |
appId |
Optional. ID of the GitHub App created from the manifest. |
appSlug |
Output only. The URL-friendly name of the GitHub App. |
privateKeySecretVersion |
Optional. SecretManager resource containing the private key of the GitHub App, formatted as |
webhookSecretSecretVersion |
Optional. SecretManager resource containing the webhook secret of the GitHub App, formatted as |
appInstallationId |
Optional. ID of the installation of the GitHub App. |
installationUri |
Output only. The URI to navigate to in order to manage the installation associated with this GitHubEnterpriseConfig. |
serviceDirectoryConfig |
Optional. Configuration for using Service Directory to privately connect to a GitHub Enterprise server. This should only be set if the GitHub Enterprise server is hosted on-premises and not reachable by public internet. If this field is left empty, calls to the GitHub Enterprise server will be made over the public internet. |
serverVersion |
Output only. GitHub Enterprise version installed at the host_uri. |
sslCaCertificate |
Optional. SSL certificate to use for requests to GitHub Enterprise. |
organization |
Optional. Immutable. GitHub Enterprise organization in which the GitHub App is created. |
ServiceDirectoryConfig
| JSON representation |
|---|
{ "service": string } |
| Fields | |
|---|---|
service |
Required. The Service Directory service name. Format: projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}. |
GitLabConfig
| JSON representation |
|---|
{ "webhookSecretSecretVersion": string, "readAuthorizerCredential": { object ( |
| Fields | |
|---|---|
webhookSecretSecretVersion |
Required. Immutable. SecretManager resource containing the webhook secret of a GitLab project, formatted as |
readAuthorizerCredential |
Required. A GitLab personal access token with the minimum |
authorizerCredential |
Required. A GitLab personal access token with the minimum |
UserCredential
| JSON representation |
|---|
{ "userTokenSecretVersion": string, "username": string } |
| Fields | |
|---|---|
userTokenSecretVersion |
Required. A SecretManager resource containing the user token that authorizes the Developer Connect connection. Format: |
username |
Output only. The username associated with this token. |
GitLabEnterpriseConfig
| JSON representation |
|---|
{ "hostUri": string, "webhookSecretSecretVersion": string, "readAuthorizerCredential": { object ( |
| Fields | |
|---|---|
hostUri |
Required. The URI of the GitLab Enterprise host this connection is for. |
webhookSecretSecretVersion |
Required. Immutable. SecretManager resource containing the webhook secret of a GitLab project, formatted as |
readAuthorizerCredential |
Required. A GitLab personal access token with the minimum |
authorizerCredential |
Required. A GitLab personal access token with the minimum |
serviceDirectoryConfig |
Optional. Configuration for using Service Directory to privately connect to a GitLab Enterprise instance. This should only be set if the GitLab Enterprise server is hosted on-premises and not reachable by public internet. If this field is left empty, calls to the GitLab Enterprise server will be made over the public internet. |
sslCaCertificate |
Optional. SSL Certificate Authority certificate to use for requests to GitLab Enterprise instance. |
serverVersion |
Output only. Version of the GitLab Enterprise server running on the |
BitbucketDataCenterConfig
| JSON representation |
|---|
{ "hostUri": string, "webhookSecretSecretVersion": string, "readAuthorizerCredential": { object ( |
| Fields | |
|---|---|
hostUri |
Required. The URI of the Bitbucket Data Center host this connection is for. |
webhookSecretSecretVersion |
Required. Immutable. SecretManager resource containing the webhook secret used to verify webhook events, formatted as |
readAuthorizerCredential |
Required. An http access token with the minimum |
authorizerCredential |
Required. An http access token with the minimum |
serviceDirectoryConfig |
Optional. Configuration for using Service Directory to privately connect to a Bitbucket Data Center instance. This should only be set if the Bitbucket Data Center is hosted on-premises and not reachable by public internet. If this field is left empty, calls to the Bitbucket Data Center will be made over the public internet. |
sslCaCertificate |
Optional. SSL certificate authority to trust when making requests to Bitbucket Data Center. |
serverVersion |
Output only. Version of the Bitbucket Data Center server running on the |
BitbucketCloudConfig
| JSON representation |
|---|
{ "workspace": string, "webhookSecretSecretVersion": string, "readAuthorizerCredential": { object ( |
| Fields | |
|---|---|
workspace |
Required. The Bitbucket Cloud Workspace ID to be connected to Google Cloud Platform. |
webhookSecretSecretVersion |
Required. Immutable. SecretManager resource containing the webhook secret used to verify webhook events, formatted as |
readAuthorizerCredential |
Required. An access token with the minimum |
authorizerCredential |
Required. An access token with the minimum |
SecureSourceManagerInstanceConfig
| JSON representation |
|---|
{ "instance": string } |
| Fields | |
|---|---|
instance |
Required. Immutable. Secure Source Manager instance resource, formatted as |
GenericHTTPEndpointConfig
| JSON representation |
|---|
{ "hostUri": string, "serviceDirectoryConfig": { object ( |
| Fields | |
|---|---|
hostUri |
Required. Immutable. The service provider's https endpoint. |
serviceDirectoryConfig |
Optional. Configuration for using Service Directory to privately connect to a HTTP service provider. This should only be set if the Http service provider is hosted on-premises and not reachable by public internet. If this field is left empty, calls to the HTTP service provider will be made over the public internet. |
sslCaCertificate |
Optional. The SSL certificate to use for requests to the HTTP service provider. |
Union field authentication. The authentication mechanism to use for requests to the HTTP service provider. authentication can be only one of the following: |
|
basicAuthentication |
Optional. Basic authentication with username and password. |
bearerTokenAuthentication |
Optional. Bearer token authentication with a token. |
BasicAuthentication
| JSON representation |
|---|
{ "username": string, // Union field |
| Fields | |
|---|---|
username |
Required. The username to authenticate as. |
Union field password. The password to authenticate as. password can be only one of the following: |
|
passwordSecretVersion |
The password SecretManager secret version to authenticate as. |
BearerTokenAuthentication
| JSON representation |
|---|
{ // Union field |
| Fields | |
|---|---|
Union field token. The token to authenticate as. token can be only one of the following: |
|
tokenSecretVersion |
Optional. The token SecretManager secret version to authenticate as. |
Timestamp
| JSON representation |
|---|
{ "seconds": string, "nanos": integer } |
| Fields | |
|---|---|
seconds |
Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be between -62135596800 and 253402300799 inclusive (which corresponds to 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). |
nanos |
Non-negative fractions of a second at nanosecond resolution. This field is the nanosecond portion of the duration, not an alternative to seconds. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be between 0 and 999,999,999 inclusive. |
LabelsEntry
| JSON representation |
|---|
{ "key": string, "value": string } |
| Fields | |
|---|---|
key |
|
value |
|
InstallationState
| JSON representation |
|---|
{
"stage": enum ( |
| Fields | |
|---|---|
stage |
Output only. Current step of the installation process. |
message |
Output only. Message of what the user should do next to continue the installation. Empty string if the installation is already complete. |
actionUri |
Output only. Link to follow for next action. Empty string if the installation is already complete. |
AnnotationsEntry
| JSON representation |
|---|
{ "key": string, "value": string } |
| Fields | |
|---|---|
key |
|
value |
|
CryptoKeyConfig
| JSON representation |
|---|
{ "keyReference": string } |
| Fields | |
|---|---|
keyReference |
Required. The name of the key which is used to encrypt/decrypt customer data. For key in Cloud KMS, the key should be in the format of |
GitProxyConfig
| JSON representation |
|---|
{ "enabled": boolean, "httpProxyBaseUri": string } |
| Fields | |
|---|---|
enabled |
Optional. Setting this to true allows the Git proxy to be used for performing Git operations on the repositories linked in the connection. |
httpProxyBaseUri |
Output only. The base URI for the HTTP proxy endpoint. Has the format |
GitHubApp
Represents the various GitHub Applications that can be installed to a GitHub user or organization and used with Developer Connect.
| Enums | |
|---|---|
GIT_HUB_APP_UNSPECIFIED |
GitHub App not specified. |
DEVELOPER_CONNECT |
The Developer Connect GitHub Application. |
FIREBASE |
The Firebase GitHub Application. |
GEMINI_CODE_ASSIST |
The Gemini Code Assist Application. |
DATAFORM |
The Dataform GitHub Application. |
Stage
Stage of the installation process.
| Enums | |
|---|---|
STAGE_UNSPECIFIED |
No stage specified. |
PENDING_CREATE_APP |
Only for GitHub Enterprise. An App creation has been requested. The user needs to confirm the creation in their GitHub enterprise host. |
PENDING_USER_OAUTH |
User needs to authorize the GitHub (or Enterprise) App via OAuth. |
PENDING_INSTALL_APP |
User needs to follow the link to install the GitHub (or Enterprise) App. |
COMPLETE |
Installation process has been completed. |
Output Schema
This resource represents a long-running operation that is the result of a network API call.
Operation
| JSON representation |
|---|
{ "name": string, "metadata": { "@type": string, field1: ..., ... }, "done": boolean, // Union field |
| Fields | |
|---|---|
name |
The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the |
metadata |
Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. An object containing fields of an arbitrary type. An additional field |
done |
If the value is |
Union field result. The operation result, which can be either an error or a valid response. If done == false, neither error nor response is set. If done == true, exactly one of error or response can be set. Some services might not provide the result. result can be only one of the following: |
|
error |
The error result of the operation in case of failure or cancellation. |
response |
The normal, successful response of the operation. If the original method returns no data on success, such as An object containing fields of an arbitrary type. An additional field |
Any
| JSON representation |
|---|
{ "typeUrl": string, "value": string } |
| Fields | |
|---|---|
typeUrl |
Identifies the type of the serialized Protobuf message with a URI reference consisting of a prefix ending in a slash and the fully-qualified type name. Example: type.googleapis.com/google.protobuf.StringValue This string must contain at least one The prefix is arbitrary and Protobuf implementations are expected to simply strip off everything up to and including the last All type URL strings must be legal URI references with the additional restriction (for the text format) that the content of the reference must consist only of alphanumeric characters, percent-encoded escapes, and characters in the following set (not including the outer backticks): In the original design of |
value |
Holds a Protobuf serialization of the type described by type_url. A base64-encoded string. |
Status
| JSON representation |
|---|
{ "code": integer, "message": string, "details": [ { "@type": string, field1: ..., ... } ] } |
| Fields | |
|---|---|
code |
The status code, which should be an enum value of |
message |
A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the |
details[] |
A list of messages that carry the error details. There is a common set of message types for APIs to use. An object containing fields of an arbitrary type. An additional field |
Tool Annotations
Tool annotations are sent to MCP clients to describe the basic risk of a given tool. Most clients treat these hints as untrusted, but they can be used to decide when a confirmation prompt might be sent to a user.
Along with the title string, the following boolean hints are defined as follows:
readOnlyHint: If true, the tool doesn't modify its environment. Default: false.destructiveHint: If true, then the tool can perform destructive actions. If false, then the tool can only perform additive actions. Default: true.idempotentHint: If true, then calling the tool repeatedly with the same arguments will have no additional effect on its environment. Default: false.openWorldHint: If true, then the tool can interact with an 'open world' of external entities. If false, then the tool can only interact with internal entities. For example, a web search tool would be open world, while a memory tool would not be open world.
Destructive Hint: ❌ | Idempotent Hint: ❌ | Read Only Hint: ❌ | Open World Hint: ❌