mcp-client

Connect to MCP servers to discover and execute tools on demand.

2|Updated Dec 19, 2025
One-click install
npx skills add https://github.com/mjunaidca/code-execution-mcp-agent-skills --skill mcp-client
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mcp-client
Source: https://github.com/mjunaidca/code-execution-mcp-agent-skills/tree/main/.claude/skills/mcp-client
Command: npx skills add https://github.com/mjunaidca/code-execution-mcp-agent-skills --skill mcp-client

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires PyYAML, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Keeps MCP tool definitions lightweight by loading tools on-demand, caching tool schemas, and executing tools through a single client to reduce token usage.

Core Features & Use Cases

  • On-demand tool discovery: List and call tools from any MCP server without loading all definitions upfront.
  • Schema caching: Emit tool schemas to references/ for progressive disclosure.
  • HTTP or stdio transports: Works with both remote and local MCP servers.
  • Unified client: Run tool calls and process results in a consistent way.

Quick Start

Copy scripts/mcp-client.py into your skill, configure the server URL, then list or call tools using the CLI.

Frequently Asked Questions about mcp-client

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

FAQPage Schema
How do I connect to an MCP server and dynamically access tools without preloading definitions?

MCP client connects to MCP servers using HTTP or stdio transports to dynamically discover and execute tools on-demand. This approach lists available tools from the server, caches their schemas for reference, and invokes them as needed—reducing token usage by avoiding upfront loading of all tool definitions into your AI skill's context.

Can I use an MCP client with both remote and local MCP servers?

Yes, MCP client supports both HTTP transports for remote MCP servers and stdio transports for local servers. This flexibility allows you to work with MCP servers running anywhere in your architecture while maintaining a single unified client interface for tool discovery and invocation.

How do I set up JSON-RPC communication with an MCP server?

MCP client implements JSON-RPC communication by initializing MCP sessions, establishing transports, and handling message exchange automatically. After copying the mcp-client.py script into your skill and configuring the server URL, the client manages all protocol details for listing and calling tools.

What's the best way to manage tool schemas when working with external tools?

MCP client generates and caches tool schemas to the references/ directory, enabling progressive disclosure of tool definitions. Schema caching keeps your workflow modular and reduces the number of tool definitions loaded into context at any given time, supporting on-demand tool discovery.

Do I need to manually load all tool definitions into my skill's context?

No, MCP client eliminates manual tool loading by dynamically discovering tools from MCP servers. Tools are listed and invoked on-demand through the client, with schemas cached for reference—this keeps tool definitions lightweight and out of your skill's main context.

Can I run tool calls and process results consistently across multiple MCP servers?

Yes, MCP client provides a unified interface for tool invocation and result processing regardless of server count or type. The single client abstracts transport and JSON-RPC details, letting you call tools and handle responses uniformly across HTTP and stdio MCP servers.