1.8 KiB
1.8 KiB
name, description
| name | description |
|---|---|
| ck-use-mcp | Execute operations via Model Context Protocol (MCP) servers. Use for MCP tool calls, resource access, prompt execution, integrating external services, or offloading tasks to preserve context budget. |
Use MCP — Execute MCP Operations
Executes MCP operations via Gemini CLI to preserve context budget, with fallback to direct MCP tool use.
When to Use
- Executing tools from connected MCP servers
- Accessing MCP resources or prompts
- Offloading external service calls to preserve main context budget
- Integrating third-party services via MCP protocol
Don't Use When
- Task can be done directly without MCP (no external service needed)
- No MCP servers are configured
Primary: Gemini CLI Execution
Execute via stdin pipe (NOT -p flag — deprecated, skips MCP init):
echo "<task>. Return JSON only per GEMINI.md instructions." | gemini -y -m <gemini.model>
Read model from $HOME/.claude/.ck.json: gemini.model (default: gemini-2.5-flash-preview)
Use -y flag to auto-approve tool execution.
Expected output format:
{"server": "name", "tool": "name", "success": true, "result": <data>, "error": null}
Anti-Pattern (Never Use)
# BROKEN — -p flag skips MCP server connections
gemini -y -m model -p "..."
Fallback: Direct MCP Tool Use
If Gemini CLI is unavailable:
- Discover available MCP tools from connected servers
- Execute the appropriate tool directly
- If no suitable tool found, report back and move on — do not create new scripts
Notes
GEMINI.mdis auto-loaded from project root, enforcing JSON-only response format- Use
ck-mcp-builderskill if MCP server scripts have issues - Sub-process can only use existing MCP tools — never create new scripts as fallback