Reddit

by enisze

Not rated
GitHub

About

Interact with Reddit by posting comments and searching for posts.

Details

Author
enisze
Categories
Communication, Other, Search

Setup

Install Reddit in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/enisze/reddit-mcp

Follow the installation instructions in the repository README, then restart your MCP client.

This MCP server allows Clients to interact with Reddit using OAuth2 authentication, enabling read-only access to search for posts within subreddits.

- Search posts: Search for posts within specific subreddits with various sorting options (relevance, hot, top, new, comments)
- OAuth2 authentication: Secure authentication using Reddit's OAuth2 client credentials flow
- Read-only access: Safe, read-only access to Reddit data without requiring user credentials
-

Create a Reddit application to get your API credentials:

- Go tohttps://www.reddit.com/prefs/apps
- Click "Create App" or "Create Another App"
- Choose "script" as the app type
- Note down your client ID and client secret

Add this configuration to your Claude Desktop config file:

Windows:%APPDATA%\Claude\claude_desktop_config.json
macOS:~/Library/Application Support/Claude/claude_desktop_config.json

{ "mcpServers": { "reddit-mcp": { "command": "npx", "args": ["-y", "@enisze/reddit-mcp"], "env": { "REDDIT_CLIENT_ID": "your_client_id_here", "REDDIT_CLIENT_SECRET": "your_client_secret_here", "REDDIT_USER_AGENT": "reddit-mcp-server/1.0.0" } } } }

That's it! Claude can now search Reddit through thesearch_poststool.

- "Can you search for posts about 'artificial intelligence' in the MachineLearning subreddit?"
- "Search for the top 10 posts about 'Claude AI' in the artificial subreddit"
- "Find recent discussions about 'programming best practices' in the programming subreddit"

- REDDIT_CLIENT_ID: Your Reddit app's client ID
- REDDIT_CLIENT_SECRET: Your Reddit app's client secret
- REDDIT_USER_AGENT: User agent string (optional, defaults to "reddit-mcp-server/1.0.0")

If you want to contribute or run from source:

git clone <repository-url> cd reddit-mcp
# Run unit tests (no API credentials needed) npm test # Run API integration tests (requires Reddit credentials) npm run test:api

To test the functionality of the Reddit MCP server:

This will run a series of evaluations to ensure all tools are working correctly.

The evals package loads an MCP client that then runs the index.ts file, so there is no need to rebuild between tests. You can load environment variables by prefixing the npx command. Full documentation can be foundhere.

OPENAI_API_KEY=your-key npx mcp-eval src/evals/evals.ts src/index.ts

You can also run this MCP server using Docker:

# Build the Docker image docker build -t reddit-mcp . # Run the container with environment variables docker run -e REDDIT_CLIENT_ID=your_client_id \ -e REDDIT_CLIENT_SECRET=your_client_secret \ reddit-mcp

Searches for posts in a Reddit subreddit using OAuth2 authentication.

- query(string, required): Search query
- subreddit(string, required): The subreddit name (without r/ prefix)
- count(number, optional): Number of posts to return (1-100, default: 25)
- sort(string, optional): Sort order - 'relevance', 'hot', 'top', 'new', 'comments' (default: 'relevance')

- Make sure your Reddit client ID and secret are correct
- Ensure your Reddit app is configured as a "script" type
- Check that your user agent string is descriptive and unique

- The server implements basic rate limiting (2 seconds between requests)
- Reddit has its own rate limits - if you hit them, wait before retrying

- "Subreddit not found": Check the subreddit name spelling
- "OAuth2 authentication failed": Verify your Reddit app credentials
- "Invalid credentials": Make sure your client ID and secret are correct

The project includes comprehensive tests to verify functionality:

Run basic functionality tests without requiring Reddit API credentials:

- Response formatting
- Type definitions
- Data structure handling
- Error handling logic

Test actual Reddit API functionality (requires credentials):

Set up your credentials in.envfirst (copy from.env.example).

- OAuth2 authentication flow
- Search functionality
- API response handling
- Error handling for various scenarios

SeeTEST.mdfor detailed testing instructions.

Schedule and queue text, image, and video posts to many social networks, including LinkedIn, X, Bluesky, Instagram, Facebook, Threads, Tiktok.

AI-powered social media posting across 14 platforms with per-platform content adaptation, scheduling, and 30-day calendar generation

Access the BlueSky social network data via its official API.

A MCP server for LinkedIn REST API v2 that enables AI assistants to create, list, and delete posts, manage events, upload images, comment, and react—featuring OAuth 2.0 with session persistence, local post history tracking, and multiple automated tests

Generates professional LinkedIn post drafts from YouTube videos by summarizing their content.

An MCP server for interacting with the Reddit API, enabling searches for posts, comments, and subreddits.

Access and interact with MyMCPSpace posts, replies, likes, and feeds.

Threads tools for AI agents — generate viral posts, download videos, and export profile data from Meta Threads.

Publish to multiple social networks with only one MCP

A server for fetching and creating content on Reddit using its API.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.