Android MCP Server 标志

Android MCP Server

社区
jduartedj

MCP server for Android device control via ADB - supports screenshot, touch, and swipe actions

发布者jduartedj
代码仓库android-mcp-server
语言TypeScript
复刻数
2
星标数
6
可用工具
0
传输类型stdio
分类
许可协议MIT
链接
  • 将工具接入 AI 工作流

    Android MCP Server 提供 MCP 功能,可供兼容的 AI 客户端和智能体使用。

  • 0 个可用工具

    浏览下方可调用的操作;如果服务器提供了名称和描述,也会一并显示。

  • 可直接复制的配置

    使用安装配置片段,在您首选的 MCP 客户端中配置此服务器。

  • 开源社区热度

    关联的代码仓库有 6 个 Star 和 2 个 Fork。

Android MCP Server

A Model Context Protocol (MCP) server providing comprehensive Android device control with 22 powerful tools for UI automation, screen capture, and ultra-fast H.264 streaming via Scrcpy.

Features

  • 📸 Screenshots: Capture screenshots from Android devices
  • 👆 Touch & Gestures: Simulate touch, long press, swipe, and multi-point interactions
  • ⌨️ Text Input & Key Events: Direct text input and key event simulation (2 tools)
    • Send key events (HOME, BACK, ENTER, etc.)
    • Input text directly into focused fields
  • 🔧 Generic ADB Commands: Execute any ADB command with custom parameters (1 tool)
    • Full flexibility for agents to run custom ADB operations
    • Access to all ADB functionality (logcat, shell commands, package manager, etc.)
  • 🎯 UIAutomator: Full UI hierarchy inspection and element interaction (10 tools)
    • Dump complete XML UI hierarchy
    • Find elements by resource ID or text
    • Click, double-click, long-click on elements
    • Set/clear text in input fields
    • Toggle checkboxes
    • Wait for elements to appear
    • Scroll within specific elements
  • ⚡ Scrcpy Streaming: Ultra-fast H.264 video streaming (4 tools)
    • Start/stop H.264 video streams (~2s setup, <50ms frame polling)
    • Capture single frames (100-300ms) or latest stream frames (<50ms)
    • Dramatically faster than screenshot capture
  • 🚀 App Management: Launch apps and list installed packages
  • 🔌 ADB Integration: Direct integration with Android Debug Bridge
  • ⚡ Auto-Download: Automatically downloads ADB and Scrcpy from official sources

Prerequisites

  • Node.js 18 or higher
  • Android device connected via USB with USB debugging enabled, or emulator running

Note: ADB (Android Debug Bridge) and Scrcpy are optional - the server automatically downloads them from official sources on first use if needed.

Quick Start

  1. Clone and Build

    bash
    git clone https://github.com/jduartedj/android-mcp-server.git
    cd android-mcp-server
    npm install
    npm run build
  2. Test the Server

    bash
    node dist/index.js

    The server will start and automatically download ADB/Scrcpy if needed.

  3. Add to VS Code (see VS Code Integration below)

Installation

bash
npm install
npm run build

Usage

Running the Server Standalone

bash
node dist/index.js

Configuration

The server supports the following environment variables:

  • ADB_PATH: Custom path to ADB executable (default: uses system PATH or auto-downloads)
  • DEVICE_SERIAL: Specific device serial number to target (default: first available device)

VS Code Integration

Adding to VS Code GitHub Copilot

To use this MCP server with GitHub Copilot in VS Code:

  1. Open VS Code Settings (Ctrl+, or Cmd+,)

  2. Search for MCP or navigate to: GitHub Copilot > Chat > MCP Servers

  3. Edit the MCP configuration by clicking "Edit in settings.json"

  4. Add the Android MCP Server to your configuration:

json
{
  "github.copilot.chat.mcp.servers": {
    "android-mcp-server": {
      "command": "node",
      "args": ["F:\\android-mcp-server\\dist\\index.js"],
      "env": {
        "ADB_PATH": "",
        "DEVICE_SERIAL": ""
      }
    }
  }
}

Note: Replace F:\\android-mcp-server\\dist\\index.js with the actual absolute path to your dist/index.js file. Use double backslashes on Windows.

  1. Alternative: Using npx (if published to npm):
