MCP server for msw
@JasonBoy
About MCP server for msw
Cli & MCP server for msw (Mock Service Worker) for AI Agents with dynamic mocking
Basic information
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"msw-mcp": {
"command": "npx",
"args": [
"msw-mcp@latest"
]
}
}
}Tools
5Add MSW request handlers to the browser service worker at runtime. Accepts JavaScript handler code strings that will be executed in the browser.
Reset MSW request handlers in the browser service worker. If no handlers provided, removes all runtime handlers and keeps only initial ones. If handlers provided, replaces all handlers with the new ones.
Remove specific MSW request handlers from the browser service worker by URL patterns and optional HTTP methods.
Update existing MSW request handlers by replacing handlers that match specified URL patterns with new handler code. This is an atomic operation that removes old handlers and adds new ones in a single transaction.
Get the current status of the MSW service worker, including connection state, worker status, and active handlers.
Overview
What is MCP server for msw?
MCP server for msw is a Model Context Protocol server that bridges AI agents with Mock Service Worker (MSW). It enables dynamic addition, updating, and removal of MSW network mocks directly from an AI assistant or command line, without restarting the application.
How to use MCP server for msw?
Register the server in your MCP client using the command npx msw-mcp@latest. Then use the /msw-setup prompt to scaffold the browser‑side integration (requires msw, @msw-mcp/client, and the worker bridge). Alternatively, use the msw-cli for terminal control.
Key features of MCP server for msw
- Generate MSW handlers with AI assistance
- Update mocks without reloading the page
- WebSocket bridge between CLI/MCP and the browser
- Scaffold MSW setup with
/msw-setupprompt - Terminal and script control via
msw-cli - Configurable port, persistence, and client targeting
Use cases of MCP server for msw
- Let AI agents dynamically mock API responses during development
- Update network mocks live while a user is testing an application
- Scaffold a complete MSW setup in a new project without manual steps
- Control mock handlers from CI scripts or automated test suites
FAQ from MCP server for msw
What is the difference between msw-cli and msw-mcp?
msw-cli is a command‑line tool for terminal and script control; msw-mcp is the MCP server that enables AI assistants to manage mocks via MCP tools. Both use the same WebSocket bridge and core daemon.
Does MCP server for msw require a browser?
Yes. The server depends on MSW running in a browser environment, and the @msw-mcp/client package must be loaded in the page to receive updates via the WebSocket bridge.
How do I install and configure MCP server for msw?
Install by registering the server in your MCP client config with "command": "npx", "args": ["msw-mcp@latest"]. Then run the /msw-setup prompt in the assistant to follow the scaffold steps.
What runtime dependencies does MCP server for msw have?
It requires Node.js (for the MCP server) and the browser to load msw, @msw-mcp/client, and the worker file. The server is published on npm as msw-mcp.
What transport does MCP server for msw use?
The MCP server communicates via stdio (standard input/output) with the MCP client. The browser bridge uses WebSocket.
More Other MCP servers
MCP Go 🚀
mark3labsA Go implementation of the Model Context Protocol (MCP), enabling seamless integration between LLM applications and external data sources and tools.
Activepieces
activepiecesAI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
MCP Toolbox for Databases
googleapisMCP Toolbox for Databases is an open source MCP server for databases.
Codelf
unbugA search tool helps dev to solve the naming things problem.
Awesome Mlops
visengerA curated list of references for MLOps
Comments