Skip to main content

Overview

Minecraft Creator Tools includes a local web server for testing and collaboration. The server provides a web interface for validation, project browsing, and team development.

Starting the Server

Basic server start:
mct serve -i ./my-project
By default, the server starts on http://localhost:8080.

Server Features

Control which features are enabled with the --server-features flag:
mct serve -i ./my-project --server-features all
Enables all server capabilities:
  • Web-based validation interface
  • Project file browsing and editing
  • Real-time collaboration features
  • Asset preview and management
  • Dedicated server integration

Port Configuration

--server-port
number
default:"8080"
HTTP port for the web interface
mct serve -i ./my-project --server-port 3000
Ensure the port is not already in use by another application.

Access Control

Protect your server with passcodes:

Admin Access

--server-admin-passcode
string
Full administrative access (read/write/deploy)
mct serve -i ./my-project --server-admin-passcode "secretpass123"

Display Read-Only Access

--server-display-readonly-passcode
string
View-only access with limited features
mct serve -i ./my-project --server-display-readonly-passcode "viewonly"

Full Read-Only Access

--server-full-readonly-passcode
string
Read-only access to all project data

Update State Access

--server-update-state-passcode
string
Allow updating project state (validation, builds) but not source files

Server Metadata

--server-title
string
Display name for the server in the web UI
--server-domain-name
string
Public domain name for external access
--server-motd
string
Message of the day shown to connecting users
mct serve -i ./my-project \
  --server-title "Team Dev Server" \
  --server-domain-name "dev.myproject.com" \
  --server-motd "Welcome to the development server!"

Run Once Mode

--server-run-once
boolean
Start server, perform operation, then exit automatically
mct serve -i ./my-project --server-run-once
Useful for automated builds and CI/CD pipelines.

Web Interface Endpoints

Once running, the server exposes:

Validation Interface

http://localhost:8080/validate
Web-based validation runner with interactive results.

Project Browser

http://localhost:8080/browse
Browse project files and folder structure.

API Endpoints

http://localhost:8080/api/validate
http://localhost:8080/api/files
http://localhost:8080/api/deploy
RESTful API for programmatic access.

Example Configurations

Development Server (Local)

mct serve -i ./my-project \
  --server-port 8080 \
  --server-features allwebservices \
  --server-title "Local Dev"

Team Server (Shared)

mct serve -i ./shared-project \
  --server-port 8080 \
  --server-features all \
  --server-title "Team Development Server" \
  --server-admin-passcode "admin123" \
  --server-full-readonly-passcode "readonly" \
  --server-motd "Development server - main branch"

CI/CD Server (Automated)

mct serve -i ./build-output \
  --server-port 8080 \
  --server-features basicwebservices \
  --server-run-once \
  --server-title "Build Server"

Security Best Practices

Always use passcodes when exposing the server beyond localhost.
Use environment variables for passcodes in CI/CD:
mct serve -i ./my-project \
  --server-admin-passcode "$SERVER_ADMIN_PASS"
The server is designed for development and testing. For production deployments, consider additional security measures like reverse proxies, SSL/TLS, and firewall rules.

Troubleshooting

Error: EADDRINUSE: address already in useSolution: Change the port or stop the conflicting process:
mct serve -i ./my-project --server-port 8081
Problem: Server starts but cannot access web interfaceSolutions:
  • Check firewall rules allow the port
  • Verify server is running: netstat -an | grep 8080
  • Try accessing via http://127.0.0.1:8080 instead of localhost
Problem: Passcode rejected by serverSolutions:
  • Ensure passcode is quoted if it contains special characters
  • Check for typos in passcode
  • Restart server after changing passcode

Integration Examples

Docker Deployment

Dockerfile
FROM node:18

RUN npm install -g @minecraft/creator-tools

WORKDIR /app
COPY . .

EXPOSE 8080

CMD ["mct", "serve", "-i", ".", "--server-features", "allwebservices"]

Nginx Reverse Proxy

server {
    listen 80;
    server_name dev.myproject.com;
    
    location / {
        proxy_pass http://localhost:8080;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
    }
}

Build docs developers (and LLMs) love