json
{
  "github.copilot.chat.mcp.servers": {
    "android-mcp-server": {
      "command": "npx",
      "args": ["-y", "android-mcp-server"]
    }
  }
}
  1. Reload VS Code or restart the GitHub Copilot extension

Verifying the Integration

After adding the server:

  1. Open GitHub Copilot Chat in VS Code
  2. Type @workspace and you should see the Android MCP tools available
  3. Try asking: "Take a screenshot of my Android device"
  4. Copilot will use the appropriate tool to capture the screen

Example Prompts for Copilot

Once integrated, you can ask GitHub Copilot:

  • "Take a screenshot of my Android device"
  • "Start streaming my device screen for real-time monitoring"
  • "Get the latest frame from the stream"
  • "Tap at coordinates 500, 1000 on my phone"
  • "Swipe up on my Android screen"
  • "Press the back button on my device"
  • "Send the home key event"
  • "Type 'hello world' into the current field"
  • "Press enter to submit the form"
  • "Get the device battery status using ADB"
  • "Read the logcat output for debugging"
  • "Clear the app data for com.example.app"
  • "List all installed packages"
  • "Launch the Chrome app"
  • "Find the login button and click it"
  • "Fill in the email field with user@example.com"
  • "Dump the UI hierarchy of the current screen"
  • "Long press on the menu button"
  • "Scroll down in the settings list"
  • "Toggle the enable notifications checkbox"
  • "Wait for the loading indicator to disappear"

All 22 MCP Tools

Basic Tools (5)

1. android_screenshot

Capture a screenshot from the Android device.

Parameters:

  • outputPath (optional): Local path to save the screenshot. If not provided, returns base64 encoded image.
  • deviceSerial (optional): Target specific device by serial number

Performance: ~1-2 seconds per capture

Example:

json
{
  "name": "android_screenshot",
  "arguments": {
    "outputPath": "./screenshot.png"
  }
}

2. android_touch

Simulate a touch event at specific screen coordinates. Supports both quick taps and long presses.

Parameters:

  • x (required): X coordinate
  • y (required): Y coordinate
  • duration (optional): Touch duration in milliseconds (default: 100ms for tap, >100ms for long press)
  • deviceSerial (optional): Target specific device by serial number

Performance: Immediate

Example - Quick Tap:

json
{
  "name": "android_touch",
  "arguments": { "x": 500, "y": 1000, "duration": 100 }
}

Example - Long Press:

json
{
  "name": "android_touch",
  "arguments": { "x": 500, "y": 1000, "duration": 2000 }
}

3. android_swipe

Perform a swipe gesture between two coordinates.

Parameters:

  • startX (required): Starting X coordinate
  • startY (required): Starting Y coordinate
  • endX (required): Ending X coordinate
  • endY (required): Ending Y coordinate
  • duration (optional): Swipe duration in milliseconds (default: 300)
  • deviceSerial (optional): Target specific device by serial number

Performance: Immediate

Example:

json
{
  "name": "android_swipe",
  "arguments": {
    "startX": 500, "startY": 1500, "endX": 500, "endY": 500, "duration": 300
  }
}

4. android_launch_app

Launch an Android app by package name.

Parameters:

  • packageName (required): Package name of the app (e.g., com.example.app, com.google.android.apps.maps)
  • deviceSerial (optional): Target specific device by serial number

Performance: ~1-2 seconds

Example:

json
{
  "name": "android_launch_app",
  "arguments": { "packageName": "com.example.app" }
}

5. android_list_packages

List installed packages on the Android device with optional filtering.

Parameters:

  • filter (optional): Search filter for package names (case-insensitive)
  • deviceSerial (optional): Target specific device by serial number

Performance: Medium (retrieves full package list)

Example - List All Packages:

json
{
  "name": "android_list_packages",
  "arguments": {}
}

Example - Filter Packages:

json
{
  "name": "android_list_packages",
  "arguments": { "filter": "google" }
}

Text Input & Key Event Tools (2)

6. android_input_text

Input text into the currently focused field on the Android device via ADB.

Parameters:

  • text (required): Text to input. Spaces are automatically handled.
  • deviceSerial (optional): Target specific device by serial number

Performance: Immediate

