Metadata-Version: 2.4
Name: battlemap-mcp
Version: 1.5.0
Summary: MCP server bridging an LLM to a running Dungeondraft instance via its modding API
Project-URL: Homepage, https://github.com/thekannen/battlemap-mcp
Project-URL: Documentation, https://knownframe.com/battlemap-mcp/docs/
Project-URL: Repository, https://github.com/thekannen/battlemap-mcp
Project-URL: Issues, https://github.com/thekannen/battlemap-mcp/issues
Project-URL: Releases, https://github.com/thekannen/battlemap-mcp/releases
Author: thekannen
License-Expression: MIT
License-File: LICENSE
License-File: NOTICE.md
Keywords: Dungeondraft,battle-map,mcp,model-context-protocol,ttrpg
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: End Users/Desktop
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Games/Entertainment :: Role-Playing
Requires-Python: >=3.11
Requires-Dist: cryptography<49,>=48; sys_platform == 'darwin' and platform_machine == 'x86_64'
Requires-Dist: cryptography>=50; sys_platform != 'darwin' or platform_machine != 'x86_64'
Requires-Dist: mcp<2.3,>=2.2
Requires-Dist: pillow<14,>=13.0
Requires-Dist: pydantic>=2
Provides-Extra: dev
Requires-Dist: build>=1.2; extra == 'dev'
Requires-Dist: mypy>=1.11; extra == 'dev'
Requires-Dist: pip-audit>=2.7; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.6; extra == 'dev'
Requires-Dist: vulture>=2.11; extra == 'dev'
Description-Content-Type: text/markdown

# battlemap-mcp

<!-- mcp-name: io.github.thekannen/battlemap-mcp -->

An AI collaborator for your Dungeondraft maps: a local bridge that lets your AI
assistant (Claude, Codex, OpenCode or any other MCP client) build, inspect and
refine the map you have open, using assets you already own.

This package is the **server** your AI app runs. Dungeondraft also needs the
**mod** it talks to. The package carries the mod, and its `install` command or
your assistant copies it into Dungeondraft's mods folder.

You need **Dungeondraft 1.2.0.1** and an AI app that can run local MCP servers,
on the same computer.

## Install

Pick one way. The first two use [uv](https://docs.astral.sh/uv/).

### uv tool install (recommended)

```text
uv tool install battlemap-mcp
uv tool update-shell
```

Open a new terminal, then install the mod and connect your AI app. With
Dungeondraft closed:

```text
battlemap-mcp install
battlemap-mcp setup --client claude-code
```

`setup` also takes `codex` and `opencode`. It installs the map-making skills
and registers the server. Upgrade with `uv tool upgrade battlemap-mcp`.

### uvx, with nothing installed

Give your AI app the command `uvx` with the argument `battlemap-mcp`:

```text
claude mcp add --scope user battlemap -- uvx battlemap-mcp
codex mcp add battlemap -- uvx battlemap-mcp
```

For an app set up through a JSON file:

```json
{"mcpServers": {"battlemap": {"command": "uvx", "args": ["battlemap-mcp"]}}}
```

`uvx` goes on running the version it first downloaded. Write
`battlemap-mcp@latest` instead to take each new release as your app starts
the server, which then needs the network. If your app cannot find `uvx`, give
it the full path.

Install the mod with `uvx battlemap-mcp install`, or ask your assistant to
install the bridge. `setup` does not work through `uvx`, because it would
register a temporary file that uv may delete. The map-making skills still work:
the server hands them to your assistant.

### pip or pipx

```text
pipx install battlemap-mcp
```

or `python -m pip install battlemap-mcp` into a virtual environment you keep.
Then run `battlemap-mcp install` and `battlemap-mcp setup --client ...` as
above. Upgrade with `pipx upgrade battlemap-mcp` or
`python -m pip install --upgrade battlemap-mcp`.

## Finish and check

In Dungeondraft, under **Mods**, choose the mods folder the installer used, tick
**Battlemap MCP Bridge**, accept, quit and reopen Dungeondraft, then open a map. Then:

```text
battlemap-mcp doctor --live --brief
```

(With `uvx`, put `uvx` in front.) Quit and reopen your AI app after connecting
it.

**After every upgrade**, update the mod too: run `battlemap-mcp install
--force`, or ask your assistant to install the bridge, then restart
Dungeondraft. If you used `setup`, run it again with `--force` to update the
skills. Upgrade with your AI app closed; on Windows a running server cannot be
replaced.

Install it only one way. A second connection to the same AI app shows every tool
twice.

## No Python

The [GitHub releases](https://github.com/thekannen/battlemap-mcp/releases)
have a self-contained download that needs no Python or uv.

## More

- [Documentation](https://knownframe.com/battlemap-mcp/docs/)
- [Source, changelog and issues](https://github.com/thekannen/battlemap-mcp)
- [Privacy](https://knownframe.com/privacy/battlemap-mcp/)

MIT licensed. This is an independent, unofficial project, not sponsored,
operated or endorsed by Megasploot or Tailwind Games, LLC. It includes no
Dungeondraft software, maps or art.
