ck:use-mcp

Execute MCP server tools via Gemini CLI with JSON output.

Updated May 10, 2026
One-click install
npx skills add https://github.com/dthuy62/kollet-app --skill ck-use-mcp-dthuy62
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ck:use-mcp
Source: https://github.com/dthuy62/kollet-app/tree/main/.opencode/skills/use-mcp
Command: npx skills add https://github.com/dthuy62/kollet-app --skill ck-use-mcp-dthuy62

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps an agent discover and execute MCP tools efficiently when a task depends on external capabilities instead of direct local reasoning. It reduces wasted context by delegating execution to the correct tool path and returning structured results.

Core Features & Use Cases

  • Tool Discovery: Identifies the right MCP server and tool for a given task.
  • Deterministic Execution: Runs MCP operations through Gemini CLI using stdin piping to preserve MCP initialization.
  • Fallback Handling: Switches to an mcp-manager subagent when Gemini CLI is unavailable, while avoiding unnecessary script creation.
  • Use Case: Use this Skill when an assistant must query connected services, fetch structured data, or complete a tool-backed workflow without manual intervention.

Quick Start

Ask the assistant to execute your MCP-backed task through this Skill and return the result in JSON.

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 without losing context in my agent workflow?

You can execute MCP tools without losing context by delegating execution to Gemini CLI through stdin piping. This approach preserves MCP initialization and returns structured JSON results to the main agent.

How does tool discovery work when automating tasks with MCP servers?

Tool discovery identifies the correct MCP server and tool for a given task, routing requests automatically. This prevents manual context switching and reduces wasted context budget in agent workflows.

What is the best way to handle MCP tool execution when Gemini CLI is unavailable?

When Gemini CLI is unavailable, MCP tool execution falls back to an mcp-manager subagent. This no-new-scripts fallback path ensures safe recovery without creating unnecessary scripts.

Can I use this approach to fetch structured data from connected services?

Yes, you can query connected services and fetch structured data by running MCP operations through Gemini CLI. The process enforces JSON-only structured output for deterministic results.

Why does MCP execution require stdin piping with Gemini invocation?

MCP execution requires stdin piping because it preserves MCP initialization across Gemini CLI calls. This prevents context loss and ensures the agent maintains its connection to external tool capabilities.

Do I need to manually switch contexts to execute tool-backed workflows with MCP?

No, you do not need manual context switching. The Skill automates tool discovery, routes requests to the right MCP server, and returns JSON results directly within the agent workflow.