Skip to main content
Glama
slidecold-mcp

slidecold-mcp

by slidecold

SlideCold Python SDK

The official Python client for the SlideCold API (Instagram cold-DM outreach): SlideCold and AsyncSlideCold clients with typed methods for every API operation, generated from the OpenAPI spec.

Looking for a command line or an MCP server? They live in their own repos:

Install

pip install slidecold    # Python 3.9+, the only dependency is httpx

Create an API key at https://slidecold.com/settings. Keys look like cs_....

Related MCP server: external-ai-ecosystem-gateway

Authentication

The API key is resolved in this order:

  1. the api_key= argument

  2. the SLIDECOLD_API_KEY environment variable

  3. the config file written by slidecold login from slidecold-cli: ~/.config/slidecold/config.json ($XDG_CONFIG_HOME/slidecold/config.json if set, %APPDATA%\slidecold\config.json on Windows)

The base URL follows the same order (base_url=, SLIDECOLD_BASE_URL, config baseUrl), then defaults to https://slidecold.com/api/v1. The config file is {"apiKey": "cs_...", "baseUrl": "..."}. The SDK only reads it; it never writes it.

SDK quickstart

from slidecold import SlideCold

with SlideCold() as client:  # or SlideCold(api_key="cs_...")
    for campaign in client.campaigns.list():
        print(campaign["id"], campaign["name"], campaign["status"])

    campaign = client.campaigns.create(
        name="Spring outreach",
        audienceIds=["aud_123"],
        accountIds=["acc_456"],
        templates=[{"body": "Hey, quick question about your page"}],
    )
    print(client.campaigns.stats(campaign["id"]))

    csv_text = client.audiences.export("aud_123")  # str
    members = client.audiences.list_members("aud_123", min_followers=1000, limit=50)
    client.conversations.send_reply("conv_789", message="Thanks, sending details now")
    client.conversations.send_photo("conv_789", file="offer.jpg")

Request bodies use the API's field names. Pass them as keyword arguments, as a dict, or both: client.campaigns.update(id, {"status": "ACTIVE"}) is the same as client.campaigns.update(id, status="ACTIVE"). Path parameters are positional and query parameters are snake_case keyword arguments. Every method's docstring lists the scope it needs. Responses are plain dicts and lists, typed with the TypedDicts in slidecold.types.

Async

import asyncio
from slidecold import AsyncSlideCold


async def main():
    async with AsyncSlideCold() as client:
        accounts, campaigns = await asyncio.gather(client.accounts.list(), client.campaigns.list())


asyncio.run(main())

Instagram login jobs

Adding an account, re-logging in and session checks run in the background and return {"jobId": ...}. wait_for_login_job polls accounts.login_status until the job finishes:

job = client.accounts.create(username="mybrand", password="...", proxyId="prx_1")
status = client.wait_for_login_job(job["jobId"], interval=2, timeout=120)
if status["state"] == "failed":
    print(status.get("error"))

It returns the final status (completed, failed or unknown) and raises TimeoutError after timeout seconds. AsyncSlideCold.wait_for_login_job is the async version.

Options

SlideCold(api_key=None, base_url=None, timeout=30, max_retries=2). GET requests are retried on 429, 5xx and connection errors with exponential backoff (honouring Retry-After). Other methods are never retried, so a DM is never sent twice. client.request("operationId", path=..., query=..., body=...) calls any operation by its OpenAPI operationId.

Scopes

Each API key has scopes of the form <resource>:<read|write> for accounts, audiences, campaigns and conversations. A :write scope also grants :read. Proxies use the accounts scopes. The scope for each operation is shown in its method docstring.

Errors