Use Cases:

  • Quick text input without UIAutomator
  • Inputting text when element resource ID is unknown
  • Simple form filling
  • Command-line style text entry

Example:

json
{
  "name": "android_input_text",
  "arguments": {
    "text": "user@example.com"
  }
}

7. android_send_key_event

Send a key event to the Android device (e.g., HOME, BACK, ENTER).

Parameters:

  • keyCode (required): Key event code. Can be key name (e.g., KEYEVENT_HOME, KEYEVENT_BACK) or numeric code (e.g., 3 for HOME, 4 for BACK)
  • deviceSerial (optional): Target specific device by serial number

Performance: Immediate

Common Key Codes:

  • KEYEVENT_HOME or 3 - Home button
  • KEYEVENT_BACK or 4 - Back button
  • KEYEVENT_ENTER or 66 - Enter/Return key
  • KEYEVENT_DEL or 67 - Delete key
  • KEYEVENT_MENU or 82 - Menu button
  • KEYEVENT_VOLUME_UP or 24 - Volume up
  • KEYEVENT_VOLUME_DOWN or 25 - Volume down
  • KEYEVENT_POWER or 26 - Power button

Use Cases:

  • Navigation (HOME, BACK)
  • Submitting forms (ENTER)
  • Controlling device functions (VOLUME, POWER)
  • Keyboard shortcuts

Example:

json
{
  "name": "android_send_key_event",
  "arguments": {
    "keyCode": "KEYEVENT_BACK"
  }
}

Generic ADB Command Tool (1)

8. android_execute_command

Execute a generic ADB command with custom arguments. This powerful tool gives agents full flexibility to run any ADB command with their own parameters.

Parameters:

  • args (required): Array of ADB command arguments (e.g., ["shell", "pm", "list", "packages"])
  • deviceSerial (optional): Target specific device by serial number

Performance: Varies by command

Returns: Both stdout and stderr from the command execution

Use Cases:

  • Execute custom shell commands
  • Access logcat for debugging
  • Manage packages (install, uninstall, clear data)
  • Query device properties
  • File operations (push, pull)
  • Network operations (port forwarding)
  • Any ADB functionality not covered by specific tools

Common Examples:

List all packages:

json
{
  "name": "android_execute_command",
  "arguments": {
    "args": ["shell", "pm", "list", "packages"]
  }
}

Get device properties:

json
{
  "name": "android_execute_command",
  "arguments": {
    "args": ["shell", "getprop", "ro.build.version.release"]
  }
}

Read logcat:

json
{
  "name": "android_execute_command",
  "arguments": {
    "args": ["logcat", "-d", "-s", "MyTag:V"]
  }
}

Clear app data:

json
{
  "name": "android_execute_command",
  "arguments": {
    "args": ["shell", "pm", "clear", "com.example.app"]
  }
}

Get battery info:

json
{
  "name": "android_execute_command",
  "arguments": {
    "args": ["shell", "dumpsys", "battery"]
  }
}

Push file to device:

json
{
  "name": "android_execute_command",
  "arguments": {
    "args": ["push", "/local/path/file.txt", "/sdcard/file.txt"]
  }
}

Install APK:

json
{
  "name": "android_execute_command",
  "arguments": {
    "args": ["install", "-r", "/path/to/app.apk"]
  }
}

Port forwarding:

json
{
  "name": "android_execute_command",
  "arguments": {
    "args": ["forward", "tcp:8080", "tcp:8080"]
  }
}

UIAutomator Tools (10)

9. android_uiautomator_dump

Dump the complete UI hierarchy of the current screen as XML for inspection and element identification.

Parameters:

  • deviceSerial (optional): Target specific device by serial number

Returns: Complete XML UI hierarchy that can be parsed to find element resource IDs and attributes.

Performance: ~500-800ms

Use Cases:

  • Inspecting app UI structure
  • Finding element resource IDs for automation
  • Understanding view hierarchies

Example:

json
{
  "name": "android_uiautomator_dump",
  "arguments": {}
}

10. android_uiautomator_find

Find UI elements by resource ID or text content using UIAutomator.

Parameters:

  • resourceId (optional): Resource ID to search for (e.g., com.example.app:id/button_submit)
  • text (optional): Text content to search for
  • deviceSerial (optional): Target specific device by serial number

