MCP server for msw
@JasonBoy
关于 MCP server for msw
Cli & MCP server for msw (Mock Service Worker) for AI Agents with dynamic mocking
基本信息
配置
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"msw-mcp": {
"command": "npx",
"args": [
"msw-mcp@latest"
]
}
}
}工具
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.
概览
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.
其他 分类下的更多 MCP 服务器

Sequential Thinking
modelcontextprotocolModel Context Protocol Servers
ICSS
chokcoco不止于 CSS

EverArt
modelcontextprotocolModel Context Protocol Servers
MCP Registry
modelcontextprotocolA community driven registry service for Model Context Protocol (MCP) servers.
AutoBrowser MCP
autobrowser-aiBrowser MCP is a Model Context Provider (MCP) server that allows AI applications to control your browser
评论