MCP

SnapAny ships a hosted MCP server (Model Context Protocol, Streamable HTTP). Once it's set up you can just say "extract the video and images from this link" in Claude Code, Codex or Cursor and the agent will call SnapAny — no code required. Same API key, same billing as the REST API.

Endpoint: https://api.snapany.com/mcp

Before you start

You need an API key first. Two steps:

  1. Create a key under API Keys, then claim 50 free credits in the console
  2. Copy that key — it starts with sk_snapany_

The sk_snapany_xxx in every config below is a placeholder you must replace with your own real key. Pasting it as-is won't fail loudly up front, but every call afterwards will.

See Authentication for key rotation and limits.

Claude Code

claude mcp add --transport http snapany https://api.snapany.com/mcp \
  --header "Authorization: Bearer sk_snapany_xxx"

This only applies to the directory you ran it in. Add -s user to make it available in every project.

Codex

# ~/.codex/config.toml
[mcp_servers.snapany]
url = "https://api.snapany.com/mcp"
http_headers = { "Authorization" = "Bearer sk_snapany_xxx" }

~ is your home directory; create the file if it doesn't exist. Restart Codex afterwards.

Generic JSON config (Cursor and others)

Cursor reads ~/.cursor/mcp.json (global) or .cursor/mcp.json in the project root (that project only). For other clients, check their docs for the MCP config file location.

{
  "mcpServers": {
    "snapany": {
      "url": "https://api.snapany.com/mcp",
      "headers": { "Authorization": "Bearer sk_snapany_xxx" }
    }
  }
}

Restart the client afterwards.

Verify the connection

In Claude Code, run:

claude mcp list

Seeing snapany listed as connected means you're set — /mcp inside a session works too. Other clients show the server in their MCP settings panel. If the seven tools below are listed, it's working.

Available tools

ToolWhat it does
extract_postExtract media/metadata from a post URL (1 credit)
extract_playlistExtract one page of a playlist/channel (2 credits)
extract_subtitlesExtract subtitle tracks with download URLs (1 credit)
youtube_proxy_downloadGet YouTube proxy download URLs, up to 1080p (4 credits/10 min)
transcribeSubmit a transcription job (4 API credits/started minute)
get_transcriptionPoll a transcription result (free)
get_docsRead these docs from inside your agent (free)

extract_post, extract_playlist and extract_subtitles return direct links and metadata, not the files themselves. youtube_proxy_download returns the same shape as extract_post, plus proxy URLs (*_proxy_url) for YouTube variants up to 1080p, valid for 30 minutes to 1 hour. To actually save something locally, have your agent download the link it got back — most clients can do that directly. If a YouTube direct link fails with 403, have it call youtube_proxy_download and download the *_proxy_url instead.

extract_subtitles supports existing YouTube and Bilibili captions. Bilibili returns BCC JSON; convert it to SRT/VTT or other formats as needed. Multiple tracks may share a language tag. Videos without subtitles return a no_subtitles tool error. See Subtitle extraction.

URL transcription

transcribe accepts audio or video file URLs from SnapAny's extraction API or URLs you provide in fileUrl. Optional fileHeaders contains any headers needed to download that file, such as Referer or User-Agent. If you have a separate audio URL, you can submit it directly. The file limit is 512 MiB, with no duration limit.

A successful call immediately returns { "id": "...", "status": "processing" }. Call get_transcription with that id every 3–5 seconds to poll for the result. While the file is being processed, duration is null; it becomes a number in seconds once the actual audio duration is confirmed. Each started minute costs 4 API credits, reserved after the duration is confirmed and before transcription starts. No credits are charged while the duration is unknown.

A file without audio or a failed download makes the job failed without charging credits. If the balance passed the initial minimum check but cannot cover the full cost once the duration is confirmed, the job also becomes failed with errorCode: "insufficient_credits", without charging credits. Read errorCode and error from get_transcription, for example audio_track_missing, download_failed or insufficient_credits. If transcription fails after credits have been reserved, they are refunded automatically.

Each call to transcribe creates a separate job and is billed separately. Query an existing job with get_transcription rather than submitting it again. See Transcription for parameters and response examples.

Credits

New developers can claim 50 free credits in the console, and credits never expire. Your balance and top-ups live there too; per-call usage is under Credits history.

Before creating a transcription job, transcribe checks that at least 4 API credits are available. If not, it immediately returns an insufficient_credits tool error without creating a job or charging credits (the REST API returns HTTP 402). If the minimum check passes but the full cost later exceeds the balance, get_transcription reports status: "failed" with errorCode: "insufficient_credits", without charging credits. Other paid tools return Insufficient credits. Full billing rules are in Credits & Billing.

Troubleshooting

SymptomMost likely cause
Connection failed / 401sk_snapany_xxx wasn't replaced with a real key, or the Bearer prefix is missing (note the space after Bearer)
Config saved but no tools show upThe client wasn't restarted
429 rate_limitedRate limited — the quota is shared with the REST API (1,200 requests/minute)

Next steps

Try telling your agent: "Extract this YouTube video and transcribe its audio with speaker labels: https://..."