Skip to main content
Glama

Reddit MCP Server

by sumitroyyy
test_simple.py741 B
#!/usr/bin/env python3 import asyncio import os from dotenv import load_dotenv import praw print("Starting simple test...") # Load environment variables load_dotenv() print("Environment loaded") # Test Reddit connection print("Testing Reddit connection...") reddit = praw.Reddit( client_id=os.getenv("REDDIT_CLIENT_ID"), client_secret=os.getenv("REDDIT_CLIENT_SECRET"), user_agent=os.getenv("REDDIT_USER_AGENT", "RedditMCPServer/1.0.0"), check_for_async=False ) try: subreddit = reddit.subreddit("python") post = next(subreddit.hot(limit=1)) print(f"Reddit connection successful! Test post: {post.title[:50]}") except Exception as e: print(f"Reddit connection failed: {e}") print("Simple test completed")

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/sumitroyyy/Reddit_mcp_server'

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