JosmMCP is a plugin for JOSM, the Java-based editor for OpenStreetMap. It integrates JOSM with the Model Context Protocol (MCP), providing an HTTP server that allows external MCP clients to access JOSM features.
This plugin is currently in an experimental phase and is not suitable for production use. It serves as a proof-of-concept and does not adhere to zero trust principles. Users should be aware that it may lead to unexpected behaviors or errors.
After installing and loading the plugin in JOSM, it automatically starts an MCP server on port 3000. External MCP clients (such as AI assistants or other applications) can connect to http://localhost:3000/mcp and use the available tools to interact with JOSM.
Currently available tools:
get_josm_state: Retrieves the current state of JOSM, including version, downloaded layers, and data information.get_user_selection: Retrieves information about the currently selected OSM elements in JOSM, including tags.search_elements: Searches for OSM elements in the downloaded data using JOSM query syntax (e.g., 'highway=residential', 'amenity=restaurant').modify_tags: Modifies OSM elements: add/remove/set tags.- CRUD operations on Node, Ways, Relations (WIP)
-
Download the file
josm-latest.jarand place it in thelibfolder. -
Make sure you have Maven installed.
-
Build the main project with:
mvn clean package
The resulting jar with all dependencies will be in the target folder.
Copy the generated jar from target/ to your JOSM plugins directory, for example:
cp target/josmmcp-0.0.2-SNAPSHOT-jar-with-dependencies.jar ~/.local/share/JOSM/plugins/Disclaimer: JOSM and OpenStreetMap are trademarks of their respective owners. This project is not affiliated with or endorsed by the JOSM or OpenStreetMap projects.
For any issues or contributions, please refer to the repository or open an issue.