Skip to main content
SocialCutter

AI and agents

Aider has no MCP: use the SocialCutter API instead

Aider does not support MCP and there is no official flag for it. An honest guide to what does work: --lint-cmd and --test-cmd calling the SocialCutter API.

  • Aider
  • MCP
  • lint-cmd
  • test-cmd
  • REST API
  • X-API-Key

What the documentation says, and what it does not

Start here, because plenty of tutorials assume the opposite: Aider does not support MCP. This is not an opinion or a stale version:

  • Aider’s official options documentation has no MCP option.
  • The arguments file in Aider’s own repository contains no match for mcp.
  • Official issue 4506 confirms it: Aider does not natively support the Model Context Protocol.
  • The pull requests that would add it (3672, 3937 and 5539) are still unmerged.

In practice: there is no --mcp, no mcp.json, no list of MCP tools Aider can see. If a tutorial hands you a flag for Aider, either it invented it or it is talking about a different tool. We are not going to invent one here.

The path that does work

Aider runs external commands at two very specific points in its workflow:

OptionWhen it runsWhat it is for here
--lint-cmdAfter every edit Aider makes to your filesRegenerate the formats when the master image changes
--test-cmdWhen you ask Aider, or inside the commit flowProcess before signing off on a change

Both take an arbitrary shell command. That is the whole hook: a script that calls the SocialCutter REST API. It is not MCP, it is an HTTP request inside Aider’s workflow.

And an honest warning about what this does not do: the model never sees the SocialCutter tools and never chooses one. Aider just runs your script when it is due. The ability to process images lives in the script, not in Aider.

The script

#!/usr/bin/env bash
# process-image.sh — generates the formats of a master image
set -euo pipefail

API_URL="https://api.socialcutter.theboomer.dev"
: "${SOCIALCUTTER_API_KEY:?Set SOCIALCUTTER_API_KEY to your sc_ key}"
IMG_URL="${1:?Usage: process-image.sh <image-url>}"

curl -sS -X POST "$API_URL/api/v1/images/process" \
  -H "X-API-Key: $SOCIALCUTTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{
        \"source\": { \"type\": \"url\", \"value\": \"$IMG_URL\" },
        \"destinations\": [
          { \"platform\": \"instagram\", \"format\": \"post\" },
          { \"platform\": \"tiktok\", \"format\": \"cover\" }
        ]
      }" | python3 -m json.tool

# Same auth with the other header:
#   -H "Authorization: Bearer $SOCIALCUTTER_API_KEY"

Make it executable with chmod +x process-image.sh and export the key before running it:

export SOCIALCUTTER_API_KEY="sc_your_key"

The key goes into an authentication header, not the request body: no tool or endpoint accepts it as an argument. SocialCutter accepts both headers: X-API-Key: sc_... and Authorization: Bearer sc_.... Use whichever your client documents; the result is identical. A Bearer without the sc_ prefix is treated as a session token and will return 401.

Hooking it into Aider

export SOCIALCUTTER_API_KEY="sc_your_key"

aider \
  --lint-cmd "./process-image.sh https://example.com/master.jpg" \
  --test-cmd "./process-image.sh https://example.com/master.jpg"

Two details that save you trouble:

  • The lint command runs a lot. It fires after every edit, so without control you will repeat the same processing over and over, and every destination costs. A stamp of the master’s state avoids repeated calls:
#!/usr/bin/env bash
# lint-hook.sh — only calls the API when the master has changed
set -euo pipefail

STAMP=".socialcutter-master.etag"
MASTER="https://example.com/master.jpg"

etag="$(curl -sSI "$MASTER" | tr -d '\r' | awk -F': ' 'tolower($1)=="etag"{print $2}')"
if [[ -f "$STAMP" && "$(cat "$STAMP")" == "$etag" ]]; then
  echo "Master unchanged: no use consumed."
  exit 0
fi

./process-image.sh "$MASTER"
printf '%s\n' "$etag" > "$STAMP"
  • The exit code matters. Aider treats a command that ends with a non-zero status as a failure and shows its output as a warning. If the script fails for any reason —the key, the network, a 429— you will see it mixed in with lint warnings. Make the script exit zero only when the request has completed.

