dsh-mt-mcp: Connecting to Mobile MT Manager MCP via DSH Settings Page

Preface

When connecting external MCPs in DeepSeek Harness (DSH), the common practice is to modify the profile patch and endpoint addresses via composition, followed by restarting the Host. MT Manager (MT) on a mobile phone typically runs a Streamable HTTP MCP, and the address is often a LAN IP, which changes with Wi-Fi switching, DHCP lease renewals, or hotspot activation. Editing YAML and restarting the service every time is inconvenient for daily debugging.

Below is an introduction to the community plugin dsh-mt-mcp (maintainer: aikunx). It moves the configuration of “which phone and port to connect to” into the Web settings page. Changes take effect immediately upon saving, requiring no DSH restart. Once connected, the capabilities exposed by MT appear as mcp__mt__* tools within the session, allowing you to use natural language to direct the agent to read mobile files, analyze APKs, manipulate ZIPs, and more.

What is this

dsh-mt-mcp is a client-side plugin package for DSH (current version 0.1.0, MIT License), categorized as a networking tool. It acts as an MCP client on the computer: you enter the MCP address displayed by MT on your phone (and an optional Bearer token) into Settings → MT Manager. The plugin handles the connection and registers MT’s tools into the current DSH session.

On the mobile side, you need MT Manager (Android) to start the MCP Service manually. The plugin does not implement file/APK/ZIP logic; it only forwards requests. The accessible paths are strictly determined by MT’s file access rules on the phone, which the plugin cannot bypass.

Core Features

Connection and Hot-Update Address in Settings Page

  • A MT Manager panel appears in the settings sidebar: enter the MCP address and optional token, then save and connect.
  • The address can be modified and saved at any time without restarting DSH; it disconnects the old connection and replaces the registered tools.
  • The panel displays connection status, discovered tool lists, and the config file path; the full token is never shown in plaintext in the output.

In-Session Tools

MT’s capabilities are roughly divided into three groups in DSH (by name prefix):

Prefix Function
mcp__mt__mt_file_* Mobile files: list directories, search by name/content/size/time, read/write text and binary, move/delete, create directories, etc.
mcp__mt__mt_apk_* APK: open workspace, analyze manifest/resources/smali/so, edit, repackage/sign, manage workspace
mcp__mt__mt_zip_* ZIP: browse, read entries, verify, create, add/delete/modify entries, extract

The plugin also provides two auxiliary tools: mt_mcp_status (address, connection status, tool count, recent errors) and mt_mcp_connect (reconnect using the saved address).

Testing on MT 2.26.x documents approximately 57 tools; the exact number depends on your mobile MT version.

Implementation and Dependencies

  • The protocol implementation is located in lib/mcp-http.js within the plugin, using Node’s built-in fetch. Aside from the @deepseek-ai/dsh-tools included with DSH, there are no other runtime third-party dependencies.
  • Requires DSH 0.2.0-rc.2 or higher (0.2.x); Node engine is ^22.19.0 || >=24.0.0.

Installation and Activation

Ensure that DSH opens normally on your machine first (e.g., dsh web). Follow the repository README for installation commands:

# Install from npm (Recommended)
dsh plugin --profile web add dsh-mt-mcp

# Or install from GitHub source
dsh plugin --profile web add github:aikunx/dsh-mt-mcp

If using a desktop profile, replace web with desktop in the command.

After installation, restart DSH and refresh the page; newly installed client plugins require a reload. Then, fill in the mobile address in Settings → MT Manager.

You can also add the market index in DSH plugin settings and install via Discover:

https://raw.githubusercontent.com/aikunx/dsh-mt-mcp/main/market.json

The plugin runs with the current dsh process privileges; it is recommended to review the source code and MIT License on the GitHub repository before installation to ensure compliance with your environment policy.

Typical Usage

1. Start MCP on the Phone

  1. MT Manager → Sidebar Tools → MCP Service → Start.
  2. Copy the address displayed by MT. Since DSH runs on the computer, a LAN address should be used, e.g., http://192.168.5.20:8787/mcp.
    - The /mcp suffix is required; the default port is 8787.
    - Do not use 127.0.0.1, as it points to the local computer, not the phone.

2. Save and Connect in DSH

Paste the address into Settings → MT Manager, optionally fill in the Bearer token, and click Save and Connect. A green status and a list of tools in the panel indicate a successful connection.

If MT has enabled Bearer verification under Settings → Authentication, fill in the token generated by MT; leaving it empty retains the current token, and only “Clear Token” will delete it.

3. Submit Requests Directly in Conversation

Once connected, you can drive mcp__mt__* tools using natural language. Examples from the README:

Read test.txt in MT's Home folder and summarize it. Don't modify anything yet.
Analyze the startup flow of the current APK and explain the relevant classes and methods.
Pack the project folder in Home into project.zip at the archive root.

In Chinese scenarios, you can describe paths and operations similarly, allowing the agent to select the corresponding MT tools for execution.

Use Cases and Notes

Who is it for

  • Those already using MT for APK/ZIP/local file processing who want to integrate these capabilities into DSH agent workflows.
  • Developers whose phone IP changes frequently and who wish to avoid repeatedly modifying composition and restarting the Host.

Access Scope (Configured on the Phone)

  • Default Home is /storage/emulated/0/MT2/mcp (can be modified in MT Settings → General).
  • The default read/write scope is primarily Home; reading directories outside Home requires adding rules in MT Settings → Files.
  • Files requiring “read-only protection” should be placed outside Home and authorized individually according to rules.

Network and Security

  • The phone and computer must be on the same LAN; guest Wi-Fi, AP isolation, or VPN may cause connection failures.
  • MT does not enable authentication by default; anyone on the LAN with port access can call it. Bearer does not encrypt HTTP; use it only on a trusted LAN, and do not expose port 8787 to the public internet.
  • Upon disconnection, the plugin retries with a backoff of 1s → 2s → 4s … up to a maximum of 30s, for a maximum of 10 times; after that, you can click “Reconnect” in the panel. Android background restrictions may kill the process; enabling the floating ball in MT and granting overlay permissions can improve survival.

Differences from the Built-in MCP Client

DSH’s built-in @deepseek-ai/dsh-mcp-client is still suitable for fixed endpoints; this plugin targets scenarios where “the mobile MCP address changes,” moving endpoint maintenance to the UI.

Conclusion

dsh-mt-mcp bridges the MCP capabilities of MT Manager on Android to DSH: enter the address in the settings page, modify it anytime, and enjoy restart-free operation, using mcp__mt__* within the session to manipulate mobile-side files, APKs, and ZIPs. Community directory page: SkillHub Plugin Page; Source code and full documentation: github.com/aikunx/dsh-mt-mcp.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye