KosmoKrator

data

Reddit MCP Integration for LangGraph

Connect Reddit to LangGraph through the local KosmoKrator MCP gateway with scoped tools, credentials, and write policy.

9 functions 7 read 2 write Manual OAuth token auth

Connect Reddit to LangGraph

Run KosmoKrator integration calls from LangGraph nodes while preserving local credentials and permissions.

Use a graph node that calls the KosmoKrator CLI for deterministic steps or an MCP client for dynamic tool selection. The gateway is local, scoped to this integration, and starts with --write=deny so LangGraph can inspect read-capable tools without receiving write access by default.

Reddit MCP Config for LangGraph

Headless CLI calls fit repeatable graph edges; MCP fits exploratory agent nodes.

{
  "mcpServers": {
    "kosmokrator-reddit": {
      "type": "stdio",
      "command": "kosmo",
      "args": [
        "mcp:serve",
        "--integration=reddit",
        "--write=deny"
      ]
    }
  }
}

Run the Gateway Manually

kosmokrator mcp:serve --integration=reddit --write=deny

Why Use KosmoKrator Here

Scoped tools

Expose only Reddit instead of a broad multi-service tool list.

Local credentials

Reuse credentials already configured for the KosmoKrator CLI and Lua runtime.

Write policy

Start read-only, then opt into ask or allow for trusted workspaces.

Reddit Tools Visible to LangGraph

LangGraph sees stable MCP tool names generated from the Reddit integration catalog.

MCP toolSource functionTypeDescription
integration__reddit__reddit_create_comment reddit.reddit_create_comment Write Post a comment on a Reddit post or reply to an existing comment. The comment body supports Markdown formatting. Use "t3_" prefix for post IDs or "t1_" prefix for comment IDs as the parent.
integration__reddit__reddit_create_post reddit.reddit_create_post Write Submit a new post to a subreddit. Supports text (self), link, image, and video post types.
integration__reddit__reddit_get_current_user reddit.reddit_get_current_user Read Get the profile of the currently authenticated Reddit user. Useful for verifying credentials and displaying account information.
integration__reddit__reddit_get_post reddit.reddit_get_post Read Get details for a specific Reddit post by subreddit and post ID. Returns the post listing and its top-level comments.
integration__reddit__reddit_get_subreddit reddit.reddit_get_subreddit Read Get information about a specific subreddit including subscriber count, description, and settings.
integration__reddit__reddit_list_comments reddit.reddit_list_comments Read List comments for a specific Reddit post. Supports sorting (best, top, new, controversial, old, q&a) and depth limiting.
integration__reddit__reddit_list_posts reddit.reddit_list_posts Read List posts from a subreddit or the Reddit front page. Supports hot, new, top, rising, and controversial sorting with pagination via after/before cursors.
integration__reddit__reddit_list_subreddits reddit.reddit_list_subreddits Read List popular or new subreddits. Supports pagination with after/before cursors.
integration__reddit__reddit_search reddit.reddit_search Read Search Reddit for posts, subreddits, or users. Supports filtering by type, sorting, and time range. Use this to find relevant content across Reddit.

Related Reddit Pages