Installation¶
Debian and Ubuntu packages¶
mcprack is packaged for Debian 12/13 and Ubuntu 24.04 in the VitexSoftware repository.
sudo apt install mcprack
Optional components:
sudo apt install python3-fastmcp # per-user stdio proxies (a Recommends: installed by default)
For the Vaultwarden secret backend install the Bitwarden CLI (bw) and set
BW_BIN if it is not at /usr/bin/bw.
Files and directories¶
Path |
Purpose |
|---|---|
|
All settings ( |
|
First administrator’s generated password (root only; remove after use) |
|
Database (SQLite by default), installed packages, |
|
Volatile state of the per-user proxy processes (tmpfs, |
|
|
|
systemd unit running gunicorn (4 workers, |
The command line tool¶
/usr/bin/mcprack loads /etc/mcprack/env when it can read it and forwards to
the management CLI, so run it with sudo:
sudo mcprack user list
sudo mcprack server list
Configuration after installation¶
Edit /etc/mcprack/env and restart the service:
sudo systemctl restart mcprack
At least set PUBLIC_BASE_URL. The settings are listed in
Configuration reference. The installer never overwrites an existing
/etc/mcprack/env.
Database¶
The package asks dbconfig-common which engine to use: SQLite (the default, in
/var/lib/mcprack), PostgreSQL or MySQL/MariaDB (install python3-psycopg2 or
python3-pymysql). The choice ends up in SQLALCHEMY_DATABASE_URI in
/etc/mcprack/env. Migrations run on upgrade; to run them by hand:
sudo mcprack db upgrade
Resource limits¶
The mcprack systemd unit caps the whole service cgroup: the web application
and every MCP server process it starts. The package ships these defaults:
Setting |
Default |
Meaning |
|---|---|---|
|
|
RAM for the service and all MCP server processes together |
|
|
Processes and threads |
|
|
Four CPU cores |
|
|
Open files and sockets per process |
Each user’s selected server runs as its own relay process plus the server itself,
about 150–200 MB together, and every call of the Bitwarden CLI (bw) adds about
180 MB while it runs. Estimate the memory you need as:
MemoryMax ≈ 1 GB + 200 MB × users × selected servers in use at the same time
For example, two users with 15 servers each need about 7 GB. Leave room for the database and the rest of the host: a limit close to the host’s total RAM no longer protects anything.
A service that sits at its limit is slowed down by memory reclaim long before a
process is killed. bw then gets slow and clients report Vaultwarden is busy
(Troubleshooting). Check the current usage and how often the
limit was hit:
systemctl status mcprack | grep Memory
cat /sys/fs/cgroup/system.slice/mcprack.service/memory.events
Raise a limit with a drop-in, never by editing the packaged unit, which an upgrade overwrites:
sudo systemctl edit mcprack
[Service]
MemoryMax=7G
To apply the new limit immediately, without a restart:
sudo systemctl set-property --runtime mcprack MemoryMax=7G
Upgrading from 1.6.x¶
Back up the database first. The upgrade applies these migrations: per-user token
and session versions, materialize_server_permissions, add_login_throttle
and add_user_mfa. They are reversible (mcprack db downgrade).
What changes for existing installations:
Server access is now explicit.
STRICT_SERVER_PERMISSIONSistrueby default. The migration grants every existing user the servers that are enabled at that moment, so nobody loses access; new servers and new users need a grant.Administrators are asked for two-factor authentication the first time they open the admin area (Two-factor authentication). Set
MFA_REQUIRED_FOR_ADMINS=falseto postpone it on a trusted network.Passwords set from now on need 12 characters. Existing passwords still work.
A weak or placeholder ``SECRET_KEY`` refuses to start. Rotate with
SECRET_KEY_FALLBACKS(Rotating the SECRET_KEY).Admin API tokens created before the upgrade are not asked for a code. Review and rotate them.
Old ``/proxy/mcp/<token>/<id>`` URLs keep working until they expire or you run
mcprack user revoke-tokens; users should download a new configuration.