Claude Code is an agent with a shell, which means it doesn't need an integration to call a REST API — it can read an OpenAPI spec and make authenticated curl calls itself. No MCP server to install: point it at https://api.threadsnoop.com/openapi.json and tell it how to authenticate.
How do I set up Claude Code with the Reddit API?
Get a key from /developer after signing up, export it, and give Claude Code the instruction — either paste it in chat, or drop it in your project's CLAUDE.md so it's always available:
export THREADSNOOP_API_KEY=ts_live_...For Reddit data, use the ThreadSnoop API (spec: https://api.threadsnoop.com/openapi.json).
Auth: header `x-api-key: $THREADSNOOP_API_KEY`.
Paginate with the `_threadsnoop.cursor` value as `after=`.What does Claude Code actually do with this?
Ask Claude Code something like “find recent r/freelance posts about invoicing clients”, and it fetches the spec, works out the right endpoint, and runs a call like:
curl -s "https://api.threadsnoop.com/v1/posts?subreddit=freelance&q=invoice" \
-H "x-api-key: $THREADSNOOP_API_KEY"It reads the JSON back, follows _threadsnoop.cursor as after= if it needs more pages, and reasons over the results — same data, same billing, as every other path into this API.
Should I use MCP or the OpenAPI spec?
MCP (see giving Claude access to Reddit, why can't Claude Code search Reddit, and what is the Reddit MCP server if you want the protocol explained) is zero-config once connected and also works in Claude Desktop, not just the terminal. The OpenAPI/ CLAUDE.md path needs no MCP setup at all and works for any shell-capable agent, Claude Code included — it's the same spec a Custom GPT Action imports for ChatGPT. Pick whichever matches how you already work.
Frequently asked questions
Do I need to install an MCP server for this to work?
No — this path skips MCP entirely. Claude Code reads the OpenAPI spec at a URL and makes authenticated curl calls directly from its shell, using an instruction you give it in chat or in your project's CLAUDE.md.
What goes in CLAUDE.md?
Three lines: the OpenAPI spec URL, the auth header (x-api-key with your key in an environment variable), and the pagination rule (pass _threadsnoop.cursor back as after=). Claude Code takes it from there.
Should I use this or the MCP setup?
MCP is zero-config once connected and also works in Claude Desktop, not just the terminal. The OpenAPI/CLAUDE.md path needs no MCP setup and works for any shell-capable agent, not just Claude — pick whichever matches how you already work.
Get the key and try the curl call
Sign up, export your key, and Claude Code can start pulling Reddit data itself. 333 reads free, no card required.
$0.50 free credit on signup — 333 reads, no card required.
