@agents-at-scale/ark 0.1.37 → 0.1.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/chat/index.js +1 -2
- package/dist/commands/generate/generators/project.js +33 -26
- package/dist/commands/generate/index.js +2 -2
- package/dist/commands/generate/templateDiscovery.js +13 -4
- package/dist/components/AsyncOperation.d.ts +54 -0
- package/dist/components/AsyncOperation.js +110 -0
- package/dist/components/ChatUI.js +21 -72
- package/dist/components/SelectMenu.d.ts +17 -0
- package/dist/components/SelectMenu.js +21 -0
- package/dist/components/StatusMessage.d.ts +20 -0
- package/dist/components/StatusMessage.js +13 -0
- package/dist/ui/asyncOperations/connectingToArk.d.ts +15 -0
- package/dist/ui/asyncOperations/connectingToArk.js +63 -0
- package/package.json +5 -3
- package/templates/agent/agent.template.yaml +27 -0
- package/templates/marketplace/.editorconfig +24 -0
- package/templates/marketplace/.github/.keep +11 -0
- package/templates/marketplace/.github/workflows/.keep +16 -0
- package/templates/marketplace/.helmignore +23 -0
- package/templates/marketplace/.prettierrc.json +20 -0
- package/templates/marketplace/.yamllint.yml +53 -0
- package/templates/marketplace/README.md +197 -0
- package/templates/marketplace/agents/.keep +29 -0
- package/templates/marketplace/docs/.keep +19 -0
- package/templates/marketplace/mcp-servers/.keep +32 -0
- package/templates/marketplace/models/.keep +23 -0
- package/templates/marketplace/projects/.keep +43 -0
- package/templates/marketplace/queries/.keep +25 -0
- package/templates/marketplace/teams/.keep +29 -0
- package/templates/marketplace/tools/.keep +32 -0
- package/templates/marketplace/tools/examples/.keep +17 -0
- package/templates/mcp-server/Dockerfile +133 -0
- package/templates/mcp-server/Makefile +186 -0
- package/templates/mcp-server/README.md +178 -0
- package/templates/mcp-server/build.sh +76 -0
- package/templates/mcp-server/chart/Chart.yaml +22 -0
- package/templates/mcp-server/chart/templates/_helpers.tpl +62 -0
- package/templates/mcp-server/chart/templates/deployment.yaml +80 -0
- package/templates/mcp-server/chart/templates/hpa.yaml +32 -0
- package/templates/mcp-server/chart/templates/mcpserver.yaml +21 -0
- package/templates/mcp-server/chart/templates/secret.yaml +11 -0
- package/templates/mcp-server/chart/templates/service.yaml +15 -0
- package/templates/mcp-server/chart/templates/serviceaccount.yaml +13 -0
- package/templates/mcp-server/chart/values.yaml +84 -0
- package/templates/mcp-server/example-values.yaml +74 -0
- package/templates/mcp-server/examples/{{ .Values.mcpServerName }}-agent.yaml +33 -0
- package/templates/mcp-server/examples/{{ .Values.mcpServerName }}-query.yaml +24 -0
- package/templates/models/azure.yaml +33 -0
- package/templates/models/claude.yaml +28 -0
- package/templates/models/gemini.yaml +28 -0
- package/templates/models/openai.yaml +39 -0
- package/templates/project/.editorconfig +24 -0
- package/templates/project/.helmignore +24 -0
- package/templates/project/.prettierrc.json +16 -0
- package/templates/project/.yamllint.yml +50 -0
- package/templates/project/Chart.yaml +19 -0
- package/templates/project/Makefile +360 -0
- package/templates/project/README.md +377 -0
- package/templates/project/agents/.keep +11 -0
- package/templates/project/docs/.keep +14 -0
- package/templates/project/mcp-servers/.keep +34 -0
- package/templates/project/models/.keep +17 -0
- package/templates/project/queries/.keep +11 -0
- package/templates/project/scripts/setup.sh +108 -0
- package/templates/project/teams/.keep +11 -0
- package/templates/project/templates/00-rbac.yaml +168 -0
- package/templates/project/templates/01-models.yaml +11 -0
- package/templates/project/templates/02-mcp-servers.yaml +22 -0
- package/templates/project/templates/03-tools.yaml +12 -0
- package/templates/project/templates/04-agents.yaml +12 -0
- package/templates/project/templates/05-teams.yaml +11 -0
- package/templates/project/templates/06-queries.yaml +11 -0
- package/templates/project/templates/_helpers.tpl +91 -0
- package/templates/project/tests/e2e/.keep +10 -0
- package/templates/project/tests/unit/.keep +10 -0
- package/templates/project/tools/.keep +25 -0
- package/templates/project/tools/example-tool.yaml.disabled +94 -0
- package/templates/project/tools/examples/data-tool/Dockerfile +32 -0
- package/templates/project/values.yaml +141 -0
- package/templates/query/query.template.yaml +13 -0
- package/templates/team/team.template.yaml +17 -0
- package/templates/tool/.python-version +1 -0
- package/templates/tool/Dockerfile +23 -0
- package/templates/tool/README.md +238 -0
- package/templates/tool/agent.yaml +19 -0
- package/templates/tool/deploy.sh +10 -0
- package/templates/tool/deployment/deployment.yaml +31 -0
- package/templates/tool/deployment/kustomization.yaml +7 -0
- package/templates/tool/deployment/mcpserver.yaml +12 -0
- package/templates/tool/deployment/service.yaml +12 -0
- package/templates/tool/deployment/serviceaccount.yaml +8 -0
- package/templates/tool/deployment/values.yaml +3 -0
- package/templates/tool/pyproject.toml +9 -0
- package/templates/tool/src/main.py +36 -0
- package/templates/tool/uv.lock +498 -0
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
{{- if eq .Values.technology "node" }}
|
|
2
|
+
FROM node:22
|
|
3
|
+
|
|
4
|
+
# Install the MCP server package
|
|
5
|
+
{{- if .Values.packageSource }}
|
|
6
|
+
{{- if eq .Values.packageSource "npm" }}
|
|
7
|
+
RUN npm install -g {{ .Values.packageName }}
|
|
8
|
+
{{- else if eq .Values.packageSource "local" }}
|
|
9
|
+
COPY . /app
|
|
10
|
+
WORKDIR /app
|
|
11
|
+
RUN npm install
|
|
12
|
+
{{- end }}
|
|
13
|
+
{{- else }}
|
|
14
|
+
COPY . /app
|
|
15
|
+
WORKDIR /app
|
|
16
|
+
RUN npm install
|
|
17
|
+
{{- end }}
|
|
18
|
+
|
|
19
|
+
# Install mcp-proxy for HTTP transport
|
|
20
|
+
RUN npm install -g mcp-proxy
|
|
21
|
+
|
|
22
|
+
EXPOSE 8080
|
|
23
|
+
|
|
24
|
+
{{- if eq .Values.packageSource "npm" }}
|
|
25
|
+
ENTRYPOINT [ "/bin/sh", "-c", "mcp-proxy --debug --port 8080 --host 0.0.0.0 --shell \"{{ .Values.packageName }} stdio\"" ]
|
|
26
|
+
{{- else }}
|
|
27
|
+
ENTRYPOINT [ "/bin/sh", "-c", "mcp-proxy --debug --port 8080 --host 0.0.0.0 --shell \"node index.js stdio\"" ]
|
|
28
|
+
{{- end }}
|
|
29
|
+
|
|
30
|
+
{{- else if eq .Values.technology "deno" }}
|
|
31
|
+
FROM denoland/deno:2.1.8
|
|
32
|
+
|
|
33
|
+
USER root
|
|
34
|
+
|
|
35
|
+
# Install Node.js for mcp-proxy
|
|
36
|
+
RUN apt-get update && apt-get install -y \
|
|
37
|
+
curl \
|
|
38
|
+
&& curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
|
|
39
|
+
&& apt-get install -y nodejs \
|
|
40
|
+
&& rm -rf /var/lib/apt/lists/*
|
|
41
|
+
|
|
42
|
+
# Install mcp-proxy
|
|
43
|
+
RUN npm install -g mcp-proxy
|
|
44
|
+
|
|
45
|
+
{{- if .Values.packageSource }}
|
|
46
|
+
{{- if eq .Values.packageSource "jsr" }}
|
|
47
|
+
RUN deno install --global -A --node-modules-dir=auto {{ .Values.packageName }}
|
|
48
|
+
{{- else if eq .Values.packageSource "local" }}
|
|
49
|
+
COPY . /app
|
|
50
|
+
WORKDIR /app
|
|
51
|
+
{{- end }}
|
|
52
|
+
{{- else }}
|
|
53
|
+
COPY . /app
|
|
54
|
+
WORKDIR /app
|
|
55
|
+
{{- end }}
|
|
56
|
+
|
|
57
|
+
EXPOSE 8080
|
|
58
|
+
|
|
59
|
+
{{- if eq .Values.packageSource "jsr" }}
|
|
60
|
+
ENTRYPOINT [ "/bin/bash", "-c", "mcp-proxy --debug --port 8080 --host 0.0.0.0 --shell \"deno run -A --node-modules-dir=auto {{ .Values.packageName }} stdio\"" ]
|
|
61
|
+
{{- else }}
|
|
62
|
+
ENTRYPOINT [ "/bin/bash", "-c", "mcp-proxy --debug --port 8080 --host 0.0.0.0 --shell \"deno run -A index.ts stdio\"" ]
|
|
63
|
+
{{- end }}
|
|
64
|
+
|
|
65
|
+
{{- else if eq .Values.technology "go" }}
|
|
66
|
+
FROM golang:latest AS go-builder
|
|
67
|
+
{{- if .Values.packageSource }}
|
|
68
|
+
{{- if eq .Values.packageSource "go-install" }}
|
|
69
|
+
RUN go install {{ .Values.packageName }}@latest
|
|
70
|
+
{{- else if eq .Values.packageSource "local" }}
|
|
71
|
+
COPY . /app
|
|
72
|
+
WORKDIR /app
|
|
73
|
+
RUN go build -o {{ .Values.mcpServerName }} .
|
|
74
|
+
{{- end }}
|
|
75
|
+
{{- else }}
|
|
76
|
+
COPY . /app
|
|
77
|
+
WORKDIR /app
|
|
78
|
+
RUN go build -o {{ .Values.mcpServerName }} .
|
|
79
|
+
{{- end }}
|
|
80
|
+
|
|
81
|
+
FROM node:22
|
|
82
|
+
{{- if eq .Values.packageSource "go-install" }}
|
|
83
|
+
COPY --from=go-builder /go/bin/{{ .Values.packageName }} /usr/local/bin/
|
|
84
|
+
{{- else }}
|
|
85
|
+
COPY --from=go-builder /app/{{ .Values.mcpServerName }} /usr/local/bin/
|
|
86
|
+
{{- end }}
|
|
87
|
+
RUN npm install -g mcp-proxy
|
|
88
|
+
|
|
89
|
+
EXPOSE 8080
|
|
90
|
+
|
|
91
|
+
{{- if eq .Values.packageSource "go-install" }}
|
|
92
|
+
ENTRYPOINT [ "/bin/sh", "-c", "mcp-proxy --debug --port 8080 --host 0.0.0.0 --shell \"/usr/local/bin/{{ .Values.packageName }} stdio\"" ]
|
|
93
|
+
{{- else }}
|
|
94
|
+
ENTRYPOINT [ "/bin/sh", "-c", "mcp-proxy --debug --port 8080 --host 0.0.0.0 --shell \"/usr/local/bin/{{ .Values.mcpServerName }} stdio\"" ]
|
|
95
|
+
{{- end }}
|
|
96
|
+
|
|
97
|
+
{{- else if eq .Values.technology "python" }}
|
|
98
|
+
FROM python:3.11-slim
|
|
99
|
+
|
|
100
|
+
WORKDIR /app
|
|
101
|
+
|
|
102
|
+
{{- if .Values.packageSource }}
|
|
103
|
+
{{- if eq .Values.packageSource "pip" }}
|
|
104
|
+
RUN pip install {{ .Values.packageName }}
|
|
105
|
+
{{- else if eq .Values.packageSource "local" }}
|
|
106
|
+
COPY requirements.txt .
|
|
107
|
+
RUN pip install -r requirements.txt
|
|
108
|
+
COPY . .
|
|
109
|
+
{{- end }}
|
|
110
|
+
{{- else }}
|
|
111
|
+
COPY requirements.txt .
|
|
112
|
+
RUN pip install -r requirements.txt
|
|
113
|
+
COPY . .
|
|
114
|
+
{{- end }}
|
|
115
|
+
|
|
116
|
+
# Install Node.js for mcp-proxy
|
|
117
|
+
RUN apt-get update && apt-get install -y \
|
|
118
|
+
curl \
|
|
119
|
+
&& curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
|
|
120
|
+
&& apt-get install -y nodejs \
|
|
121
|
+
&& rm -rf /var/lib/apt/lists/*
|
|
122
|
+
|
|
123
|
+
RUN npm install -g mcp-proxy
|
|
124
|
+
|
|
125
|
+
EXPOSE 8080
|
|
126
|
+
|
|
127
|
+
{{- if eq .Values.packageSource "pip" }}
|
|
128
|
+
ENTRYPOINT [ "/bin/bash", "-c", "mcp-proxy --debug --port 8080 --host 0.0.0.0 --shell \"{{ .Values.packageName }} stdio\"" ]
|
|
129
|
+
{{- else }}
|
|
130
|
+
ENTRYPOINT [ "/bin/bash", "-c", "mcp-proxy --debug --port 8080 --host 0.0.0.0 --shell \"python main.py stdio\"" ]
|
|
131
|
+
{{- end }}
|
|
132
|
+
|
|
133
|
+
{{- end }}
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
# {{ .Values.mcpServerName }} MCP Server Makefile
|
|
2
|
+
|
|
3
|
+
# Variables
|
|
4
|
+
IMAGE_NAME ?= {{ .Values.mcpServerName }}
|
|
5
|
+
IMAGE_TAG ?= latest
|
|
6
|
+
TARGET_CLUSTER ?= auto
|
|
7
|
+
HELM_RELEASE_NAME ?= {{ .Values.mcpServerName }}-mcp
|
|
8
|
+
|
|
9
|
+
# Docker image build
|
|
10
|
+
.PHONY: build
|
|
11
|
+
build:
|
|
12
|
+
@echo "Building {{ .Values.mcpServerName }} MCP Server Docker image..."
|
|
13
|
+
./build.sh $(IMAGE_TAG) $(TARGET_CLUSTER)
|
|
14
|
+
|
|
15
|
+
{{- if .Values.requiresAuth }}
|
|
16
|
+
# Install using Helm
|
|
17
|
+
.PHONY: install
|
|
18
|
+
install:
|
|
19
|
+
@echo "Installing {{ .Values.mcpServerName }} MCP Server with Helm..."
|
|
20
|
+
@if [ -z "$(AUTH_TOKEN)" ]; then \
|
|
21
|
+
echo "Error: AUTH_TOKEN environment variable is required"; \
|
|
22
|
+
echo "Usage: make install AUTH_TOKEN=your-auth-token"; \
|
|
23
|
+
exit 1; \
|
|
24
|
+
fi
|
|
25
|
+
helm install $(HELM_RELEASE_NAME) ./chart \
|
|
26
|
+
--set auth.token="$(AUTH_TOKEN)"
|
|
27
|
+
{{- else }}
|
|
28
|
+
# Install using Helm
|
|
29
|
+
.PHONY: install
|
|
30
|
+
install:
|
|
31
|
+
@echo "Installing {{ .Values.mcpServerName }} MCP Server with Helm..."
|
|
32
|
+
helm install $(HELM_RELEASE_NAME) ./chart
|
|
33
|
+
{{- end }}
|
|
34
|
+
|
|
35
|
+
# Install with values file
|
|
36
|
+
.PHONY: install-with-values
|
|
37
|
+
install-with-values:
|
|
38
|
+
@echo "Installing {{ .Values.mcpServerName }} MCP Server with values file..."
|
|
39
|
+
@if [ -z "$(VALUES_FILE)" ]; then \
|
|
40
|
+
echo "Error: VALUES_FILE is required"; \
|
|
41
|
+
echo "Usage: make install-with-values VALUES_FILE=example-values.yaml"; \
|
|
42
|
+
exit 1; \
|
|
43
|
+
fi
|
|
44
|
+
helm install $(HELM_RELEASE_NAME) ./chart \
|
|
45
|
+
--values $(VALUES_FILE)
|
|
46
|
+
|
|
47
|
+
# Upgrade using Helm
|
|
48
|
+
.PHONY: upgrade
|
|
49
|
+
upgrade:
|
|
50
|
+
@echo "Upgrading {{ .Values.mcpServerName }} MCP Server with Helm..."
|
|
51
|
+
{{- if .Values.requiresAuth }}
|
|
52
|
+
@if [ -n "$(AUTH_TOKEN)" ]; then \
|
|
53
|
+
helm upgrade $(HELM_RELEASE_NAME) ./chart \
|
|
54
|
+
--set auth.token="$(AUTH_TOKEN)"; \
|
|
55
|
+
elif [ -n "$(VALUES_FILE)" ]; then \
|
|
56
|
+
helm upgrade $(HELM_RELEASE_NAME) ./chart \
|
|
57
|
+
--values $(VALUES_FILE); \
|
|
58
|
+
else \
|
|
59
|
+
helm upgrade $(HELM_RELEASE_NAME) ./chart; \
|
|
60
|
+
fi
|
|
61
|
+
{{- else }}
|
|
62
|
+
@if [ -n "$(VALUES_FILE)" ]; then \
|
|
63
|
+
helm upgrade $(HELM_RELEASE_NAME) ./chart \
|
|
64
|
+
--values $(VALUES_FILE); \
|
|
65
|
+
else \
|
|
66
|
+
helm upgrade $(HELM_RELEASE_NAME) ./chart; \
|
|
67
|
+
fi
|
|
68
|
+
{{- end }}
|
|
69
|
+
|
|
70
|
+
# Uninstall using Helm
|
|
71
|
+
.PHONY: uninstall
|
|
72
|
+
uninstall:
|
|
73
|
+
@echo "Uninstalling {{ .Values.mcpServerName }} MCP Server..."
|
|
74
|
+
helm uninstall $(HELM_RELEASE_NAME)
|
|
75
|
+
|
|
76
|
+
# Check status
|
|
77
|
+
.PHONY: status
|
|
78
|
+
status:
|
|
79
|
+
@echo "Checking {{ .Values.mcpServerName }} MCP Server status..."
|
|
80
|
+
@echo "=== Helm Release Status ==="
|
|
81
|
+
helm status $(HELM_RELEASE_NAME)
|
|
82
|
+
@echo ""
|
|
83
|
+
@echo "=== Pod Status ==="
|
|
84
|
+
kubectl get pods -l app.kubernetes.io/name={{ .Values.mcpServerName }}
|
|
85
|
+
@echo ""
|
|
86
|
+
@echo "=== Service Status ==="
|
|
87
|
+
kubectl get svc -l app.kubernetes.io/name={{ .Values.mcpServerName }}
|
|
88
|
+
@echo ""
|
|
89
|
+
@echo "=== MCP Server Status ==="
|
|
90
|
+
kubectl get mcpservers -l app.kubernetes.io/name={{ .Values.mcpServerName }}
|
|
91
|
+
|
|
92
|
+
# Show logs
|
|
93
|
+
.PHONY: logs
|
|
94
|
+
logs:
|
|
95
|
+
@echo "Showing {{ .Values.mcpServerName }} MCP Server logs..."
|
|
96
|
+
kubectl logs -l app.kubernetes.io/name={{ .Values.mcpServerName }} --follow
|
|
97
|
+
|
|
98
|
+
# Deploy examples
|
|
99
|
+
.PHONY: deploy-examples
|
|
100
|
+
deploy-examples:
|
|
101
|
+
@echo "Deploying example agent and query..."
|
|
102
|
+
kubectl apply -f examples/
|
|
103
|
+
|
|
104
|
+
# Clean up examples
|
|
105
|
+
.PHONY: clean-examples
|
|
106
|
+
clean-examples:
|
|
107
|
+
@echo "Cleaning up example resources..."
|
|
108
|
+
kubectl delete -f examples/ --ignore-not-found
|
|
109
|
+
|
|
110
|
+
# Test the MCP server
|
|
111
|
+
.PHONY: test
|
|
112
|
+
test:
|
|
113
|
+
@echo "Testing {{ .Values.mcpServerName }} MCP Server..."
|
|
114
|
+
{{- if .Values.technology }}
|
|
115
|
+
{{- if eq .Values.technology "node" }}
|
|
116
|
+
npm test
|
|
117
|
+
{{- else if eq .Values.technology "python" }}
|
|
118
|
+
python -m pytest
|
|
119
|
+
{{- else if eq .Values.technology "go" }}
|
|
120
|
+
go test ./...
|
|
121
|
+
{{- else if eq .Values.technology "deno" }}
|
|
122
|
+
deno test
|
|
123
|
+
{{- end }}
|
|
124
|
+
{{- else }}
|
|
125
|
+
@echo "No tests configured for this MCP server"
|
|
126
|
+
{{- end }}
|
|
127
|
+
|
|
128
|
+
# Development server
|
|
129
|
+
.PHONY: dev
|
|
130
|
+
dev:
|
|
131
|
+
@echo "Starting {{ .Values.mcpServerName }} MCP Server in development mode..."
|
|
132
|
+
{{- if .Values.technology }}
|
|
133
|
+
{{- if eq .Values.technology "node" }}
|
|
134
|
+
npm run dev
|
|
135
|
+
{{- else if eq .Values.technology "python" }}
|
|
136
|
+
python main.py
|
|
137
|
+
{{- else if eq .Values.technology "go" }}
|
|
138
|
+
go run .
|
|
139
|
+
{{- else if eq .Values.technology "deno" }}
|
|
140
|
+
deno run -A index.ts
|
|
141
|
+
{{- end }}
|
|
142
|
+
{{- else }}
|
|
143
|
+
@echo "Development mode not configured for this MCP server"
|
|
144
|
+
{{- end }}
|
|
145
|
+
|
|
146
|
+
# Port forward for local testing
|
|
147
|
+
.PHONY: port-forward
|
|
148
|
+
port-forward:
|
|
149
|
+
@echo "Port forwarding {{ .Values.mcpServerName }} MCP Server to localhost:8080..."
|
|
150
|
+
kubectl port-forward svc/$(HELM_RELEASE_NAME) 8080:8080
|
|
151
|
+
|
|
152
|
+
# Help
|
|
153
|
+
.PHONY: help
|
|
154
|
+
help:
|
|
155
|
+
@echo "{{ .Values.mcpServerName }} MCP Server Makefile"
|
|
156
|
+
@echo ""
|
|
157
|
+
@echo "Available targets:"
|
|
158
|
+
@echo " build Build Docker image"
|
|
159
|
+
@echo " install Install with Helm"
|
|
160
|
+
@echo " install-with-values Install with values file"
|
|
161
|
+
@echo " upgrade Upgrade with Helm"
|
|
162
|
+
@echo " uninstall Uninstall from cluster"
|
|
163
|
+
@echo " status Check deployment status"
|
|
164
|
+
@echo " logs Show pod logs"
|
|
165
|
+
@echo " deploy-examples Deploy example resources"
|
|
166
|
+
@echo " clean-examples Clean up example resources"
|
|
167
|
+
@echo " test Run tests"
|
|
168
|
+
@echo " dev Start development server"
|
|
169
|
+
@echo " port-forward Port forward to localhost"
|
|
170
|
+
@echo " help Show this help"
|
|
171
|
+
@echo ""
|
|
172
|
+
{{- if .Values.requiresAuth }}
|
|
173
|
+
@echo "Environment variables:"
|
|
174
|
+
@echo " AUTH_TOKEN Authentication token (required for install)"
|
|
175
|
+
@echo " VALUES_FILE Helm values file path"
|
|
176
|
+
@echo ""
|
|
177
|
+
{{- end }}
|
|
178
|
+
@echo "Examples:"
|
|
179
|
+
{{- if .Values.requiresAuth }}
|
|
180
|
+
@echo " make install AUTH_TOKEN=your-token"
|
|
181
|
+
{{- else }}
|
|
182
|
+
@echo " make install"
|
|
183
|
+
{{- end }}
|
|
184
|
+
@echo " make install-with-values VALUES_FILE=example-values.yaml"
|
|
185
|
+
@echo " make upgrade"
|
|
186
|
+
@echo " make status"
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
# {{ .Values.mcpServerName }} MCP Server
|
|
2
|
+
|
|
3
|
+
{{ .Values.description }}
|
|
4
|
+
|
|
5
|
+
## Prerequisites
|
|
6
|
+
|
|
7
|
+
- Kubernetes 1.19+
|
|
8
|
+
- Helm 3.2.0+
|
|
9
|
+
{{- if .Values.requiresAuth }}
|
|
10
|
+
- Authentication credentials configured
|
|
11
|
+
{{- end }}
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
### 1. Build the Docker Image
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
cd /path/to/{{ .Values.mcpServerName }}
|
|
19
|
+
docker build -t {{ .Values.mcpServerName }}:latest .
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### 2. Install the Helm Chart
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
# Install the MCP server
|
|
26
|
+
helm install {{ .Values.mcpServerName }}-mcp ./chart \
|
|
27
|
+
{{- if .Values.requiresAuth }}
|
|
28
|
+
--set auth.token="your-auth-token"
|
|
29
|
+
{{- end }}
|
|
30
|
+
{{- if .Values.hasCustomConfig }}
|
|
31
|
+
--set config.customValue="your-config-value"
|
|
32
|
+
{{- end }}
|
|
33
|
+
|
|
34
|
+
# Or install with values file
|
|
35
|
+
helm install {{ .Values.mcpServerName }}-mcp ./chart \
|
|
36
|
+
--values example-values.yaml
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### 3. Deploy Agent and Query (Optional)
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
# Deploy the example agent and query that use the MCP server
|
|
43
|
+
kubectl apply -f examples/{{ .Values.mcpServerName }}-agent.yaml
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### 4. Verify Installation
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
kubectl get pods -l app.kubernetes.io/name={{ .Values.mcpServerName }}
|
|
50
|
+
kubectl get mcpservers
|
|
51
|
+
kubectl get agents
|
|
52
|
+
kubectl get queries
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Configuration
|
|
56
|
+
|
|
57
|
+
### Helm Values
|
|
58
|
+
|
|
59
|
+
| Key | Type | Default | Description |
|
|
60
|
+
| ------------------ | ------ | ------------------------------- | ------------------ |
|
|
61
|
+
| `replicaCount` | int | `1` | Number of replicas |
|
|
62
|
+
| `image.repository` | string | `"{{ .Values.mcpServerName }}"` | Image repository |
|
|
63
|
+
| `image.tag` | string | `"latest"` | Image tag |
|
|
64
|
+
| `service.port` | int | `8080` | Service port |
|
|
65
|
+
|
|
66
|
+
{{- if .Values.requiresAuth }}
|
|
67
|
+
| `auth.token` | string | `""` | Authentication token |
|
|
68
|
+
| `auth.existingSecret` | string | `""` | Existing secret name for auth |
|
|
69
|
+
{{- end }}
|
|
70
|
+
{{- if .Values.hasCustomConfig }}
|
|
71
|
+
| `config.customValue` | string | `""` | Custom configuration value |
|
|
72
|
+
{{- end }}
|
|
73
|
+
|
|
74
|
+
### Environment Variables
|
|
75
|
+
|
|
76
|
+
{{- if .Values.requiresAuth }}
|
|
77
|
+
|
|
78
|
+
- `AUTH_TOKEN`: Authentication token for the service
|
|
79
|
+
{{- end }}
|
|
80
|
+
{{- if .Values.hasCustomConfig }}
|
|
81
|
+
- `CUSTOM_CONFIG`: Custom configuration for the MCP server
|
|
82
|
+
{{- end }}
|
|
83
|
+
|
|
84
|
+
## MCP Tools
|
|
85
|
+
|
|
86
|
+
The {{ .Values.mcpServerName }} MCP server provides these tools:
|
|
87
|
+
|
|
88
|
+
{{- range .Values.tools }}
|
|
89
|
+
|
|
90
|
+
- `{{ .name }}` - {{ .description }}
|
|
91
|
+
{{- end }}
|
|
92
|
+
|
|
93
|
+
## Docker Usage
|
|
94
|
+
|
|
95
|
+
Run the container directly:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
docker build -t {{ .Values.mcpServerName }} .
|
|
99
|
+
docker run -p 8080:8080 {{ .Values.mcpServerName }}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
The server will be available at `http://localhost:8080/mcp`
|
|
103
|
+
|
|
104
|
+
## Development
|
|
105
|
+
|
|
106
|
+
### Local Development
|
|
107
|
+
|
|
108
|
+
1. Install dependencies:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
{{ .Values.packageManager }} install
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
2. Run the server:
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
{{ .Values.packageManager }} start
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
3. Test the MCP server:
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
# Using MCP Inspector or similar tool
|
|
124
|
+
mcp-inspector http://localhost:8080/mcp
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### Testing
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
{{ .Values.packageManager }} test
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
## Architecture
|
|
134
|
+
|
|
135
|
+
This MCP server is built using:
|
|
136
|
+
|
|
137
|
+
- **{{ .Values.technology }}**: Core MCP server implementation
|
|
138
|
+
- **mcp-proxy**: HTTP transport layer for the MCP protocol
|
|
139
|
+
- **Kubernetes**: Container orchestration and deployment
|
|
140
|
+
- **Helm**: Package management and configuration
|
|
141
|
+
|
|
142
|
+
## Examples
|
|
143
|
+
|
|
144
|
+
See the `examples/` directory for:
|
|
145
|
+
|
|
146
|
+
- Agent configurations using this MCP server
|
|
147
|
+
- Query examples
|
|
148
|
+
- Integration patterns
|
|
149
|
+
|
|
150
|
+
## Troubleshooting
|
|
151
|
+
|
|
152
|
+
### Common Issues
|
|
153
|
+
|
|
154
|
+
1. **Connection refused**: Check if the service is running and port 8080 is accessible
|
|
155
|
+
2. **Authentication failed**: Verify auth token configuration
|
|
156
|
+
3. **Tool not found**: Ensure the MCP server is properly registered
|
|
157
|
+
|
|
158
|
+
### Logs
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
# Check pod logs
|
|
162
|
+
kubectl logs -l app.kubernetes.io/name={{ .Values.mcpServerName }}
|
|
163
|
+
|
|
164
|
+
# Check MCP server registration
|
|
165
|
+
kubectl describe mcpserver {{ .Values.mcpServerName }}
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
## Contributing
|
|
169
|
+
|
|
170
|
+
1. Fork the repository
|
|
171
|
+
2. Create a feature branch
|
|
172
|
+
3. Make your changes
|
|
173
|
+
4. Add tests if applicable
|
|
174
|
+
5. Submit a pull request
|
|
175
|
+
|
|
176
|
+
## License
|
|
177
|
+
|
|
178
|
+
This project is licensed under the MIT License - see the LICENSE file for details.
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# {{ .Values.mcpServerName }} MCP Server Build Script
|
|
4
|
+
|
|
5
|
+
set -e
|
|
6
|
+
|
|
7
|
+
IMAGE_TAG=${1:-latest}
|
|
8
|
+
TARGET_CLUSTER=${2:-auto}
|
|
9
|
+
IMAGE_NAME="{{ .Values.mcpServerName }}"
|
|
10
|
+
|
|
11
|
+
echo "Building {{ .Values.mcpServerName }} MCP Server..."
|
|
12
|
+
echo "Image: ${IMAGE_NAME}:${IMAGE_TAG}"
|
|
13
|
+
echo "Target cluster: ${TARGET_CLUSTER}"
|
|
14
|
+
|
|
15
|
+
# Build the Docker image
|
|
16
|
+
docker build -t ${IMAGE_NAME}:${IMAGE_TAG} .
|
|
17
|
+
|
|
18
|
+
# Tag and push based on target cluster
|
|
19
|
+
case $TARGET_CLUSTER in
|
|
20
|
+
"auto")
|
|
21
|
+
echo "Auto-detecting cluster configuration..."
|
|
22
|
+
# Try to detect if we're in a local development environment
|
|
23
|
+
if kubectl config current-context | grep -E "(kind|minikube|docker-desktop)" > /dev/null 2>&1; then
|
|
24
|
+
echo "Local development cluster detected, loading image locally..."
|
|
25
|
+
|
|
26
|
+
# Load image into kind if available
|
|
27
|
+
if command -v kind > /dev/null 2>&1 && kind get clusters > /dev/null 2>&1; then
|
|
28
|
+
echo "Loading image into kind cluster..."
|
|
29
|
+
kind load docker-image ${IMAGE_NAME}:${IMAGE_TAG}
|
|
30
|
+
fi
|
|
31
|
+
|
|
32
|
+
# Load image into minikube if available
|
|
33
|
+
if command -v minikube > /dev/null 2>&1 && minikube status > /dev/null 2>&1; then
|
|
34
|
+
echo "Loading image into minikube..."
|
|
35
|
+
minikube image load ${IMAGE_NAME}:${IMAGE_TAG}
|
|
36
|
+
fi
|
|
37
|
+
else
|
|
38
|
+
echo "Remote cluster detected, pushing to registry..."
|
|
39
|
+
docker push ${IMAGE_NAME}:${IMAGE_TAG}
|
|
40
|
+
fi
|
|
41
|
+
;;
|
|
42
|
+
"local"|"kind"|"minikube")
|
|
43
|
+
echo "Loading image into local cluster..."
|
|
44
|
+
|
|
45
|
+
if [[ $TARGET_CLUSTER == "kind" ]] && command -v kind > /dev/null 2>&1; then
|
|
46
|
+
kind load docker-image ${IMAGE_NAME}:${IMAGE_TAG}
|
|
47
|
+
elif [[ $TARGET_CLUSTER == "minikube" ]] && command -v minikube > /dev/null 2>&1; then
|
|
48
|
+
minikube image load ${IMAGE_NAME}:${IMAGE_TAG}
|
|
49
|
+
else
|
|
50
|
+
echo "Local cluster tools not available, skipping image load"
|
|
51
|
+
fi
|
|
52
|
+
;;
|
|
53
|
+
"remote"|"registry")
|
|
54
|
+
echo "Pushing image to registry..."
|
|
55
|
+
docker push ${IMAGE_NAME}:${IMAGE_TAG}
|
|
56
|
+
;;
|
|
57
|
+
*)
|
|
58
|
+
echo "Unknown target cluster: $TARGET_CLUSTER"
|
|
59
|
+
echo "Valid options: auto, local, kind, minikube, remote, registry"
|
|
60
|
+
exit 1
|
|
61
|
+
;;
|
|
62
|
+
esac
|
|
63
|
+
|
|
64
|
+
echo "{{ .Values.mcpServerName }} MCP Server build completed successfully!"
|
|
65
|
+
echo ""
|
|
66
|
+
echo "Next steps:"
|
|
67
|
+
echo "1. Install the Helm chart:"
|
|
68
|
+
{{- if .Values.requiresAuth }}
|
|
69
|
+
echo " make install AUTH_TOKEN=your-auth-token"
|
|
70
|
+
{{- else }}
|
|
71
|
+
echo " make install"
|
|
72
|
+
{{- end }}
|
|
73
|
+
echo "2. Check the status:"
|
|
74
|
+
echo " make status"
|
|
75
|
+
echo "3. View logs:"
|
|
76
|
+
echo " make logs"
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
apiVersion: v2
|
|
2
|
+
name: {{ .Values.mcpServerName }}
|
|
3
|
+
description: {{ .Values.description }}
|
|
4
|
+
type: application
|
|
5
|
+
version: 0.1.0
|
|
6
|
+
appVersion: "latest"
|
|
7
|
+
keywords:
|
|
8
|
+
- mcp
|
|
9
|
+
- {{ .Values.mcpServerName }}
|
|
10
|
+
- proxy
|
|
11
|
+
- agent
|
|
12
|
+
{{- if .Values.homeUrl }}
|
|
13
|
+
home: {{ .Values.homeUrl }}
|
|
14
|
+
{{- end }}
|
|
15
|
+
{{- if .Values.sourceUrls }}
|
|
16
|
+
sources:
|
|
17
|
+
{{- range .Values.sourceUrls }}
|
|
18
|
+
- {{ . }}
|
|
19
|
+
{{- end }}
|
|
20
|
+
{{- end }}
|
|
21
|
+
maintainers:
|
|
22
|
+
- name: {{ .Values.maintainerName | default "QBAF Team" }}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{{/*
|
|
2
|
+
Expand the name of the chart.
|
|
3
|
+
*/}}
|
|
4
|
+
{{- define "{{ .Values.mcpServerName }}.name" -}}
|
|
5
|
+
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
|
|
6
|
+
{{- end }}
|
|
7
|
+
|
|
8
|
+
{{/*
|
|
9
|
+
Create a default fully qualified app name.
|
|
10
|
+
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
|
11
|
+
If release name contains chart name it will be used as a full name.
|
|
12
|
+
*/}}
|
|
13
|
+
{{- define "{{ .Values.mcpServerName }}.fullname" -}}
|
|
14
|
+
{{- if .Values.fullnameOverride }}
|
|
15
|
+
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
|
|
16
|
+
{{- else }}
|
|
17
|
+
{{- $name := default .Chart.Name .Values.nameOverride }}
|
|
18
|
+
{{- if contains $name .Release.Name }}
|
|
19
|
+
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
|
|
20
|
+
{{- else }}
|
|
21
|
+
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
|
|
22
|
+
{{- end }}
|
|
23
|
+
{{- end }}
|
|
24
|
+
{{- end }}
|
|
25
|
+
|
|
26
|
+
{{/*
|
|
27
|
+
Create chart name and version as used by the chart label.
|
|
28
|
+
*/}}
|
|
29
|
+
{{- define "{{ .Values.mcpServerName }}.chart" -}}
|
|
30
|
+
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
|
31
|
+
{{- end }}
|
|
32
|
+
|
|
33
|
+
{{/*
|
|
34
|
+
Common labels
|
|
35
|
+
*/}}
|
|
36
|
+
{{- define "{{ .Values.mcpServerName }}.labels" -}}
|
|
37
|
+
helm.sh/chart: {{ include "{{ .Values.mcpServerName }}.chart" . }}
|
|
38
|
+
{{ include "{{ .Values.mcpServerName }}.selectorLabels" . }}
|
|
39
|
+
{{- if .Chart.AppVersion }}
|
|
40
|
+
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
|
41
|
+
{{- end }}
|
|
42
|
+
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
|
43
|
+
{{- end }}
|
|
44
|
+
|
|
45
|
+
{{/*
|
|
46
|
+
Selector labels
|
|
47
|
+
*/}}
|
|
48
|
+
{{- define "{{ .Values.mcpServerName }}.selectorLabels" -}}
|
|
49
|
+
app.kubernetes.io/name: {{ include "{{ .Values.mcpServerName }}.name" . }}
|
|
50
|
+
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
51
|
+
{{- end }}
|
|
52
|
+
|
|
53
|
+
{{/*
|
|
54
|
+
Create the name of the service account to use
|
|
55
|
+
*/}}
|
|
56
|
+
{{- define "{{ .Values.mcpServerName }}.serviceAccountName" -}}
|
|
57
|
+
{{- if .Values.serviceAccount.create }}
|
|
58
|
+
{{- default (include "{{ .Values.mcpServerName }}.fullname" .) .Values.serviceAccount.name }}
|
|
59
|
+
{{- else }}
|
|
60
|
+
{{- default "default" .Values.serviceAccount.name }}
|
|
61
|
+
{{- end }}
|
|
62
|
+
{{- end }}
|