ck:use-mcp

Execute MCP tools via Gemini CLI with stdin piping and JSON results.

Updated Apr 9, 2026
One-click install
npx skills add https://github.com/jangtrinh/demo-Lam --skill ck-use-mcp-jangtrinh
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ck:use-mcp
Source: https://github.com/jangtrinh/demo-Lam/tree/main/.claude/skills/use-mcp
Command: npx skills add https://github.com/jangtrinh/demo-Lam --skill ck-use-mcp-jangtrinh

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps you execute MCP server tools reliably while preserving your model context budget and ensuring MCP initialization is not skipped.

Core Features & Use Cases

  • Gemini CLI–based MCP execution: Runs MCP operations through Gemini CLI using stdin piping so MCP support is preserved.
  • Tool discovery and fallback execution: Uses an mcp-manager subagent when Gemini CLI is unavailable to discover and execute appropriate MCP tools.
  • Operational safety guardrails: Enforces JSON-only parsing expectations and warns against deprecated flags that break MCP connections.

Quick Start

Ask an AI agent to run ck:use-mcp with the task you want completed and it will execute the best available MCP tools using Gemini CLI via stdin piping, falling back to mcp-manager if needed.

Frequently Asked Questions about ck:use-mcp

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run MCP server tools reliably without skipping MCP initialization?

To run MCP server tools reliably without skipping initialization, execute them through Gemini CLI using stdin piping. This method preserves model context budget and ensures the MCP connection initializes correctly during tool execution.

Why does my MCP execution fail when using the deprecated -p flag in Gemini CLI?

MCP execution fails with the deprecated -p flag because it breaks MCP connections. You must use stdin piping instead to preserve MCP support, auto-approve tool execution with the -y flag, and ensure predictable JSON parsing.

What is the best way to automate MCP tool discovery when Gemini CLI is unavailable?

The best way to automate MCP tool discovery when Gemini CLI is unavailable is using an mcp-manager subagent fallback. This subagent discovers and executes appropriate MCP tools deterministically while maintaining structured JSON results.

Can I use stdin piping to auto-approve MCP tool execution and return structured JSON?

Yes, you can use stdin piping to auto-approve MCP tool execution with the -y flag and return structured JSON. This approach reads the gemini.model from .claude/.ck.json and enforces JSON-only parsing expectations for deterministic results.

Do I need a specific configuration file to execute MCP tools through Gemini CLI?

Yes, you need the .claude/.ck.json configuration file to execute MCP tools through Gemini CLI. The execution process reads the gemini.model setting from this file to ensure correct context-safe tool discovery and predictable JSON parsing.

What are the limitations of using deprecated flags for MCP tool execution?

Using deprecated flags for MCP tool execution breaks MCP connections and skips initialization. To avoid these limitations, you must use stdin piping instead of the deprecated -p flag to ensure operational safety and maintain model context budget.