首页 公告 项目 RSS

⬇️⬇️⬇️ 欢迎关注我的 telegram 频道和 twitter ⬇️⬇️⬇️


联系方式: Twitter Github Email Telegram

Setting Up mcpo

June 18, 2025 本文有 609 个字 需要花费 3 分钟阅读

Introduction

For details on what mcp and mcpo are, see below:

https://docs.openwebui.com/openapi-servers/mcp/

Simply put, MCP is a standardized protocol service for managing and storing large model contexts, while MCPO is a scheduler that coordinates multiple MCP services. Together, they enable unified management and invocation of multiple model contexts.

Here, I will only explain how to deploy mcpo on Kubernetes and make it available for openwebui.

First, create deploy.yaml

apiVersion: apps/v1
kind: Deployment
metadata:
  name: mcpo
  namespace: app
spec:
  replicas: 1
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
  selector:
    matchLabels:
      app: mcpo
  template:
    metadata:
      labels:
        app: mcpo
    spec:
      imagePullSecrets:
      - name: regcred
      volumes:
      - name: mcpo-conf
        configMap:
          name: mcpo-conf
      - name: mcpo-data
        persistentVolumeClaim:
          claimName: mcpo-pvc
      containers:
      - name: mcpo
        image: ghcr.io/open-webui/mcpo:latest
        args:
        - --config
        - /app/config.json
        - --api-key 
        - passwd
        ports:
        - containerPort: 8000
        volumeMounts:
        - name: mcpo-conf
          mountPath: /app/config.json
          subPath: config.json
        - name: mcpo-data
          mountPath: /app/data

The key part to focus on is:

        args:
        - --config
        - /app/config.json
        - --api-key 
        - passwd
  • The value after --config is the mcp server configuration.
  • For --api-key, it’s best to set a key for security. The value after this is the key your client will use to connect to mcpo. For example, openwebui will need this key to connect to mcpo.

Here, I mounted two things:

        - name: mcpo-conf
          mountPath: /app/config.json
          subPath: config.json
        - name: mcpo-data
          mountPath: /app/data

mcpo-conf is where the mcp configuration is mounted, and mcpo-data is for persisting some data.

Create service, ingress, pvc, and kustomization

Nothing special here.

Create the service:

apiVersion: v1
kind: Service
metadata:
  name: mcpo
  namespace: app
spec:
  selector:
    app: mcpo
  ports:
  - port: 8000
    targetPort: 8000
    name: mcpo

Create the pvc:

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: mcpo-pvc
  namespace: app
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 10Gi

Create the ingress:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: mcpo-ingress
  namespace: app
  annotations:
    kubernetes.io/ingress.class: "nginx"
    nginx.ingress.kubernetes.io/ssl-redirect: "false"
spec:
  rules:
  - host: "mcpo.xxx.com"
    http:
      paths:
      - pathType: Prefix
        path: "/"
        backend:
          service:
            name: mcpo
            port:
              number: 8000
  tls:
  - hosts:
    - mcpo.xxx.com
    secretName: xxx-cn-tls

Create kustomization:

resources:
- deploy.yaml
- svc.yaml
- ingress.yaml
- pvc.yaml
namespace: app
configMapGenerator:
- name: mcpo-conf
  files:
  - config.json
  options:
    disableNameSuffixHash: true

Pay attention to config.json

config.json defines the mcp servers and rules you want to use. Here is my configuration:

{
  "mcpServers": {
    "time": {
      "command": "uvx",
      "args": ["mcp-server-time", "--local-timezone=America/New_York"]
    },
    "fetch": {
      "command": "uvx",
      "args": ["mcp-server-fetch"]
    },
    "mcp-hn": {
      "command": "uvx",
      "args": ["mcp-hn"]
    },
    "openmemory": {
      "command": "npx",
      "args": ["-y","openmemory"],
      "env": {
        "OPENMEMORY_API_KEY": "om-xxxxxxxxxxxxxxxx",
        "CLIENT_NAME": "openmemory"
      }
    },
    "context7": {
      "command": "npx",
      "args": ["-y", "@upstash/context7-mcp"]
      }
  }
}

A brief explanation of the mcp servers I connected:

For other mcp servers, see:

https://github.com/modelcontextprotocol/servers
https://mcpservers.org/
https://mcp.so/
https://github.com/metorial/mcp-containers

Configure openwebui

There are two places to configure openwebui: one is in the user settings -> Tools, and the other is in the admin panel -> Tools. Note that if you are a regular user, requests to mcpo are made from the frontend JS, not the openwebui backend. If you are an admin and create tools in the admin panel, the backend makes the request. So if you can’t connect to mcpo, pay attention to this.

The address is the mcpo address, such as http://mcpo:8000/time, where time is the mcp server name.

Feel free to follow my blog at www.bboy.app

Have Fun