Repository navigation
feat(agentregistry): add GKE manifests and JSON spec samples #15004
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| # Copyright 2026 Google LLC | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| # [START agentregistry_gke_agent_manifest] | ||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
| name: my-agent | ||
| labels: | ||
| # GKE takes this label and registers the agent to Agent Registry | ||
| registry.gke.io/functional-type: "AGENT" | ||
| annotations: | ||
| # A2A protocol metadata annotation for automated Agent Card discovery | ||
| a2a-protocol.org/agent-card: | | ||
| card: | ||
| endpoint: /.well-known/agent-card.json | ||
| protocol: HTTP | ||
| port: 8080 | ||
| spec: | ||
| selector: | ||
| matchLabels: | ||
| app: my-agent | ||
| template: | ||
| metadata: | ||
| labels: | ||
| app: my-agent | ||
| annotations: | ||
| # Agent Identity annotation for identity and access management | ||
| iam.gke.io/spiffe-identity-type: agent-identity | ||
| spec: | ||
| containers: | ||
| - name: server | ||
| image: gcr.io/PROJECT_ID/my-agent:1.0.0 | ||
| ports: | ||
| - containerPort: 8080 | ||
| env: | ||
| - name: PORT | ||
| value: "8080" | ||
| --- | ||
| # Kubernetes Service for in-cluster network routing to the agent pod | ||
| apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
| name: my-agent-service | ||
| labels: | ||
| app: my-agent | ||
| spec: | ||
| type: ClusterIP | ||
| ports: | ||
| - port: 8080 | ||
| targetPort: 8080 | ||
| protocol: TCP | ||
| name: http | ||
| selector: | ||
| app: my-agent | ||
| # [END agentregistry_gke_agent_manifest] | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| # Copyright 2026 Google LLC | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| # [START agentregistry_gke_mcp_server_manifest] | ||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
| name: my-mcp-server | ||
| labels: | ||
| # GKE takes this label and registers the deployment as an MCP server | ||
| registry.gke.io/functional-type: "MCP_SERVER" | ||
| annotations: | ||
| # Endpoint URLs where the GKE controller can access this MCP server | ||
| modelcontextprotocol.info/urls: | | ||
| - https://my-mcp-server.default.svc.cluster.local/mcp | ||
| # Defines structural capabilities for the MCP server card | ||
| modelcontextprotocol.info/capabilities: | | ||
| card: | ||
| endpoint: "/mcp" | ||
| protocol: "HTTP" | ||
|
Comment on lines
+24
to
+31
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The URL in # Endpoint URLs where the GKE controller can access this MCP server
modelcontextprotocol.info/urls: |
- http://my-mcp-server.default.svc.cluster.local/mcp
# Defines structural capabilities for the MCP server card
modelcontextprotocol.info/capabilities: |
card:
endpoint: "/mcp"
protocol: "HTTP"
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not applying this change: this manifest is extracted from the published Agent Registry GKE documentation ( There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. +1 from the TW side — keeping exact parity with register-mcp-servers.md makes sense for this migration PR. |
||
| spec: | ||
| selector: | ||
| matchLabels: | ||
| app: my-mcp-server | ||
| template: | ||
| metadata: | ||
| labels: | ||
| app: my-mcp-server | ||
| annotations: | ||
| # Agent Identity annotation for identity and access management | ||
| iam.gke.io/spiffe-identity-type: agent-identity | ||
| spec: | ||
| containers: | ||
| - name: server | ||
| image: gcr.io/PROJECT_ID/my-mcp-server:1.0.0 | ||
| # [END agentregistry_gke_mcp_server_manifest] | ||
|
Comment on lines
+43
to
+47
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The deployment defines an in-cluster URL spec:
containers:
- name: server
image: gcr.io/PROJECT_ID/my-mcp-server:1.0.0
ports:
- containerPort: 8080
---
# Kubernetes Service for in-cluster network routing to the MCP server pod
apiVersion: v1
kind: Service
metadata:
name: my-mcp-server
labels:
app: my-mcp-server
spec:
type: ClusterIP
ports:
- port: 80
targetPort: 8080
protocol: TCP
name: http
selector:
app: my-mcp-server
# [END agentregistry_gke_mcp_server_manifest]
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not applying this change: this sample intentionally mirrors the focused |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| { | ||
| "supportedInterfaces": [ | ||
| { | ||
| "url": "https://example.com/mock-travel-agent", | ||
| "protocolBinding": "HTTP+JSON", | ||
| "protocolVersion": "1.0.0" | ||
| } | ||
| ], | ||
| "name": "mock-travel-agent", | ||
| "description": "A mock agent that plans travel itineraries.", | ||
| "version": "1.0.0", | ||
| "capabilities": { | ||
| "streaming": false, | ||
| "pushNotifications": false | ||
| }, | ||
| "defaultInputModes": ["text/plain"], | ||
| "defaultOutputModes": ["text/plain"], | ||
| "skills": [ | ||
| { | ||
| "id": "BookFlight", | ||
| "name": "BookFlight", | ||
| "description": "Books a flight to a destination.", | ||
| "tags": ["travel", "booking"] | ||
| }, | ||
| { | ||
| "id": "SearchHotels", | ||
| "name": "SearchHotels", | ||
| "description": "Searches for hotels in a destination city.", | ||
| "tags": ["travel", "accommodation"] | ||
| } | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| { | ||
| "tools": [ | ||
| { | ||
| "name": "get_customer_info", | ||
| "description": "Retrieves customer details from the database.", | ||
| "annotations": { | ||
| "title": "Get Customer Info", | ||
| "readOnlyHint": true, | ||
| "idempotentHint": true | ||
| } | ||
| }, | ||
| { | ||
| "name": "create_support_ticket", | ||
| "description": "Creates a new support ticket in the issue tracking system.", | ||
| "annotations": { | ||
| "title": "Create Support Ticket", | ||
| "destructiveHint": true, | ||
| "idempotentHint": false, | ||
| "openWorldHint": true | ||
| } | ||
| } | ||
|
Comment on lines
+13
to
+21
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. issue (blocking): This is missing the _meta / com.googleapis.iap/PolicyHints block on create_support_ticket that's currently in register-mcp-servers.md: The two paragraphs immediately below the snippet in register-mcp-servers.md explicitly walk through _meta, com.googleapis.iap/PolicyHints, toolDisabled, and hitlMode, so we need to keep that block in toolspec.json to preserve parity with the doc. |
||
| ] | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit (non-blocking): Both GKE manifests match our current docs accurately! Just flagging for a future follow-up (not blocking this migration): gcr.io/PROJECT_ID/... uses legacy Container Registry, so we should consider migrating both the docs and these manifests to Artifact Registry (REGION-docker.pkg.dev/...) in a separate pass.