Are you the author? Sign in to claim
Celeste map editor for AI agents — MCP server for reading, editing, and previewing .bin map files with GitHub Copilot, C
A Celeste map editor for AI agents — a Model Context Protocol (MCP) server that brings full Celeste .bin map editing to Claude, GitHub Copilot, and other MCP clients, plus a standalone pcgscene CLI for scripting and CI. Read, edit, analyze, generate, and preview maps without opening Lönn.
"For AI agents" describes who talks to this server (any MCP client), not what runs inside it — every tool here is deterministic and procedural. See No AI Inside.
Works with Everest mods and maps from Lönn or Ahorn.
pcgscene CLI75 MCP tools for complete map manipulation, plus the pcgscene command-line tool for scripting and CI.
Reading & Querying
list_maps — List all .bin filesread_map_overview — Summary of rooms, entities, triggers, stylegroundsread_room — Full room details (tiles, entities, triggers, decals)get_room_tiles — Raw tile grid (FG or BG)read_map_metadata — Quick metadata without full readsearch_entities — Find entities by type, position, roomsearch_triggers — Find triggers by typecompare_rooms — Side-by-side room comparisonEditing
add_entity / remove_entity — Place or delete entitiesupdate_entity / move_entity — Modify entity properties or positionadd_trigger / remove_trigger — Place or delete triggersset_room_tiles — Replace tile gridadd_room / remove_room — Create or delete roomscreate_map — Create new .bin fileupdate_room — Modify room properties (music, dark, wind, etc.)clone_room — Duplicate a roombatch_add_entities — Add multiple entities at onceresize_room — Change room dimensionsDecals & Effects
list_decals / add_decal / remove_decal — Manage foreground/background decalslist_stylegrounds / add_styleground / update_styleground / remove_styleground — Manage map effectsDefinitions & Catalog
list_entity_definitions / get_entity_definition — Browse entity typeslist_trigger_definitions / get_trigger_definition — Browse trigger typeslist_effect_definitions / get_effect_definition — Browse effect typesBasic Analysis
analyze_map — Entity counts, type breakdown, world boundsvisualize_map_layout — ASCII mini-mappreview_map_section — Detailed ASCII previewAdvanced Analysis
analyze_entity_usage — Entity stats across entire mapanalyze_difficulty — Room/map difficulty estimationfind_entity_references — Locate all instances of an entity typedetect_map_patterns — Identify design archetypes (linear, hub, etc.)analyze_room_connectivity — Adjacency graph analysisSuggestions & Improvements
suggest_improvements — Actionable room suggestionscompare_maps — Structural diff between mapsWiki & Caching
wiki_save / wiki_search / wiki_list / wiki_get — Persist and retrieve analysis resultsProject Management
get_mod_info — Project metadata and structurevalidate_map / batch_validate_and_fix — Playability validation with auto-fixexport_room_json / import_room_json — JSON room exchangeDiffing
summarize_map_diff — Track map evolution with snapshotsrender_map_html — Interactive HTML preview (zoom, pan, search, minimap)Pattern-Based Generation
build_pattern_library — Extract patterns from existing mapsgenerate_room_from_pattern — Generate rooms with strategy + seedingest_external_map — Download and extract patterns from GameBananaImage & Terrain Generation
generate_map_from_image — Convert color-mapped images to playable mapsgenerate_terrain_map — Procedural maps with Perlin noise + Voronoi biomespreview_terrain_biomes — Preview biome layout before generationpip install loenn-mcp
Or from source:
git clone https://github.com/Magedeline/loenn-mcp
cd loenn-mcp
pip install -e .
Add to claude_desktop_config.json:
{
"mcpServers": {
"loenn-mcp": {
"command": "python",
"args": ["-m", "loenn_mcp.server"],
"env": {
"LOENN_MCP_WORKSPACE": "/absolute/path/to/your/mod"
}
}
}
}
Add to .vscode/mcp.json:
{
"servers": {
"loenn-mcp": {
"type": "stdio",
"command": "python",
"args": ["-m", "loenn_mcp.server"],
"env": {
"LOENN_MCP_WORKSPACE": "${workspaceFolder}"
}
}
}
}
python -m loenn_mcp.preview_map Maps/01_City_A.bin
python -m loenn_mcp.preview_map Maps/01_City_A.bin g- # filter by prefix
The interactive HTML preview supports zoom, pan, room details, search, and minimap with keyboard shortcuts.
pcgscene CLIA batch-first command-line tool for scanning and repairing maps outside an
MCP client — install once, use from scripts, pre-commit hooks, or CI. Every
command that touches a .bin file writes through the same atomic,
backed-up, round-trip-validated path as the MCP server, so a bad run can
never destroy a map.
pip install loenn-mcp
pcgscene scan MyMap.bin # score every room + map connectivity
pcgscene validate MyMap.bin # in-game readiness checklist (exit 0/1)
pcgscene fix MyMap.bin --dry-run # preview safe auto-repairs
pcgscene fix MyMap.bin # apply them (backed up first)
pcgscene diff before.bin after.bin # what changed between two maps
| Command | What it does |
|---|---|
scan | Scores every room (interestingness, difficulty, exit connectivity, spawn presence, fairness gate) plus map-wide reachability from the start room. |
score | Deep report for a single room (--room NAME). |
validate | In-game readiness checklist — bad names, missing spawns, sealed exits, unreachable rooms — with a CI-friendly exit code. |
fix | Safe auto-repairs: adds missing spawns, sanitizes bad room names, converts strawberry{golden} to real goldenBerry entities. Supports --dry-run and --only spawns,names,berries. |
diff | Room/entity/tile changes between two maps. |
generate | Preset-driven generation (quick / simple_fair / explore / challenge) with a reproducible --seed. Requires the pcg_helper module from the full/Pro build (loenn-mcp-delta) — this build's generate refuses gracefully and tells you so. |
Every command accepts --json (and --out FILE) for machine-readable
output, so an editor plugin or CI step can consume the report directly.
| Strategy | Description |
|---|---|
balanced | Mix of exploration and challenge (default) |
exploration | Open spaces, gentle platforming, few hazards |
challenge | Dense tiles, many hazards, tight jumps |
speedrun | Linear path, minimal platforms, fast flow |
| Profile | Behavior | Use Case |
|---|---|---|
creative | Random seed each call | Maximum variety |
deterministic | Stable seed from strategy | Reproducible layouts |
architect | Random seed | Emphasis on shape/connectivity |
# 1. Build pattern library from existing maps
build_pattern_library()
# 2. Create a new map
create_map("Maps/PCG/Generated.bin", "PCG/Generated")
# 3. Generate rooms
generate_room_from_pattern(
map_path="Maps/PCG/Generated.bin",
room_name="a-01",
strategy="exploration",
seed=42,
model_profile="deterministic"
)
# 4. Validate and preview
validate_room("Maps/PCG/Generated.bin", "a-01")
render_map_html("Maps/PCG/Generated.bin")
Use seed=<int> + model_profile="deterministic" for reproducible output:
# Both calls produce identical rooms
generate_room_from_pattern(..., strategy="challenge", seed=1234, model_profile="deterministic")
generate_room_from_pattern(..., strategy="challenge", seed=1234, model_profile="deterministic")
Download and extract patterns from community mods:
# Dry-run (preview only)
ingest_external_map(
source_url="https://gamebanana.com/mods/53774",
attribution="Spring Collab 2020",
confirm_download=False
)
# Download and extract
ingest_external_map(
source_url="https://gamebanana.com/mods/53774",
attribution="Spring Collab 2020 (various authors)",
confirm_download=True,
tags="community,expert"
)
Patterns are saved to PCG/Datasets/ with attribution. Always verify mod licenses permit derivative use.
Convert color-mapped images directly into playable Celeste maps. Each pixel becomes one 8×8 tile.
| Color | Hex | Maps to |
|---|---|---|
| Black | #000000 | Solid tile |
| White | #FFFFFF | Air (empty) |
| Red | #FF0000 | Spike hazard |
| Green | #00FF00 | Player spawn |
| Blue | #0000FF | Jump-through platform |
| Yellow | #FFFF00 | Strawberry |
| Magenta | #FF00FF | Spring |
| Cyan | #00FFFF | Refill crystal |
| Orange | #FF8000 | Crumble block |
| Grey | #808080 | Background solid |
# Basic conversion
generate_map_from_image(image_path="Assets/my_level.png")
# Custom colors and scale
generate_map_from_image(
image_path="Assets/large_map.png",
output_path="Maps/Custom/level.bin",
scale=4, # 4×4 pixel blocks → 1 tile
color_map_json='{"#FF0000":"solid","#00FF00":"spawn"}'
)
Requires Pillow: pip install loenn-mcp[image]
Generate complete maps with Perlin noise and Voronoi biomes. Inspired by AliShazly/map-generator.
| Biome | Terrain |
|---|---|
mountain | Dense tiles, tight platforms, spikes |
forest | Moderate density, many platforms, springs |
plains | Open spaces, gentle platforms, collectibles |
lake | Sparse tiles, jump-throughs, refills |
cave | Enclosed, crumble blocks, dark rooms |
summit | Sparse platforms, wind effects |
# Generate a 4×3 map with seed 42
generate_terrain_map(seed=42, difficulty=3, width_rooms=4, height_rooms=3)
# Preview biome layout before generating
preview_terrain_biomes(seed=42, width_rooms=4, height_rooms=3)
# Output:
# [P] [^] [^] [F]
# [~] [P] [^] [M]
# [C] [~] [P] [F]
| Parameter | Default | Description |
|---|---|---|
seed | -1 (random) | Integer seed for reproducible output |
width_rooms | 4 | Rooms horizontally |
height_rooms | 3 | Rooms vertically |
frequency | 8.0 | Perlin noise frequency (lower = smoother) |
voronoi_points | 12 | Number of biome region centres |
biome_set | all | Comma-separated biome names |
difficulty | 3 | 1-5 scale for hazard density |
Advanced analysis tools for map design, difficulty, and patterns.
# Analyze difficulty
analyze_difficulty(map_path="Maps/MyMod/1-City.bin")
# Detect gameplay patterns
detect_map_patterns(map_path="Maps/MyMod/1-City.bin")
# → "standard-level (7-15 rooms)", "linear-horizontal", "checkpointed"
# Get room suggestions
suggest_improvements(map_path="Maps/MyMod/1-City.bin", room_name="lvl_a-01")
# Track map evolution
summarize_map_diff(map_path="Maps/MyMod/1-City.bin") # save snapshot
# ... edit map ...
summarize_map_diff(map_path="Maps/MyMod/1-City.bin") # show diff
# Cache results for instant re-use
wiki_save(key="city_difficulty", content="Avg 4.2/10, 3 hard rooms", tags="analysis")
wiki_search(query="difficulty")
# Batch validation
batch_validate_and_fix(map_path="Maps/MyMod/1-City.bin", auto_fix=True)
# Search and clone
search_entities(map_path="Maps/MyMod/1-City.bin", entity_type="strawberry")
clone_room(map_path="Maps/MyMod/1-City.bin", source_room="lvl_a-01", new_name="lvl_a-01-copy")
# Export/import rooms
export_room_json(map_path="Maps/MyMod/1-City.bin", room_name="lvl_a-01")
import_room_json(map_path="Maps/MyMod/2-Resort.bin", json_path="Export/lvl_a-01.json")
Analysis results persist in .loenn_mcp_wiki/ as JSON files for instant re-use across sessions.
As of v7.0.0 every tool in loenn-mcp is deterministic and procedural —
Markov chains, wave-function collapse, noise, BFS/graph analysis. The server
makes no calls to any AI/LLM API, requires no API key, and ships no AI
models. The former ai_analyze_map / ai_describe_room / ai_suggest_entities
tools and the anthropic dependency were removed.
Disclaimer: this project was developed with the assistance of Claude (Anthropic) as a coding tool, based on the algorithms published in Robinet et al., "Towards a Celeste AI Framework" (FDG '25, DOI 10.1145/3723498.3723796). All output has been human-tested in Lönn and in-game.
| Variable | Default | Description |
|---|---|---|
LOENN_MCP_WORKSPACE | Current directory | Root of your Celeste mod project. All map paths are relative to this. Path traversal is blocked. |
celeste_bin.py — Standalone .bin parser
pcg.py — Procedural generation
image_map.py — Image-to-map conversion
terrain_gen.py — Seeded terrain generation
gdep_tools.py — Game analysis
.loenn_mcp_wiki/)server.py — MCP server
cli.py — pcgscene command-line tool
--json-capableceleste_bin's atomic-write path — no separate write logic to driftfastmcp >= 3.0.0Pillow >= 9.0 (optional, for image-to-map conversion)Install with all optional features:
pip install loenn-mcp[image]
No Celeste installation required.
MIT — see LICENSE.
Run Claude Code as an MCP server so any agent can delegate coding tasks to it
Browser automation using accessibility snapshots instead of screenshots
Google's universal MCP server supporting PostgreSQL, MySQL, MongoDB, Redis, and 10+ databases
Official GitHub integration for repos, issues, PRs, and CI/CD workflows