Token导航 LogoToken导航TokenDH.com
Specter MCP logo
开发工具未说明官方级别未说明来源级核验

Specter MCP

MCP Server

Specter MCP是一款为AI代理提供Kotlin多平台移动项目构建、测试、调试和交互能力的MCP服务器。

工具数

15

提示词数

0

GitHub Stars

1

资源数

0
测试自动化TypeScriptClaude调试工具Claude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

abd3lraouf

提供方

abd3lraouf

最后核验

2026/5/17 20:21

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

Specter MCP

KMM Diagnostic & Execution Engine

An MCP server providing "hands and eyes" for AI agents working with Kotlin Multiplatform Mobile projects.

______________________________________________________________________

什么是Spectre MCP?

Spectre MCP使AI代理(Claude、GPT等)能够 构建、测试、调试和交互 通过Android和iOS应用程序 模型上下文协议。将其视为赋予您的AI助手以下能力:

  • 构建和部署您的移动应用程序
  • 截图并与UI元素交互
  • 运行单元测试和E2E测试(Maestro)
  • 分析崩溃日志并调试问题
  • 检查应用程序状态(首选项、数据库、日志)

先决条件

要求版本验证命令
Node.js20+node --version
Android SDK任何adb --version
Xcode CLI(macOS)任何xcrun --version
Maestro(可选)任何maestro --version

快速设置

# Android SDK (if not installed via Android Studio)
export ANDROID_SDK_ROOT="$HOME/Library/Android/sdk"
export PATH="$PATH:$ANDROID_SDK_ROOT/platform-tools"

# iOS (macOS only)
xcode-select --install
sudo xcodebuild -license accept

# Maestro (optional, for E2E testing)
curl -Ls "https://get.maestro.mobile.dev" | bash

安装

选项1:npm(推荐)

npm install -g specter-mcp

选项2:来源

git clone https://github.com/abd3lraouf/specter-mcp.git
cd specter-mcp
npm install && npm run build

配置

克劳德桌面版

添加 ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "specter-mcp": {
      "command": "specter-mcp"
    }
  }
}

克劳德代码

添加到您的项目 .mcp.json:

{
  "mcpServers": {
    "specter-mcp": {
      "command": "specter-mcp"
    }
  }
}

使用环境变量

{
  "mcpServers": {
    "specter-mcp": {
      "command": "specter-mcp",
      "env": {
        "SPECTER_DEBUG": "true",
        "ANDROID_SDK_ROOT": "/path/to/android/sdk"
      }
    }
  }
}

来自源头

{
  "mcpServers": {
    "specter-mcp": {
      "command": "node",
      "args": ["/absolute/path/to/specter-mcp/dist/index.js"]
    }
  }
}

可用工具(15)

类别工具描述
构建build_app构建Android/iOS应用程序(调试/发布)
install_app在设备上安装APK或.app
launch_app启动已安装的应用程序
用户界面get_ui_context屏幕截图+UI层次结构
interact_with_ui点击、滑动、输入文本
测试run_unit_tests运行单元测试
run_maestro_flow运行Maestro E2E流
run_linterDetekt、SwiftLint、ktlint
环境list_devices列出仿真器/模拟器
manage_env启动/关闭设备
clean_project清理构建缓存
调试analyze_crash解析崩溃日志,符号化
inspect_logs过滤设备日志
inspect_app_state读取首选项、数据库
导航deep_link_navigate打开深层链接

使用示例

构建和部署

You: Build my Android app in debug mode and install it

Claude: I'll build and deploy your app.
→ build_app(platform: "android", variant: "debug")
→ install_app(platform: "android", appPath: "...")
→ launch_app(platform: "android", appId: "com.example.app")

调试崩溃

You: My iOS app crashed, help me debug it

Claude: Let me analyze the crash.
→ analyze_crash(platform: "ios", appId: "com.example.app")
→ inspect_logs(platform: "ios", minLevel: "error")

用户界面测试

You: Take a screenshot and tap the login button

Claude: I'll capture the UI and interact with it.
→ get_ui_context(platform: "android")
→ interact_with_ui(platform: "android", action: "tap", element: "Login")

运行E2E测试

You: Run my login flow test on both platforms

Claude: Running Maestro flows.
→ run_maestro_flow(platform: "android", flowPath: "./maestro/login.yaml")
→ run_maestro_flow(platform: "ios", flowPath: "./maestro/login.yaml")

环境变量

变量默认值描述
SPECTER_DEBUGfalse启用调试日志记录
SPECTER_LOG_LEVELinfo日志级别(错误/警告/信息/调试)
SPECTER_TIMEOUT60000默认超时(ms)
ANDROID_SDK_ROOTautoAndroid SDK路径
SPECTER_ANDROID_DEVICE-默认Android设备
SPECTER_IOS_DEVICEbooted默认iOS模拟器

故障排除

“adb:找不到命令”

export PATH="$PATH:$ANDROID_SDK_ROOT/platform-tools"

“未找到设备”

# Android: Start emulator
emulator -avd Pixel_6_API_34

# iOS: Boot simulator
xcrun simctl boot "iPhone 15 Pro"

“xcrun:错误:找不到实用程序”

xcode-select --install

调试模式

{
  "env": {
    "SPECTER_DEBUG": "true",
    "SPECTER_LOG_LEVEL": "debug"
  }
}

项目结构

src/
├── index.ts              # MCP server entry
├── config.ts             # Configuration
├── platforms/            # Android/iOS utilities
│   ├── android/          # ADB, Gradle, logcat
│   └── ios/              # simctl, xcodebuild, crash parsing
├── tools/                # MCP tool implementations
│   ├── build/            # build_app, install_app, launch_app
│   ├── ui/               # get_ui_context, interact_with_ui
│   ├── testing/          # run_unit_tests, run_maestro_flow, run_linter
│   ├── environment/      # list_devices, manage_env, clean_project
│   ├── crash/            # analyze_crash
│   ├── navigation/       # deep_link_navigate
│   └── observability/    # inspect_logs, inspect_app_state
└── utils/                # Shell, image processing, XML parsing

发展

npm install          # Install dependencies
npm run build        # Build TypeScript
npm test             # Run tests (695 tests)
npm run test:coverage # Coverage report
npm run lint         # ESLint
npm run typecheck    # Type check

文档

许可证

麻省理工学院 ©Spectre MCP贡献者

目录标签

目录标签

测试自动化TypeScriptClaude调试工具移动开发本地部署AI代理工具Kotlin多平台

支持客户端

Claude

接入字段

传输方式(transport,传输协议)

未说明

鉴权方式(authType,认证方式)

session

部署方式(deploymentType,部署类型)

local-only

工具数量(toolCount,工具数)

15

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

未说明sessionlocal-only

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP