NWN MCP Server
Enables querying and updating NWN SQLite campaign databases, allowing AI assistants to read and modify persistent campaign state stored in SQLite.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@NWN MCP Server Load mymodule.mod and show me a summary"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
NWN MCP Server
An MCP (Model Context Protocol) server for Neverwinter Nights: Enhanced Edition module files (.mod). It wraps neverwinter.nim CLI tools to let AI assistants read, query, and modify NWN modules through structured tool calls.
Features
Load and inspect
.modfiles — areas, creatures, items, dialogs, scripts, placeables, and moreCreate and edit areas, place objects, write dialogs, build quests
Compile scripts, manage journals, link area transitions, and validate modules
Bulk operations — rename tags, move or remove objects across areas, and orchestrate complex multi-step changes with natural language
Search blueprints across the full resource stack (base game + HAKs + module)
Spatial awareness — JSON payload of tile grids, walkable zones, and placed objects for AI reasoning
Query and update NWN SQLite campaign databases
HTML area reports — interactive visual maps of areas for human review
Bonus: A fully autonomous one-shot adventure creator. Give it a prompt, sit back, and get a playable module — areas painted, NPCs placed, quests written, loot balanced, all hands-free. Use /create-adventure and have fun. (Warning: spoiler-free by design — the DM gets surprised too.)
Designed for two workflows:
AI-assisted module design — You stay in creative control while an AI helps build, modify, and extend your module via natural language.
AI-driven adventure creation — A small, proof-of-concept tool that lets an LLM autonomously generate one-shot adventures for you and your friends — quests, dialogue, areas, and placed content from a high-level prompt. Spoiler-free by design, so the DM can be surprised too. Warning: Fully AI-generated content is best-effort, especially autonomous area painting. There may be dragons!
Related MCP server: rpgmaker-mz-mcp
Prerequisites
Node.js v18+
neverwinter.nim tools —
nwn_erf,nwn_gff,nwn_script_comp,nwn_twoda,nwn_resman_catNeverwinter Nights: Enhanced Edition (for base game data)
MCP-compatible AI client (Claude Code, Claude Desktop, VS Code, etc.)
Installation
1. Clone and build
git clone https://github.com/Txpple/nwn-mcp.git
cd nwn-mcp
npm install
npm run build2. Download neverwinter.nim tools
Download the latest release for your platform from neverwinter.nim releases and extract the binaries to a folder you'll reference below.
3. Configure your MCP client
Add the server to your MCP client config. The config location depends on your client:
Client | Config file |
Claude Code |
|
Claude Desktop |
|
VS Code | MCP settings in |
{
"mcpServers": {
"nwn-mcp": {
"command": "node",
"args": ["dist/index.js"],
"cwd": "/path/to/nwn-mcp",
"env": {
"NIM_FOLDER_NWTOOLS": "/path/to/neverwinter-nim-tools",
"NWN_FOLDER_DATA": "/path/to/Neverwinter Nights",
"NWN_FOLDER_USER": "/path/to/Documents/Neverwinter Nights"
}
}
}
}Windows paths example:
{
"NIM_FOLDER_NWTOOLS": "C:/tools/neverwinter.nim/bin",
"NWN_FOLDER_DATA": "C:/Program Files (x86)/Steam/steamapps/common/Neverwinter Nights",
"NWN_FOLDER_USER": "C:/Users/you/Documents/Neverwinter Nights"
}Environment Variables
Variable | Required | Default | Description |
| Yes | Path to neverwinter.nim binaries | |
| Yes | NWN game install directory (base game 2DA/TLK) | |
| Yes | NWN user documents directory (HAKs, overrides, modules) | |
| No |
| Temp directory for extracted modules |
| No | Directory for exported reports |
Usage
Once connected, call load_module with a module filename to begin:
load_module("mymodule.mod")Then use any of the 110+ tools to inspect and modify the module. Ask your AI assistant things like:
"Load my module and show me a summary"
"Create a forest area with a river running through it"
"Place a merchant NPC near the tavern door and give her a shop"
"Write a quest where the player retrieves a stolen amulet from a goblin cave"
"Add wolves and a bear encounter to the wilderness area"
"Go through my custom classes and update descriptions"
"Add some new power scripts to my custom feats"
"Validate the module and check for broken references"
Changes are written back to the .mod file via repack_module.
Special Commands
export_area_report/export_module_report— Generate interactive HTML maps of individual areas or the entire module for visual review in a browser./create-adventure— Generate a complete one-shot adventure module from a creative prompt. Uses subagents to build areas, place NPCs, write quests, and populate the world autonomously.
Example /create-adventure prompts
/create-adventure I'd like to play an adventure in the wilderness where I fight off
animals and survive the elements. Give a somber tone. I'll be playing solo with a single level 2 character./create-adventure I'd like to play an adventure with city streets and thieves' guild
intrigue — sneaking, double-crosses, maybe a heist. Make it fun and cheeky. We'll be playing with a party of
3 level 5 characters./create-adventure I'd like to play an adventure where I'm an agent of a wizard society
sent to investigate the society's latest crisis. Classic tabletop style. Solo player,
level 4, lots of investigation and a climactic magical battle./create-adventure I'd like a classic dungeon crawl — an old crypt full of undead with
a powerful lich at the end. Make it old school classic gold box style. Party of 4 players around level 6./create-adventure Surprise me — you pick the setting, tone, and story. Solo player, level 3.Just describe the kind of adventure you want to play and your party size and level — the skill takes it from there.
Available Tools
Areas
create_area— create a new area with terrain tilesget_area_details— area properties, lighting, weather, musicset_area_properties— modify lighting, fog, music, weatherpaint_tiles— set exact tile IDs on specific positions (direct placement)paint_group— place multi-tile groups (temples, lodges, etc.)adventure_apply_layout— apply a full layout atomically: zones + crossers + features via zone solver (adventure tool)get_tileset_details— tileset info with summary mode (~2KB) or full tile catalog (~60-100KB)
Note: Terrain painting is best-effort — always open the module in the toolset to review painted areas and touch up as needed.
visualize_area— spatial JSON payload for AI reasoningexport_area_report/export_module_report— HTML visualizations for human review
Object Placement
place_creature/place_placeable/place_door/place_waypoint— place objects in areasplace_encounter/place_trigger/place_sound/place_store— encounters, triggers, sounds, storesmove_object/remove_object/bulk_remove_objects— reposition or remove objects
Blueprints
list_blueprints— search base game + HAK + module blueprintscreate_creature_blueprint/create_item_blueprint— create new blueprintscreate_encounter_blueprint/create_store_blueprint/create_trap_blueprint— encounters, stores, traps
Dialogs & Quests
create_dialog/flatten_dialog/add_dialog_node— write and inspect conversationsadd_journal_quest/add_journal_entry— build quest journalsverify_quest_completability— trace quests from dialog to journal end entry
Scripts
write_script/compile_script/read_script_source— NWScript authoringsearch_scripts/list_script_references— find and trace script usage
Analysis
validate_module— check for broken references across the modulecheck_area_connectivity— verify all areas are reachable via transitionsget_balance_report— creature difficulty and item values per areasuggest_encounter— advisory tool for encounter composition by party level
Module Management
load_module/repack_module— load and save modulesget_module_info/get_module_summary— module metadata and overviewundo_last_change/undo_history— revert recent changes
Adventure Creator
Tools specific to the /create-adventure pipeline for autonomous module building:
adventure_generate_layout— procedural area layout generation with feature suggestions (dungeon, cave, dwelling, forest, rural, city, plains, desert, castle, tundra)adventure_apply_layout— atomically apply a generated layout (zones + crossers + features) via the zone solveradventure_list_features— enumerate solver-compatible feature groups for a tileset and styleadventure_find_walkable— find guaranteed walkable coordinates in an area regionadventure_create_transition— bidirectional portal transitions (single call places lights + waypoints in both areas)
Architecture
.mod file --> nwn_erf (extract) --> temp dir --> nwn_gff (parse GFF to JSON)
--> in-memory ModuleIndex (tags, scripts, areas, dialogs, creatures, items)
--> MCP tool handlers serve queries & modifications
--> nwn_gff (serialize back) --> nwn_erf (repack) --> .mod fileOne module is loaded at a time. The server builds a full resource manager stack on load — base game BIFs, module HAKs, user overrides, and module resources — giving tools access to the complete data hierarchy.
All tools carry MCP annotations (readOnlyHint, destructiveHint, idempotentHint) so clients can understand tool behavior. Adventure-creator-specific tools are separated into src/tools/adventure-tools.ts; all other tools are base tools for general module editing.
Scope
Targets non-persistent world modules — single-player and small co-op campaigns. Focused on instanced objects placed in areas (GIT contents). Blueprint modification, palette-level changes, and deep 2DA/ruleset authoring are out of scope. That being said, these are all possible with careful prompts.
Development
npm run dev # Run with tsx (hot reload)
npm run build # Compile TypeScript
npm run start # Run compiled output
npm run test # Run tests (vitest)
npm run lint # Lint with Biome
npm run format # Format with BiomeTroubleshooting
neverwinter.nim tools not found — Verify
NIM_FOLDER_NWTOOLSpoints to the directory containing the binaries, not a parent folder.
Support
Issues: GitHub Issues
Acknowledgments
Niv at neverwinter.nim for all the awesome stuff he's provided
The NWN Discord and Zulip communities
License
MIT License — see LICENSE for details.
Available Tools
125 toolsadd_dialog_nodeA
Add a node to an existing dialog. If parentType is 'entry', adds a PC reply linked from that entry. If parentType is 'reply', adds an NPC entry linked from that reply. If parentType is 'dialog', adds a new NPC root entry to the StartingList (use for quest-stage branching with condition scripts). For 'dialog' mode, parentIndex controls insertion position: 0 inserts at the beginning (evaluated first), -1 or omit appends at the end (evaluated last).
Inputs: text (required), dialog (required), parentType (required), parentIndex (required), +2 more.
add_item_propertyBIdempotent
Add a property to an item blueprint's PropertiesList. Use integer row from itempropdef.2da, or text name to search.
Inputs: resref (required), propertyName (required), param1, subType, +3 more.
add_items_to_containerAIdempotent
Add items to a placeable container's inventory. Resolves item blueprints from module or base game.
Inputs: area (required), items (required), containerTag (required).
add_journal_entryA
Add an entry to an existing quest. Entries represent journal updates the player sees as the quest progresses.
Inputs: id (required), text (required), questTag (required), end.
add_journal_questC
Add a new quest category to the journal.
Inputs: tag (required), name (required), xp, comment, +1 more.
adventure_apply_layoutAIdempotent
Apply a complete area layout atomically. Takes the full output of adventure_generate_layout (zones, crossers, suggestedFeatures) and paints everything in one call — terrain zones via the zone solver, crosser paths, and multi-tile feature groups.
Inputs: area (required), layout (required), autoRepack.
adventure_create_transitionA
Create a BIDIRECTIONAL area transition for adventure modules in a single call. Places a useable blue shaft of light (plc_solblue) AND a landing waypoint at BOTH positions simultaneously, guaranteeing the light and waypoint in each area are at the exact same coordinates. The A→B light's OnUsed script plays VFX_FNF_SUMMON_MONSTER_2 and jumps the PC to the waypoint in B. The B→A light does the same back to A. Both scripts are compiled and dialog resrefs are returned. Tag constraints: max 11 chars (resrefs are 'a_at_' and 'a_rt_', both max 16 chars).
Inputs: aX (required), aY (required), bX (required), bY (required), +3 more.
adventure_find_walkableARead-onlyIdempotent
Find guaranteed walkable coordinates in an area. Returns positions validated against the walkmesh with correct Z height. Use region to constrain the search to a part of the area.
Inputs: area (required), count, region, avoidEdges.
adventure_generate_layoutARead-onlyIdempotent
Generate a procedural area layout with terrain zones, crosser paths, and transition points. Returns data ready to pass to adventure_apply_layout. Encodes all layout rules: perimeter encapsulation, room separation, adjacency validation, walkable ratio. Styles: dungeon (varied rooms + corridors, some L-shapes), cave (smaller rooms, more corridors, maze-like), dwelling (quadrant rooms, fewer corridors, building interior), forest (clearings separated by trees, winding roads), rural (farmland/village, spine roads), city (urban cobblestone, grid roads), plains (open terrain, sparse clearings), desert (arid, cliff borders), castle (fortified exterior, castle walls), tundra (frozen, snow/camp clearings). Returns suggestedFeatures array with pre-validated feature placements.
Inputs: style (required), width (required), height (required), tileset (required), +2 more.
adventure_list_featuresARead-onlyIdempotent
List feature groups from a tileset that are compatible with the layout solver. Automatically resolves the floor terrain from the style type (same logic as adventure_generate_layout), then filters out groups with doors, crosser edges, or mismatched terrain corners. Returns only groups safe to pass as preferredFeatures.
Inputs: style (required), tileset (required).
bulk_move_objectsCIdempotent
Move all objects with a given tag by an offset in an area.
Inputs: tag (required), area (required), offsetX (required), offsetY (required), +2 more.
bulk_remove_objectsADestructive
Remove objects matching a tag pattern from one or all areas. Use '*' as wildcard. Default: dry run (preview only).
Inputs: listName (required), tagPattern (required), area, dryRun.
check_area_connectivityARead-onlyIdempotent
Check if all areas are reachable from the module start area via door/trigger transitions. Returns reachable/unreachable areas and the transition graph.
Inputs: startArea.
clear_creature_equipmentADestructive
Remove all or specific equipment from a placed creature.
Inputs: tag (required), area (required), slot.
clear_item_propertiesADestructive
Remove all properties from an item blueprint.
Inputs: resref (required).
clone_resourceC
Clone an existing resource with a new resref.
Inputs: newResref (required), sourceType (required), sourceResref (required).
compile_scriptCIdempotent
Compile a NWScript (.nss) source file to bytecode (.ncs).
Inputs: resref (required), includePaths.
create_areaB
Create a new area with default terrain tiles. Creates ARE, GIT, and GIC files, registers in module IFO.
Inputs: name (required), width (required), height (required), resref (required), +2 more.
create_area_transitionA
Create a one-way area transition: trigger in source area → waypoint in target area. For two-way transitions, call twice with swapped source/target. Writes and compiles a transition script, places the waypoint, places the trigger, and sets LinkedTo metadata for connectivity checks.
Inputs: tag (required), sourceX (required), sourceY (required), targetX (required), +6 more.
create_creature_blueprintA
Create a new creature blueprint (.utc). Optionally clone from a base game or module creature and apply overrides.
Inputs: tag (required), name (required), resref (required), cr, +20 more.
create_dialogB
Create a new DLG conversation file from a simplified tree structure. Root nodes must be NPC lines (speaker: 'npc'). The tree alternates NPC→PC→NPC.
Inputs: nodes (required), resref (required).
create_encounter_blueprintB
Create a new encounter blueprint (.ute) with a creature spawn list. Encounters spawn creatures when players enter their region, with configurable difficulty, respawning, and creature counts.
Inputs: tag (required), name (required), resref (required), creatures (required), +7 more.
create_factionB
Add a new faction to the module's .fac file with reputation entries for all existing factions.
Inputs: name (required), global, parentId, defaultReputation.
create_item_blueprintA
Create a new item blueprint (.uti) in the module. Optionally clone from a base game or module item and apply overrides.
Inputs: tag (required), name (required), resref (required), baseItem (required), +8 more.
create_journalA
Create a new .jrl file if the module has none. Required before adding quests to a module without an existing journal.
Inputs: resref.
create_moduleA
Create a new empty module (.mod) from the standard template. Includes default event scripts, factions, and palette files. Creates a small starter area for the entry point. Saves to NWN_FOLDER_USER/modules/ and loads the module.
Inputs: name (required), filename (required).
create_store_blueprintA
Create a new store blueprint (.utm) with custom pricing and inventory. Place with place_store and open via script (OpenStore).
Inputs: tag (required), name (required), resref (required), markUp, +6 more.
create_trap_blueprintA
Create a new trap trigger blueprint (.utt) with trap detection/disarm DCs and a default square geometry. Optionally clone from a base game trigger and apply overrides.
Inputs: tag (required), name (required), resref (required), scriptOnEnter (required), +5 more.
delete_areaADestructive
Remove an area from the module. Deletes ARE, GIT, and GIC files and unregisters from module IFO. Cannot delete the module entry area. This action is irreversible (no undo support).
Inputs: area (required).
disassemble_scriptBRead-onlyIdempotent
Disassemble compiled NWScript (.ncs) bytecode.
Inputs: resref (required).
edit_dialog_nodeAIdempotent
Edit an existing dialog node's text, script, sound, or comment. Supports partial updates — only provided fields are changed. Note: conditions live on links (Active field), not nodes — use modify_gff_field for those.
Inputs: dialog (required), nodeType (required), nodeIndex (required), text, +3 more.
edit_journal_entryBIdempotent
Modify an existing journal entry's text or completion flag.
Inputs: id (required), questTag (required), end, text.
edit_journal_questAIdempotent
Modify quest metadata (name, priority, comment, XP). Use add_journal_quest to create new quests.
Inputs: tag (required), xp, name, comment, +1 more.
export_area_reportAIdempotent
Export a self-contained HTML visualization of a single area to disk. This is a human debugging tool that renders the same spatial data returned by visualize_area — tile walkmesh geometry, material colors, object markers, zone connectivity, creature/placeable cards, and area transitions. Returns the file path to open in a browser.
Inputs: area (required).
export_module_reportAIdempotent
Export a self-contained HTML report of the entire module to disk. This is a human debugging tool that visualizes the spatial data for all areas: module summary, area transitions overview, and per-area interactive maps with walkmesh geometry, object markers, creature/placeable cards, and zone connectivity. Writes to module-report.html in the module temp dir. Returns the file path.
Inputs: no named parameters.
export_resourceAIdempotent
Extract a single resource file from the module to a specified path on disk.
Inputs: type (required), resref (required), outputPath (required).
find_dialog_scriptsBRead-onlyIdempotent
Find all scripts referenced in dialog files (actions and conditions).
Inputs: dialog.
find_orphansBRead-onlyIdempotent
Find resources that are never referenced by any other resource.
Inputs: no named parameters.
find_strref_usageBRead-onlyIdempotent
Find which GFF resources reference a given TLK string reference number.
Inputs: strref (required).
find_variable_usageARead-onlyIdempotent
Find all scripts that use Get/SetLocal* functions with a given variable name.
Inputs: variableName (required).
fix_object_heightsAIdempotent
Adjust Z height of all placed objects in an area to match the walkmesh ground plane. Fixes objects that were placed at Z=0 on elevated terrain.
Inputs: area.
flatten_dialogBRead-onlyIdempotent
Get a human-readable conversation flow showing NPC/PC lines with branching.
Inputs: dialog (required), maxDepth.
get_area_creaturesBRead-onlyIdempotent
List all creatures placed in a specific area with their stats.
Inputs: area (required).
get_area_detailsARead-onlyIdempotent
Get full details for an area including properties, lighting, weather, and music.
Inputs: area (required).
get_area_doorsARead-onlyIdempotent
List all doors in a specific area with lock status and destinations.
Inputs: area (required).
get_area_encountersBRead-onlyIdempotent
List all encounters in a specific area with creature list and spawn conditions.
Inputs: area (required).
get_area_itemsBRead-onlyIdempotent
List all items placed on the ground in a specific area.
Inputs: area (required).
get_area_placeablesCRead-onlyIdempotent
List all placeables in a specific area.
Inputs: area (required).
get_area_soundsBRead-onlyIdempotent
List all sound objects in a specific area.
Inputs: area (required).
get_area_triggersARead-onlyIdempotent
List all triggers in a specific area with type, scripts, and linked destination.
Inputs: area (required).
get_area_waypointsBRead-onlyIdempotent
List all waypoints in a specific area with tag, position, and map note.
Inputs: area (required).
get_balance_reportCRead-onlyIdempotent
Analyze creature difficulty and item values per area.
Inputs: no named parameters.
get_creature_detailsBRead-onlyIdempotent
Get full details for a specific creature including stats, feats, equipment, and scripts.
Inputs: tag, area, index.
get_dependency_graphARead-onlyIdempotent
Show resource dependency graph. Resources depend on other resources via script references, conversation assignments, etc.
Inputs: resource.
get_dialog_treeBRead-onlyIdempotent
Get the raw dialog structure for a conversation file.
Inputs: dialog (required).
get_faction_creaturesBRead-onlyIdempotent
List all creatures that belong to a specific faction.
Inputs: factionId (required).
get_faction_detailsARead-onlyIdempotent
List factions and reputation relationships from the module's .fac file.
Inputs: no named parameters.
get_item_detailsBRead-onlyIdempotent
Get full details for an item blueprint including properties.
Inputs: tag, resref.
get_journalARead-onlyIdempotent
Get all journal entries organized by quest/category.
Inputs: no named parameters.
get_module_infoBRead-onlyIdempotent
Get parsed module.ifo data: areas, entry point, scripts, time settings.
Inputs: no named parameters.
get_module_summaryCRead-onlyIdempotent
Get a high-level summary of the entire module.
Inputs: no named parameters.
get_resourceARead-onlyIdempotent
Get the full content of a resource. Returns GFF as JSON, .nss as source text, .ncs as disassembly.
Inputs: type (required), resref (required).
get_store_detailsBRead-onlyIdempotent
Get full details for a store including inventory and pricing.
Inputs: resref (required).
get_tileset_detailsARead-onlyIdempotent
Get full details for a tileset: terrain types, crosser types, primary rules, all groups with dimensions and tile IDs, and a summary of the tile catalog organized by terrain patterns. Use detail='summary' (default) for a compact ~2KB overview including valid terrain adjacencies. Use detail='full' for the complete tile catalog (~60-100KB).
Inputs: tileset (required), detail.
link_doorsAIdempotent
Link two doors for area transitions. Sets LinkedTo and LinkedToFlags on both doors bidirectionally.
Inputs: area1 (required), area2 (required), door1Tag (required), door2Tag (required).
list_2da_tablesARead-onlyIdempotent
List all 2DA tables available in the loaded module.
Inputs: no named parameters.
list_areasARead-onlyIdempotent
List all areas in the module with dimensions and object counts.
Inputs: no named parameters.
list_blueprintsARead-onlyIdempotent
Search for blueprints across the full resman stack (base game + HAKs + module) by resref, tag, or display name (including TLK-resolved names). Returns type-specific summaries.
Inputs: type (required), pattern (required), limit.
list_creaturesARead-onlyIdempotent
List all creatures in the module, optionally filtered by area.
Inputs: area.
list_databasesARead-onlyIdempotent
List SQLite database files in the NWN user database folder, with size and table count. Database naming: mod_.sqlite3 for module-level, .sqlite3 for local characters, .sqlite3 for server characters, with _hench_tagid_NNN suffixes for henchmen.
Inputs: no named parameters.
list_itemsBRead-onlyIdempotent
List all item blueprints in the module.
Inputs: no named parameters.
list_resourcesBRead-onlyIdempotent
List all resources in the loaded module, optionally filtered by type (extension).
Inputs: type.
list_script_referencesARead-onlyIdempotent
Show where scripts are referenced from in GFF files (event handlers, dialog actions, etc.).
Inputs: resref.
list_storesARead-onlyIdempotent
List all stores in the module with name and markup.
Inputs: no named parameters.
list_tilesetsARead-onlyIdempotent
List all tilesets available via resman. Returns resref, display name, interior/exterior, terrain types, crosser types, group count, and tile count for each.
Inputs: no named parameters.
list_tlk_entriesBRead-onlyIdempotent
Browse TLK entries with optional substring filter and range. Returns up to 50 entries at a time.
Inputs: count, start, filter, source.
load_moduleAIdempotent
Load and index a NWN module (.mod) file. Must be called before using other tools. If just a filename is given (e.g., 'mymod.mod'), it is resolved from the NWN_FOLDER_USER/modules/ directory.
Inputs: modPath (required).
modify_gff_fieldBIdempotent
Modify a field in a GFF resource by dot-path. Example path: 'Creature List.0.ChallengeRating'
Inputs: path (required), type (required), value (required), resource (required), +1 more.
move_objectAIdempotent
Move an object to a new position in an area. Finds the object by tag (first match) or list index.
Inputs: x (required), y (required), area (required), listName (required), +3 more.
paint_groupBIdempotent
Place a multi-tile group (e.g. 'Temple_3x2', 'Lodge_2x2') at a grid position. Validates bounds and edge constraints.
Inputs: x (required), y (required), area (required), feature (required).
paint_tilesAIdempotent
Set exact tile IDs on specific positions. Direct placement, no solving.
Inputs: area (required), tiles (required).
place_creatureBIdempotent
Place a creature in an area from a UTC blueprint (module or base game). Validates position against walkmesh.
Inputs: x (required), y (required), area (required), blueprint (required), +3 more.
place_doorCIdempotent
Place a door in an area from a UTD blueprint (module or base game).
Inputs: x (required), y (required), area (required), blueprint (required), +2 more.
place_encounterAIdempotent
Place an encounter in an area from a UTE blueprint (module or base game). The blueprint's geometry defines the spawn region.
Inputs: x (required), y (required), area (required), blueprint (required), +1 more.
place_placeableAIdempotent
Place a placeable in an area from a UTP blueprint. Appearance field comes from the blueprint (not defaulted to 0). By default strips event scripts and clears Useable/HasInventory — pass stripScripts='false' to keep blueprint defaults. Use add_items_to_container to enable inventory on placed containers. Enforces 1m collision check — placement fails if another object is within 1m.
Inputs: x (required), y (required), area (required), blueprint (required), +3 more.
place_soundBIdempotent
Place a sound object in an area from a UTS blueprint (module or base game).
Inputs: x (required), y (required), area (required), blueprint (required), +1 more.
place_storeBIdempotent
Place a store in an area from a UTM blueprint (module or base game). Stores are typically opened via scripts on NPCs/placeables.
Inputs: x (required), y (required), area (required), blueprint (required), +1 more.
place_triggerBIdempotent
Place a trigger in an area from a UTT blueprint (module or base game). The blueprint's geometry defines the trigger shape.
Inputs: x (required), y (required), area (required), blueprint (required), +1 more.
place_waypointBIdempotent
Place a waypoint in an area with optional map note.
Inputs: x (required), y (required), tag (required), area (required), +5 more.
query_databaseA
Run a SQL statement against a NWN SQLite database. Returns rows for SELECT/PRAGMA, or change summary for INSERT/UPDATE/DELETE. Database name can omit the .sqlite3 extension. The main table is 'db' with columns: varname (varchar), playerid (varchar), vartype (tinyint), payload (blob), compressed (bool). vartype codes (ASCII char): 70='F' float, 73='I' int, 74='J' json (SetCampaignJson), 76='L' location (areaId@x:y;z!facing), 79='O' object (StoreCampaignObject, GFF JSON), 83='S' string, 86='V' vector. F/I/L/V are uncompressed ASCII. J/O/S are CPDB/zstd compressed. Compressed rows use CPDB/zstd format — use read_database_object to deserialize blobs.
Inputs: sql (required), database (required), limit, params.
read_database_objectARead-onlyIdempotent
Deserialize a compressed GFF blob (creature, item, etc.) from a campaign database. Returns the object as parsed GFF JSON.
Inputs: varname (required), database (required), playerid.
read_script_sourceBRead-onlyIdempotent
Read the NWScript (.nss) source code for a script.
Inputs: resref (required).
remove_item_propertyBDestructive
Remove a property from an item blueprint by index in PropertiesList.
Inputs: index (required), resref (required).
remove_items_from_containerADestructive
Remove items from a placeable container's inventory by resref (all matching) or by index.
Inputs: area (required), containerTag (required), index, itemResref.
remove_journal_entryBDestructive
Remove a specific entry from a quest by its ID.
Inputs: id (required), questTag (required).
remove_journal_questBDestructive
Remove an entire quest category and all its entries from the journal.
Inputs: tag (required).
remove_objectADestructive
Remove an object from an area's GIT by tag or list index.
Inputs: area (required), listName (required), tag, index.
rename_tagADestructiveIdempotent
Rename a tag across all GFF resources and NWScript source files. Use dryRun=true to preview changes without modifying anything.
Inputs: newTag (required), oldTag (required), dryRun.
repack_moduleCIdempotent
Repack the extracted module files into a .mod file.
Inputs: outputPath.
resman_searchARead-onlyIdempotent
Search for resources across the full resman stack (base game + HAKs + override + development) by name pattern or binary content.
Inputs: binary, invert, pattern.
resman_statsARead-onlyIdempotent
Show the full resman stack for the loaded module: container sizes, file counts, shadowing info, and load order. Useful for diagnosing why a resource isn't loading as expected.
Inputs: detailed.
resolve_2daARead-onlyIdempotent
Look up a value in a 2DA table by row index. Returns the full row or a specific column value. Uses base game + HAK 2DA tables loaded via resman.
Inputs: row (required), table (required), column.
resolve_blueprintARead-onlyIdempotent
Resolve any resource from the full resman stack (base game BIFs + HAKs + override + development) and return its GFF as JSON. Use this to look up base game or HAK blueprints by resref (e.g., 'nw_cloth001.uti', 'nw_dog.utc', 'plc_chest1.utp').
Inputs: resource (required).
resolve_tlkARead-onlyIdempotent
Look up text for a TLK string reference. Checks custom TLK first (strrefs >= 0x01000000), then base game dialog.tlk.
Inputs: strref (required).
search_2daBRead-onlyIdempotent
Search a 2DA table for rows where a column matches a value (case-insensitive substring match).
Inputs: table (required), value (required), column (required).
search_by_fieldBRead-onlyIdempotent
Search for GFF fields by name and optionally by value across all parsed resources.
Inputs: fieldName (required), type, value.
search_by_resrefBRead-onlyIdempotent
Search for resources by resref pattern (case-insensitive substring match).
Inputs: pattern (required), type.
search_by_tagBRead-onlyIdempotent
Search for resources by Tag value across the entire module.
Inputs: tag (required), exactMatch.
search_scriptsARead-onlyIdempotent
Search across all NWScript (.nss) source files for a text pattern.
Inputs: pattern (required), caseSensitive.
search_tlkBRead-onlyIdempotent
Search TLK entries by text content (case-insensitive substring match).
Inputs: query (required), source.
set_area_propertiesCIdempotent
Modify area properties: lighting, fog, music, ambient sounds, weather, skybox, day/night cycle. Music/ambient values are IDs from ambientmusic.2da / ambientsound.2da.
Inputs: area (required), skyBox, isNight, musicDay, +20 more.
set_area_scriptsAIdempotent
Set event scripts on an area's ARE file. Pass empty string to clear a script.
Inputs: area (required), onExit, onEnter, onHeartbeat, +1 more.
set_creature_equipmentAIdempotent
Set equipment on a placed creature in an area. Merges with existing equipment by default; use replace=true to clear first.
Inputs: tag (required), area (required), equipment (required), replace.
set_faction_reputationAIdempotent
Modify reputation between two factions. Creates a new entry if none exists.
Inputs: faction1 (required), faction2 (required), reputation (required).
set_module_scriptsBIdempotent
Set event scripts on the module IFO. Pass empty string to clear a script.
Inputs: Mod_OnModLoad, Mod_OnPlrChat, Mod_OnPlrRest, Mod_OnModStart, +14 more.
suggest_encounterBRead-onlyIdempotent
Advisory tool: suggest creature compositions for a given party level and size. Read-only, does not modify anything.
Inputs: partyLevel (required), theme, partySize, difficulty.
tlkify_moduleAIdempotent
Extract all hardcoded strings from the loaded module into a TLK file for localization review. Creates a new module with strref pointers and a companion TLK containing all extracted text.
Inputs: outputTlkPath (required), outputModPath.
trace_dialog_pathBRead-onlyIdempotent
Follow a specific conversation path by choosing PC reply indices at each step.
Inputs: dialog (required), replyIndices (required).
undo_historyARead-onlyIdempotent
View the undo stack — recent GIT mutations that can be reverted.
Inputs: no named parameters.
undo_last_changeA
Revert the most recent GIT mutation (object placement, removal, linking, etc.).
Inputs: no named parameters.
validate_moduleARead-onlyIdempotent
Check for broken references across the module (missing scripts, dialogs, items, door links).
Inputs: no named parameters.
verify_quest_completabilityARead-onlyIdempotent
Verify that all quests in the journal are mechanically completable. Traces from quest-start dialog through condition/action scripts to the journal end entry. Checks area reachability for quest objectives.
Inputs: no named parameters.
visualize_areaARead-onlyIdempotent
Get the spatial awareness payload for an area: tile grid with terrain, materials, crossers, walkability, and features; walkable zones with connectivity and area transition analysis; all placed objects (creatures, placeables, doors, waypoints, triggers, encounters, sounds, stores) with world positions and full properties. Use this for spatial reasoning, quest design, object placement, and area analysis. To generate a human-readable HTML visualization, use export_area_report.
Inputs: area (required).
write_database_objectAIdempotent
Serialize a GFF JSON document into a compressed blob and store it in a campaign database. Use for persisting creatures, items, or other objects.
Inputs: data (required), varname (required), database (required), playerid.
write_scriptAIdempotent
Write NWScript (.nss) source code to the module and optionally compile it. Creates or overwrites the .nss file. Use for creating new scripts or editing existing ones.
Inputs: resref (required), source (required), compile.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 125 tools
Most tools target distinct resources and actions, and descriptions are detailed enough to separate close pairs (visualize_area vs export_area_report, resolve_blueprint vs get_resource). However, there are multiple overlapping families: area listing tools (get_area_creatures, get_area_items, list_creatures), three different transition-creation tools (create_area_transition, adventure_create_transition, link_doors), and several object-removal tools (remove_object, bulk_remove_objects, remove_items_from_container) that an agent could easily confuse.
The dominant pattern is snake_case verb_noun (place_creature, create_journal, list_areas), which is readable and mostly predictable. But the surface mixes many namespaces and verb families — adventure_*, resman_*, tlkify_, paint_, add_ vs create_ vs place_ vs set_ vs edit_ vs modify_ — so an agent cannot reliably infer a tool's category from its verb alone.
125 tools is an extreme mismatch for a single MCP server, far beyond the typical 3-15 range, and many are near-duplicates in intent. The surface would almost certainly exceed practical context budgets and make tool selection unreliable.
Coverage is genuinely broad: module lifecycle, areas/tiles, creatures/items/placeables/doors/triggers/encounters/stores, dialogs, scripts, journals, factions, 2DA/TLK, resman, databases, and validation. Minor gaps exist (e.g., blueprint editing beyond items/creature equipment, no undo for area/structure changes), but the domain surface is close to complete.
Maintenance
Related MCP Connectors
Savecraft serves real save game data and expert game knowledge to AI assistants.
Connect any AI to your Foundry VTT world: actors, combat, dice, journals, tokens, compendiums.
D&D and TTRPG campaign manager for GMs: your AI reads and writes a live, typed campaign database.
Manage NodePal Minecraft servers, worlds, mods, backups and console from AI agents.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to search, browse, and manage mods across Nexus Mods, mod.io, Thunderstore, and Modrinth, as well as perform local diagnostics like detecting games and parsing crash logs.MIT
- AlicenseBqualityBmaintenanceEnables AI assistants to read and write RPG Maker MZ projects directly, covering database, maps, events, and system settings with 119 tools.128177 npm33MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to develop Banner of the Maid mods by reading and modifying game data (characters, items, weapons, skills, dialogue, saves, portraits) and to perform live in-game verification via launching the game, taking screenshots, and clicking by coordinates.2MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to read, audit, and byte-faithfully edit Warcraft III .w3x and .w3m maps while preserving untouched file bytes, with tools for metadata, objects, terrain, sounds, cameras, triggers, and more.4Apache 2.0