Skip to content

Commit 16bddba

Browse files
authored
Merge branch 'main' into aron/retoken-issue
2 parents 595cacc + 85c5f3e commit 16bddba

File tree

2 files changed

+120
-12
lines changed

2 files changed

+120
-12
lines changed

examples/operator/virtual-mcps/vmcp_optimizer_advanced.yaml renamed to examples/operator/virtual-mcps/vmcp_optimizer_all_options.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# EmbeddingServer configuration options explicitly set, suitable as a
55
# reference for production tuning.
66
#
7-
# Unlike vmcp_optimizer_example.yaml (which relies on auto-configuration),
7+
# Unlike vmcp_optimizer_quickstart.yaml (which relies on auto-configuration),
88
# this example:
99
# - Explicitly specifies every EmbeddingServer field (model, image, port, replicas, resources, etc.)
1010
# - Explicitly configures the optimizer block with tuned search parameters
@@ -26,7 +26,7 @@
2626
# ARM64 support is tracked in: https://github.com/huggingface/text-embeddings-inference/pull/827
2727
#
2828
# Usage:
29-
# kubectl apply -f vmcp_optimizer_advanced.yaml
29+
# kubectl apply -f vmcp_optimizer_all_options.yaml
3030

3131
---
3232
# Step 1: Create MCPGroup

examples/operator/virtual-mcps/vmcp_optimizer_example.yaml renamed to examples/operator/virtual-mcps/vmcp_optimizer_quickstart.yaml

Lines changed: 118 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,15 @@
1414
#
1515
# This example creates:
1616
# 1. An MCPGroup to organize backends
17-
# 2. A yardstick MCPServer backend
18-
# 3. A fetch MCPServer backend (URL fetching)
19-
# 4. An EmbeddingServer for the optimizer (using all default values)
20-
# 5. A VirtualMCPServer with optimizer auto-configured via embeddingServerRef
17+
# 2. Multiple MCPServer backends covering popular MCP servers:
18+
# - yardstick (unit conversion)
19+
# - fetch (URL content fetching)
20+
# - github (GitHub API)
21+
# - memory (knowledge graph-based persistent memory)
22+
# - puppeteer (browser automation)
23+
# - osv (OSV vulnerability database)
24+
# 3. An EmbeddingServer for the optimizer (using all default values)
25+
# 4. A VirtualMCPServer with optimizer auto-configured via embeddingServerRef
2126
#
2227
# Apple Silicon (ARM64) Note:
2328
# The embedding server image (ghcr.io/huggingface/text-embeddings-inference:cpu-latest)
@@ -26,8 +31,21 @@
2631
# kind load docker-image ghcr.io/huggingface/text-embeddings-inference:cpu-latest --name toolhive
2732
# ARM64 support is tracked in: https://github.com/huggingface/text-embeddings-inference/pull/827
2833
#
34+
# Prerequisites - Create secrets for MCP servers that need them:
35+
#
36+
# # GitHub Personal Access Token (for github MCP server)
37+
# # Option 1: From environment variable (recommended - avoids token in shell history)
38+
# kubectl create secret generic github-token \
39+
# --from-literal=token="$GITHUB_TOKEN"
40+
#
41+
# # Option 2: From a file
42+
# echo -n "ghp_YOUR_TOKEN" > /tmp/github-token.txt
43+
# kubectl create secret generic github-token \
44+
# --from-file=token=/tmp/github-token.txt
45+
# rm /tmp/github-token.txt
46+
#
2947
# Usage:
30-
# kubectl apply -f vmcp_optimizer_example.yaml
48+
# kubectl apply -f vmcp_optimizer_quickstart.yaml
3149

3250
---
3351
# Step 1: Create MCPGroup
@@ -40,7 +58,7 @@ spec:
4058
description: Backend services for optimizer-enabled VirtualMCPServer
4159

4260
---
43-
# Step 2: Create MCPServer backend - yardstick
61+
# Step 2a: MCPServer backend - yardstick (unit conversion)
4462
apiVersion: toolhive.stacklok.dev/v1alpha1
4563
kind: MCPServer
4664
metadata:
@@ -49,8 +67,11 @@ metadata:
4967
spec:
5068
groupRef: optimizer-services
5169
image: ghcr.io/stackloklabs/yardstick/yardstick-server:1.1.1
52-
transport: stdio
70+
transport: streamable-http
5371
proxyPort: 8080
72+
env:
73+
- name: TRANSPORT
74+
value: streamable-http
5475
resources:
5576
limits:
5677
cpu: "100m"
@@ -60,7 +81,7 @@ spec:
6081
memory: "64Mi"
6182

