mcpc

작성자: apify

mcpc CLI를 사용하여 MCP 서버와 상호작용 - 도구 호출, 리소스 읽기, 프롬프트 가져오기. Model Context Protocol 서버 작업 시, MCP 호출 시 사용합니다.

npx skills add https://github.com/apify/mcpc --skill mcpc

mcpc: MCP command-line client

mcpc maps every MCP operation to a shell command. For agents this is often more efficient than function calling: discover the right tool on demand, then generate shell commands (ideally with --json) instead of carrying tool definitions in context.

Mental model

  1. Connect once to a server — this creates a persistent, named @session. A background bridge process keeps the connection (and its state) alive.
  2. Run commands against the @session: list/call tools, read resources, get prompts, run async tasks. There is no one-shot mcpc <url> tools-list — connect first.
  3. Default output is human-readable; add --json for machine-readable, MCP-spec shaped output that composes with jq and shell pipelines (code mode).

Everything is self-documenting — when unsure, ask the CLI:

mcpc --help                       # all commands + global options
mcpc help connect                 # help for one command
mcpc @apify tools-call foo --help # that tool's details + schema

First steps

mcpc                                   # list sessions + auth profiles (start here)
mcpc connect mcp.apify.com @apify      # connect, create the @apify session
mcpc @apify                            # server info, capabilities, tools overview
mcpc @apify tools-list                 # list tools
mcpc @apify tools-call <tool> q:="hi"  # call a tool

Connecting

