Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions charts/mcp-stack/templates/configmap-gateway-plugin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{{- if .Values.mcpContextForge.pluginConfig.enabled}}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "mcp-stack.fullname" . }}-gateway-plugins
labels:
{{- include "mcp-stack.labels" . | nindent 4 }}
app.kubernetes.io/component: gateway
data:
config.yaml: |
{{- .Values.mcpContextForge.pluginConfig.plugins | nindent 4 }}
{{- end }}
16 changes: 16 additions & 0 deletions charts/mcp-stack/templates/deployment-mcpgateway.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,19 @@ spec:
# Resource requests / limits
resources:
{{- toYaml .Values.mcpContextForge.resources | nindent 12 }}
{{- /* Plugins enabled need the plugins configuration */}}
{{- if .Values.mcpContextForge.pluginConfig.enabled }}
volumeMounts:
- name: plugin-config-volume
mountPath: /app/{{ .Values.mcpContextForge.config.PLUGIN_CONFIG_FILE }}
subPath: config.yaml
{{- end }}
{{- if .Values.mcpContextForge.pluginConfig.enabled }}
volumes:
- name: plugin-config-volume
configMap:
name: {{ include "mcp-stack.fullname" . }}-gateway-plugins
items:
- key: config.yaml
path: config.yaml
{{- end }}
16 changes: 16 additions & 0 deletions charts/mcp-stack/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,22 @@
},
"additionalProperties": false
},

"pluginConfig": {
"type": "object",
"description": "Content of the plugin file",
"properties": {
"enabled": {
"type": "boolean",
"description": "Enable pluginConfig loading for ingress",
"default": false
},
"plugins": {
"type": "string",
"description": "contents of plugin file"
}
}
},
"env": {
"type": "object",
"description": "Environment configuration",
Expand Down
6 changes: 6 additions & 0 deletions charts/mcp-stack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ global:
# MCP CONTEXT-FORGE (Gateway / API tier)
########################################################################
mcpContextForge:
# --- Specific plugin file ----#
pluginConfig:
enabled: false
plugins: |
# plugin file

replicaCount: 2 # horizontal scaling for the gateway

# --- HORIZONTAL POD AUTOSCALER --------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion mcpgateway/transports/streamablehttp_transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ async def call_tool(name: str, arguments: dict) -> List[Union[types.TextContent,
logger.warning(f"No content returned by tool: {name}")
return []

return [types.TextContent(type=result.content[0].type, text=result.content[0].text)]
return [types.TextContent(type=content.type, text=content.text) for content in result.content]
except Exception as e:
logger.exception(f"Error calling tool '{name}': {e}")
return []
Expand Down
Loading