Whistle MCP Server
English | 中文
Project Introduction
Whistle MCP Server is a Whistle proxy management tool based on the Model Context Protocol (MCP), allowing AI assistants to directly operate and control local Whistle proxy servers. Through this tool, AI can help users manage rules, groups, values, monitor network requests, replay and modify requests, etc., without requiring manual operation of the Whistle interface. It greatly simplifies the process of network debugging, API testing, and proxy rule management, enabling users to complete complex network proxy configuration tasks through natural language interaction with AI.
Features
- Rule Management: Create, update, rename, delete, and enable/disable Whistle rules
- Group Management: Create, rename, delete groups, and associate operations between rules and groups
- Value Management: Create, update, rename, and delete values, with support for value group management
- Proxy Control: Enable/disable proxy, HTTP/HTTPS interception, HTTP/2 protocol, etc.
- Request Interception: View intercepted network request information, with URL filtering support
- Request Replay: Support for replaying captured requests with custom request parameters
- Multi-Rule Mode: Support for enabling/disabling multi-rule mode
Installation
Requirements
Node.js 18.20.0 or newer is required (see engines in package.json). Older versions are not supported.
Installing via Smithery
To install Whistle MCP Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @7gugu/whistle-mcp --client claude
Manual Installation
You can install Whistle MCP Server globally via npm:
npm install -g whistle-mcp-tool
Build from source
From the repository root:
npm install
npm run build
The build output entry is dist/index.js (the same file used by the whistle-mcp CLI after a global install). You can also point MCP config at it with node and the path to dist/index.js.
MCP Configuration
Transport (stdio vs HTTP)
By default the server uses stdio (suitable for local MCP clients such as Cursor).
To expose Streamable HTTP and SSE on the same process (for remote or HTTP-capable clients), use --transport http-stream. FastMCP then listens on --mcp-host / --mcp-port and serves:
- Streamable HTTP:
http://<mcp-host>:<mcp-port><mcp-endpoint>(default path/mcp) - SSE:
http://<mcp-host>:<mcp-port>/sse
Aliases for http-stream: sse, streamable-http (same mode; both URLs are available).
Whistle connection options are unchanged: --host, --port, --username / --password (or -n / -w).
Example (HTTP transport + local Whistle on 8899; MCP listens on 8085 by default):
whistle-mcp --transport http-stream --host 127.0.0.1 --port 8899
Use --mcp-port <port> to override the default 8085.
After installation, you can configure Whistle MCP in your MCP JSON configuration file:
{
"mcpServers": {
"whistle-mcp": {
"command": "whistle-mcp",
"args": [
"--host=<whistle server IP address>",
"--port=<whistle server port number>"
]
}
}
}
If you start Whistle with basic auth (same flags as the Whistle CLI: w2 start -n <username> -w <password>), pass the same credentials to this MCP server so HTTP requests to Whistle’s API succeed:
{
"mcpServers": {
"whistle-mcp": {
"command": "whistle-mcp",
"args": [
"--host=localhost",
"--port=8899",
"--username=<username>",
"--password=<password>"
]
}
}
}
Short options (aligned with w2): -n / -w are equivalent to --username / --password.
whistle-mcp --host localhost --port 8899 -n myuser -w mypass
Configuration Details
- host: Whistle server IP address; defaults to
localhostif omitted - port: Whistle server port; defaults to
8899if omitted - username (
-n/--username): Basic auth username when Whistle was started with-n; omit if Whistle has no login - password (
-w/--password): Basic auth password when Whistle was started with-w; if username is set but password is omitted, an empty password is sent
Configuring MCP JSON in AI Clients
- Claude Client: https://modelcontextprotocol.io/quickstart/user
- Raycast: Requires MCP plugin installation
- Cursor: https://docs.cursor.com/context/model-context-protocol#configuring-mcp-servers
MCP Tools Description
Whistle MCP Server provides the following tools, which can be called via the MCP protocol:
Rule Management
Group Management
Value Management
Proxy Control
Request Management
Utility
Contact Information
- Email: [email protected]
- Blog: https://7gugu.com