get_subreddit

Pack: reddit · Endpoint: https://gateway.pipeworx.io/reddit/mcp

Get trending posts from a subreddit (e.g., ‘python’, ‘news’). Returns titles, scores, authors, URLs, and comment counts.

Parameters

NameTypeRequiredDescription
subredditstringyesSubreddit name without the r/ prefix (e.g. “programming”)
limitnumbernoNumber of posts to return (default: 10, max: 100)

Example call

Arguments

{
  "subreddit": "programming"
}

curl

curl -X POST https://gateway.pipeworx.io/reddit/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_subreddit","arguments":{"subreddit":"programming"}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('get_subreddit', {
  "subreddit": "programming"
});

More examples

{
  "subreddit": "python",
  "limit": 25
}

Response shape

Full JSON Schema
{
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean",
          "enum": [
            true
          ],
          "description": "Success flag"
        },
        "subreddit": {
          "type": "string",
          "description": "Subreddit name queried"
        },
        "count": {
          "type": "number",
          "description": "Number of posts returned"
        },
        "posts": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "Post ID"
              },
              "title": {
                "type": "string",
                "description": "Post title"
              },
              "subreddit": {
                "type": "string",
                "description": "Subreddit name"
              },
              "author": {
                "type": "string",
                "description": "Post author"
              },
              "score": {
                "type": "number",
                "description": "Upvote score"
              },
              "url": {
                "type": "string",
                "description": "Post URL"
              },
              "permalink": {
                "type": "string",
                "description": "Full Reddit permalink"
              },
              "num_comments": {
                "type": "number",
                "description": "Number of comments"
              },
              "created_utc": {
                "type": "number",
                "description": "Creation timestamp (UTC)"
              },
              "is_self": {
                "type": "boolean",
                "description": "Is self-post"
              },
              "selftext": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Self-post text content"
              },
              "flair": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Link flair text"
              }
            },
            "required": [
              "id",
              "title",
              "subreddit",
              "author",
              "score",
              "url",
              "permalink",
              "num_comments",
              "created_utc",
              "is_self",
              "selftext",
              "flair"
            ]
          }
        }
      },
      "required": [
        "ok",
        "subreddit",
        "count",
        "posts"
      ]
    },
    {
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean",
          "enum": [
            false
          ],
          "description": "Failure flag"
        },
        "subreddit": {
          "type": "string",
          "description": "Subreddit name requested"
        },
        "posts": {
          "type": "array",
          "description": "Empty posts array on failure"
        },
        "reason": {
          "type": "string",
          "enum": [
            "reddit_blocked",
            "reddit_rate_limited",
            "not_found"
          ],
          "description": "Failure reason"
        },
        "message": {
          "type": "string",
          "description": "Failure message"
        },
        "hint": {
          "type": "string",
          "description": "Optional hint for recovery"
        }
      },
      "required": [
        "ok",
        "subreddit",
        "posts",
        "reason",
        "message"
      ]
    }
  ]
}

Connect

Add this to your MCP client config, or use one-click install buttons:

{
  "mcpServers": {
    "reddit": {
      "url": "https://gateway.pipeworx.io/reddit/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build May 9, 2026