MaaFramework Pipeline 開發工具 MCP Server,專為 Claude Code 設計
Project description
MaaMCP_CC
專為 Claude Code 打造的 MaaFramework Pipeline 開發工具
這是什麼?
MaaMCP_CC 是一個 MCP (Model Context Protocol) 伺服器,讓 Claude Code 能夠直接操控 Android 模擬器或 Windows 視窗,專門優化 MaaFramework Pipeline 開發流程。
與 MaaMCP 的差異
| MaaMCP | MaaMCP_CC | |
|---|---|---|
| 設計對象 | Cursor、LM Studio 等早期 AI Agent | Claude Code |
| 截圖方式 | OCR 回傳純文字 | 回傳圖片,Claude 直接用眼睛看 |
| 識別測試 | 要寫檔案 → 跑 Pipeline → 看 log | test_recognition 即時測試,秒出結果 |
| 連接流程 | 多個工具來回呼叫 | 單一工具完成連接 + 載入資源 |
| 執行結果 | 成功 / 失敗 | 逐節點詳細報告 + 完成時截圖 |
安裝
前置需求
- Python 3.10 以上
- Claude Code CLI
步驟一:安裝套件
pip install maamcp-cc
步驟二:Clone 此專案
git clone https://github.com/Arcelibs/MaaMCP_CC.git
cd MaaMCP_CC
Clone 完成後,用 Claude Code 開啟此資料夾,Claude Code 會自動偵測 .mcp.json 並詢問是否啟用 MaaMCP_CC。
步驟三:確認安裝成功
claude mcp list
看到 MaaMCP_CC: ... ✓ Connected 即為成功。
工具說明
list_devices
掃描所有可用的 Android 模擬器(ADB)和 Windows 視窗。 在連接前先用這個查看有哪些設備。
connect_adb
連接到 Android 設備並一次完成載入 MaaFramework 資源包。
| 參數 | 說明 |
|---|---|
address |
ADB 地址,如 127.0.0.1:5555 |
resource_path |
資源包路徑(含 pipeline/ 和 image/ 的資料夾) |
adb_path |
ADB 執行檔路徑,通常直接填 adb |
connect_window
連接到 Windows 視窗(後台操作,不佔用滑鼠鍵盤)。
screenshot
擷取當前畫面,回傳 base64 圖片。 Claude 可以直接「看」這張圖,識別 UI 元素、按鈕位置、文字等。
test_recognition ⭐ 最重要的工具
在當前畫面上即時測試一個識別節點定義,不需要寫入任何 Pipeline 檔案。
回傳結果包含:
hit:是否命中box:命中區域座標[x, y, width, height]best_result:最佳識別結果(OCR 識別到的文字、TemplateMatch 的置信度等)annotated_image_base64:標記了命中位置的截圖(命中為綠框,未命中顯示 MISS)
使用範例:
測試 OCR 識別「確認」按鈕:
{
"recognition_type": "OCR",
"params": {
"expected": ["確認", "OK"],
"roi": [500, 600, 400, 100]
}
}
測試圖片模板比對:
{
"recognition_type": "TemplateMatch",
"params": {
"template": ["button_confirm.png"],
"threshold": [0.8]
}
}
run_task
執行 Pipeline 任務,支援即時覆蓋節點定義(不需儲存到檔案)。
| 參數 | 說明 |
|---|---|
entry |
入口節點名稱 |
pipeline_override |
臨時修改的節點定義(可選) |
timeout_seconds |
超時秒數,預設 120 |
回傳結果包含每個節點的識別結果、動作結果,以及任務完成時的截圖。
list_tasks
列出已載入資源中的所有 Pipeline 節點,或讀取指定 JSON 檔案的節點列表。
stop_task / get_session_info
停止任務 / 查看目前連接狀態。
開發工作流程
1. list_devices → 查看有哪些設備
2. connect_adb → 連接設備 + 載入資源
3. screenshot → 看當前畫面
4. test_recognition → 測試識別條件(可重複多次調整)
5. 直接修改 Pipeline JSON
6. run_task → 驗證結果
技術細節
相關專案
- MaaFramework — 底層自動化框架
- MaaMCP — 原版 MCP(適合 Cursor 等工具)
- MaaStellaSora — 本工具的主要使用案例
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file maamcp_cc-0.1.0.tar.gz.
File metadata
- Download URL: maamcp_cc-0.1.0.tar.gz
- Upload date:
- Size: 9.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c3bd25c328f025a2add96eeb3a025973c5ddb8941af5a2fb37017692a9ad83c
|
|
| MD5 |
61bfbf8428c0bbc96286c73b704cc71e
|
|
| BLAKE2b-256 |
e040c639093caaa915cf202aa4c2be7755609337c80b6a9d387746f393197014
|
Provenance
The following attestation bundles were made for maamcp_cc-0.1.0.tar.gz:
Publisher:
publish.yml on Arcelibs/MaaMCP_CC
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
maamcp_cc-0.1.0.tar.gz -
Subject digest:
5c3bd25c328f025a2add96eeb3a025973c5ddb8941af5a2fb37017692a9ad83c - Sigstore transparency entry: 1121846005
- Sigstore integration time:
-
Permalink:
Arcelibs/MaaMCP_CC@b2666bba878e15b718e63286451b48b46b670de9 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Arcelibs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b2666bba878e15b718e63286451b48b46b670de9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file maamcp_cc-0.1.0-py3-none-any.whl.
File metadata
- Download URL: maamcp_cc-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a781e071e8f6a184cc4f0ae71690e5db6f0fbfaf544e9cb31699e2e46b9f9c4e
|
|
| MD5 |
a3a83914c5717469f2dda08679897c73
|
|
| BLAKE2b-256 |
22aa1fd3eec1c26b254aaa2f5a77fab2e559506089bcf81298e49984b5b998ed
|
Provenance
The following attestation bundles were made for maamcp_cc-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on Arcelibs/MaaMCP_CC
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
maamcp_cc-0.1.0-py3-none-any.whl -
Subject digest:
a781e071e8f6a184cc4f0ae71690e5db6f0fbfaf544e9cb31699e2e46b9f9c4e - Sigstore transparency entry: 1121846073
- Sigstore integration time:
-
Permalink:
Arcelibs/MaaMCP_CC@b2666bba878e15b718e63286451b48b46b670de9 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Arcelibs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b2666bba878e15b718e63286451b48b46b670de9 -
Trigger Event:
push
-
Statement type: