AI SMART HUB· Guide
AI · Chapter 12/14

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.

2 min read · updated Nov 20, 2026

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.

BeforeWith MCP
Open the tool, read the log → copy the error → paste it to the AI → the AI guesses → you fix it and rerun by handType 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

  1. Copy the new ai_tich_hop folder next to the tool.
  2. Open the tool and wait for the interface to appear.
  3. 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.
  4. 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
💡 Through MCP the AI can edit scripts (.json) and always saves them under a new name, never over the original. The AI does not edit the tool's code (.py). To edit code, open Claude Code in the tool folder.

Commands the AI can use (30 commands)

Read from gpm_mcp.py. * = required parameter.

trang_thaiRead onlyNEW

See 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 onlyNEW

Accounts/profiles in the tool: number, name, ticked or not, last run result (ok/err), error note. Proxies/IPs are not returned.

chi_loichi_ticktimtoi_da
nhat_kyRead onlyNEW

Read the tool's latest log. Filter errors or one account.

so_dongchi_loistt
ds_kich_banRead onlyNEW

List the script files (.json) in the tool's script folder.

tim
xem_kich_banRead onlyNEW

View one script (by file name) or the open script (leave ten empty). Changes nothing in the tool.

tenday_du
mo_kich_banGuardedNEW

Open a script file in the tool (replaces the open script; does not run).

ten
chay_kich_banGuardedNEW

Run 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.

stt *kich_banly_do
dung_chayGuardedNEW

Press Stop: stops every running account. Always allowed.

tam_dungGuardedNEW

Press Pause / Resume (toggles).

nap_kich_banGuardedNEW

Load a step list (JSON steps) into the tool's editor for the owner to review. NOT saved, not run.

steps *
luu_kich_banGuardedNEW

Save the open script as a new file. Same name as an existing file → asks the owner, default is NO overwrite.

ten *
bao_cao_dbRead onlyNEW

Read 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.

loaibao_caotimtudentoi_da
soan_kich_banGuardedNEW

Hand 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.

yeu_cauurlmo_trangnhanhidtutra_loi
chi_phi_aiRead onlyNEW

AI money the tool has spent (by day, by worker) and today's budget.

so_ngay
bao_cao_demRead onlyNEW

The 'night doctor' report: repeated errors, diagnoses, patches created.

chay_thu_tu_suaGuardedNEW

TEST & 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.

stt *kich_bantoi_da_sualy_do
xem_chay_thu_tu_suaRead onlyNEW

See progress / results of a test & fix run (log, steps the AI fixed).

id
ap_ban_chay_thuGuardedNEW

Apply the fixed version (from a PASSED test run) to the original script; the old one goes to ban_cu/. The owner must approve.

id
hoi_tro_lyRead onlyNEW

Ask the tool's support assistant how to use a feature (answers from the user guide).

cau_hoi *
so_tay_xpathRead onlyNEW

The XPath notebook the tool has learned per website (no ten_mien = list of sites).

ten_mien
phone_ds_mayRead onlyNEW

PHONES: list of Android phones in Box Phone (names 01..15, ready/not found, what is running). Call before the phone_ commands.

phone_man_hinhRead onlyNEW

PHONES: read the TEXT on one phone's screen → numbered elements #1, #2… (buttons, inputs, position %). Sensitive data is masked; password fields never show text.

may *
phone_thao_tacGuardedNEW

PHONES: 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.

may *lenh *sochuenterhuongphimgoiurlgiayxy
phone_ds_kich_banRead onlyNEW

PHONES: list Box Phone scripts (.json).

tim
phone_xem_kich_banRead onlyNEW

PHONES: view one Box Phone script.

ten *
phone_chay_kich_banGuardedNEW

PHONES: 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.

kich_ban *may *file_accly_do
phone_luu_kich_banGuardedNEW

PHONES: 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.

ten *steps *
phone_chay_thuGuardedNEW

PHONES: 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.

kich_ban *may *file_accdong_acctoi_da_sualam_moily_do
phone_xem_chay_thuRead onlyNEW

PHONES: see progress / results of test runs (step log, steps the AI fixed, fixed script when an id is given).

id
phone_dungGuardedNEW

PHONES: 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.

KeyDefaultMeaning
toi_da_acc_khong_hoi1how many accounts can run WITHOUT asking (more than this → question window)
cho_chay_kich_ban_tientrueFalse = the AI may never run money/wallet scripts (not even 1 account)
hoi_bang_cua_sotrueFalse = no question window → anything that needs asking is REFUSED
giay_cho_tra_loi120the question window closes itself (= refused) after this many seconds
che_du_lieutruemask secrets in text returned to the AI
cho_soan_aitruelet 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_duyet30after 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_hoi1how 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?

MessageFix
WinError 10061 / cannot reach the toolThe 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
© 2026 AI Smart Hub · Automate Intelligence. Elevate Possibilities. · Updated Nov 20, 2026
Home · Blog · Terms · Zalo · Telegram