Performance: Fast

Example - Find by Resource ID:

json
{
  "name": "android_uiautomator_find",
  "arguments": { "resourceId": "com.example.app:id/email_input" }
}

Example - Find by Text:

json
{
  "name": "android_uiautomator_find",
  "arguments": { "text": "Submit" }
}

11. android_uiautomator_click

Click on a UI element by resource ID.

Parameters:

  • resourceId (required): Resource ID of the element to click
  • deviceSerial (optional): Target specific device by serial number

Performance: Immediate

Example:

json
{
  "name": "android_uiautomator_click",
  "arguments": { "resourceId": "com.example.app:id/button_submit" }
}

12. android_uiautomator_double_click

Perform a double-click on a UI element by resource ID.

Parameters:

  • resourceId (required): Resource ID of the element
  • deviceSerial (optional): Target specific device by serial number

Performance: Immediate

Example:

json
{
  "name": "android_uiautomator_double_click",
  "arguments": { "resourceId": "com.example.app:id/text_field" }
}

13. android_uiautomator_long_click

Perform a long-click on a UI element by resource ID.

Parameters:

  • resourceId (required): Resource ID of the element
  • deviceSerial (optional): Target specific device by serial number

Performance: Immediate

Example:

json
{
  "name": "android_uiautomator_long_click",
  "arguments": { "resourceId": "com.example.app:id/menu_item" }
}

14. android_uiautomator_set_text

Set text on a UI element by resource ID. Automatically clears existing text first.

Parameters:

  • resourceId (required): Resource ID of the element
  • text (required): Text to set
  • deviceSerial (optional): Target specific device by serial number

Performance: Immediate

Example:

json
{
  "name": "android_uiautomator_set_text",
  "arguments": {
    "resourceId": "com.example.app:id/email_input",
    "text": "user@example.com"
  }
}

15. android_uiautomator_clear_text

Clear text from a UI element by resource ID.

Parameters:

  • resourceId (required): Resource ID of the element
  • deviceSerial (optional): Target specific device by serial number

Performance: Immediate

Example:

json
{
  "name": "android_uiautomator_clear_text",
  "arguments": { "resourceId": "com.example.app:id/search_input" }
}

16. android_uiautomator_toggle_checkbox

Toggle a checkbox element by resource ID.

Parameters:

  • resourceId (required): Resource ID of the checkbox
  • deviceSerial (optional): Target specific device by serial number

Performance: Immediate

Example:

json
{
  "name": "android_uiautomator_toggle_checkbox",
  "arguments": { "resourceId": "com.example.app:id/agree_checkbox" }
}

17. android_uiautomator_wait

Wait for a UI element to appear by resource ID with timeout support.

Parameters:

  • resourceId (required): Resource ID to wait for
  • timeoutMs (optional): Maximum wait time in milliseconds (default: 5000)
  • deviceSerial (optional): Target specific device by serial number

Performance: Configurable (up to timeout)

Example:

json
{
  "name": "android_uiautomator_wait",
  "arguments": {
    "resourceId": "com.example.app:id/loading_indicator",
    "timeoutMs": 10000
  }
}

18. android_uiautomator_scroll_in_element

Scroll within a specific scrollable UI element.

Parameters:

  • resourceId (required): Resource ID of the scrollable element
  • direction (required): Direction to scroll (up, down, left, right)
  • distance (optional): Distance to scroll in pixels (default: 500)
  • deviceSerial (optional): Target specific device by serial number

Performance: Immediate

Example:

json
{
  "name": "android_uiautomator_scroll_in_element",
  "arguments": {
    "resourceId": "com.example.app:id/list_view",
    "direction": "down",
    "distance": 500
  }
}

Scrcpy Streaming Tools (4)

Scrcpy streaming provides ultra-fast frame capture using H.264 video encoding, perfect for real-time monitoring, rapid screenshot sequences, or continuous frame polling.

19. android_start_scrcpy_stream

Initialize an H.264 video stream from the Android device using Scrcpy.

Parameters:

  • deviceSerial (optional): Target specific device by serial number
  • bitrate (optional): Video bitrate in Mbps (default: 4)
  • fps (optional): Frames per second (default: 60)

