Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MIHOMO_HOSTNoThe host of the mihomo external controller.127.0.0.1
MIHOMO_PORTNoThe port of the mihomo external controller.9090
MIHOMO_SECRETNoThe external-controller-secret of mihomo, if set.
MIHOMO_TIMEOUTNoTimeout 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

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
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"

  • rule: use rules to decide what goes through proxy

  • global: all traffic through proxy

  • direct: all traffic bypasses proxy

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

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Aris-qin/mihomo-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server