6283
---
63-
# Step 3: Create MCPServer backend - fetch (URL content fetching)
84+
# Step 2b: MCPServer backend - fetch (URL content fetching)
6485
apiVersion: toolhive.stacklok.dev/v1alpha1
6586
kind: MCPServer
6687
metadata:
@@ -81,7 +102,94 @@ spec:
81102
memory: "64Mi"
82103

83104
---
84-
# Step 4: Create EmbeddingServer for the optimizer
105+
# Step 2c: MCPServer backend - github (GitHub API interaction)
106+
# Requires a Kubernetes Secret named "github-token" with key "token"
107+
# containing a GitHub Personal Access Token:
108+
# kubectl create secret generic github-token --from-literal=token=ghp_YOUR_TOKEN
109+
apiVersion: toolhive.stacklok.dev/v1alpha1
110+
kind: MCPServer
111+
metadata:
112+
name: github
113+
namespace: default
114+
spec:
115+
groupRef: optimizer-services
116+
image: ghcr.io/github/github-mcp-server
117+
transport: stdio
118+
proxyPort: 8080
119+
secrets:
120+
- name: github-token
121+
key: token
122+
targetEnvName: GITHUB_PERSONAL_ACCESS_TOKEN
123+
resources:
124+
limits:
125+
cpu: "200m"
126+
memory: "256Mi"
127+
requests:
128+
cpu: "100m"
129+
memory: "128Mi"
130+
131+
---
132+
# Step 2d: MCPServer backend - memory (knowledge graph-based persistent memory)
133+
apiVersion: toolhive.stacklok.dev/v1alpha1
134+
kind: MCPServer
135+
metadata:
136+
name: memory
137+
namespace: default
138+
spec:
139+
groupRef: optimizer-services
140+
image: docker.io/mcp/memory
141+
transport: stdio
142+
proxyPort: 8080
143+
resources:
144+
limits:
145+
cpu: "100m"
146+
memory: "128Mi"
147+
requests:
148+
cpu: "50m"
149+
memory: "64Mi"
150+
151+
---
152+
# Step 2e: MCPServer backend - puppeteer (browser automation and web scraping)
153+
apiVersion: toolhive.stacklok.dev/v1alpha1
154+
kind: MCPServer
155+
metadata:
156+
name: puppeteer
157+
namespace: default
158+
spec:
159+
groupRef: optimizer-services
160+
image: docker.io/mcp/puppeteer
161+
transport: stdio
162+
proxyPort: 8080
163+
resources:
164+
limits:
165+
cpu: "500m"
166+
memory: "512Mi"
167+
requests:
168+
cpu: "200m"
169+
memory: "256Mi"
170+
171+
---
172+
# Step 2f: MCPServer backend - osv (OSV vulnerability database)
173+
apiVersion: toolhive.stacklok.dev/v1alpha1
174+
kind: MCPServer
175+
metadata:
176+
name: osv
177+
namespace: default
178+
spec:
179+
groupRef: optimizer-services
180+
image: ghcr.io/stackloklabs/osv-mcp/server:0.0.7
181+
transport: streamable-http
182+
proxyPort: 8080
183+
resources:
184+
limits:
185+
cpu: "100m"
186+
memory: "128Mi"
187+
requests:
188+
cpu: "50m"
189+
memory: "64Mi"
190+
191+
---
192+
# Step 3: Create EmbeddingServer for the optimizer
85193
# All fields use kubebuilder defaults:
86194
# model: BAAI/bge-small-en-v1.5
87195
# image: ghcr.io/huggingface/text-embeddings-inference:cpu-latest
@@ -96,7 +204,7 @@ metadata:
96204
spec: {}
97205

98206
---
99-
# Step 5: Create VirtualMCPServer with optimizer auto-configured
207+
# Step 4: Create VirtualMCPServer with optimizer auto-configured
100208
# Note: No explicit "optimizer" config is needed. The operator detects that
101209
# embeddingServerRef is set, auto-populates the optimizer with default values,
102210
# resolves the EmbeddingServer URL, and emits an "OptimizerAutoConfigured" event.

0 commit comments

Comments
 (0)