{"_id":"@arismatic/mcp-reddit-server","name":"@arismatic/mcp-reddit-server","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@arismatic/mcp-reddit-server","version":"1.0.0","description":"A Reddit MCP server for searching subreddits and fetching hot/top posts from the last 24 hours","main":"build/index.js","type":"module","bin":{"mcp-reddit":"build/index.js"},"scripts":{"build":"tsc && chmod 755 build/index.js","watch":"tsc --watch","inspector":"npx @modelcontextprotocol/inspector build/index.js","prepublishOnly":"npm run build"},"keywords":["mcp","model-context-protocol","reddit","api","typescript"],"author":{"name":"Your Name","email":"your.email@example.com"},"license":"MIT","engines":{"node":">=18.0.0"},"dependencies":{"@modelcontextprotocol/sdk":"^1.17.4","zod":"^3.22.4"},"devDependencies":{"@types/node":"^20.11.24","typescript":"^5.3.3"},"_id":"@arismatic/mcp-reddit-server@1.0.0","types":"./build/index.d.ts","_nodeVersion":"22.19.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-IhjVevuaQzyN1M8jLDYfY8RbH923DQ+xt7GH1w3QO7VNAfFvgxd9Nhqh8OM/C8gmJ4/uUObNaGKb40ZTHstv4g==","shasum":"994aa26c43aa051d4d30078fad3b8bbcd00e4257","tarball":"https://registry.npmjs.org/@arismatic/mcp-reddit-server/-/mcp-reddit-server-1.0.0.tgz","fileCount":6,"unpackedSize":21828,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCICy5ZqpWxGUWkmUQ7byq66kvgtwV1C5oa84shXpkjGHzAiB3ga5yCP2hpyPeVvZKJeNbdLrtRRFQZ/jGt+L7zcSIzw=="}]},"_npmUser":{"name":"arismatic","email":"arismaticstudios@gmail.com"},"directories":{},"maintainers":[{"name":"arismatic","email":"arismaticstudios@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcp-reddit-server_1.0.0_1759679111200_0.8167724756417596"},"_hasShrinkwrap":false}},"time":{"created":"2025-10-05T15:45:11.126Z","1.0.0":"2025-10-05T15:45:11.380Z","modified":"2025-10-05T15:45:11.644Z"},"maintainers":[{"name":"arismatic","email":"arismaticstudios@gmail.com"}],"description":"A Reddit MCP server for searching subreddits and fetching hot/top posts from the last 24 hours","keywords":["mcp","model-context-protocol","reddit","api","typescript"],"author":{"name":"Your Name","email":"your.email@example.com"},"license":"MIT","readme":"# MCP Reddit Server\n\nA Reddit MCP (Model Context Protocol) server that provides tools for searching subreddits and fetching hot/top posts from the last 24 hours using Reddit's public JSON API.\n\n## Features\n\n### Tools\n\n1. **search_subreddits** - Search for subreddits by name or topic\n   - Find subreddits matching your search query\n   - Returns subreddit name, title, subscriber count, and description\n\n2. **get_posts** - Get hot or top posts from a subreddit (last 24 hours only)\n   - Fetch posts from any subreddit\n   - Choose between \"hot\" or \"top\" sorting\n   - Filter to only posts from the last 24 hours\n   - Returns post title, score, body, URL, author, and timestamp\n   - Configurable limit (default: 25, max: 100)\n\n## Installation\n\n### From NPM\n```bash\nnpm install -g mcp-reddit-server\n```\n\n### From Source\n```bash\ngit clone <repository-url>\ncd mcp-reddit-server\nnpm install\nnpm run build\n```\n\n## Usage\n\n### With Claude Code (Recommended)\n```bash\n# Add the MCP server to Claude Code\nclaude mcp add reddit npx -s user mcp-reddit-server\n\n# IMPORTANT: After adding, restart Claude Code for changes to take effect:\n# 1. Press Ctrl+C twice to stop Claude Code\n# 2. Run: claude --continue to restart\n```\n\n### With MCP Inspector (for testing)\n```bash\nnpm run inspector\n```\n\n### With Claude Desktop\nAdd to your Claude Desktop MCP settings:\n\n```json\n{\n  \"mcpServers\": {\n    \"reddit\": {\n      \"command\": \"mcp-reddit\"\n    }\n  }\n}\n```\n\n## Available Tools\n\n### 1. search_subreddits\n\nSearch for subreddits matching a query.\n\n**Parameters:**\n- `query` (string, required) - Search term to find subreddits\n\n**Example:**\n```json\n{\n  \"name\": \"search_subreddits\",\n  \"arguments\": {\n    \"query\": \"programming\"\n  }\n}\n```\n\n**Response:**\n```\n🔍 Found 25 subreddits matching \"programming\"\n\n1. r/programming - programming\n   👥 6,234,567 subscribers\n   📝 Computer Programming\n\n2. r/learnprogramming - Learn Programming\n   👥 4,567,890 subscribers\n   📝 A subreddit for all questions related to programming...\n```\n\n### 2. get_posts\n\nGet hot or top posts from a subreddit in the last 24 hours.\n\n**Parameters:**\n- `subreddit` (string, required) - Name of the subreddit (without r/ prefix)\n- `sort` (string, optional) - Sort type: \"hot\" or \"top\" (default: \"hot\")\n- `limit` (number, optional) - Number of posts to retrieve (default: 25, max: 100)\n\n**Example:**\n```json\n{\n  \"name\": \"get_posts\",\n  \"arguments\": {\n    \"subreddit\": \"python\",\n    \"sort\": \"top\",\n    \"limit\": 10\n  }\n}\n```\n\n**Response:**\n```\n🔥 TOP posts from r/python (Last 24 hours)\nFound 10 posts\n==================================================\n\nPost 1:\n📝 **Amazing Python Feature You Didn't Know About**\n👤 Author: u/example_user\n⬆️ Score: 2543\n🔗 URL: https://example.com/article\n📄 Post: This is the post content...\n🔗 Reddit Link: https://www.reddit.com/r/python/comments/...\n🕒 Posted: 10/5/2025, 10:30:00 AM\n```\n\n## How It Works\n\nThis MCP server uses Reddit's public JSON API, which doesn't require authentication:\n\n- **Subreddit Search**: `https://www.reddit.com/subreddits/search.json?q={query}`\n- **Hot Posts**: `https://www.reddit.com/r/{subreddit}/hot.json?limit={limit}`\n- **Top Posts (24h)**: `https://www.reddit.com/r/{subreddit}/top.json?limit={limit}&t=day`\n\nThe server automatically:\n- Sets a custom User-Agent to avoid rate limiting\n- Filters hot posts to only include posts from the last 24 hours\n- Uses Reddit's built-in `t=day` parameter for top posts\n- Formats responses with emojis and clear structure\n\n## Development\n\n### Build\n```bash\nnpm run build\n```\n\n### Watch mode\n```bash\nnpm run watch\n```\n\n### Test with Inspector\n```bash\nnpm run inspector\n```\n\n## Project Structure\n\n```\nmcp-reddit-server/\n├── src/\n│   └── index.ts          # Main server implementation\n├── build/                # Compiled JavaScript (auto-generated)\n├── node_modules/         # Dependencies (auto-generated)\n├── package.json          # Project configuration\n├── package-lock.json     # Dependency lock (auto-generated)\n├── tsconfig.json         # TypeScript configuration\n├── .gitignore           # Git ignore rules\n└── README.md            # This file\n```\n\n## Rate Limiting\n\nReddit's public API has rate limits. The server sets a custom User-Agent header to help avoid rate limiting issues. If you encounter rate limit errors, wait a few minutes before making more requests.\n\n## Limitations\n\n- Posts are limited to the last 24 hours only\n- Maximum of 100 posts per request\n- Reddit's public API may have rate limits\n- Private and banned subreddits are not accessible\n- NSFW content filtering depends on Reddit's API defaults\n\n## Error Handling\n\nThe server provides user-friendly error messages for common issues:\n- Invalid subreddit names\n- Missing required parameters\n- Reddit API errors (404, rate limits, etc.)\n- Network connection issues\n\n## License\n\nMIT\n\n## Contributing\n\nContributions are welcome! Please feel free to submit issues or pull requests.\n\n## Acknowledgments\n\n- Built using the [Model Context Protocol SDK](https://github.com/anthropics/mcp)\n- Uses Reddit's public JSON API\n- Inspired by the MCP calculator example\n","readmeFilename":"README.md","_rev":"1-5b78545c8c458b8f4321c5936c9170c2"}