Skip to main content
Glama
bsaa141aly-bit

community-research-mcp

README.md
# Community Research MCP

MCP server for researching community discussions (Reddit focus).

## Features

- Search Reddit posts
- Read Reddit threads and comments
- Structured JSON output optimized for LLM consumption

## Installation

```bash
pip install -e .
```

## Configuration

Create a `.env` file with your Reddit API credentials:

```bash
cp .env.example .env
# Edit .env with your credentials
```

To get Reddit credentials:
1. Go to https://www.reddit.com/prefs/apps
2. Click "Create App" or "Create Another App"
3. Select "script" for personal use
4. Fill in name and redirect URI (http://localhost:8080)
5. Copy the client ID (under app name) and secret

## Usage

### Run MCP Server

```bash
# Development
mcp dev src/community_research_mcp/server.py

# Production
community-research-mcp
```

### Tools

#### reddit_search_posts

Search Reddit for public posts.

```json
{
  "query": "D54 burst delay",
  "subreddit": "MarathonTheGame",
  "sort": "relevance",
  "time_filter": "month",
  "limit": 10
}
```

#### reddit_read_thread

Read a Reddit post and its comment tree.

```json
{
  "url_or_id": "https://www.reddit.com/r/.../comments/...",
  "comment_sort": "best",
  "max_comments": 80,
  "max_depth": 4
}
```

## Testing

```bash
pip install -e ".[dev]"
pytest
```

## QwenPaw Integration

Add to your `mcp_config.json`:

```json
{
  "community-research-mcp": {
    "command": "community-research-mcp",
    "env": {
      "REDDIT_CLIENT_ID": "your_client_id",
      "REDDIT_CLIENT_SECRET": "your_client_secret",
      "REDDIT_USER_AGENT": "community-research-mcp:v0.1.0 (by /u/yourusername)"
    }
  }
}
```

## License

MIT