IDE Extensions
MockServer publishes IDE extensions so you can start, stop, and open the MockServer Dashboard without leaving your editor. Two extensions are available:
| IDE | Extension | Registry |
|---|---|---|
| VS Code (and Theia / Gitpod / Cursor) | mockserver.mockserver | VS Code Marketplace & Open VSX |
| IntelliJ IDEA (and all JetBrains IDEs) | com.mock-server.mockserver | JetBrains Marketplace |
Both extensions require Docker Desktop to be running when using the "Start MockServer" command. No Java or separate server installation is required — the extension pulls and starts the official mockserver/mockserver:7.1.0 Docker image automatically.
VS Code Extension
The MockServer extension for Visual Studio Code provides commands to manage MockServer Docker containers and JSON snippets to quickly author expectations in any .json file.
Installation
Install directly from within VS Code:
- Open the Extensions view (Cmd+Shift+X / Ctrl+Shift+X)
- Search for MockServer
- Click Install
Alternatively, install from the command line:
code --install-extension mockserver.mockserver
For Eclipse Theia, Gitpod, Cursor, and other Open VSX compatible editors, install from open-vsx.org.
Prerequisites
- VS Code 1.80+
- Docker Desktop installed and running
Commands
Open the Command Palette (Cmd+Shift+P / Ctrl+Shift+P) and type MockServer:
| Command | What it does |
|---|---|
| MockServer: Start (Docker) | Pulls and starts mockserver/mockserver:7.1.0 on port 1080 |
| MockServer: Stop | Stops the running MockServer container |
| MockServer: Open Dashboard | Opens the MockServer Dashboard at http://localhost:1080/mockserver/dashboard in your browser |
JSON Snippets
In any .json file, type one of the following prefixes and press Tab to expand a full expectation template:
| Prefix | Inserts |
|---|---|
| mockserver-expectation | A request matcher with an HTTP response action |
| mockserver-forward | A request matcher with a forward proxy action |
| mockserver-verify | A request verification template |
Quick Start
- Run MockServer: Start (Docker) from the Command Palette
- Create expectations by POSTing JSON to http://localhost:1080/mockserver/expectation, or use the JSON snippets to build them in a file
- Run MockServer: Open Dashboard to inspect recorded requests and active expectations
- Run MockServer: Stop when finished
IntelliJ / JetBrains Plugin
The MockServer plugin for IntelliJ IDEA (and all JetBrains IDEs) adds a Tools > MockServer menu and a persistent tool window in the bottom panel.
Installation
- Open Settings > Plugins > Marketplace (Ctrl+Alt+S then Plugins)
- Search for MockServer
- Click Install and restart the IDE
Prerequisites
- IntelliJ IDEA 2023.3+ (build 233+) or any JetBrains IDE on IntelliJ Platform 2023.3+
- Docker (for the "Start MockServer" action)
Features
| Action | Where | What it does |
|---|---|---|
| Open MockServer Dashboard | Tools > MockServer menu and tool window | Opens http://localhost:1080/mockserver/dashboard in the default browser |
| Start MockServer (Docker) | Tools > MockServer menu and tool window | Runs docker run -d --rm -p 1080:1080 mockserver/mockserver:7.1.0 |
The MockServer tool window appears in the bottom panel and provides button access to the same actions — useful without opening the Tools menu.
For more information see MockServer Dashboard and Running MockServer.