MCP Servers in Kubernetes
This is an overview of how Fronteir AI sets up MCP servers in Kubernetes, and how to change some of the configuration values.
Namespace
Fronteir AI will deploy MCP servers into the namespace {helm-release-name}-mcp. So if your Helm release name is obot,
Fronteir AI will deploy servers to the obot-mcp namespace.
You can override this namespace and set it to whatever you would like using the Helm value .mcpNamespace.name.
RBAC
In order to set up Deployments, Services, and Secrets, Fronteir AI needs a ServiceAccount, Role, and RoleBinding that give it permissions to do so in the namespace. All of this is included in the Helm chart.
These permissions are granted only for the namespace where Fronteir AI deploys MCP servers.
K8s objects for each MCP server
Each MCP server will have the following Kubernetes objects created for it:
- A Deployment to run the actual server
- A Service to expose it within the cluster
- Secrets to hold configuration
Deployment
Fronteir AI will set up one Deployment for the MCP server. Most of the configuration for these Deployments is unchangeable, but some of it can be modified. These are the configuration parameters that cannot be changed:
- Replicas: 1
- ImagePullPolicy:
Always - SecurityContext:
allowPrivilegeEscalationis false,runAsNonRootis true,runAsUseris 1000, andrunAsGroupis 1000 - Environment: sourced from a SecretRef containing the configuration values provided by the user, if any
- Volumes and Volume Mounts: any configuration values from the user that were provided as files, will be mounted from Secrets in this way
The values that are configurable, and how to change them, follow.
Configurable Values
- Affinity and Tolerations: can be set using the
.mcpServerDefaults.affinityand.mcpServerDefaults.tolerationsin Helm, or via the admin UI if not set in Helm values - Resources: the default value is a memory request of
400Miwith no memory limit or CPU requests/limits. This can be set in Helm using the.mcpServerDefaults.resourcesvalue, or via the Admin UI if not set in Helm values. - Image: the default value is
ghcr.io/obot-platform/mcp-images/phat:mainand it can be changed by setting the Helm value.config.OBOT_SERVER_MCPBASE_IMAGE.
A note on Affinity, Tolerations, and Resources
The configuration for affinity, tolerations, and resources applies to all MCP server Deployments across Fronteir AI. It cannot be customized for individual MCP server Deployments. When this configuration value changes, it will only affect new Deployments (or restarted existing Deployments) from that point forward. The admin can use the UI to manually apply this configuration change to existing MCP server Deployments as desired.
Service
Fronteir AI creates one ClusterIP service for each Deployment to expose its MCP server on port 80.
Fronteir AI does not create any NetworkPolicies. You can set up your own NetworkPolicies to restrict incoming traffic to the MCP server Deployments, so that only the main Fronteir AI Deployment can connect to them. We recommend allowing all egress traffic out of the MCP server Deployments.
Secrets
Fronteir AI will create a Secret to contain the user-provided configuration values for the MCP server.
Any configuration values that were marked as files will be in a separate Secret that is mounted in the /files directory in the container.