The same idea in Python

If you would rather parse the JSON and download the outputs, the script can be Python:

import os, requests

resp = requests.post(
    "https://api.socialcutter.theboomer.dev/api/v1/images/process",
    headers={"X-API-Key": os.environ["SOCIALCUTTER_API_KEY"]},
    # equivalent: headers={"Authorization": "Bearer " + os.environ["SOCIALCUTTER_API_KEY"]},
    json={
        "source": {"type": "url", "value": "https://example.com/master.jpg"},
        "destinations": [
            {"platform": "instagram", "format": "post"},
            {"platform": "tiktok", "format": "cover"},
        ],
    },
    timeout=60,
)
resp.raise_for_status()
for out in resp.json()["outputs"]:
    print(out["platform"], out["format"], out["url"])

The outputs are public URLs, one per destination: the script prints them, stores them or feeds the next step. The full detail is in the Python guide and the curl guide.

If you want the model to pick the tool

Then this path will not do it: a lint command exposes no tools to the model. For that you need a client that speaks MCP, because SocialCutter does have an MCP server: 28 tools at https://mcp.socialcutter.theboomer.dev/mcp, with the key in the X-API-Key or Authorization: Bearer sc_... header. Start with the MCP server guide and, if you use Zed, the Zed guide.

AiderDesk is not Aider

There is AiderDesk, a different product built around Aider, which does include MCP. AiderDesk having MCP does not mean Aider has it: two tools, two similar names. If you work with the Aider command line you still have no MCP tools and you still need the script path. Worth keeping in mind while searching for documentation, because many pages mix the two names up.

Cost and limits

  • 1 use per destination (platform and format). Two destinations in one request, 2 uses; failures are refunded.
  • 5 MB per image, and output in webp, jpg or png at quality 1 to 100 (85 by default).
  • The crop is centered, with the cover, contain, fill and stretch modes and no content analysis.
  • SocialCutter generates files and does not publish to social networks and does not edit the image.

Common errors

SymptomCauseFix
401: Invalid or expired authentication tokenThe script sends no auth header, or the Bearer value has no sc_ prefixExport SOCIALCUTTER_API_KEY and pass it in -H "X-API-Key: ..." or in -H "Authorization: Bearer ..."
401: Invalid API keyKey mistyped or revokedCreate a new one under Profile → API keys and update the environment variable
No MCP tools appear in AiderAider does not support MCPThere is no flag to enable: use the script, or an MCP client if you want tools
The command never runs--lint-cmd only fires after an edit, and the script path is relative to the working directoryCheck the path (./process-image.sh) and force an edit to test it
A lint warning after every editThe script exits with a non-zero statusReturn 0 when the request succeeds and keep a stamp so calls are not repeated
Your MCP client connects but shows no toolsWrong transport (SSE, or url without a type in clients that require one)Use the HTTP URL with the X-API-Key header and fix the client’s root key
413The image is over 5 MBShrink the file before processing it
429Wallet quota exhaustedCheck get_credits, then buy a pack or upgrade the plan

Next steps

Frequently asked questions

Does Aider support MCP?

No. Aider's official options documentation has no MCP option, the arguments file in its repository has no match for mcp, and the official issue 4506 confirms it. The pull requests that would add it are still unmerged.

Is there a flag or an MCP configuration file in Aider?

There is none. If you are looking for a command line option, an MCP server file or a way to list MCP tools in Aider, you will not find one: it is not implemented. There is no shortcut to invent.

What can I do to process images then?

Call the SocialCutter REST API from the commands Aider already runs: --lint-cmd and --test-cmd can fire a script that sends a request to POST /api/v1/images/process with the X-API-Key header.

Does that make Aider see the SocialCutter tools?

No. The model sees no tools and picks no parameters: Aider simply runs your script when you tell it to. If you want a model to choose the tool itself, you need an MCP client.

Should I use AiderDesk?

AiderDesk is a different product from Aider. AiderDesk does include MCP, but that changes nothing about Aider: on the Aider command line you still have no MCP tools.