MCP gateway: let Claude and Cursor control the tool by chat
What MCP is, plugging it into Claude Desktop / Claude Code / Cursor in one click, the commands the AI can use, machine-enforced safety rails and how to change the limits.
What is MCP?
Simply put: MCP is a standard socket. Any AI app with an "MCP plug" (Claude Desktop, Claude Code, Cursor…) can plug in and use the tool's buttons.
| Before | With MCP |
|---|---|
| Open the tool, read the log → copy the error → paste it to the AI → the AI guesses → you fix it and rerun by hand | Type one sentence. The AI reads the log, checks the script, fixes it, loads it into the tool, tests 1 account and reads the result |
The MCP server runs on your own PC and talks to the tool through the local 127.0.0.1 port, never exposed to the Internet.
Setup in 4 steps
- Copy the new
ai_tich_hopfolder next to the tool. - Open the tool and wait for the interface to appear.
- Double-click CAI_MCP.bat: it finds Claude Desktop / Claude Code / Cursor, backs up their old settings, plugs in and finally runs a self-test. When you see ✔ trang_thai, you're done.
- Fully quit Claude Desktop (right-click the tray icon → Quit) and reopen it. The first time the AI uses a command, press Allow.
Sample prompts
- What is AutoSmartTool running right now?
- Which accounts failed, and why, grouped by cause?
- Read the latest failed account's log, find the wrong step in the script, fix it, load it into the tool and test 1 account
- Summarize this week's SQLite reports
Commands the AI can use (30 commands)
Read from gpm_mcp.py. * = required parameter.
trang_thaiRead onlyNEWSee what AutoSmartTool is doing: running or idle, open script, progress, accounts done/failed, failed accounts. Call this FIRST. (Status of the GPM automation tool.)
ds_accRead onlyNEWAccounts/profiles in the tool: number, name, ticked or not, last run result (ok/err), error note. Proxies/IPs are not returned.
nhat_kyRead onlyNEWRead the tool's latest log. Filter errors or one account.
ds_kich_banRead onlyNEWList the script files (.json) in the tool's script folder.
xem_kich_banRead onlyNEWView one script (by file name) or the open script (leave ten empty). Changes nothing in the tool.
mo_kich_banGuardedNEWOpen a script file in the tool (replaces the open script; does not run).
chay_kich_banGuardedNEWRun the open script (or open kich_ban, then run) on the listed account numbers. More accounts than allowed / 'all' / a money or wallet script → the owner's PC shows a question window and it runs only after Yes. Money scripts: 1 account only. Test on 1 account first, check trang_thai/nhat_ky, then ask to run more.
dung_chayGuardedNEWPress Stop: stops every running account. Always allowed.
tam_dungGuardedNEWPress Pause / Resume (toggles).
nap_kich_banGuardedNEWLoad a step list (JSON steps) into the tool's editor for the owner to review. NOT saved, not run.
luu_kich_banGuardedNEWSave the open script as a new file. Same name as an existing file → asks the owner, default is NO overwrite.
bao_cao_dbRead onlyNEWRead result reports in SQLite (gpm_data.db). loai: tom_tat (default) | acc_loi | acc_ok | acc_khong_ro | loi_hay_gap | theo_ngay | tim_acc | tong_swap | tong_chuyen | chuyen_loi | vi_dang_giu.
soan_kich_banGuardedNEWHand a description to the CHEAP AI WORKER in the tool (DeepSeek…) to write a script; mo_trang=true opens the first ticked account to scan the real page. Costs a fraction of a cent per run. Returns within 45 seconds; if not finished, call again with id + tu to continue / answer the worker's questions.
chi_phi_aiRead onlyNEWAI money the tool has spent (by day, by worker) and today's budget.
bao_cao_demRead onlyNEWThe 'night doctor' report: repeated errors, diagnoses, patches created.
chay_thu_tu_suaGuardedNEWTEST & FIX a script on EXACTLY 1 test account: at the failing step the tool's AI reads the real page text, fixes the step and reruns (up to toi_da_sua times). Works on a copy <name>__tuthu.json, the original stays untouched. Always asks the owner first. Check it with xem_chay_thu_tu_sua.
xem_chay_thu_tu_suaRead onlyNEWSee progress / results of a test & fix run (log, steps the AI fixed).
ap_ban_chay_thuGuardedNEWApply the fixed version (from a PASSED test run) to the original script; the old one goes to ban_cu/. The owner must approve.
hoi_tro_lyRead onlyNEWAsk the tool's support assistant how to use a feature (answers from the user guide).
so_tay_xpathRead onlyNEWThe XPath notebook the tool has learned per website (no ten_mien = list of sites).
phone_ds_mayRead onlyNEWPHONES: list of Android phones in Box Phone (names 01..15, ready/not found, what is running). Call before the phone_ commands.
phone_man_hinhRead onlyNEWPHONES: read the TEXT on one phone's screen → numbered elements #1, #2… (buttons, inputs, position %). Sensitive data is masked; password fields never show text.
phone_thao_tacGuardedNEWPHONES: do one action on one phone. lenh: cham {so} | giu {so} | go {so?, chu, enter?} | vuot {huong: len/xuong/trai/phai} | quay_lai | home | phim {phim: enter/xoa/tab} | mo_app {goi: com.discord} | mo_link {url} | cho {giay} | cham_xy {x,y percent}. Number #N comes from the phone_man_hinh you just read (read again after each action). First time on each phone / risky steps / wallet apps → the owner must approve on the PC. Returns the matching Box Phone script step so steps can be collected into a script.
phone_ds_kich_banRead onlyNEWPHONES: list Box Phone scripts (.json).
phone_xem_kich_banRead onlyNEWPHONES: view one Box Phone script.
phone_chay_kich_banGuardedNEWPHONES: run a Box Phone script on the listed phones (e.g. "07" / "01,03" / "all"). More phones than allowed / all / a money script → the owner must approve. Money scripts: 1 phone at a time.
phone_luu_kich_banGuardedNEWPHONES: save a step list as a Box Phone script file (e.g. collecting the buoc_kich_ban from phone_thao_tac). Same name as an existing file → the owner must approve the overwrite.
phone_chay_thuGuardedNEWPHONES: TEST a saved script on exactly 1 phone (1 account). At a failing step the tool's AI reads the screen, fixes that step and continues (up to toi_da_sua times). The original file is not changed. See results with phone_xem_chay_thu. First time on each phone / money / wiping app data → the owner must approve.
phone_xem_chay_thuRead onlyNEWPHONES: see progress / results of test runs (step log, steps the AI fixed, fixed script when an id is given).
phone_dungGuardedNEWPHONES: stop every phone running a script + the AI assistant on phones. Always allowed.
Safety rails (enforced by the machine, the AI cannot get around them)
- Running more accounts than allowed, running "all", or a script that touches money/wallets → your PC shows a Yes / No window. No click within 2 minutes = refused. The window is on your PC, not in the chat, so the AI cannot click it for you.
- Money/wallet scripts: the AI runs only 1 account at a time, even with your approval.
- No overwriting existing scripts, no deleting, no reading key / Excel / cookie files.
- Text returned to the AI is masked (wallets, seeds, emails, proxies…). Every command the AI calls is logged in
ai_log/mcp_nhat_ky_DATE.txt.
Changing the limits
Edit ai_tich_hop/gpm_mcp_cfg.json in Notepad; saving applies it immediately.
| Key | Default | Meaning |
|---|---|---|
toi_da_acc_khong_hoi | 1 | how many accounts can run WITHOUT asking (more than this → question window) |
cho_chay_kich_ban_tien | true | False = the AI may never run money/wallet scripts (not even 1 account) |
hoi_bang_cua_so | true | False = no question window → anything that needs asking is REFUSED |
giay_cho_tra_loi | 120 | the question window closes itself (= refused) after this many seconds |
che_du_lieu | true | mask secrets in text returned to the AI |
cho_soan_ai | true | let outside AI hand script-writing jobs to the cheap AI worker in the tool (a fraction of a cent per run) |
cau_noi | "" | path to gpm_web_cau_noi.json if it is somewhere unusual (usually empty) |
phone_phut_duyet | 30 | after the owner lets the AI control a phone → how many minutes it may keep working on that phone without asking again |
phone_toi_da_may_khong_hoi | 1 | how many phones a phone script can run on without asking |
cau_noi_phone | "" | path to box_web_cau_noi.json if it is somewhere unusual (usually empty) |
Errors?
| Message | Fix |
|---|---|
WinError 10061 / cannot reach the tool | The tool is not open. Or it runs from another folder: copy ai_tich_hop next to the running tool and press CAI_MCP.bat again |
| Claude does not see "aismarthub" | You must Quit from the tray (the X button only minimizes) |
| "Owner REFUSED / did not answer in time" | That is by design. The question window may be behind other windows, check the taskbar |