Server formats accepted by connect:

  • mcp.example.com — remote HTTP server (https:// is added automatically)
  • localhost:8080 or 127.0.0.1:8080 — local HTTP server (http:// is the default for localhost and 127.0.0.1)
  • ~/.vscode/mcp.json:filesystem — a single entry from a config file (file:entry)
  • ~/.vscode/mcp.json — connect every entry in a config file
  • (no server) — auto-discover standard configs and connect all of them
mcpc connect mcp.apify.com @apify        # remote server, explicit session name
mcpc connect mcp.apify.com               # auto-name the session → @apify
mcpc connect ./.vscode/mcp.json:fs @fs   # one config entry (stdio or http)
mcpc connect                             # discover standard configs + connect everything
  • @session is optional — omit it to auto-generate a name from the server (mcp.apify.com@apify). A matching session (same server + auth) is reused.
  • Stdio (command-based) entries launch a local process on connect — only connect to configs you trust. Bulk connects skip stdio entries unless you pass --stdio.
  • login / logout only accept an MCP server URL (a bare host or full http(s):// URL) — not config files or auto-discovery.

Sessions

mcpc                     # list all sessions and their state
mcpc @apify              # session details, capabilities, tools (also reports the
                         # negotiated protocol version and stateful vs stateless)
mcpc restart @apify      # restart (after server updates, or to recover an 'expired' session)
mcpc close @apify        # tear the session down

Session states:

  • 🟢 live — ready to use
  • 🟡 connecting / reconnecting — transient; retry in a moment
  • 🟡 disconnected — bridge alive but the server has gone quiet; retry to reconnect
  • 🟡 crashed — bridge process died; auto-restarts on next use
  • 🔴 unauthorized — auth failed; run mcpc login <server> then mcpc restart @session
  • 🔴 expired — server dropped the session; run mcpc restart @session

Discovering and inspecting tools

mcpc @apify tools-list                  # compact list with inline param signatures
mcpc @apify tools-list --full           # full JSON schemas
mcpc @apify tools-get <tool>            # one tool's details + schema
mcpc @apify tools-call <tool> --help    # shortcut for tools-get: that tool's details + schema

mcpc grep "search"                      # search tools + instructions across ALL sessions
mcpc @apify grep "actor" --resources    # search one session
# grep filters: --tools/--resources/--prompts/--instructions, -E regex, -s case-sensitive, -m <n> max

Prefer progressive discovery: grep to find the right tool, then tools-get for its schema. This keeps token use low instead of dumping every tool definition.

Calling tools (passing arguments)

Arguments go after the tool name. Three interchangeable styles:

# 1) key:=value — values are auto-parsed as JSON, falling back to string
mcpc @apify tools-call search query:="hello world" limit:=10 enabled:=true
mcpc @apify tools-call search config:='{"nested":"value"}' items:='[1,2,3]'
mcpc @apify tools-call search id:='"123"'          # force a string with JSON quotes

# 2) inline JSON — when the first arg starts with { or [
mcpc @apify tools-call search '{"query":"hello","limit":10}'

# 3) stdin — auto-detected when piped and no positional args are given
echo '{"query":"hello"}' | mcpc @apify tools-call search

JSON output (code mode)

Add --json for machine-readable output: results on stdout, errors on stderr, shaped strictly per the MCP spec.

mcpc --json @apify tools-list | jq -r '.[].name'
mcpc --json @apify tools-call search query:="test" | jq -r '.content[0].text'

# chain tools across calls/sessions
mcpc --json @apify tools-call search-actors keywords:="scraper" \
  | jq -r '.content[0].text | fromjson | .items[0].id' \
  | xargs -I{} mcpc --json @apify tools-call get-actor actorId:="{}"

mcpc --json with no command returns { "sessions": [...], "profiles": [...] }.

Resources and prompts

mcpc @apify resources-list
mcpc @apify resources-read "file:///path/to/file"   # -o <file> to save (binary-safe), --raw to pipe
mcpc @apify resources-templates-list
mcpc @apify resources-subscribe <uri> <file>        # keep local <file> in sync with the resource
mcpc @apify resources-unsubscribe <uri>             # stop syncing, keep the file

mcpc @apify prompts-list
mcpc @apify prompts-get <name> arg1:=value1         # same argument syntax as tools-call (values coerced to strings)

Async tasks (long-running tools)

mcpc @apify tools-call <tool> --task <args>     # run as a task with a progress spinner; Ctrl+C (or
                                                # ESC) leaves it running and prints the task ID.
                                                # Falls back to a normal sync call if the server has no task support.
mcpc @apify tools-call <tool> --detach <args>   # start and return the task ID immediately
mcpc @apify tasks-list
mcpc @apify tasks-get <taskId>                  # status
mcpc @apify tasks-result <taskId>               # block until the final result is ready
mcpc @apify tasks-cancel <taskId>

Authentication

# OAuth — interactive browser login, saved as a reusable profile
mcpc login mcp.apify.com                    # "default" profile
mcpc login mcp.apify.com --profile work     # a named profile (multiple accounts per server)
mcpc connect mcp.apify.com @apify --profile work
mcpc logout mcp.apify.com

# Bearer token — not stored as a profile; kept per-session
mcpc connect mcp.apify.com @s -H "Authorization: Bearer $TOKEN"
mcpc @s tools-list

With no auth flags, mcpc uses the default profile if one exists, otherwise it connects anonymously. Use --no-profile to force an anonymous connection, or --profile <name> to require a specific one.

Proxy for AI isolation

Expose an authenticated session as a local MCP server, so sandboxed AI code can use it without ever seeing your real credentials:

# Human: authenticated session + proxy listening on :8080
mcpc connect mcp.apify.com @ai-proxy --profile ai-access --proxy 8080

# AI in a sandbox limited to localhost: no access to the original tokens
mcpc connect localhost:8080 @sandboxed
mcpc @sandboxed tools-list

A proxy does not make an untrusted server safe — stdio servers still touch your system, and HTTP servers still hold your credentials. Only connect to servers you trust.

Server-published skills (experimental)

Distinct from this guide: some MCP servers publish their own agent skills (draft MCP extension, SEP-2640). Read them with:

mcpc @apify skills-list
mcpc @apify skills-get <name> --raw    # print the SKILL.md markdown (pipe to a file or an LLM)

(mcpc help --skill documents mcpc itself; skills-list / skills-get fetch skills from the server.)

Global flags worth knowing

--json                  # machine-readable, MCP-spec-shaped output (code mode)
--verbose               # protocol-level debug logging (JSON-RPC, transport)
--profile <name>        # OAuth profile to use ("default" if omitted)
--timeout <seconds>     # request timeout in seconds (default: 60)
--max-chars <n>         # truncate human-readable output to n chars (ignored with --json)
--insecure              # skip TLS verification (self-signed certs only)

(--no-profile, --stdio, --proxy, and -H are options of connect, not global flags.)

mcpc also has experimental --x402 auto-payment for paid MCP tools — see mcpc help x402.

Debugging

mcpc --verbose @apify tools-call <tool>   # protocol-level detail (JSON-RPC, transport)
mcpc @apify logs                          # bridge log; -n <N>, --follow, --since 1h
mcpc @apify ping                          # round-trip health check
mcpc clean                                # tidy stale sessions/logs (also: mcpc clean all)

Exit codes

  • 0 — success
  • 1 — client error (invalid arguments, unknown command)
  • 2 — server error (tool failed, resource not found)
  • 3 — network error
  • 4 — authentication error

apify의 다른 스킬

bug-triage
apify
apify/apify-mcp-server 저장소의 열린 버그 이슈를 분류합니다. 분석하고, 응답을 초안 작성하며, 승인을 받고, 게시합니다.
official
dig
apify
Apify MCP 서버에서 작업을 탐색, 계획 및 사양을 작성하기 위한 유연한 스킬입니다. 소스 파일을 편집하지 마십시오 — 이 스킬은 이해와 계획 전용입니다.
official
apify-actor-development
apify
서버리스 클라우드 프로그램을 생성, 디버깅 및 배포하여 웹 스크래핑, 자동화 및 데이터 처리를 수행합니다. JavaScript, TypeScript 및 Python 템플릿을 지원하며, HTTP 및 브라우저 기반 크롤링을 위한 통합 Crawlee, Playwright 및 Cheerio 라이브러리를 포함합니다. 격리된 스토리지와 함께 apify run을 통한 로컬 테스트, 입력/출력에 대한 스키마 검증, apify push를 통한 Apify 플랫폼 배포를 포함합니다. Apify CLI 인증 및 AI를 위한 .actor/actor.json의 필수 generatedBy 메타데이터가 필요합니다...
official
apify-actorization
apify
기존 프로젝트를 언어별 SDK 통합을 통해 서버리스 Apify Actor로 변환합니다. JavaScript/TypeScript(Actor.init() / Actor.exit() 사용), Python(비동기 컨텍스트 매니저), CLI 래퍼를 통한 모든 언어를 지원합니다. 구조화된 워크플로우를 제공합니다: apify init으로 스캐폴딩, SDK 래핑 적용, 입출력 스키마 구성, apify run으로 로컬 테스트, apify push로 배포. 입출력 스키마 검증, Docker 컨테이너화, 선택적 이벤트당 과금을 포함합니다.
official
apify-audience-analysis
apify
페이스북, 인스타그램, 유튜브, 틱톡에서 잠재 고객 인구통계, 참여 패턴, 행동 데이터를 추출합니다. 4개 플랫폼 전반에 걸쳐 팔로워 인구통계, 참여 지표, 댓글, 프로필 분석을 다루는 18개 이상의 전문 액터를 지원합니다. 빠른 채팅 표시, CSV 내보내기, 다운스트림 분석용 JSON 내보내기 등 세 가지 출력 형식을 제공합니다. Apify 토큰과 mcpc CLI 도구가 필요하며, 동적 스키마 가져오기를 사용하여 각 액터의 요구사항에 맞게 입력을 조정합니다. 구조화된...
official
apify-brand-reputation-monitoring
apify
Google Maps, Booking.com, TripAdvisor, Facebook, Instagram, YouTube, TikTok 전반에서 브랜드 평판을 모니터링합니다. 리뷰, 평점, 댓글, 멘션을 포함한 모든 주요 플랫폼을 아우르는 16개 이상의 전용 Apify Actor를 지원합니다. 유연한 출력 형식: 채팅에서 결과 표시, CSV로 내보내기, 또는 다운스트림 분석을 위해 JSON으로 저장 가능합니다. Apify 토큰과 Node.js 20.6+가 필요하며, mcpc CLI를 사용하여 Actor 스키마와 입력 파라미터를 동적으로 가져옵니다. 워크플로는 플랫폼 선택 과정을 안내합니다.
official
apify-competitor-intelligence
apify
Apify Actors를 통한 Google Maps, Booking.com, Facebook, Instagram, YouTube, TikTok의 멀티 플랫폼 경쟁사 분석. 7개 플랫폼에 걸쳐 25개 이상의 특화된 Actors를 제공하며, 각각 비즈니스 데이터 추출, 리뷰 비교, 광고 전략 모니터링, 콘텐츠 성과, 오디언스 인사이트 등 특정 분석 유형에 최적화되어 있습니다. Apify 토큰, Node.js 20.6+, 그리고 Actor 스키마를 가져와 동적으로 분석을 실행하는 mcpc CLI 도구가 필요합니다. 빠른 채팅 표시 등 세 가지 출력 형식을 지원합니다.
official
apify-content-analytics
apify
Apify Actors를 통한 Instagram, Facebook, YouTube, TikTok의 멀티 플랫폼 콘텐츠 분석. 네 플랫폼의 게시물, 릴스, 스토리, 댓글, 해시태그, 팔로워, 광고를 포함한 17개 이상의 특화 Actors를 지원합니다. mcpc CLI를 사용하여 Actor 스키마를 동적으로 가져와 필요한 입력과 사용 가능한 출력 필드를 결정합니다. 빠른 채팅 표시, CSV 내보내기, JSON 내보내기(결과 수 사용자 지정 가능)의 세 가지 형식으로 결과를 출력합니다. .env 파일에 Apify 토큰이 필요하며 Node.js 20.6+가 필요합니다...
official