---
title: "Self-host (Tutor)"
description: "Run the Open edX MCP with Tutor — local or Kubernetes — including config, routing and health probes."
source: "https://docs.blend-ed.com/openedx-mcp/self-host/"
---

# Self-host (Tutor)

## Install
```
pip install tutor-contrib-openedxmcptutor plugins enable openedxmcptutor images build openedx openedxmcptutor local launch          # or: tutor k8s launchtutor local do init
```
The `openedx-mcp` app auto-installs into the openedx image via a Dockerfile patch. To pin a version or source, append to Tutor’s standard list:

```
tutor config save --append OPENEDX_EXTRA_PIP_REQUIREMENTS=openedx-mcp==<ver>
```
## Configuration

| Key | Default | Meaning |
| --- | --- | --- |
| `OPENEDXMCP_IMAGE` | `openedxmcp:latest` | MCP server image tag |
| `OPENEDXMCP_ENDPOINT` | `mcp.{{ LMS_HOST }}` | public MCP host |
| `OPENEDXMCP_PORT` | `8080` | server port |
| `OPENEDXMCP_LMS_BASE_URL` | `http://lms:8000` | in-cluster LMS upstream |
| `OPENEDXMCP_CMS_BASE_URL` | `http://cms:8000` | in-cluster CMS upstream |
| `OPENEDXMCP_PUBLIC_URL` | `https://{{ ENDPOINT }}/mcp` | shown in the Django key page (injected as `OPENEDX_MCP_PUBLIC_URL`) |

App-side settings (LMS/CMS):

| Setting | Default | Meaning |
| --- | --- | --- |
| `OPENEDX_MCP_DEFAULT_KEY_TTL_DAYS` | `90` | auto-expiry for new keys |
| `OPENEDX_MCP_PUBLIC_URL` | `""` | endpoint shown in the admin connect banner |

## Routing & health
- Caddy routes `/mcp*` on `mcp.<LMS_HOST>` to the server container.
- The server exposes an unauthenticated `/health` ; the facade exposes `/api/mcp/health/` . Kubernetes manifests wire readiness/liveness probes and the
docker-compose service a healthcheck.

## Production notes
- Point the Django cache at **Redis/memcached** — the confirm-token and
rate-limit rails need a shared backend (see [Security](/openedx-mcp/security/) ).
- Terminate TLS at your proxy; the server-to-LMS/CMS hop stays inside the cluster.
