⚙️ A Model Context Protocol (MCP) that provides tools for fetching and creating Reddit content
claude mcp add --transport stdio aflekkas-reddit-mcp-server node path/to/reddit-mcp-server/build/index.js \ --env REDDIT_PASSWORD="<your Reddit password>" \ --env REDDIT_USERNAME="<your Reddit username>" \ --env REDDIT_CLIENT_ID="<your Reddit client ID>" \ --env REDDIT_CLIENT_SECRET="<your Reddit client secret>"
How to use
This MCP server exposes a set of Reddit-related capabilities that let you read data from Reddit and, with proper credentials, post content. Read-only tools (accessible with client credentials) include retrieving detailed user info, analyzing top posts, obtaining subreddit statistics, and listing trending subreddits. Read-write tools (requiring a user-authenticated context) enable creating posts and adding replies to posts or comments, all with engagement-oriented insights prepared by the server. To use these tools, configure the MCP with the provided environment variables for Reddit API access and then call the corresponding tool endpoints through your MCP client or agent, selecting the appropriate function name (e.g., get_top_posts, create_post, or reply_to_post) as needed.
How to install
Prerequisites:
- Node.js installed on your machine (v14+ recommended)
- npm or yarn for package management
- A Reddit application configured to obtain client ID and client secret
Installation steps:
- Clone the repository: git clone https://github.com/alexandros-lekkas/reddit-mcp-server
- Install dependencies: npm install
- Create a Reddit app to obtain CLIENT_ID and CLIENT_SECRET by following Reddit's app creation page and selecting the script type.
- Create a .env file (optional if you plan to pass env vars directly) and populate with: REDDIT_CLIENT_ID=<your-client-id> REDDIT_CLIENT_SECRET=<your-client-secret> REDDIT_USERNAME=<your-reddit-username> REDDIT_PASSWORD=<your-reddit-password>
- Start the server in development mode: npm run dev
- Verify the inspection server is running at http://127.0.0.1:6274/ and ensure connectivity with Reddit before adding MCP config.
- In your MCP configuration, add the following (adjust paths to your environment):
"mcpServers": {
"reddit": {
"command": "node",
"args": [
"path/to/reddit-mcp-server/build/index.js"
],
"env": {
"REDDIT_CLIENT_ID": "<your-client-id>",
"REDDIT_CLIENT_SECRET": "<your-client-secret>",
"REDDIT_USERNAME": "<your-username>",
"REDDIT_PASSWORD": "<your-password>"
},
"autoApprove": [
"get_reddit_post",
"get_top_posts",
"get_user_info",
"get_subreddit_info",
"get_trending_subreddits",
"create_post",
"reply_to_post"
]
}
}
Replace the placeholder values with your actual Reddit credentials and local path to the built index.js.
Additional notes
Tips and common issues:
- Ensure your Reddit app uses the script type and that you’ve granted the necessary scopes for reading and posting.
- Use environment variables to keep credentials out of your MCP config files; consider a secrets manager for production.
- If you only need read-only features, you can run the server with client credentials and omit password-related env vars.
- The inspection UI at http://127.0.0.1:6274/ helps verify endpoints and sample calls.
- If you encounter connection errors, confirm that the build/index.js path is correct after your build process and that Node has permission to access network resources.
- For posting actions, Reddit may require you to complete additional verification steps or rate limits; ensure your account has posting permissions.
- Keep dependencies updated to avoid compatibility issues with Reddit API changes.
Related MCP Servers
context7
Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
reddit -buddy
Clean, LLM-optimized Reddit MCP server. Browse posts, search content, analyze users. No fluff, just Reddit data.
MiniMax -JS
Official MiniMax Model Context Protocol (MCP) JavaScript implementation that provides seamless integration with MiniMax's powerful AI capabilities including image generation, video generation, text-to-speech, and voice cloning APIs.
systemprompt
A complete, production-ready implementation of a Model Context Protocol (MCP) server demonstrating OAuth 2.1, tools, prompts, resources, sampling, and notifications using Reddit as a real-world integration example.
mcp-bundler
Is the MCP configuration too complicated? You can easily share your own simplified setup!
akyn-sdk
Turn any data source into an MCP server in 5 minutes. Build AI-agents-ready knowledge bases.