Enable the beta flag
- Open Preferences.
- Go to Beta.
- Turn on Mock Server.
Create from a collection (saved examples)
Use this path when the collection already has saved response examples.- Open the collection.
- In the sidebar, expand Mock Servers and click the + icon to create a new mock server.
- Enter a Name.
- Under Source, select Collection and pick the collection.
- Keep Sync mock responses with collection examples checked, then click Create. Every saved example becomes a mock response (method, path, status, headers, and body). If you uncheck it, you can sync later from the dashboard with Sync with Examples.
- Click Start Server to start the mock server on the saved port. If the port is already in use, change it under Mock Server Settings (gear icon) → Advanced settings.
Create from an OpenAPI spec
Use this path when you have an API spec in the workspace. Turn on API Spec under Preferences → Features if it is not already enabled.- Load the spec under API Specs in the sidebar (if it is not already there).
- Create a mock server. Under Source, select API Spec and pick the spec.
- Keep Sync mock responses with API spec checked, then click Create. Each operation and response status becomes a mock response; bodies are derived from the schema where possible. If you uncheck it, you can generate later from the dashboard with Generate from API Spec.
- Click Start Server to start the mock server on the saved port. If the port is already in use, change it under Mock Server Settings (gear icon) → Advanced settings.
Create a standalone (manual) mock
To add responses yourself instead of syncing from a collection or spec:- Click + under Mock Servers.
- Enter a Name.
- Under Source, select Standalone.
- Optionally set Port and Response delay under Advanced settings.
- Click Create, then add responses from the Responses tab.
Port validation
The port must be a whole number between 1 and 65535. Bruno validates the port when you create, clone, or edit a mock server and when you start it, and shows an error if the port is already used by another mock server in Bruno or by another process on your system.Where Bruno store mock servers
Mock servers are stored in the workspace at the root of the mocks folder. After creation, the mock server is saved as a .yml file.Next steps
- Run a mock server — start, stop, and manage mock servers from the dashboard