Scrapely MCP Server
An MCP (Model Context Protocol) server that wraps the Scrapely API, letting AI assistants like Claude directly manage your Twitter/X DM outreach — campaigns, lead scraping, conversations, CRM, and scheduled tweets — all through natural language.
GitHub: github.com/deepblue6/scrapely-mcp
Quick Start
You need a Scrapely API key. Generate one from Settings in your Scrapely dashboard.
Use in Claude (claude.ai) — Recommended
Add Scrapely as a connector in Claude. No install needed.
- Go to Claude Settings → Connectors → Add custom connector
- Fill in:
- Name:
Scrapely
- Remote MCP server URL:
https://mcp.scrapely.co/mcp
- Click Add
- When prompted, enter your Scrapely API key
That's it. Open any Claude conversation and start using Scrapely tools.
Use in Claude Code
One command (replace sk_live_... with your real key):
claude mcp add --transport http --scope user scrapely https://mcp.scrapely.co/mcp \
--header "Authorization: Bearer sk_live_your_key_here"
No install, no Node.js required. The --scope user flag makes it available across all your projects.
To update or rotate your key, remove and re-add:
claude mcp remove scrapely --scope user
claude mcp add --transport http --scope user scrapely https://mcp.scrapely.co/mcp \
--header "Authorization: Bearer sk_live_new_key_here"
Use in Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"scrapely": {
"command": "npx",
"args": ["scrapely-mcp"],
"env": {
"SCRAPELY_API_KEY": "sk_live_your_key_here"
}
}
}
}
Other MCP clients
Any MCP-compatible client works. Just run npx scrapely-mcp with SCRAPELY_API_KEY set in the environment.
Command-line tool (CLI)
The same package also gives you a scrapely command, so you can run your Scrapely outreach from the terminal or from your own scripts. It can do everything the MCP server can: same features, same options.
Install
npm install -g scrapely-mcp
This installs the scrapely command. To try it without installing anything, put npx -p scrapely-mcp in front of any command:
npx -p scrapely-mcp scrapely campaigns list
npx scrapely (without -p scrapely-mcp) is not this tool. It downloads a different npm package that happens to have the same name.
Requires Node.js 18.3 or newer.
Log in
scrapely login
Create an API key at app.scrapely.co/settings/integrations, then paste it when asked (what you type stays hidden). Scrapely checks the key before saving it.
- The key is saved in
~/.config/scrapely/config.json (%APPDATA%\scrapely\config.json on Windows), and only your user can read that file.
scrapely whoami shows which key is in use (only its last 4 characters) and where it comes from.
scrapely logout removes the saved key.
- In scripts and CI you can skip
login and set the SCRAPELY_API_KEY environment variable instead. When it is set, it wins over saved keys (unless you pass --profile).
Several workspaces (agencies)
Save one key per workspace under a profile name, then pick it per command or make it the default:
scrapely login --profile bitvault
scrapely campaigns list --profile bitvault
scrapely profiles use bitvault # use it by default
scrapely profiles list # names, masked keys, which one is the default
scrapely profiles remove bitvault
The key used is, first match wins: --profile, SCRAPELY_API_KEY, SCRAPELY_PROFILE (a profile name), the default profile, then a profile named default if it is the only one. Commands that change things show the profile in their "Continue?" question (and print it when you pass --yes), so you always know which workspace you're changing. When SCRAPELY_API_KEY is set while you have saved profiles, every command prints a note saying it is being used instead.
Use with AI agents (Claude Code, Codex, Cursor)
One command teaches your coding agent to use the CLI, with nothing to copy and paste:
scrapely setup-agent
It writes a Claude Code skill to ~/.claude/skills/scrapely/SKILL.md and a Scrapely section to ./AGENTS.md (read by Codex, Cursor and many other agents), after showing you the files and asking first. In AGENTS.md it only touches the block between <!-- scrapely:start --> and <!-- scrapely:end -->, so running it again (for example after upgrading) updates that block and leaves the rest of the file alone.
--claude or --agents-md writes just one of them; --project puts the skill in this project's .claude/skills instead of your home folder.
--print shows the instructions without writing anything.
- A
SKILL.md you wrote yourself is never replaced unless you add --force.
The instructions tell your agent to check scrapely whoami first, to ask you to run scrapely login yourself (never to paste a key into the chat), to use --json, and to get your explicit OK before anything that sends, spends, launches, pauses or deletes. For agencies, they tell it to pick the workspace with --profile <name> and always say which profile it used. Then try asking your agent: "show me my Scrapely campaigns".
Your first 5 minutes
# 1. See your connected X accounts (copy an ID from the ID column for later)
scrapely accounts list
# 2. See your campaigns and how they are doing
scrapely campaigns list
# 3. Look at one campaign in detail: replies, per-account stats, messages and settings
scrapely campaigns get --campaign-name "Agency owners"
# 4. Count founders in New York with 1,000+ followers in the People database
# (counting is free; it still asks "Continue?" because full searches use credits)
scrapely people search --bio-contains founder --location-contains "New York" --min-followers 1000 --count-only
# 5. Reply to someone: find the conversation, then send the DM from one of your accounts
scrapely conversations list --limit 10
scrapely dm send --conversation-id <conversation-id> --account-id <account-id> --message "Thanks, talk soon!"
Help is built in at every level:
scrapely --help # every group of commands
scrapely campaigns --help # every command in a group
scrapely campaigns launch --help # every option of a command, with an example
Options are written as --flags. For yes/no options, --include-messages means yes and --no-include-messages means no. For lists, repeat the flag or separate values with commas (--bio-contains founder,ceo). Options that take structured data (like a campaign's message variants) accept JSON text, @file.json to read it from a file, or - to read it from stdin.
Use it in scripts: --json
Results print as easy-to-read tables. Add --json to get the raw JSON instead, which is ideal for scripts and tools like jq:
scrapely campaigns list --json | jq '.campaigns[].name'
Confirmation before changes, and --yes
Commands that send DMs, spend credits, launch, pause, delete or overwrite something show what they are about to do and ask Continue? [y/N] first. Nothing happens unless you answer yes. These commands are marked "yes" in the "Asks first" column below, and with * in scrapely <group> --help.
To skip the question, add --yes (or -y). In a script, where there is nobody to answer, these commands stop and do nothing unless you pass --yes:
scrapely campaigns pause --campaign-name "Agency owners" --yes
Call any API endpoint: scrapely api
If something you need doesn't have a command yet, scrapely api calls any endpoint of the Scrapely API directly with your API key and prints the JSON response. Paths are relative to https://app.scrapely.co/api/v1.
scrapely api GET /campaigns --query limit=5
scrapely api POST /campaigns/pause --data '{"campaign_name":"Agency owners","is_paused":true}'
--data takes JSON text, @file.json, or - for stdin. Anything other than a GET asks for confirmation first (or pass --yes).
Other options
| Option |
What it does |
--json |
Print raw JSON instead of tables |
-y, --yes |
Don't ask "Continue?" before commands that change things |
--debug |
Show technical details when something fails |
-h, --help |
Show help |
--version |
Show the installed version |
Once a day the CLI checks npm for a newer version and, if there is one, prints an "Update available" line (on stderr, so --json output stays clean). Set SCRAPELY_NO_UPDATE_CHECK=1 to turn this off; it's also off when CI is set.
All commands