mcpc

द्वारा apify

mcpc CLI का उपयोग करके MCP सर्वरों से संवाद करें - टूल्स कॉल करें, संसाधन पढ़ें, प्रॉम्प्ट प्राप्त करें। इसका उपयोग तब करें जब Model Context Protocol सर्वरों के साथ काम कर रहे हों, MPC को कॉल कर रहे हों…

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 की और Skills

bug-triage
apify
apify/apify-mcp-server पर खुले बग मुद्दों को ट्रायेज करें। विश्लेषण करें, प्रतिक्रिया का मसौदा तैयार करें, अनुमोदन प्राप्त करें, पोस्ट करें।
official
dig
apify
Apify MCP सर्वर पर कार्य की खोज, योजना और विशिष्टीकरण के लिए लचीला कौशल। स्रोत फ़ाइलों को संपादित न करें — यह कौशल केवल समझने और योजना बनाने के लिए है।
official
apify-actor-development
apify
वेब स्क्रैपिंग, ऑटोमेशन और डेटा प्रोसेसिंग के लिए सर्वरलेस क्लाउड प्रोग्राम बनाएं, डीबग करें और डिप्लॉय करें। JavaScript, TypeScript और Python टेम्पलेट्स को इंटीग्रेटेड Crawlee, Playwright और Cheerio लाइब्रेरीज़ के साथ HTTP और ब्राउज़र-आधारित क्रॉलिंग के लिए सपोर्ट करता है। इसमें apify run के माध्यम से आइसोलेटेड स्टोरेज के साथ लोकल टेस्टिंग, इनपुट/आउटपुट के लिए स्कीमा वैलिडेशन और apify push के माध्यम से Apify
official
apify-actorization
apify
मौजूदा प्रोजेक्ट्स को भाषा-विशिष्ट SDK एकीकरण के साथ सर्वरलेस Apify एक्टर्स में बदलें। JavaScript/TypeScript (Actor.init() / Actor.exit() के साथ), Python (एसिंक कॉन्टेक्स्ट मैनेजर), और CLI रैपर के माध्यम से किसी भी भाषा को सपोर्ट करता है। संरचित वर्कफ़्लो प्रदान करता है: स्कैफोल्ड करने के लिए apify init, SDK रैपिंग लागू करना, इनपुट/आउटपुट स्कीमा कॉन्फ़िगर करना, apify run के साथ स्थानीय रूप से परीक्षण करना, फिर apify push के स
official
apify-audience-analysis
apify
Facebook, Instagram, YouTube और TikTok से दर्शकों की जनसांख्यिकी, जुड़ाव पैटर्न और व्यवहार डेटा निकालें। सभी चार प्लेटफ़ॉर्म पर फ़ॉलोअर जनसांख्यिकी, जुड़ाव मीट्रिक्स, टिप्पणियाँ और प्रोफ़ाइल विश्लेषण को कवर करने वाले 18+ विशेषज्ञ एक्टर्स का समर्थन करता है। तीन आउटपुट प्रारूप प्रदान करता है: त्वरित चैट प्रदर्शन, CSV निर्यात, या डाउनस्ट्रीम विश्लेषण के लिए JSON निर्यात। Apify टोकन और mcpc CLI टूल की आवश्यकता है; प्रत्येक
official
apify-brand-reputation-monitoring
apify
Google Maps, Booking.com, TripAdvisor, Facebook, Instagram, YouTube और TikTok पर ब्रांड प्रतिष्ठा की निगरानी करें। समीक्षाओं, रेटिंग्स, टिप्पणियों और उल्लेखों को कवर करने वाले 16+ समर्पित Apify एक्टर्स का समर्थन करता है। लचीले आउटपुट प्रारूप: परिणाम चैट में प्रदर्शित करें, CSV में निर्यात करें, या डाउनस्ट्रीम विश्लेषण के लिए JSON के रूप में सहेजें। Apify टोकन और Node.js 20.6+ की आवश्यकता है; एक्टर स्कीमा और इनपुट पैरामीटर गतिशील रूप से प्राप्त करने के लिए mc
official
apify-competitor-intelligence
apify
एपिफाई एक्टर्स के माध्यम से गूगल मैप्स, बुकिंग.कॉम, फेसबुक, इंस्टाग्राम, यूट्यूब और टिकटॉक के लिए बहु-प्लेटफॉर्म प्रतिस्पर्धी विश्लेषण। सात प्लेटफॉर्म पर 25 से अधिक विशेष एक्टर्स को कवर करता है, प्रत्येक विशिष्ट विश्लेषण प्रकारों के लिए अनुकूलित: व्यवसाय डेटा निष्कर्षण, समीक्षा तुलना, विज्ञापन रणनीति निगरानी, सामग्री प्रदर्शन और दर्शक अंतर्दृष्टि। एक्टर स्कीमा प्राप्त करने और ग
official
apify-content-analytics
apify
Apify Actors के माध्यम से Instagram, Facebook, YouTube और TikTok के लिए मल्टी-प्लेटफ़ॉर्म कंटेंट एनालिटिक्स। सभी चार प्लेटफ़ॉर्म पर पोस्ट, रील्स, स्टोरीज़, कमेंट्स, हैशटैग, फ़ॉलोअर्स और विज्ञापनों को कवर करने वाले 17+ विशेषज्ञ Actors को सपोर्ट करता है। mcpc CLI का उपयोग करके आवश्यक इनपुट और उपलब्ध आउटपुट फ़ील्ड निर्धारित करने के लिए Actor स्कीमा को डायनामिक रूप से प्राप्त करता है। परिणाम तीन प्रारूपों में आउटपुट करता है: त्वर
official