using-mcp-tools-with-mcpc
Use mcpc CLI to interact with MCP servers - call tools, read resources, get prompts. Use when working with Model Context Protocol servers, calling MCP tools, or accessing MCP resources programmatically; prefer key:=value bindings over raw JSON bodies.
Best use case
using-mcp-tools-with-mcpc is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Use mcpc CLI to interact with MCP servers - call tools, read resources, get prompts. Use when working with Model Context Protocol servers, calling MCP tools, or accessing MCP resources programmatically; prefer key:=value bindings over raw JSON bodies.
Teams using using-mcp-tools-with-mcpc should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/using-mcp-tools-with-mcpc/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How using-mcp-tools-with-mcpc Compares
| Feature / Agent | using-mcp-tools-with-mcpc | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Use mcpc CLI to interact with MCP servers - call tools, read resources, get prompts. Use when working with Model Context Protocol servers, calling MCP tools, or accessing MCP resources programmatically; prefer key:=value bindings over raw JSON bodies.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# mcpc: MCP command-line client
Use `mcpc` to interact with MCP (Model Context Protocol) servers from the command line.
This is more efficient than function calling - generate shell commands instead.
## Trust pattern
- **Always**: Read-only mcpc commands in the sandbox (e.g., `tools-list`, `tools-get`, `resources-list/read`, `prompts-list/get`, `tools-call` for read/search-only endpoints), session status checks, and commands that reuse already-created auth profiles.
- **Ask**: Anything that writes or needs network/OAuth (login/logout must be human-initiated in the foreground), connecting to new servers, commands that create/update/delete data, helper scripts that write files, or when sandbox blocks the command.
- **Never**: Destructive workspace actions (moves/deletes) without explicit user request; connecting to unknown MCP servers without instruction; backgrounding `mcpc <server> login` or trying to auto-open a browser.
## Quick reference
```text
# List sessions and auth profiles
mcpc
# Show server info
mcpc <server>
mcpc @<session>
# Tools
mcpc <target> tools-list
mcpc <target> tools-get <tool-name>
mcpc <target> tools-call <tool-name> key:=value key2:="string value"
# Resources
mcpc <target> resources-list
mcpc <target> resources-read <uri>
# Prompts
mcpc <target> prompts-list
mcpc <target> prompts-get <prompt-name> arg1:=value1
# Sessions (persistent connections)
mcpc <server> connect @<name>
mcpc @<name> <command>
mcpc @<name> close
# Authentication
mcpc <server> login
mcpc <server> logout
```
## Target types
- `mcp.example.com` - Direct HTTPS connection to remote server
- `localhost:8080` or `127.0.0.1:8080` - Local HTTP server (http:// is default for localhost)
- `@session-name` - Named persistent session (faster, maintains state)
- `config-entry` - Entry from config file (with `--config`)
## Passing arguments
Prefer `key:=value` bindings. Use inline JSON only when needed (e.g., first-arg object or complex arrays):
```text
# String values
mcpc @s tools-call search query:="hello world"
# Numbers, booleans, null (auto-parsed as JSON)
mcpc @s tools-call search query:="hello" limit:=10 enabled:=true
# Complex JSON values
mcpc @s tools-call search config:='{"nested":"value"}' items:='[1,2,3]'
# Force string type with JSON quotes
mcpc @s tools-call search id:='"123"'
# Inline JSON object (if first arg starts with { or [)
mcpc @s tools-call search '{"query":"hello","limit":10}'
# From stdin (auto-detected when piped)
echo '{"query":"hello"}' | mcpc @s tools-call search
```
## JSON output for scripting
Always use `--json` flag for machine-readable output:
```text
# Get tools as JSON
mcpc --json @apify tools-list
# Call tool and parse result with jq
mcpc --json @apify tools-call search query:="test" | jq '.content[0].text'
# Chain commands
mcpc --json @server1 tools-call get-data | mcpc @server2 tools-call process
```
## Sessions for efficiency
Create sessions for repeated interactions:
```text
# Create session (or reconnect if exists)
mcpc mcp.apify.com connect @apify
# Use session (faster - no reconnection overhead)
mcpc @apify tools-list
mcpc @apify tools-call search query:="test"
# Restart session (useful after server updates)
mcpc @apify restart
# Close when done
mcpc @apify close
```
**Session states:**
- 🟢 **live** - Bridge running, server might or might not be responding
- 🟡 **crashed** - Bridge crashed; auto-restarts on next use
- 🔴 **expired** - Server rejected session; needs `close` and reconnect
## Authentication
**OAuth (interactive login – human-only, foreground)**:
- `mcpc <server> login` opens the browser; mcpc never opens it itself. Do not background this command or it will miss the localhost callback.
- Run login once per profile, then reuse the saved credentials in scripts.
- Re-run login to refresh/change scopes.
Python preflight to enforce “login first” in scripts (no automatic browser launches):
```python
import json, os, sys
server = os.environ.get("MCP_SERVER", "mcp.apify.com")
profile = os.environ.get("MCP_PROFILE", "default")
profiles_path = os.path.join(os.path.expanduser("~"), ".mcpc", "profiles.json")
try:
data = json.load(open(profiles_path, "r", encoding="utf-8"))
profiles = data.get("profiles", [])
except FileNotFoundError:
profiles = []
has_profile = any(p.get("server") == server and p.get("name") == profile for p in profiles)
if not has_profile:
print(f"No mcpc auth profile '{profile}' for {server}.")
print(f"Run this yourself (foreground): mcpc {server} login --profile {profile}")
sys.exit(1)
```
After the preflight succeeds, scripts may call `mcpc --profile <name> ...` or rely on the default profile.
**Bearer token**:
```text
mcpc -H "Authorization: Bearer $TOKEN" mcp.apify.com tools-list
mcpc -H "Authorization: Bearer $TOKEN" mcp.apify.com connect @myserver
```
## Proxy server for AI isolation
Create a proxy MCP server that hides authentication tokens:
```text
# Human creates authenticated session with proxy
mcpc mcp.apify.com connect @ai-proxy --proxy 8080
# AI agent connects to proxy (no access to original tokens)
# Note: localhost defaults to http://
mcpc localhost:8080 tools-list
mcpc 127.0.0.1:8080 connect @sandboxed
```
## Common patterns
**List and inspect tools**:
```text
mcpc @s tools-list
mcpc @s tools-get tool-name
```
**Call tool and extract text result**:
```text
mcpc --json @s tools-call my-tool | jq -r '.content[0].text'
```
**Read resource content**:
```text
mcpc @s resources-read "file:///path/to/file"
```
**Use config file for local servers**:
```text
mcpc --config .vscode/mcp.json filesystem resources-list
```
## Exit codes
- `0` - Success
- `1` - Client error (invalid arguments)
- `2` - Server error (tool failed)
- `3` - Network error
- `4` - Authentication error
## Debugging
```text
# Verbose output shows protocol details
mcpc --verbose @s tools-call my-tool
```
## Example script
See [`docs/examples/company-lookup.sh`](../examples/company-lookup.sh) for a complete example
of an AI-generated script that validates prerequisites and calls MCP tools.Related Skills
using-superpowers
Use when starting any conversation - establishes how to find and use skills, requiring Skill tool invocation before ANY response including clarifying questions
using-skills
Provides sub agents important information on how to use skills
Using GitHub API with gh CLI
This skill teaches how to access GitHub's REST and GraphQL APIs via gh api for inline PR comments, review threads, and data not available through standard gh commands. Use this when you need PR review comments, thread status, or other GitHub data that gh pr view doesn't provide.
using-git-worktrees
(中文)Use when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktrees with smart directory selection and safety verification
using-contextd
Use when starting any session with contextd - introduces core tools for cross-session memory, semantic code search, and error remediation. REQUIRES contextd MCP server.
Static Analysis Tools Skill
Integration with security-focused static analysis tools
Red Team Tools and Methodology
This skill should be used when the user asks to "follow red team methodology", "perform bug bounty hunting", "automate reconnaissance", "hunt for XSS vulnerabilities", "enumerate subdomains", or needs security researcher techniques and tool configurations from top bug bounty hunters.
ravenseotools-automation
Automate Ravenseotools tasks via Rube MCP (Composio). Always search tools first for current schemas.
protobuf-tools
Protocol Buffers (protobuf) の使用ガイド。概要と各ガイド(Style Guide, Best Practices, Tools)へのリンクを提供する。詳細はサブファイルを参照。
project-aeo-monitoring-tools
Build custom AI search monitoring tools for competitive AEO analysis. Covers API access, scraping architecture, legal compliance, and cost estimation.
n8n-mcp-tools-expert
Expert guide for using n8n-mcp MCP tools effectively. Use when searching for nodes, validating configurations, accessing templates, managing workflows, or using any n8n-mcp tool. Provides tool sele...
kafka-cli-tools
Expert knowledge of Kafka CLI tools (kcat, kcli, kaf, kafkactl). Auto-activates on keywords kcat, kafkacat, kcli, kaf, kafkactl, kafka cli, kafka command line, produce message, consume topic, list topics, kafka metadata. Provides command examples, installation guides, and tool comparisons.