This MCP server implementation provides a bridge for AI assistants to access and interact with Reddit content through the Python Reddit API Wrapper (PRAW). It enables assistants to fetch user information, analyze subreddit content, and even create posts or comments with proper authentication.
You'll need:
uv
installedgit clone https://github.com/Arindam200/reddit-mcp.git
cd reddit-mcp
{
"mcpServers": {
"reddit": {
"command": "{{PATH_TO_UV}}",
"args": [
"--directory",
"{{PATH_TO_SRC}}",
"run",
"server.py"
],
"env": {
"REDDIT_CLIENT_ID": "your_client_id",
"REDDIT_CLIENT_SECRET": "your_client_secret",
"REDDIT_USERNAME": "your_username",
"REDDIT_PASSWORD": "your_password"
}
}
}
}
Replace the placeholder values:
{{PATH_TO_UV}}
: Run which uv
in your terminal and use the output{{PATH_TO_SRC}}
: Navigate to the repository directory and run pwd
For Claude Desktop:
claude_desktop_config.json
in:~/Library/Application Support/Claude/claude_desktop_config.json
For Cursor:
mcp.json
in:~/.cursor/mcp.json
These tools require only client credentials:
get_user_info(username)
- Analyze a user's profile and activityget_top_posts(subreddit, time_filter, limit)
- Retrieve and analyze top postsget_subreddit_stats(subreddit)
- Get comprehensive subreddit analysisget_trending_subreddits()
- See which subreddits are trendingget_submission_by_url(url)
- Fetch a post using its URLget_submission_by_id(submission_id)
- Fetch a post using its IDThese tools require full user credentials:
who_am_i()
- Get your own Reddit profile informationcreate_post(subreddit, title, content, flair, is_self)
- Create a new postreply_to_post(post_id, content, subreddit)
- Reply to a postreply_to_comment(comment_id, content, subreddit)
- Reply to a commentHere are some examples of what you can ask your AI assistant:
The server supports two authentication levels:
client_id
and client_secret
username
and password
The server provides intelligent analysis in several areas:
The server formats responses with:
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.