Skip to Content
FeaturesMCP Server

MCP Server

BetaiOS/tvOS5.1+macOS5.1+
  • POST /mcp

Stash provides an MCP server through its control API, so AI agents such as Claude Code can inspect and control a running Stash directly:

  • View runtime state and switch the outbound mode
  • View, test, and switch proxy groups
  • Match rules and apply temporary overrides
  • Diagnose DNS, proxies, and network connectivity
  • View and close connections, and read live logs
  • Update remote resources
  • Capture HTTP traffic and test scripts and rewrite rules against the recorded requests and responses
  • Run scripts and view script logs
  • On macOS, view the LAN gateway and its devices

Enabling the Server

  • iOS: In “Settings” - “External Access”, turn on “Allow External Control”, set an “API Secret”, then turn on “Enable MCP Server”. The page shows the “MCP Address”.
  • macOS: In “Settings” - “External Access”, set an “API Secret”, then turn on “Enable MCP Server”. Agents on the same Mac can use the “MCP Address” shown on the page, for example http://127.0.0.1:9090/mcp. To connect from other devices on the local network, also turn on “Allow External Control”.

If the server is not enabled or these conditions are not met, requests to /mcp return 403.

Connecting a Client

The server uses HTTP transport and the same authentication as the HTTP API: requests must carry Authorization: Bearer <API secret>. Enter the “MCP Address” and “API Secret” in your client to connect.

Add the server in Claude Code:

claude mcp add --transport http stash http://192.168.1.10:9090/mcp --header "Authorization: Bearer <API secret>"

Generic JSON client configuration:

{ "mcpServers": { "stash": { "type": "http", "url": "http://192.168.1.10:9090/mcp", "headers": { "Authorization": "Bearer <API secret>" } } } }

Each tool is annotated as read-only, state-changing, or destructive, so clients can ask for confirmation before running it.

The API secret grants full control of Stash, so only expose the server on trusted networks.

Last updated on