Reddit MCP Server
Provides read-only access to Reddit posts, comments, subreddits, and wiki pages via the Arctic Shift archive, including thread retrieval, post and comment search with grouping and filters, subreddit search and info, and post/comment/subscriber time series.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Reddit MCP Serverfind recent posts about MCP servers in r/LocalLLaMA"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-toolshed
MCP tools for making restricted parts of the web accessible to agents.
Some platforms restrict their APIs or keep their history out of an agent's reach. mcp-toolshed wraps such sources as MCP servers, one per platform, so an agent can search and read them in a few tool calls. The first is Reddit, served from the Arctic Shift archive.
Each server runs on Cloudflare Workers at /<platform>/mcp, has only read-only tools, and returns compact markdown sized for an agent's context. Deployments have no authentication: anyone with the URL can use them, and their requests reach the platforms' APIs from your Worker.
Platforms
Reddit: /reddit/mcp
Reddit posts, comments and subreddits from the Arctic Shift archive (API docs).
Tool | What it does |
| Reads a post and its comment tree from whatever a user pastes: a post or comment URL, a share link ( |
| Finds posts in one or several subreddits by author, keywords, flair, linked URL or date, newest first or ranked by comments or score; with |
| Finds comments in one or several subreddits by author, post, parent comment, text or date; with |
| Finds subreddits by name, name prefix, subscriber count, creation date or NSFW flag |
| Gets a subreddit's description and stats, rules and wiki, or any of them; lists the wiki pages or reads them by name, path or URL |
| Shows post and comment counts, total scores or subscribers over time, Reddit-wide or for one subreddit |
Post and comment filters such as link_id and parent_id accept Reddit URLs as well as IDs.
Results that include items under 36 hours old carry a note that their scores and comment counts are placeholders until Arctic Shift backfills them. Requests that fail with HTTP 422 (usually a timeout) or 5xx are retried once.
Related MCP server: reddit-search
How it works
Each server is stateless and uses the MCP Streamable HTTP transport through createMcpHandler from the Cloudflare Agents SDK. A deployment lists its servers at /. The top-level /mcp is kept free for a possible future server that works across platforms.
Every tool returns compact markdown, or the raw API records with format: "json", and caps its output at max_chars (default 40,000) with a truncation notice.
Setup
mise trust && mise install # toolchain (node, pnpm, prek)
mise setup # install the pre-commit hooks
pnpm installDevelop
pnpm dev # http://localhost:8788/ lists the endpoints
pnpm lint # oxlint + oxfmt --check + tsc
pnpm lint:fix
pnpm test # vitest in workerd via @cloudflare/vitest-pluginTest with the MCP Inspector (npx @modelcontextprotocol/inspector@latest) pointed at an endpoint such as http://localhost:8788/reddit/mcp.
@types/node is a dev dependency even though src/ uses no Node APIs: with the compatibility date in wrangler.jsonc the Workers runtime enables Node.js compatibility by default, and without the types wrangler types (run by lint, test and type-check) asks to install them on every run.
Adding a platform
Create
src/platforms/<id>/exporting aPlatform(src/core/platform.ts): its id (the URL segment, named after the platform rather than the data source), server name, description, instructions andregisterTools.Build its API client with
createJsonClient(src/core/client.ts), passing hooks for how the API wraps payloads and errors and which failures to retry.Give every tool the output settings from
outputSettingsand use the helpers insrc/core/tool.ts,output.tsandmarkdown.ts.Add it to
PLATFORMSinsrc/platforms/index.ts. The contract tests (src/platforms/contract.test.ts) then check it through its endpoint: a URL-safe id, uniquely named and documented tools, read-only annotations, the output settings on every tool, and tool definitions under 20,000 characters (about 5k tokens).
Secrets are named <PLATFORM>_<NAME>. List them without values in .dev.vars.example, which the Deploy to Cloudflare setup page asks for, and describe each under cloudflare.bindings in package.json. Put local values in .dev.vars (gitignored) and production values in with wrangler secret put. Code reads them through import { env } from "cloudflare:workers", since the MCP server factory gets no env.
Keep wrangler.jsonc free of account-specific settings: forks and Deploy to Cloudflare clones deploy from it as it is. A storage binding (KV, D1, ...) needs a default name and no ID, so a clone's first deploy can create it.
Deploy
A deployment serves at https://mcp-toolshed.<your-subdomain>.workers.dev, or at a custom domain if DEPLOY_DOMAIN is set.
Deploy to Cloudflare button
The button clones this repository into your GitHub account and deploys your copy with Workers Builds. On the setup page, keep the deploy command as pnpm run deploy. Workers Builds ships pnpm 10 and normally switches to the pnpm version in packageManager; if installing fails, set the PNPM_VERSION build variable to 12.
CI
.github/workflows/ci.yml runs lint and tests on every push and PR. With the CLOUDFLARE_API_TOKEN repository secret, it also uploads a preview version for each PR and deploys main. Without it, for example in a copy that deploys through Workers Builds, those jobs are skipped.
By hand
pnpm run deploy # production
pnpm run deploy:preview # preview-<sha> alias, not promotedPlain pnpm deploy is pnpm's built-in command for deploying workspace packages and never reaches the script.
Settings
Setting | What it does | Locally | CI | Workers Builds |
| Custom domain to serve at, in a zone on your Cloudflare account; the deploy creates its DNS record and certificate |
| repository variable | build variable |
| Repository named in the User-Agent |
| set automatically | build variable |
Both are optional. For local settings, copy mise.local.toml.example to mise.local.toml, which is gitignored. The Deploy to Cloudflare setup page asks for neither; add them later as build variables if you want them.
Connect a client
For example Claude Code:
claude mcp add --transport http reddit https://<your-deployment>/reddit/mcpThis server cannot be deployed
Maintenance
Related MCP Connectors
Read-only Reddit search API for AI agents: posts, comments, comment trees, subreddit rules.
Reddit posts, comments, keyword search and historical archives as tools. Runs on Apify.
Search public Reddit posts, browse subreddit feeds, and read posts, comments, and profiles.
Search and read public Reddit and X posts, comments, threads, profiles and Articles; run monitors.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to search, read, and analyze Reddit content, including posts, comments, subreddits, and user profiles using natural language commands. It provides atomic tools for interacting with the Reddit API to retrieve trending topics and community metadata.MIT
- AlicenseNot gradedqualityDmaintenanceEnables searching Reddit posts, fetching subreddit content, and retrieving post comments without requiring an API key. It uses public JSON endpoints to provide seamless access to Reddit data for LLM-based applications.0MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to access public Reddit data via JSON endpoints, including subreddit trending posts, keyword search, and post details with comments, without authentication.10 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables assistants to directly query a large community archive, including user activity, thread development, and front-page history over decades. It provides read-only access to answer questions about who is most active and how the community has changed.MIT