Media
Data source: Reddit (reddit.com)
MCP Protocol
Endpoint
https://context.gnist.ai/mcp/reddit/
claude_desktop_config.json
{
"mcpServers": {
"gnist-reddit": {
"url": "https://context.gnist.ai/mcp/reddit/",
"headers": {
"Gnist-API-Key": "YOUR_API_KEY"
}
}
}
}
Shell
curl -X POST "https://context.gnist.ai/mcp/reddit/" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "search_reddit", "arguments": {"query": "example"}}}'
REST API
API Root
https://context.gnist.ai/rest/reddit/
5 endpoints available:
GET /rest/reddit/search_redditGET /rest/reddit/get_subreddit_postsGET /rest/reddit/get_subreddit_infoGET /rest/reddit/get_reddit_post_commentsGET /rest/reddit/report_feedback
Shell
curl "https://context.gnist.ai/rest/reddit/search_reddit?query=example" \ -H "Gnist-API-Key: YOUR_API_KEY"
Python
import httpx
resp = httpx.get(
"https://context.gnist.ai/rest/reddit/search_reddit",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
params={
"query": "example"
},
)
print(resp.json())
Command Line
Command
gc reddit
CLI documentation will be available when the GnistAI SDK is published.
Install
pip install gnistai
Available Tools (5)
search_redditSearch Reddit posts by keyword, optionally within a specific subreddit.
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | required | Search terms (e.g. "machine learning", "Python async"). Searches across post titles and body text. |
subreddit | any | optional | Restrict search to a specific subreddit (e.g. "python", "MachineLearning"). Optional. |
sort | string | optional | Sort order: relevance, hot, top, new, comments. Default: relevance. (default: "relevance") |
time_filter | string | optional | Time filter: hour, day, week, month, year, all. Default: all. (default: "all") |
limit | integer | optional | Number of results (1-25, default 10). (default: 10) |
get_subreddit_postsGet posts from a specific subreddit sorted by hot, new, top, or rising.
| Parameter | Type | Required | Description |
|---|---|---|---|
subreddit | string | required | Subreddit name without r/ prefix (e.g. "python", "worldnews", "AskReddit"). |
sort | string | optional | Sort: hot, new, top, rising, controversial. Default: hot. (default: "hot") |
time_filter | string | optional | Time filter for top/controversial: hour, day, week, month, year, all. (default: "day") |
limit | integer | optional | Number of posts (1-25, default 10). (default: 10) |
get_subreddit_infoGet metadata about a subreddit — name, description, subscribers, active users, etc.
| Parameter | Type | Required | Description |
|---|---|---|---|
subreddit | string | required | Subreddit name without r/ prefix (e.g. "python", "worldnews"). |
get_reddit_post_commentsGet a Reddit post and its top-level comments by post ID.
| Parameter | Type | Required | Description |
|---|---|---|---|
post_id | string | required | Reddit post ID (the short alphanumeric ID, e.g. "1abc2d"). |
sort | string | optional | Sort: top, best, new, controversial, old, qa. Default: top. (default: "top") |
limit | integer | optional | Number of comments (1-50, default 10). (default: 10) |
report_feedbackReport a bug, feature request, or general feedback for this data source.
| Parameter | Type | Required | Description |
|---|---|---|---|
feedback | string | required | |
feedback_type | string | optional | (default: "general") |