All errors derive from slidecold.SlideColdError and carry status, message (the API's error string) and body (the parsed response).

Exception

When

AuthenticationError

401: the key is missing or invalid

PermissionDeniedError

403: the key lacks a scope (This API key is missing the campaigns:write scope) or a plan limit was hit

NotFoundError

404

RateLimitError

429

APIError

any other error status (base class of the four above)

APIConnectionError

no response: DNS, connection or timeout

from slidecold import PermissionDeniedError

try:
    client.campaigns.delete("cmp_1")
except PermissionDeniedError as e:
    print(e.status, e.message)

Webhooks

SlideCold signs each webhook with an X-SlideCold-Signature header: the hex HMAC-SHA256 of the raw JSON body, keyed with the endpoint secret (whsec_...). Verify it against the raw bytes, before parsing:

from slidecold import verify_webhook_signature


@app.post("/webhooks/slidecold")  # Flask
def slidecold_webhook():
    if not verify_webhook_signature(
        request.get_data(), request.headers.get("X-SlideCold-Signature", ""), WHSEC
    ):
        abort(401)
    event = request.get_json()
    ...

Development

uv sync
uv run python scripts/generate.py          # regenerate from openapi.yaml
uv run ruff check . && uv run ruff format --check . && uv run mypy && uv run pytest

src/slidecold/_operations.py, _resources.py and types.py are generated from openapi.yaml and committed. CI fails if they are stale.

License

MIT

Available Tools

49 tools
check_account_sessionCheck the Instagram sessionB

Check the Instagram session. Required API key scope: accounts:write. POST /accounts/{id}/check-session Queues a session check; the account status is updated by the worker.

Inputs: id (required).

create_accountAdd an Instagram accountA

Add an Instagram account. Required API key scope: accounts:write. POST /accounts Queues a login job. A proxy (proxyId or inline proxy) is required in production. The login may need 2FA or a challenge (see verifyAccount2fa / verifyAccountChallenge). Body validation uses a throwing parse, so a malformed body yields a 500 rather than a 400.

Inputs: body (required).

create_audienceCreate an audienceC

Create an audience. Required API key scope: audiences:write. POST /audiences

Inputs: body (required).

create_campaignCreate a campaignA

Create a campaign. Required API key scope: campaigns:write. POST /campaigns Creates a DRAFT campaign with templates, follow-ups, accounts and audiences, and creates a PENDING recipient for every (deduplicated) member of the given audiences. timezone is accepted but ignored: the user's account timezone is used. Validation errors are reported as "<field>: <message>".

Inputs: body (required).

create_folderCreate a folderA

Create a folder. Required API key scope: campaigns:write | audiences:write | accounts:write. POST /folders Required scope depends on body type: CAMPAIGN → campaigns:write, AUDIENCE → audiences:write, ACCOUNT → accounts:write. The body is validated before authentication, so a bad body returns 400 even without credentials. A duplicate name under the same parent violates a unique constraint (500).

Inputs: body (required).

create_proxyAdd a proxyC

Add a proxy. Required API key scope: accounts:write. POST /proxies Malformed bodies yield 500 (throwing parse).

Inputs: body (required).

delete_accountDelete an accountB
DestructiveIdempotent

Delete an account. Required API key scope: accounts:write. DELETE /accounts/{id} Returns success even if the account does not exist.

Inputs: id (required).

delete_audienceDelete an audienceA
DestructiveIdempotent

Delete an audience. Required API key scope: audiences:write. DELETE /audiences/{id} Fails with 409 if an ACTIVE campaign uses it as its primary audience; otherwise unlinks it from other campaigns and deletes it.

Inputs: id (required).

delete_campaignDelete a campaignB
DestructiveIdempotent

Delete a campaign. Required API key scope: campaigns:write. DELETE /campaigns/{id}

Inputs: id (required).

delete_conversation_messageDelete (unsend) a messageA
DestructiveIdempotent

Delete (unsend) a message. Required API key scope: conversations:write. DELETE /conversations/{id}/messages/{messageId} Deletes the message locally and, when possible, queues a best-effort unsend on Instagram.

Inputs: id (required), messageId (required).

delete_folderDelete a folderA
DestructiveIdempotent

Delete a folder. Required API key scope: accounts:write. DELETE /folders/{id} Requires accounts:write regardless of type. Items inside move to root; child folders move to this folder's parent.

Inputs: id (required).

delete_proxyDelete a proxyA
DestructiveIdempotent

Delete a proxy. Required API key scope: accounts:write. DELETE /proxies/{id} Returns success even if no proxy matched.

Inputs: id (required).

export_audienceExport members as CSVA
Read-onlyIdempotent

Export members as CSV. Required API key scope: audiences:read. GET /audiences/{id}/export Columns: username,fullName,followerCount,followingCount,bio,isVerified. Sent as an attachment.

Inputs: id (required).

export_conversation_leadExport as leadA

Export as lead. Required API key scope: conversations:write. POST /conversations/{id}/crm Builds a lead (enriched from the matching audience member, last 5 messages), fires the lead.imported webhook event, optionally POSTs the lead to webhookUrl (failures ignored), and returns it as JSON or CSV. The body is optional.

Inputs: id (required), body.

get_accountGet an accountB
Read-onlyIdempotent

Get an account. Required API key scope: accounts:read. GET /accounts/{id}

Inputs: id (required).

get_accounts_proxy_healthProxy health per accountA
Read-onlyIdempotent

Proxy health per account. Required API key scope: accounts:read. GET /accounts/proxy-health Tests each account's proxy (results cached for 10 minutes). Keyed by account id.

Inputs: no named parameters.

get_account_warmup_historyWarmup history by dayA
Read-onlyIdempotent

Warmup history by day. Required API key scope: accounts:read. GET /accounts/{id}/warmup-history Last 500 warmup log entries grouped by UTC date, newest first.

Inputs: id (required).

get_account_warmup_statusWarmup status and recent logsB
Read-onlyIdempotent

Warmup status and recent logs. Required API key scope: accounts:read. GET /accounts/{id}/warmup-logs Last 50 logs, today's schedule and progress, and upcoming warmup sessions.

Inputs: id (required).

get_audienceGet an audienceC
Read-onlyIdempotent

Get an audience. Required API key scope: audiences:read. GET /audiences/{id}

Inputs: id (required).

get_campaignGet a campaignC
Read-onlyIdempotent

Get a campaign. Required API key scope: campaigns:read. GET /campaigns/{id}

Inputs: id (required).

get_campaign_statsGet campaign statsA
Read-onlyIdempotent

Get campaign stats. Required API key scope: campaigns:read. GET /campaigns/{id}/stats totalPending counts PENDING + QUEUED. replyRate is round(replied / (sent + replied) * 100).

Inputs: id (required).

get_conversationGet a conversationA
Read-onlyIdempotent

Get a conversation. Required API key scope: conversations:read. GET /conversations/{id} Returns the conversation with all messages (oldest first). Side effect - marks unread inbound messages as read (the returned messages still show their prior isRead).

Inputs: id (required).

get_login_statusPoll a login jobB
Read-onlyIdempotent

Poll a login job. Required API key scope: accounts:read. GET /accounts/login-status Status of a job returned by createAccount, reloginAccount or checkAccountSession.

Inputs: jobId (required).

import_audience_membersImport membersA

Import members. Required API key scope: audiences:write. POST /audiences/{id}/import Three input forms: JSON with a single username (plus optional profile fields), JSON with a usernames string array, or a multipart CSV file (required column username/instagram_username/ ig_username; optional full_name, followers, following, bio, last_post_date). Leading @ is stripped. Max 10,000 per import. Existing members are left untouched but still counted in imported.

Inputs: id (required), body, file_path.

list_accountsList Instagram accountsA
Read-onlyIdempotent

List Instagram accounts. Required API key scope: accounts:read. GET /accounts

Inputs: folderId.

list_audience_membersList audience membersA
Read-onlyIdempotent

List audience members. Required API key scope: audiences:read. GET /audiences/{id}/members Paginated, newest scraped first. search matches username, full name or bio (case-insensitive).

Inputs: id (required), page, limit, search, +2 more.

list_audiencesList audiencesC
Read-onlyIdempotent

List audiences. Required API key scope: audiences:read. GET /audiences

Inputs: folderId.

list_campaign_recipientsList campaign recipientsA
Read-onlyIdempotent

List campaign recipients. Required API key scope: campaigns:read. GET /campaigns/{id}/recipients Returns all recipients (unpaginated).

Inputs: id (required), status.

list_campaignsList campaignsA
Read-onlyIdempotent

List campaigns. Required API key scope: campaigns:read. GET /campaigns Returns non-archived campaigns, newest first. With archived=true, returns only ARCHIVED campaigns (and folderId is ignored).

Inputs: archived, folderId.

list_conversationsList conversationsC
Read-onlyIdempotent

List conversations. Required API key scope: conversations:read. GET /conversations Paginated, most recent message first.

Inputs: page, limit, search, status, +2 more.

list_foldersList foldersA
Read-onlyIdempotent

List folders. Required API key scope: campaigns:read | audiences:read | accounts:read. GET /folders Required scope depends on type: CAMPAIGN → campaigns:read, AUDIENCE → audiences:read, ACCOUNT or omitted → accounts:read. Without type, folders of all types are returned. Returns root folders unless parentId is given.

Inputs: type, parentId.

list_proxiesList proxiesB
Read-onlyIdempotent

List proxies. Required API key scope: accounts:read. GET /proxies

Inputs: no named parameters.

refresh_conversationsSync inboxesA

Sync inboxes. Required API key scope: conversations:write. POST /conversations/refresh Synchronously syncs the inbox of every account that has an open (SENT/READ/REPLIED) conversation.

Inputs: no named parameters.

relogin_accountRe-login with stored credentialsB

Re-login with stored credentials. Required API key scope: accounts:write. POST /accounts/{id}/relogin

Inputs: id (required).

retry_campaignRetry failed recipientsA

Retry failed recipients. Required API key scope: campaigns:write. POST /campaigns/{id}/retry Resets FAILED recipients to PENDING. A COMPLETED campaign with at least one retried recipient is set back to ACTIVE.

Inputs: id (required).

send_conversation_photoSend a photoA
Destructive

Send a photo. Required API key scope: conversations:write. POST /conversations/{id}/photo Queues a photo send; the message appears in the conversation once the worker delivers it.

Inputs: id (required), file_path (required).

send_conversation_replySend a text replyA
Destructive

Send a text reply. Required API key scope: conversations:write. POST /conversations/{id}/reply Sends via the worker and waits up to 20 s for Instagram to confirm, then returns the stored message.

Inputs: id (required), body (required).

set_account_listeningToggle inbox listeningA
Idempotent

Toggle inbox listening. Required API key scope: accounts:write. PATCH /accounts/{id}/listening When enabling, runs a one-time inbox sync and returns its result.

Inputs: id (required), body (required).

start_audience_scrapeStart scrapingB

Start scraping. Required API key scope: audiences:write. POST /audiences/{id}/scrape Queues a scrape of the audience source using the given Instagram account and sets status to SCRAPING.

Inputs: id (required), body (required).

stop_audience_scrapeStop scrapingA
DestructiveIdempotent

Stop scraping. Required API key scope: audiences:write. DELETE /audiences/{id}/scrape Signals the scrape job to stop and marks the audience COMPLETE.

Inputs: id (required).

test_proxyTest a proxyA

Test a proxy. Required API key scope: accounts:write. POST /proxies/{id}/test Fetches the exit IP through the proxy (always as an HTTP proxy) and records the result.

Inputs: id (required).

update_accountUpdate an accountA
Idempotent

Update an account. Required API key scope: accounts:write. PATCH /accounts/{id} No schema validation; only the listed fields are read. If forceRelogin is true and username + password are given, credentials are replaced and a re-login is queued (202). Otherwise fields are updated (200). In production a proxy cannot be removed (only replaced) and warmup requires a proxy.

Inputs: id (required), body (required).

update_audienceUpdate an audienceA
Idempotent

Update an audience. Required API key scope: audiences:write. PATCH /audiences/{id} Only the listed fields are applied; there is no schema validation. Empty description / folderId become null.

Inputs: id (required), body (required).

update_campaignUpdate a campaignA
Idempotent

Update a campaign. Required API key scope: campaigns:write. PATCH /campaigns/{id} Partial update. Setting status: ACTIVE requires at least one template, a primary audience with members, and at least one ACTIVE account. Passing audienceIds replaces the audiences and adds recipients for new members (existing recipients are kept). Passing accountIds replaces the accounts. timezone is ignored.

Inputs: id (required), body (required).

update_conversationUpdate a conversationC
Idempotent

Update a conversation. Required API key scope: conversations:write. PATCH /conversations/{id}

Inputs: id (required), body (required).

update_folderRename or move a folderB
Idempotent

Rename or move a folder. Required API key scope: accounts:write. PATCH /folders/{id} Requires accounts:write regardless of the folder's type.

Inputs: id (required), body (required).

update_proxyUpdate a proxyB
Idempotent

Update a proxy. Required API key scope: accounts:write. PATCH /proxies/{id} Returns success even if no proxy matched.

Inputs: id (required), body (required).

verify_account_2faSubmit a 2FA codeA

Submit a 2FA code. Required API key scope: accounts:write. POST /accounts/verify-2fa Continues a login that required two-factor auth. identifier and partialSession come from the login job result. Malformed bodies yield 500.

Inputs: body (required).

verify_account_challengeSubmit a challenge codeA

Submit a challenge code. Required API key scope: accounts:write. POST /accounts/verify-challenge Continues a login that hit an Instagram checkpoint. checkpointUrl and partialSession come from the login job result. Malformed bodies yield 500.

Inputs: body (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 49 tools

    Disambiguation3/5

    Most tools follow a clear resource+action split (campaigns, audiences, accounts, proxies, folders, conversations), so the bulk of the surface is distinguishable. However, several clusters overlap: get_account_warmup_history vs get_account_warmup_status, get_login_status vs check_account_session, and test_proxy vs get_accounts_proxy_health, plus start/stop_audience_scrape sitting apart from the audience CRUD set. An agent can usually pick correctly, but there are enough near-neighbors across 49 tools that misselection is plausible.

    Naming Consistency4/5

    Nearly everything is snake_case verb_noun with a resource noun (list_campaigns, create_audience, delete_proxy, update_conversation). Minor deviations exist where a qualifier is inserted (start_audience_scrape, send_conversation_reply, export_conversation_lead), but they remain readable and follow a predictable word order. No camelCase or chaotic mixing.

    Tool Count2/5

    49 tools is heavy for any single server, even though the domain (campaigns, audiences, accounts, proxies, folders, conversations) is genuinely broad. Several tools could have been consolidated (e.g. warmup history/status, login status/session check, proxy test/health), so the surface feels larger than necessary. This sits firmly in the '25+ tools is too many' band.

    Completeness4/5

    Coverage is strong: full CRUD for campaigns, audiences, accounts, proxies, folders and conversations, plus scrape start/stop, member import/export, warmup, 2FA/challenge continuation, and CRM lead export. Gaps are minor but real — no standalone template management despite templates being part of campaign creation, no folder get-by-id, and no direct message listing outside get_conversation. These are workable around but not ideal.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables Claude Desktop and other MCP clients to interact with any OAuth2-authenticated OpenAPI-based API through automatic tool generation from OpenAPI specifications, with built-in token management and authentication handling.
      7 npm
      3
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables turning selected OpenAPI operations into authenticated MCP tools with branded OAuth, operation allowlisting, and live schema refreshes.
      Apache 2.0