Mocktail – Self-hosted mock API server with built-in dashboard
A free, open-source mock API server that runs as a single ~25 MB binary. Define endpoints, generate realistic data, inspect live traffic, and create mocks via AI or MCP — no signup, no cloud, runs anywhere.
TL;DR
TL;DR: Mocktail is a free, self-contained mock API server that ships as a single ~25 MB binary with a built-in web dashboard — define endpoints, generate realistic fake data, and inspect live traffic with zero configuration.
What Is Mocktail?
Mocktail is an open-source mock API server that lets you spin up realistic API endpoints without writing a single line of code. It runs as a standalone binary — download, double-click, and a dashboard opens in your browser. Behind the scenes, a Go-based HTTP server handles requests while a React dashboard lets you configure endpoints, response bodies, status codes, headers, and latency.
The tagline on the site sums it up:
“Whip up a mock API.”
Key capabilities as described on getmocktail.com:
- Define REST endpoints with custom response bodies, status codes, and headers
- Generate realistic fake data (names, addresses, UUIDs, etc.)
- Inject artificial latency per endpoint to simulate real-world conditions
- Inspect all incoming request traffic live in the dashboard
- Create and manage mocks using AI or via the Model Context Protocol (MCP)
- Shipped as a single ~25 MB binary — no database, no dependencies
Setup
Mocktail is distributed as a standalone binary with no runtime dependencies. There are no install scripts, no package managers required, and no cloud sign-up.
macOS / Linux
Download the latest release from the GitHub releases page:
# Replace VERSION with the latest tag (e.g., v1.2.0)
curl -fsSL https://github.com/Huseyinnurbaki/mocktail/releases/download/v1.0.0/mocktail-linux-amd64 -o mocktail
chmod +x mocktail
./mocktail
After launching, the dashboard is available at http://localhost:3999 by default.
Docker
Mocktail also ships as a Docker image for containerized environments:
docker run -d -p 3999:3999 \
-v $(pwd)/data:/app/data \
--name mocktail \
ghcr.io/huseyinnurbaki/mocktail:latest
The -v flag persists mock configurations across restarts.
Homebrew (macOS)
If you prefer Homebrew:
brew install mocktail
mocktail
Verify the binary
After launching, the dashboard opens automatically:
✓ Mocktail is running at http://localhost:3999
The web interface is where all endpoint configuration happens.
Core Workflow
Creating an endpoint
- Open
http://localhost:3999in your browser - Click New Endpoint in the top-right corner
- Set the HTTP method (GET, POST, PUT, DELETE, etc.), URL path, response status code, and JSON body
- Click Save — the endpoint is live immediately
Adding latency simulation
To test how your client handles slow responses, open the endpoint editor and set a Delay (ms) value. For example, 2000 to simulate a 2-second network delay.
Inspecting live traffic
Switch to the Traffic tab in the sidebar. Every incoming request is logged in real time with timestamp, method, path, headers, and body. This is useful for debugging what your client is actually sending.
Using AI to generate mocks
Click the AI button in the endpoint editor and describe the mock you want in plain text. Mocktail generates a realistic response structure using the AI provider you have configured. This requires an API key for your chosen provider.
MCP integration
Mocktail supports the Model Context Protocol, allowing you to manage mocks programmatically from AI agents or MCP-compatible tooling.
Practical Evaluation Checklist
- Download size: ~25 MB binary — dramatically smaller than alternatives like json-server (Node.js runtime + npm overhead)
- Zero config: Runs immediately after download, no environment variables needed to start
- Dashboard: Built-in web UI for all configuration (no CLI-only workflow)
- Latency injection: Per-endpoint delay control for simulating real network conditions
- Traffic inspector: Live request log — useful for debugging client payloads
- AI-assisted mocking: Generate realistic response structures via natural language
- MCP support: Programmatic mock management for AI agent workflows
- Self-contained: No external database — mock configurations are stored in a local SQLite database managed by the binary
- Cross-platform: Linux, macOS, Docker, and Homebrew
Security Notes
- Mocktail listens on
localhostby default, which prevents external access to the dashboard - If deploying in a shared or networked environment, bind explicitly to a private interface and consider firewall rules
- The AI-assisted mock generation requires an API key for your chosen AI provider — store it securely, never commit it to version control
- No authentication is built into the dashboard by default — do not expose the Mocktail port to untrusted networks
FAQ
Q: Is Mocktail really free? A: Yes. Mocktail is free and open source on GitHub. There is no sign-up, no paid tier, and no cloud dependency. Run it on your laptop or your own servers.
Q: How does it compare to tools like Prism or json-server? A: Mocktail is a self-contained binary with a web dashboard, while json-server requires Node.js and a JSON file as config. Prism (from Stoplight) is more feature-rich but heavier. Mocktail’s advantage is simplicity — download and run.
Q: Can I use it in CI/CD pipelines?
A: Yes. The binary can run headlessly in CI environments. You can pre-seed mock configurations and have your tests hit localhost:3999 directly.
Q: Does it support HTTPS? A: The dashboard runs over HTTP locally. For HTTPS in production, place Mocktail behind a reverse proxy like Caddy or nginx.
Q: What happens to my mocks when I restart the binary? A: With Docker and a volume mount, mock configurations persist. Without Docker, configurations are stored in a local SQLite database in the application directory.
Source and Accuracy Notes
- Project page: getmocktail.com
- Source repository: github.com/Huseyinnurbaki/mocktail
- License: MIT (verified via GitHub API
license.spdx_id) - Stars: 275 (GitHub API, as of 2026-09-02)
- Topics: docker, go, gofiber, json-server, kubernetes, mock, mock-api, mock-data, mock-server, react
- Default branch:
master - HN launch thread: news.ycombinator.com/item?id=42019573 (25 points)
Related Posts
ai-setup
Recall – Persistent Memory for Claude Code via MCP Hooks
Recall gives Claude Code a permanent memory store that survives session restarts and context compaction. Four hooks capture and restore context automatically — with cloud SaaS or self-hosted options.
2/28/2026
dev-tools
Automotive Skills Suite for AI Engineering
Evaluate Automotive Skills Suite for APQP, ASPICE, HARA, safety-plan, and DIA workflows with setup notes, governance risks, and SME review guidance.
5/28/2026
dev-tools
awesome-agentic-ai-zh Roadmap Guide
Explore awesome-agentic-ai-zh as a Chinese agentic AI learning roadmap, with setup notes, track selection, study workflow, and evaluation guidance.
5/28/2026