Performance: ~2 seconds setup, <50ms per frame polling afterward

Advantages:

  • Ultra-fast frame capture (<50ms vs 1-2s for screenshot)
  • Continuous streaming with pre-buffered frames
  • Ideal for real-time monitoring
  • H.264 compression reduces bandwidth

Example:

json
{
  "name": "android_start_scrcpy_stream",
  "arguments": {
    "bitrate": 4,
    "fps": 30
  }
}

20. android_get_latest_frame

Poll the latest frame from an active Scrcpy stream.

Parameters:

  • deviceSerial (optional): Target specific device by serial number
  • outputPath (optional): Save frame to file, otherwise returns base64

Performance: <50ms per frame (due to pre-buffered streaming)

Use Cases:

  • Real-time monitoring
  • Rapid screenshot sequences
  • Continuous frame polling
  • Streaming visualization

Example:

json
{
  "name": "android_get_latest_frame",
  "arguments": {
    "outputPath": "./current_frame.png"
  }
}

21. android_stop_scrcpy_stream

Stop an active Scrcpy H.264 stream.

Parameters:

  • deviceSerial (optional): Target specific device by serial number

Example:

json
{
  "name": "android_stop_scrcpy_stream",
  "arguments": {}
}

22. android_capture_frame_scrcpy

Capture a single frame using Scrcpy without starting a persistent stream.

Parameters:

  • deviceSerial (optional): Target specific device by serial number
  • outputPath (optional): Save frame to file, otherwise returns base64
  • bitrate (optional): Video bitrate in Mbps (default: 4)

Performance: 100-300ms (faster than screenshot, slower than streaming)

Use Cases:

  • One-off frame captures
  • When streaming overhead isn't justified
  • Single frame comparison
  • Lightweight capture operations

Example:

json
{
  "name": "android_capture_frame_scrcpy",
  "arguments": {
    "outputPath": "./single_frame.png"
  }
}

Performance Comparison

ToolPurposeSpeedBest For
android_screenshotBasic capture1-2sSimple screenshots, initial inspection
android_capture_frame_scrcpySingle Scrcpy frame100-300msFaster one-off captures than screenshot
android_start_scrcpy_streamInitialize stream~2s setupReal-time monitoring workflows
android_get_latest_framePoll stream<50msRapid frame sequences, real-time apps
android_touchTap/long pressImmediateUI interaction
android_swipeSwipe gestureImmediateNavigation, scrolling
android_input_textDirect text inputImmediateQuick text entry via ADB
android_send_key_eventKey eventsImmediateNavigation (HOME, BACK, ENTER)
android_execute_commandGeneric ADBVariesCustom ADB operations, full flexibility
android_uiautomator_dumpUI inspection500-800msElement discovery
android_uiautomator_findElement searchFastLocated specific elements
android_uiautomator_*Element interactionImmediateForm filling, UI automation

Common Use Cases

1. Automated Testing

1. Dump UI hierarchy to find element IDs
2. Click buttons and input text using resource IDs
3. Use streaming to verify visual changes in real-time
4. Scroll and navigate through the app

2. Real-Time Monitoring

1. Start Scrcpy stream (one-time ~2s setup)
2. Poll latest frames continuously (<50ms each)
3. Process frames for visual analysis
4. Stop stream when done

3. Rapid Frame Capture Sequence

1. Start Scrcpy stream
2. Get latest frame multiple times (much faster than screenshot)
3. Process frame sequence for animation/comparison
4. Stop stream

4. Form Filling (WebView or Native)

1. Find form fields by resource ID or text
2. Clear existing text
3. Set new text values
4. Toggle checkboxes and radio buttons
5. Click submit button

5. Multi-Device Automation

Use deviceSerial parameter to target specific devices:

1. List connected devices via ADB
2. Specify device serial for each tool call
3. Automate workflows on multiple devices in parallel
4. Useful for device farms and testing labs

6. App Discovery

1. List all packages (potentially 100+)
2. Filter packages by name (e.g., "google", "com.example")
3. Launch apps by package name
4. Perfect for discovering available apps on the device

ADB & Scrcpy Setup

Automatic Installation

The server automatically downloads and installs from official sources:

  • ADB: From Android Platform Tools
  • Scrcpy: From official releases

