Mokky Buddy API Runner




Mokky Buddy API Runner is a VS Code extension that lets you run a local mock API server, manage endpoints, and preview responses directly inside your editor.
Features
- Start/stop a local mock server with a single click.
- Configure the server port individually.
- Add, edit, and delete API endpoints.
- Load and save API configurations in JSON format.
- Tree view UI to browse servers and APIs.
- Preview JSON responses and schemas directly in VS Code.
- Output channel logs server and API events.
- Quick action icons next to server name: Add, Load, Save.
➡️ See the complete list in FEATURES.md.
Installation
- Install from VS Code Marketplace or using the VSIX.
- Make sure Java JDK 17 is installed.
- Configure
mokkyBuddy.javaPath
in settings if needed.
Quick Start
- Open Mokky Buddy Server View from the sidebar.
- Your server appears as
Localhost:PORT
with action icons:
- ➕ Add: Add a new API
- 📂 Load: Load API config from JSON
- 💾 Save: Save API config to JSON
- Click ▶ Start Server to start the mock server.
- Expand API endpoints to view response, expected body, schema, and delete API.
- Change the server port via Change Port command (
Ctrl+Shift+P
).
Example JSON Configuration
[
{
"method": "GET",
"path": "/api/user/",
"response": [
{ "id": 1, "name": "Alice" },
{ "id": 2, "name": "Bob" }
]
},
{
"method": "GET",
"path": "/api/post/",
"response": [
{ "id": 1, "title": "Hello World" }
]
},
{
"method": "POST",
"path": "/api/user/",
"expectedBody": { "name": "string" },
"response": { "id": 3 },
"jsonSchema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"required": ["name"],
"properties": { "name": { "type": "string" } }
}
}
]
Commands
Mokky Buddy: Toggle Server
— Start/stop server
Mokky Buddy: Add API
— Add a new API endpoint
Mokky Buddy: Delete API
— Remove an API endpoint
Mokky Buddy: Save API Config
— Save config to file
Mokky Buddy: Load API Config
— Load config from file
Mokky Buddy: Preview JSON
— Preview JSON response or schema
Mokky Buddy: Change Port
— Change server port
Configuration
Setting |
Type |
Description |
mokkyBuddy.javaPath |
string |
Path to Java executable |
mokkyBuddy.serverPort |
number |
Default port for server |
Requirements
- VS Code 1.70+
- Java JDK 17
Changelog
Keep track of releases, fixes, and improvements.
See CHANGELOG.md for full details.
Security
If you discover a vulnerability, please report it responsibly.
Read the policy in SECURITY.md.
Contributing
Contributions welcome! Please follow the existing coding style and open an issue or PR on GitHub.
License
MIT License