mihomo-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mihomo-mcpTest all proxies in the group and switch to the fastest"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mihomo-mcp
Bridge mihomo (clash meta) RESTful API to Model Context Protocol. Switch proxies, refresh subscriptions, monitor traffic — directly from your AI client.
Status: v0.1.0 (public) — 9 tools, 17 tests, verified on mihomo v1.19.24
What is mihomo-mcp?
mihomo exposes a powerful RESTful API on 127.0.0.1:9090 (external-controller). This package wraps that API as MCP tools, so an AI client (Claude Code, OpenClaw, Cursor, etc.) can:
List and switch proxy groups
Test proxy latency
Refresh provider subscriptions
Update provider subscription URL (without restart in many cases)
Set operating mode (rule / global / direct)
Inspect active connections
Related MCP server: MCP Bridge Server
Requirements
Python 3.10+
mihomo running with
external-controllerenabledAn MCP-compatible client (OpenClaw, Claude Code, Claude Desktop, etc.)
Not affiliated with mihomo. This is a community project.
Installation
# Recommended (uv)
uv tool install mihomo-mcp
# Or pip
pip install mihomo-mcp
# Or from source
git clone https://github.com/Aris-qin/mihomo-mcp.git
cd mihomo-mcp
pip install -e .Configuration
# ~/.config/mihomo-mcp/config.yaml
mihomo:
host: 127.0.0.1
port: 9090
secret: "" # if mihomo has external-controller-secret
timeout: 10Environment variables override file values:
Var | Default |
|
|
|
|
| (empty) |
|
|
Register with OpenClaw
In openclaw.json:
{
"mcp": {
"servers": {
"mihomo": {
"type": "stdio",
"command": "mihomo-mcp",
"env": {
"MIHOMO_HOST": "127.0.0.1",
"MIHOMO_PORT": "9090"
}
}
}
}
}Register with Claude Desktop
Edit claude_desktop_config.json:
{
"mcpServers": {
"mihomo": {
"command": "mihomo-mcp",
"env": {
"MIHOMO_HOST": "127.0.0.1",
"MIHOMO_PORT": "9090"
}
}
}
}Tools
Tool | Description |
| List all proxy groups and their current selection |
| Switch a selector group to a specific proxy |
| Test latency of a single proxy |
| Test all proxies in a group, sorted by latency |
| List providers (subscriptions) and node counts |
| Trigger health check on a provider |
| Update provider's subscription URL and refresh |
| Switch operating mode (rule / global / direct) |
| List active connections |
Security & Privacy
No subscription URL is persisted. The
provider_update_urltool receives a URL via MCP, forwards it to mihomo, and discards it. Nothing is logged or written to disk.Default host is
127.0.0.1. Overriding host to a public IP is not recommended and may be rejected in future versions.No credentials stored. If your mihomo has
external-controller-secret, pass it viaMIHOMO_SECRETenv var — never in config files checked into version control.No traffic proxying. This package only manages mihomo state — it does not forward your traffic.
Not affiliated with mihomo. Community project, MIT licensed.
License
MIT — see LICENSE.
Contributing
PRs welcome after the initial public release. Please open an issue first for major changes.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceA Model Context Protocol Server that enables LLMs to interact with and execute REST API calls through natural language prompts, supporting GET/PUT/POST/PATCH operations on configured APIs.Last updated6Apache 2.0
- FlicenseBqualityDmaintenanceA macOS-native bridge server that enables communication between different AI clients like Claude and Cline, allowing them to interact with each other through the Model Context Protocol.Last updated23
- Flicense-qualityDmaintenanceA Python server implementing the Model Context Protocol that exposes tools for querying external APIs, compatible with Claude Desktop and ChatGPT Desktop.Last updated
- AlicenseAqualityDmaintenanceA Model Context Protocol server that enables AI assistants to make HTTP requests (GET, POST, PUT, DELETE) to external APIs through standardized MCP tools.Last updated42MIT
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
Connect AI agents to Replynodes over the Model Context Protocol.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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