mihomo-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MIHOMO_HOST | No | The host of the mihomo external controller. | 127.0.0.1 |
| MIHOMO_PORT | No | The port of the mihomo external controller. | 9090 |
| MIHOMO_SECRET | No | The external-controller-secret of mihomo, if set. | |
| MIHOMO_TIMEOUT | No | Timeout for requests to mihomo in seconds. | 10 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| versionA | Return mihomo-mcp package version and connected mihomo version. |
| proxy_listA | List all proxy groups with their current selection and node count. Returns a list of groups, each with: name, type, current (the active proxy), and the number of available nodes. Selector/URLTest groups show all options; Direct/Reject/Compatible show a single fixed value. |
| proxy_selectA | Switch a Selector/URLTest group to a specific proxy. Args: group: the group name (e.g. "GLOBAL", "Manual") proxy: the proxy name to select (e.g. "ðŸ‡ðŸ‡°é¦™æ¸¯01 [1×] - Lv.4") Returns the new selection. Mihomo returns 400 if the proxy is not in the group's all-list (case-sensitive). |
| proxy_testA | Test latency (ms) for a single proxy. Args: proxy: proxy name (must match an entry in a group's all-list) url: target URL, default is gstatic.com/generate_204 (used by mihomo itself) timeout_ms: per-test timeout in milliseconds (default 5000) Returns the delay in ms, or {"delay": -1} if the test failed. |
| proxy_test_groupA | Test latency of every proxy in a group, sorted by delay (fastest first). Args: group: the selector group to test url: target URL timeout_ms: per-proxy timeout concurrency: max parallel probes (default 8) Returns a list of {name, delay_ms, ok} sorted by delay. Failed probes show delay=-1 and are placed at the end. |
| provider_listA | List all proxy providers with node counts and last update info. Returns: list of {name, type, vehicle_type, node_count, updated_at}. |
| provider_healthcheckA | Trigger health check on a provider (force-refresh + delay measurement). Args: provider: provider name (e.g. "MyVPN") Returns a no-content confirmation (mihomo returns 204). The actual health state is observable via provider_list. |
| provider_update_urlA | Update a provider's subscription URL and trigger a refresh. Args: provider: provider name url: new subscription URL (forwarded to mihomo, never persisted) The URL is sent to mihomo via PUT and used immediately. It is not cached, logged, or written to disk by this server. |
| mode_setA | Switch operating mode: rule (default), global, or direct. Args: mode: one of "rule", "global", "direct"
|
| connections_listA | List active connections (source ip, host, rule, chains, upload, download). Returns a list of connection objects. An empty list means no active connections (mihomo returns {connections: null} on idle). |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 10 tools
Each tool targets a distinct resource+action: proxy_test vs proxy_test_group are clearly separate (single proxy vs group), provider_list/healthcheck/update_url each cover a unique provider operation, and mode_set, connections_list, and version are unambiguous. No two tools could be easily confused.
Names are mostly snake_case with a resource prefix and a verb (proxy_list, proxy_select, provider_update_url, mode_set), but 'version' is a bare noun and 'provider_healthcheck' is a compound rather than a clear verb_noun pattern. The slight inconsistencies are minor and do not harm readability.
10 tools is within the well-scoped 3-15 range. Each tool serves a meaningful operational purpose for controlling a mihomo proxy client, with no redundancy or bloat.
Core proxy operations are covered: list proxies, select proxy, test single/group latency, manage providers, set mode, view connections, and version. Missing features like config read/write or connection termination are minor gaps that do not block primary workflows.