The Developer Connect remote MCP server lets your AI applications and coding assistants work with the source code repositories that you've linked to Developer Connect, using one set of tools that works the same way for GitHub, GitHub Enterprise, GitLab, and GitLab Enterprise. Agents can read commits, diffs, blame, and pull requests, and open, comment on, and update pull requests, without requiring SCM credentials. The Developer Connect remote MCP server is enabled when you enable the Developer Connect API.
Model Context Protocol (MCP) standardizes how large language models (LLMs) and AI applications or agents connect to external data sources. MCP servers let you use their tools, resources, and prompts to take actions and get updated data from their backend service.
What's the difference between local and remote MCP servers?
- Local MCP servers
- Typically run on your local machine and use the standard input and output streams (stdio) for communication between services on the same device.
- Remote MCP servers
- Run on the service's infrastructure and offer an HTTP endpoint to AI applications for communication between the AI MCP client and the MCP server. For more information about MCP architecture, see MCP architecture.
Stateless core
With
MCP version 2026-07-28,
MCP changes from a bidirectional, stateful protocol to a stateless protocol.
Each MCP request is self-describing and can be routed using headers. There isn't
a need for the initialize/initialized handshake or Mcp-Session-Id because
each request includes all the information needed in HTTP headers or the _meta
parameter. MCP servers can request additional information required by a tool
through
multi-round-trip requests (MRTR).
To help route and process requests without parsing the request body, some MCP headers are required, including the following:
- Headers that are required by the MCP specification such as the protocol version header and standard request headers.
- Custom headers
that are defined by the MCP server. These headers are mirrored into HTTP
headers from the tool's input schema using the
x-mcp-headerproperty. For example, an MCP server might define a custom header to specify the Google Cloud region or project ID.
For more information about MCP architecture, see the MCP version 2026-07-28 specification and key changes.
Google and Google Cloud remote MCP servers
Google and Google Cloud remote MCP servers have the following features and benefits:- Simplified, centralized discovery
- Managed global or regional HTTP endpoints
- Fine-grained authorization
- Optional prompt and response security with Model Armor protection
- Centralized audit logging
For information about other MCP servers and information about security and governance controls available for Google Cloud MCP servers, see Google Cloud MCP servers overview.
Before you begin
Before you can use the Developer Connect MCP server to work with a repository, you must have a Developer Connect connection to your source code management (SCM) provider and a Git repository link for the repository.
Required roles
To get the permissions that you need to use the Developer Connect MCP server, ask your administrator to grant you the following IAM roles on the project that contains your Developer Connect connections:
-
Make MCP tool calls:
MCP Tool User (
roles/mcp.toolUser) -
List connections and Git repository links:
Developer Connect Viewer (
roles/developerconnect.viewer) -
Read commits, diffs, blame, and pull requests, and open, comment on, and modify pull requests (approved projects only during Preview):
Developer Connect User (
roles/developerconnect.user) -
Create connections and Git repository links:
Developer Connect Admin (
roles/developerconnect.admin)
For more information about granting roles, see Manage access to projects, folders, and organizations.
These predefined roles contain the permissions required to use the Developer Connect MCP server. To see the exact permissions that are required, expand the Required permissions section:
Required permissions
The following permissions are required to use the Developer Connect MCP server:
-
Make MCP tool calls:
mcp.tools.call
You might also be able to get these permissions with custom roles or other predefined roles.
Authentication and authorization
The Developer Connect remote MCP server uses the OAuth 2.0 protocol with Identity and Access Management (IAM) for authentication and authorization. All Google Cloud identities are supported for authentication to MCP servers.The Developer Connect MCP server requires a principal for Identity and Access Management (IAM) control and doesn't accept API keys. We recommend that you create a separate identity for agents that use MCP tools so that you can control and monitor access to resources.
The MCP server never returns SCM tokens or other credentials to the agent. Developer Connect uses the credentials stored with each connection to call the SCM provider. To limit which repositories an agent can use, grant roles on specific connections, or use tags and deny policies.
For more information about authentication, see Authenticate to MCP servers.
Developer Connect MCP OAuth scopes
OAuth 2.0 uses scopes and credentials to determine if an authenticated principal is authorized to take a specific action on a resource. For more information about OAuth 2.0 scopes at Google, see Using OAuth 2.0 to access Google APIs.
Developer Connect has the following MCP tool OAuth scopes:
| Scope URI for Google Cloud CLI | Description |
|---|---|
https://www.googleapis.com/auth/cloud-platform |
Full access to all Google Cloud resources. |
Additional permissions might be required on the resources accessed during a tool call. To view a list of roles and permissions required for Developer Connect, see Access control with IAM.
Configure an MCP client to use the Developer Connect MCP server
AI applications and agents, such as Claude or Antigravity, can instantiate an MCP client that connects to a single MCP server. An AI application can have multiple clients that connect to different MCP servers. If your application isn't listed in the client-specific guidance, then you can use the following information to connect from most applications.- Server name: Developer Connect MCP server
- Server URL or Endpoint:
https://developerconnect.googleapis.com/mcp. The Developer Connect MCP server is only available on the global endpoint. - Transport: Streamable HTTP
- Authentication details: depending on how you want to authenticate, you can enter your Google Cloud credentials, your OAuth Client ID and secret, or an agent identity and credentials. For more information about authentication, see Authenticate to MCP servers.
- OAuth scope: the OAuth 2.0 scope that you want to use when connecting to the Developer Connect MCP server.
For more general guidance, see the following resources:
Available tools
To view details of available MCP tools and their descriptions for the Developer Connect MCP server, see the Developer Connect MCP reference.
Most tools take the resource name of a Git repository link, in the format
projects/PROJECT_ID/locations/LOCATION/connections/CONNECTION_ID/gitRepositoryLinks/LINK_ID.
An agent can find it with the list-connections and list-repo-links tools.
The fetch-repo-commit and diff-repo-commit tools return only file paths and
change statuses by default. To also return the line-by-line changes, pass
path_filters, for example ["**"] for all files.
List tools
Use the MCP inspector to list tools, or send a
tools/list HTTP request directly to the Developer Connect
remote MCP server. The tools/list method doesn't require authentication.
curl -X POST https://developerconnect.googleapis.com/mcp \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}'
Example use cases
Connecting an AI agent or IDE assistant to the Developer Connect MCP server lets you review and change code across SCM providers using natural language.
You can use the Developer Connect MCP server for the following use cases:
- Review changes: Let an agent read the commits and diffs between two branches or commits, and summarize or review them.
- Investigate code history: Find which commits changed specific lines of a file, and read their commit messages.
- Automate pull request workflows: Open pull requests, add discussion and inline review comments, and update or close pull requests. During Preview, this use case is available only to approved projects.
Example prompts
The following are example prompts you can use with your connected AI application:
- Summarize a change: "Summarize the diff between
mainandfeature/logininhttps://github.com/my-org/my-repo." - Review a pull request: "List the files changed in pull request #42 in
my-repoand point out any function that's missing error handling." - Trace a line: "Who last changed lines 10 to 20 of
service.goonmain, and why?"
The following prompts use tools that, during Preview, are available only to approved projects:
- Open a pull request: "Open a pull request from
feature/logintomaininmy-repotitled 'Add login page'." - Comment on a pull request: "Add an inline comment on line 45 of
auth.goin pull request #42 suggesting better error handling."
Optional security and safety configurations
MCP introduces new security risks and considerations due to the wide variety of actions that you can do with the MCP tools. To minimize and manage these risks, Google Cloud offers default settings and customizable policies to control the use of MCP tools in your Google Cloud organization or project.
For more information about MCP security and governance, see AI security and safety.
Use Model Armor
Model Armor is a Google Cloud service designed to enhance the security and safety of your AI applications. It works by proactively screening LLM prompts and responses, protecting against various risks and supporting responsible AI practices. Whether you are deploying AI in your cloud environment, or on external cloud providers, Model Armor can help you prevent malicious input, verify content safety, protect sensitive data, maintain compliance, and enforce your AI safety and security policies consistently across your diverse AI landscape.
When Model Armor is enabled with logging enabled, Model Armor logs the entire payload. This might expose sensitive information in your logs.
MCP request routing to Model Armor
The Developer Connect MCP server is only available on the global endpoint, which uses cross-jurisdictional routing. When you enable Model Armor, the MCP server always sends requests and responses to Model Armor. For more information about the behavior of other MCP servers, see Model Armor supported products.Tool responses often contain source code and diffs. Sensitive Data Protection de-identification can change identifiers in code, which makes diffs invalid. If your agents work with code, consider leaving Sensitive Data Protection off in your Model Armor configuration for Developer Connect, and use prompt injection and jailbreak detection, malicious URL detection, and Responsible AI filters.
Enable Model Armor
You must enable Model Armor APIs before you can use Model Armor.
Console
Enable the Model Armor API, if it is not already enabled.
Roles required to enable APIs
To enable APIs, you need the
serviceusage.services.enablepermission. If you created the project, then you likely already have this permission through the Owner role (roles/owner). Otherwise, you can get this permission through the Service Usage Admin role (roles/serviceusage.serviceUsageAdmin). Learn how to grant roles.Select the project where you want to activate Model Armor.
gcloud
Before you begin, follow these steps using the Google Cloud CLI with the Model Armor API:
Install the Google Cloud CLI, and then sign in to the gcloud CLI with your federated identity. After signing in, initialize the Google Cloud CLI by running the following command:
gcloud init-
Run the following command to set the API endpoint for the Model Armor service.
gcloud config set api_endpoint_overrides/modelarmor "https://modelarmor.LOCATION.rep.googleapis.com/"
Replace
LOCATIONwith the region where you want to use Model Armor.
Configure protection for MCP servers
To help protect your MCP tool calls and responses you can use Model Armor floor settings. A floor setting defines the minimum security filters that apply across the project. This configuration applies a consistent set of filters to all MCP tool calls and responses within the project.
Set up a Model Armor floor setting with MCP sanitization enabled. For more information, see Configure Model Armor floor settings.
See the following example command:
gcloud model-armor floorsettings update \ --full-uri='projects/PROJECT_ID/locations/global/floorSetting' \ --enable-floor-setting-enforcement=TRUE \ --add-integrated-services=GOOGLE_MCP_SERVER \ --google-mcp-server-enforcement-type=INSPECT_AND_BLOCK \ --enable-google-mcp-server-cloud-logging \ --malicious-uri-filter-settings-enforcement=ENABLED \ --add-rai-settings-filters='[{"confidenceLevel": "MEDIUM_AND_ABOVE", "filterType": "DANGEROUS"}]'
Replace PROJECT_ID with your Google Cloud project ID.
Note the following settings:
INSPECT_AND_BLOCK: The enforcement type that inspects content for the Google MCP server and blocks prompts and responses that match the filters.ENABLED: The setting that enables a filter or enforcement.MEDIUM_AND_ABOVE: The confidence level for the Responsible AI - Dangerous filter settings. You can modify this setting, though lower values might result in more false positives. For more information, see Model Armor confidence levels.
Disable scanning MCP traffic with Model Armor
To stop Model Armor from automatically scanning traffic to and from Google MCP servers based on the project's floor settings, run the following command:
gcloud model-armor floorsettings update \
--full-uri='projects/PROJECT_ID/locations/global/floorSetting' \
--remove-integrated-services=GOOGLE_MCP_SERVER
Replace PROJECT_ID with the Google Cloud project
ID. Model Armor doesn't automatically apply the rules defined in
this project's floor settings to any Google MCP server traffic.
Model Armor floor settings and general configuration can impact more than just MCP. Because Model Armor integrates with services like Vertex AI, any changes you make to floor settings can affect traffic scanning and safety behaviors across all integrated services, not just MCP.
Control MCP use with IAM policies
Identity and Access Management (IAM) deny policies and allow policies help you secure Google Cloud and Google MCP servers.
You can combine multiple criteria to build customized security and governance policies by allowing or denying access based on the following:
- The principal.
- Tool properties like the read-only attribute.
- The service name or tool name.
- The application's OAuth client ID.
For more information, see Control MCP use with Identity and Access Management.
What's next
- Review the Developer Connect MCP reference documentation.
- Learn more about Google Cloud MCP servers.
- Learn more about Access control with IAM.