mcp-cli

Invoke MCP server tools, resources, and prompts from a local CLI.

10|2|Updated Mar 13, 2026
One-click install
npx skills add https://github.com/smithery-ai/mcp-to-cli --skill mcp-cli-smithery-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mcp-cli
Source: https://github.com/smithery-ai/mcp-to-cli/tree/main
Command: npx skills add https://github.com/smithery-ai/mcp-to-cli --skill mcp-cli-smithery-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Many agents and developer tools must reconnect to remote MCP servers individually, which leads to repeated authorization flows, fragmented credentials, and excessive context usage. This CLI centralizes named connections locally so you can connect once and invoke tools, resources, and prompts from any shell or scripted workflow without reauthenticating each time.

Core Features & Use Cases

  • Centralized connections: Save named MCP server connections per profile and reuse them across tools and scripts.
  • Tool invocation: List, inspect, and call remote MCP tools interactively or with JSON arguments, with local argument validation against the tool's JSON schema.
  • Auth and tunneling: Support OAuth PKCE flows with an optional ngrok tunnel for public callbacks, and a local callback server for capturing tokens.
  • Profiles & inheritance: Maintain nested profiles with inherited connections and per-profile auth state for staging, production, or multi-tenant workflows.
  • Transport resilience: Uses Streamable HTTP with SSE fallback and sensible error messages for robust connectivity.

Quick Start

Use mcp-cli to connect to a server with no browser by running the connect command with the --no-open flag, save the connection under a name, and then run the named connection's tools list to see available tools.

Frequently Asked Questions about mcp-cli

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

FAQPage Schema
How do I invoke remote MCP tools from the command line?

You can invoke remote MCP tools from the command line by using a CLI that connects to remote MCP servers, allowing you to list, inspect, and call tools with JSON arguments while validating them locally against their schemas.

How does OAuth PKCE authentication work for remote MCP server connections?

OAuth PKCE authentication for remote MCP connections uses a local callback server to capture tokens, with optional ngrok tunneling for public callbacks, ensuring secure authorization flows without repeated logins.

Can I manage multiple MCP server connections for different environments?

Yes, you can manage multiple MCP server connections using nested profiles that maintain inherited connections and per-profile auth state, which is ideal for separating staging, production, or multi-tenant workflows.

What transport protocols does the MCP CLI use for remote server connectivity?

The MCP CLI uses Streamable HTTP with SSE fallback for transport, ensuring robust connectivity and providing sensible error messages when communicating with remote MCP servers.

Do I need Bun to run the MCP command line interface?

Yes, you need Bun to operate the MCP command line interface, which manages profile-specific connection and authentication state stored locally under the ~/.mcp-to-cli directory.

Why does my MCP tool call fail when passing invalid arguments?

MCP tool calls fail when arguments are invalid because the CLI validates them locally against the tool's JSON schema before execution, preventing malformed requests from reaching the remote server.