Downloaded tools stored in ~/.android-mcp-server/platform-tools/

Manual Installation (Optional)

Windows:

bash
choco install adb
choco install scrcpy

macOS:

bash
brew install android-platform-tools
brew install scrcpy

Linux (Ubuntu/Debian):

bash
sudo apt-get install android-tools-adb scrcpy

Enabling USB Debugging on Android

  1. Go to Settings → About Phone
  2. Tap Build Number 7 times to enable Developer Options
  3. Go to Settings → Developer Options
  4. Enable USB Debugging
  5. Connect device via USB and accept the debugging prompt

Verify Connection

bash
adb devices

You should see your device listed.

Troubleshooting

IssueSolution
"No Android devices found"Ensure device is connected via USB and USB debugging is enabled. Run adb devices to verify.
UIAutomator element not foundUse android_uiautomator_dump to inspect the XML and verify the resource ID exists.
Scrcpy stream won't startEnsure Scrcpy is installed or allow auto-download to complete. Check device is connected.
"ADB not found" errorRun the server once to auto-download ADB, or manually install platform-tools.
Touch coordinates not workingVerify coordinates are within screen bounds. Use screenshots to determine correct coordinates.
App launch failsVerify package name is correct using android_list_packages. Try filtering if unsure.
Streaming frames are slowReduce bitrate/fps or use single android_capture_frame_scrcpy for one-off captures.

Advanced Patterns

Real-Time Visual Monitoring

1. android_start_scrcpy_stream (2s setup)
2. Loop: android_get_latest_frame (<50ms each)
3. Process frames for ML/analysis
4. android_stop_scrcpy_stream when done

Stress Testing with Rapid Frames

1. Start stream
2. Perform action on device
3. Capture 10+ frames in rapid succession (<50ms each)
4. Compare frame changes for regression detection

Multi-Step Form Automation

1. android_uiautomator_dump (find all fields)
2. For each field:
   - android_uiautomator_find (locate)
   - android_uiautomator_set_text (fill)
3. android_uiautomator_click (submit)
4. android_uiautomator_wait (result screen)
5. android_screenshot (verify)

Device Farm Parallel Testing

1. Get device list
2. For each device:
   - Specify deviceSerial in all tool calls
   - Run automation sequence
   - Compare results across devices

Architecture

The server uses the Model Context Protocol to expose Android device control:

  • ADB Wrapper (src/adb-wrapper.ts): Device communication, auto-downloads ADB
  • Scrcpy Integration (src/adb-wrapper.ts): H.264 streaming, frame polling
  • UIAutomator Methods (src/adb-wrapper.ts): Full XML dumping, element interaction
  • Tool Handlers (src/handlers.ts): All 19 tool operations
  • MCP Server (src/index.ts): Exposes all tools via Model Context Protocol

Supported Android Versions

  • Android 5.0+ (API Level 21+)
  • Scrcpy streaming: Android 5.0+ via ADB, optimal on 7.0+

Development

bash
# Install dependencies
npm install

# Build
npm run build

# Watch mode (if supported)
npm run watch

Adding New Tools

To add a new tool:

  1. Implement method in src/adb-wrapper.ts
  2. Implement handler in src/handlers.ts
  3. Register tool in src/index.ts with name, description, and schema
  4. Build and test with the server running

License

MIT

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

安装

TypingMind
前提条件:

Node.js 18+

{
  "mcpServers": {
    "android-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "android-mcp-server"
      ],
      "env": {
        "ADB_PATH": "",
        "DEVICE_SERIAL": ""
      }
    }
  }
}

将 Android MCP Server MCP 与多个 AI 模型配合使用

TypingMind 在工作区级别连接 MCP 工具,因此连接 Android MCP Server 后,您就可以在 TypingMind 中搭配不同的 AI 模型使用,无需为每个模型单独设置。 此 MCP 通过您设备上的 TypingMind MCP 连接器在本地运行。

本地连接器设置指南

如果 MCP 服务器需要访问您电脑上的本地文件、应用或私有资源,请选择此方式。

1

打开 MCP 设置

