Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/magefree/mage/llms.txt

Use this file to discover all available pages before exploring further.

XMage — short for Magic, Another Game Engine — is a free, open-source application that lets you play Magic: The Gathering against human opponents online or against computer AI. It enforces the full rules of the game automatically, supports dozens of formats, and runs entirely without a subscription or account requirement when connecting to public servers.

What Is XMage?

XMage is a client-server Java application built around a faithful rules engine for Magic: The Gathering. The server hosts games, manages player sessions, and enforces game rules, while the client provides a graphical interface — built with Java Swing — through which players manage decks, join tables, and play cards. Both components are distributed together and can be launched from a single launcher JAR. XMage also tracks player performance through a Glicko rating system, ranking players across competitive matches. The project is licensed under the MIT License and its source code is hosted on GitHub. The current release version is 1.4.60.
XMage requires Java 8 or later to run. You can download a compatible JRE from java.com. The entire application — client, server, and launcher — targets the Java 8 runtime, so no newer JDK features are required unless you are building from source.

Card Coverage

XMage includes full rules enforcement for an extensive card library drawn from official Magic: The Gathering releases:
MetricCount
Unique cards implemented31,000+
Total reprints across editions91,000+
Card sets availableHundreds, including all regular sets
The library also includes custom sets such as Star Wars. All regular sets have nearly all cards implemented with complete rules text.

Supported Formats & Game Modes

XMage supports single matches and tournaments across a wide range of sanctioned and community formats:
  • Two-player duel and multiplayer free-for-all (up to 10 players)
  • Commander (up to 10 players), Oathbreaker, Brawl, Tiny Leaders, Canadian Highlander
  • Standard, Modern, Pauper, Historic Standard, Super Standard, Freeform, Richman
  • Momir Basic, Penny Dreadful Commander, Freeform Unlimited Commander
  • Booster Draft and Sealed tournaments (4–16 players, elimination or Swiss)
  • Cube Draft and Cube Sealed
A special test mode is available on local servers for testing combos and game situations with pre-defined conditions.

Architecture Overview

XMage follows a classic client-server architecture. The server and client can run on the same machine or across a network.
┌─────────────────────┐         ┌──────────────────────────┐
│   Mage.Client        │◄──────►│   Mage.Server             │
│  (Swing GUI)         │  TCP   │  (JBoss Remoting)         │
│  Port: any           │ 17171  │  Port: 17171 (default)    │
└─────────────────────┘         └──────────────────────────┘
The server binds to port 17171 by default (with a secondary bind port of 17179). Configuration is loaded from config/config.xml in the working directory, and server Java options can be adjusted from the XMage Launcher under Settings → Java → Server java options.

Module Breakdown

XMage is organized as a multi-module Maven project (org.mage:mage-root, version 1.4.60). Each module has a focused responsibility:
ModuleArtifact IDPurpose
MagemageCore game engine — rules, card objects, abilities, game state
Mage.Commonmage-commonShared data types and utilities used by client and server
Mage.Servermage-serverGame server, session management, JBoss Remoting transport
Mage.Clientmage-clientJava Swing desktop client and deck editor
Mage.Setsmage-setsAll card set definitions and card implementations
Mage.Server.Plugins(multiple)Game mode plugins (Commander, Brawl, Oathbreaker, etc.), AI players, tournament types
Mage.Pluginsmage-counter-pluginClient-side plugins such as counter tracking
Mage.Server.Consolemage-server-consoleCLI console for server administration
Mage.Testsmage-testsIntegration and rules-enforcement test suite
Mage.Verifymage-verifyCard data verification tooling

Server Plugins

The Mage.Server.Plugins directory contains individual Maven modules for every supported game type and AI strategy:
  • Game modes: Mage.Game.TwoPlayerDuel, Mage.Game.CommanderDuel, Mage.Game.CommanderFreeForAll, Mage.Game.FreeForAll, Mage.Game.OathbreakerDuel, Mage.Game.BrawlDuel, Mage.Game.MomirDuel, and more
  • AI players: Mage.Player.AI, Mage.Player.AI.MA, Mage.Player.AIMCTS, Mage.Player.AI.DraftBot
  • Deck formats: Mage.Deck.Constructed, Mage.Deck.Limited
  • Tournaments: Mage.Tournament.BoosterDraft, Mage.Tournament.Sealed, Mage.Tournament.Constructed

Supported Platforms

XMage runs on all major desktop operating systems:
  • 🪟 Windows — full support; launcher available as a clickable JAR
  • 🐧 Linux — full support; OpenGL and XRender acceleration available via JVM flags
  • 🍎 macOS — full support, including Apple Silicon (M1/M2) with platform-specific workarounds

Community & Resources

GitHub Issues

Report bugs, request features, or browse the FAQ label for common problems and solutions.

Reddit — r/XMage

Community discussion, announcements, gameplay tips, and troubleshooting help.

Discord Server

Real-time chat with the XMage community and developers.

Public Servers

Connect to community-run public servers and find opponents without hosting your own.
Additional resources:

Next Steps

Quickstart

Download the launcher, connect to a public server, and play your first game in under 10 minutes.

Installation & Requirements

System requirements, JVM tuning flags, and platform-specific setup notes.

Game Modes

Explore all supported formats — from standard duels to 10-player Commander pods.

Development Setup

Clone the repo, configure IntelliJ or Eclipse, and start contributing cards or features.

Build docs developers (and LLMs) love