Skip to main content
Glama

Reddit MCP Tool

setup.pyโ€ข1.89 kB
#!/usr/bin/env python3 """ Setup script for Reddit MCP Tool. Helps users configure their environment and test their Reddit API credentials. """ import os import shutil import sys from pathlib import Path def main(): print("๐Ÿš€ Reddit MCP Tool Setup") print("=" * 40) # Check if .env exists env_file = Path(".env") env_example = Path("env.example") if not env_file.exists(): if env_example.exists(): print("๐Ÿ“‹ Creating .env file from env.example...") shutil.copy(env_example, env_file) print("โœ… .env file created!") else: print("โŒ env.example file not found!") return 1 else: print("โœ… .env file already exists") print("\n๐Ÿ“ Next steps:") print("1. Edit the .env file with your Reddit API credentials") print("2. Get credentials from: https://old.reddit.com/prefs/apps/") print("3. Create a 'script' type app") print("4. Fill in these values in .env:") print(" - REDDIT_CLIENT_ID (14 character string)") print(" - REDDIT_CLIENT_SECRET (27 character string)") print(" - REDDIT_USER_AGENT (descriptive string)") print("\n๐Ÿงช Test your setup:") print(" uv run python scripts/test_basic.py") print("\n๐Ÿƒ Run the MCP server:") print(" uv run reddit-mcp-tool") print("\n๐Ÿ“– For Claude Desktop, add this to your config:") print(''' { "mcpServers": { "reddit-mcp-tool": { "command": "uv", "args": ["run", "reddit-mcp-tool"], "cwd": "/path/to/reddit-mcp", "env": { "REDDIT_CLIENT_ID": "your_client_id_here", "REDDIT_CLIENT_SECRET": "your_client_secret_here", "REDDIT_USER_AGENT": "reddit-mcp-tool:v0.2.0 (by /u/yourusername)" } } } } ''') return 0 if __name__ == "__main__": sys.exit(main())

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/GeLi2001/reddit-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server