在 TypingMind 中,依次前往“设置”、“高级设置”和“模型上下文协议”,然后选择“设置连接器”。

  1. 在您的浏览器中打开 TypingMind。
  2. 点击“设置”图标。
  3. 进入“高级设置”。
  4. 打开“模型上下文协议”部分。
  5. 点击“设置连接器”,然后选择“此设备”。
TypingMind MCP 连接器设置界面,已选择“此设备”
2

运行连接器命令

选择“此设备”,从 TypingMind 复制命令并在终端中运行。使用 MCP 时,请保持该进程运行。

  1. 复制 TypingMind 显示的设置命令。
  2. 在 macOS 上打开“终端”,或在 Windows 上打开 Windows Terminal。
  3. 粘贴并运行命令。
  4. 如果终端询问您是否继续,请确认安装软件包。
  5. 使用 MCP 工具时,请保持终端窗口及其中的进程运行。
3

将 Android MCP Server 添加为服务器

当连接器状态为“就绪”时,点击“编辑服务器”,然后粘贴 MCP 服务器配置。

  1. 等待连接器状态显示为“就绪”。
  2. 点击“编辑服务器”。
  3. 粘贴 Android MCP Server MCP 服务器配置。
  4. 保存服务器列表。
  5. 如需确认连接器是否仍处于就绪状态,请刷新。
TypingMind MCP 设置界面,显示正在运行的服务器和“编辑服务器”按钮
{
  "mcpServers": {
    "android-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "android-mcp-server"
      ]
    }
  }
}
4

在不同模型中使用同一连接

保存服务器列表,打开“插件”,启用 Android MCP Server MCP 工具,然后在 TypingMind 中选择任意受支持的 AI 模型,即可在聊天中使用这些工具,或将其分配给智能体。

  1. 在 TypingMind 中打开“插件”页面。
  2. 启用 Android MCP Server MCP 工具。
  3. 开始聊天并选择您想使用的 AI 模型。
  4. 在聊天中使用 MCP 工具,或将其分配给 AI 智能体。
  5. 根据需要随时切换到其他 AI 模型,无需重新连接 MCP。
在 TypingMind 聊天中使用已启用的 MCP 工具和选定的 AI 模型
您能使用 Android MCP Server 帮我完成这项任务吗?
Android MCP Server
当然。我已阅读。
以下是我使用 Android MCP Server 得到的结果。

常见问题

Android MCP Server MCP 服务器有什么用途?

Android MCP Server 是一个 MCP 服务器,可让兼容的 AI 客户端连接外部工具并获取上下文。在 TypingMind 中,只需添加一次此 MCP 服务器,即可在您的 AI 工作区中使用其工具。

可以在 TypingMind 中让多个 AI 模型使用 Android MCP Server MCP 吗?

可以。TypingMind 在工作区层面连接 MCP 工具,因此您可以让 Claude、ChatGPT、Gemini 等不同 AI 模型,或您在 TypingMind 中配置的其他模型使用 Android MCP Server,而无需为每个模型单独配置 MCP 服务器。

为什么在 TypingMind 中使用 Android MCP Server MCP?

TypingMind 将多个 AI 模型、提示词、插件、AI 智能体、API 密钥和 MCP 工具整合到同一个工作区中,是优秀的大语言模型聊天前端之一。连接 Android MCP Server 后,您可以在偏好的不同模型中使用其 MCP 工具,同时在 TypingMind 中井然有序地管理聊天工作流程。

如何将 Android MCP Server MCP 连接到 TypingMind?

Android MCP Server 通过 TypingMind 本地 MCP 连接器运行。当 MCP 服务器需要访问您计算机上的本地文件、桌面应用、命令行工具或私有资源时,这种方式最合适。

Android MCP Server MCP 在 TypingMind 中提供哪些工具?

Android MCP Server 提供 MCP 功能,您可以在 TypingMind 的插件页面启用这些功能,然后在聊天中使用,或将其分配给 AI 智能体。

使用 Android MCP Server MCP 需要向 TypingMind 提供我的 API 密钥吗?

不需要。TypingMind 采用本地优先的设计,让您自行掌控模型提供商、API 密钥、提示词和 MCP 配置。如果 Android MCP Server 需要身份验证,请在创建连接时,为该 MCP 服务器添加所需的请求头、OAuth 设置或本地配置。

相关 MCP 服务器

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