# 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.
- URL: https://socialcutter.theboomer.dev/en/guides/aider/
- Idioma: en
- Familia: ia
- Actualizado: 2026-09-24
- Palabras clave: 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:

| Option | When it runs | What it is for here |
|---|---|---|
| `--lint-cmd` | After every edit Aider makes to your files | Regenerate the formats when the master image changes |
| `--test-cmd` | When you ask Aider, or inside the commit flow | Process 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

```bash
#!/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:

```bash
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

```bash
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:

```bash
#!/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:

```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](/en/guides/python/) and the [curl guide](/en/guides/curl/).

## 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](/en/guides/mcp/) and, if you use Zed, the [Zed guide](/en/guides/zed/).

## 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

| Symptom | Cause | Fix |
|---|---|---|
| `401: Invalid or expired authentication token` | The script sends no auth header, or the `Bearer` value has no `sc_` prefix | Export `SOCIALCUTTER_API_KEY` and pass it in `-H "X-API-Key: ..."` or in `-H "Authorization: Bearer ..."` |
| `401: Invalid API key` | Key mistyped or revoked | Create a new one under Profile → API keys and update the environment variable |
| No MCP tools appear in Aider | Aider does not support MCP | There 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 directory | Check the path (`./process-image.sh`) and force an edit to test it |
| A lint warning after every edit | The script exits with a non-zero status | Return 0 when the request succeeds and keep a stamp so calls are not repeated |
| Your MCP client connects but shows no tools | Wrong 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 |
| `413` | The image is over 5 MB | Shrink the file before processing it |
| `429` | Wallet quota exhausted | Check `get_credits`, then buy a pack or upgrade the plan |

## Next steps

- Protocol overview: [Use SocialCutter from your LLM or editor with MCP](/en/guides/mcp/)
- Terminal: [Process images with the API from the terminal (curl)](/en/guides/curl/)
- Code: [Process images with the SocialCutter API from Python](/en/guides/python/)
- An editor with MCP tools: [Zed and SocialCutter: MCP through context servers](/en/guides/zed/)
- The four automation paths: [Automating social media images](/en/guides/automatizar-imagenes-redes-sociales/)
- Aider's official options: https://aider.chat/docs/config/options.html
- Issue 4506 on MCP in Aider: https://github.com/Aider-AI/aider/issues/4506