use-mcp

คำสั่งสำหรับใช้เครื่องมือจากเซิร์ฟเวอร์ MCP ผ่าน Gemini CLI หรือผู้ช่วยสำรองที่ค้นหาและเรียกใช้เครื่องมือแทน

In plain words
What is it for?
ใช้เรียกใช้การทำงานของ MCP โดยส่งคำขอผ่านอินพุตมาตรฐาน และรับผลลัพธ์ในรูปแบบ JSON
Why use it?
ช่วยให้ผู้ช่วยค้นหาและดำเนินการกับเครื่องมือภายนอกได้โดยไม่ต้องสร้างสคริปต์ใหม่

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/ihatesea69/kiro-kit/use-mcp
Clone the repo
git clone --depth 1 https://github.com/ihatesea69/kiro-kit
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 386 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00012 $0.00386
Opus 5 $0.00006 $0.00193
Sonnet 5 $0.00002 $0.00077
Haiku 4.5 $0.00001 $0.00039

Measured 3d ago against content hash 4b7d898e1309, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

use-mcp scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.kiro/commands/use-mcp.md · 36 lines

What it actually says

Execute MCP operations via Gemini CLI to preserve context budget.

Execution Steps

  1. Execute task via Gemini CLI (using stdin pipe for MCP support):

    # IMPORTANT: Use stdin piping, NOT -p flag (deprecated, skips MCP init)
    echo "$ARGUMENTS. Return JSON only per GEMINI.md instructions." | gemini -y -m gemini-2.5-flash
    
  2. Fallback to mcp-manager subagent (if Gemini CLI unavailable):

    • Use mcp-manager subagent to discover and execute tools
    • If the subagent got issues with the scripts of mcp-management skill, use mcp-builder skill to fix them
    • DO NOT create ANY new scripts
    • The subagent can only use MCP tools if any to achieve this task
    • If the subagent can't find any suitable tools, just report it back to the main agent to move on to the next step

Important Notes

  • MUST use stdin piping - the deprecated -p flag skips MCP initialization
  • Use -y flag to auto-approve tool execution
  • GEMINI.md auto-loaded: Gemini CLI automatically loads GEMINI.md from project root, enforcing JSON-only response format
  • Parseable output: Responses are structured JSON: {"server":"name","tool":"name","success":true,"result":<data>,"error":null}

Anti-Pattern (DO NOT USE)

# BROKEN - deprecated -p flag skips MCP server connections!
gemini -y -m gemini-2.5-flash -p "..."
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 36 lines · 12 tokens per session scan A 4b7d898e1309

Subscribe to this mod's changes

use-mcp is a command published in the GitHub repository ihatesea69/kiro-kit (18 stars, last pushed 14d ago), licensed MIT. It adds 12 tokens to every session and 386 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.