mcp-cli — GitHub Copilot skill: MCP server interface via CLI
CLI interface for calling MCP server tools from the command line. Useful when you need to automate access to external APIs, filesystems, or databases through MCP.
npx skills add github/awesome-copilot --skill mcp-cliWhat mcp-cli does
The skill gives you terminal access to MCP servers: list available servers and tools, inspect parameters and JSON schemas, call tools with arguments. mcp-cli shows all servers and their tools, mcp-cli outputs tool parameters for a specific server, mcp-cli / returns the JSON schema, and mcp-cli / '' executes a call with the provided arguments.
Under the hood: four steps—discover servers, explore tools, inspect schema, execute call. Flag -d adds descriptions, --json outputs results in JSON for scripting, --raw returns raw text. Search tools by name with mcp-cli grep "*pattern*".
Install this if you write scripts that call MCP tools or automate work with external systems from the command line. Skip it if you don't use MCP servers.
What it helps with
- List available MCP servers and tools
- Get JSON schema for a specific MCP tool
- Call an MCP tool with JSON arguments from terminal
- Search tools by name pattern
- Automate MCP tool calls in scripts
Example prompts for the agent
- Show all available MCP servers and tools using mcp-cli
- Call filesystem/read_file for README.md via mcp-cli
- Find all MCP tools with 'file' in the name
How to install mcp-cli
1Skills CLI (Vercel)
npx skills add github/awesome-copilot --skill mcp-cli2GitHub CLI
gh skill install github/awesome-copilot mcp-cli3Manually: put the files in place
.github/skills/mcp-cli/SKILL.md1Skills CLI (Vercel)
npx skills add github/awesome-copilot --skill mcp-cli -a claude-code2Manually: put the files in place
~/.claude/skills/mcp-cli/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/mcp-cli/
Manually: put the files in place
.agents/skills/mcp-cli/SKILL.mdFor all projects use ~/.agents/skills/
Manually: put the files in place
.cursor/skills/mcp-cli/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
Platform CLI
gemini skills install https://github.com/github/awesome-copilot --path skills/mcp-cliManually: put the files in place
.devin/skills/mcp-cli/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
From the same set554
The whole set →Similar
Questions about mcp-cli
How to install mcp-cli in GitHub Copilot?
Run npx skills add github/awesome-copilot --skill mcp-cli or gh skill install github/awesome-copilot mcp-cli. The skill will appear in .github/skills/mcp-cli/SKILL.md.
What does mcp-cli do?
Provides a CLI interface to MCP servers: list tools, inspect their schemas, and call them with arguments from the command line.
How to call an MCP tool with arguments?
Use mcp-cli / '', for example mcp-cli filesystem/read_file '{"path": "./README.md"}'. For complex JSON, pipe it via heredoc or stdin.
Source text
SKILL.md · MIT
---
name: mcp-cli
description: Interface for MCP (Model Context Protocol) servers via CLI. Use when you need to interact with external tools, APIs, or data sources through MCP servers, list available MCP servers/tools, or call MCP tools from command line.
---
# MCP-CLI
Access MCP servers through the command line. MCP enables interaction with external systems like GitHub, filesystems, databases, and APIs.
## Commands
| Command | Output |
| ---------------------------------- | ------------------------------- |
| `mcp-cli` | List all servers and tool names |
| `mcp-cli <server>` | Show tools with parameters |
| `mcp-cli <server>/<tool>` | Get tool JSON schema |
| `mcp-cli <server>/<tool> '<json>'` | Call tool with arguments |
| `mcp-cli grep "<glob>"` | Search tools by name |
**Add `-d` to include descriptions** (e.g., `mcp-cli filesystem -d`)
## Workflow
1. **Discover**: `mcp-cli` → see available servers and tools
2. **Explore**: `mcp-cli <server>` → see tools with parameters
3. **Inspect**: `mcp-cli <server>/<tool>` → get full JSON input schema
4. **Execute**: `mcp-cli <server>/<tool> '<json>'` → run with arguments
## Examples
```bash
# List all servers and tool names
mcp-cli
# See all tools with parameters
mcp-cli filesystem
# With descriptions (more verbose)
mcp-cli filesystem -d
# Get JSON schema for specific tool
mcp-cli filesystem/read_file
# Call the tool
mcp-cli filesystem/read_file '{"path": "./README.md"}'
# Search for tools
mcp-cli grep "*file*"
# JSON output for parsing
mcp-cli filesystem/read_file '{"path": "./README.md"}' --json
# Complex JSON with quotes (use heredoc or stdin)
mcp-cli server/tool <<EOF
{"content": "Text with 'quotes' inside"}
EOF
# Or pipe from a file/command
cat args.json | mcp-cli server/tool
# Find all TypeScript files and read the first one
mcp-cli filesystem/search_files '{"path": "src/", "pattern": "*.ts"}' --json | jq -r '.content[0].text' | head -1 | xargs -I {} sh -c 'mcp-cli filesystem/read_file "{\"path\": \"{}\"}"'
```
## Options
| Flag | Purpose |
| ------------ | ------------------------- |
| `-j, --json` | JSON output for scripting |
| `-r, --raw` | Raw text content |
| `-d` | Include descriptions |
## Exit Codes
- `0`: Success
- `1`: Client error (bad args, missing config)
- `2`: Server error (tool failed)
- `3`: Network error
© github · MIT · github/awesome-copilot