Reddit MCP NLP Analysis Pipeline
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Reddit MCP NLP Analysis PipelineAnalyze Reddit discussions about AI and show sentiment trends"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Reddit MCP NLP Analysis Pipeline
An MCP pipeline for Reddit data collection, NLP analysis, visualization, and Knowledge Graph generation, orchestrated by Claude.
Reddit API · MCP · Transformers · NLP · Neo4j · Python
Overview
This project connects Claude to a set of MCP servers that, starting from a simple topic (e.g. economy), handle:
fetching relevant Reddit posts;
cleaning and preparing the text;
sentiment analysis and toxicity detection;
descriptive statistics and cross-subreddit comparisons;
charts and word clouds;
optionally, building a Knowledge Graph in Neo4j.
Each stage is handled by an independent MCP server: Claude calls them in sequence, but each one can also be used on its own.
Related MCP server: Reddit MCP Server
How it works
flowchart TD
A["User provides a topic"] --> B["Claude"]
B --> C["Reddit Fetcher MCP"]
C --> D["Reddit API"]
D --> E["Raw Reddit Dataset"]
E --> F["Text Analyzer MCP"]
F --> G["Sentiment Analysis"]
F --> H["Toxicity Detection"]
F --> I["Text Processing"]
G --> J["Analyzed Dataset"]
H --> J
I --> J
J --> K["Visualizer MCP"]
J --> L["Knowledge Graph MCP"]
K --> M["Charts"]
K --> N["Word Clouds"]
K --> O["Subreddit Analysis"]
L --> P["Neo4j"]The MCP servers
The project is split into four specialized MCP servers.
Reddit Fetcher – retrieves posts for a given topic: searches Reddit, extracts text and metadata, saves results as CSV, merges different datasets, and keeps track of what's already saved locally.
Text Analyzer – does the actual NLP work: sentiment analysis, toxicity detection, language detection, word-frequency stats, descriptive statistics, extraction of positive/negative/toxic examples. The output dataset is enriched with fields like:
sentiment_score
toxic_lab
toxic_score
is_toxicVisualizer – turns the analyzed data into visual output: sentiment distribution, posts per subreddit, average sentiment per subreddit, word clouds (including one for the toxic subset only).
Knowledge Graph – final, optional step: loads the analyzed dataset into Neo4j, modeling relationships between posts, subreddits, and sentiment class:
Post
│
├── POSTED_IN ────────> Subreddit
│
└── HAS_SENTIMENT ────> SentimentClassExample — topic "economy"
To test the pipeline we analyzed Reddit posts related to economy. Some of the generated outputs below.
Activity by subreddit
Which subreddits contributed the most posts to the dataset.
Sentiment distribution
Each post gets a sentiment score; here's the distribution across the whole dataset.
Sentiment by subreddit
Comparing average sentiment across the most active communities.
What's being discussed
Word cloud generated from the analyzed discussion, for a quick sense of recurring terms.
Toxic content
Posts classified as potentially toxic are isolated and analyzed separately. Here's the word cloud of the most common terms in that subset.
Example usage
Just ask something like:
Analyze the Reddit discussion around the economy.and Claude orchestrates the MCP tools through fetching → NLP analysis → visualizations and/or Knowledge Graph, with no need to set up the pipeline manually each time.
NLP models
Sentiment analysis: nlptown/bert-base-multilingual-uncased-sentiment
Toxicity detection: facebook/roberta-hate-speech-dynabench-r4-target
Both via Hugging Face transformers.
Knowledge Graph
Current graph structure in Neo4j:
graph LR
P["Post"]
S["Subreddit"]
C["SentimentClass"]
P -->|"POSTED_IN"| S
P -->|"HAS_SENTIMENT"| CEach Post node can hold properties like id, title, sentiment_score, toxic_score, is_toxic.
Tech stack
Technology | Purpose |
Python | Core language |
FastMCP | MCP server/tool implementation |
PRAW | Reddit API access |
Hugging Face Transformers | NLP models |
Pandas | Data manipulation |
NLTK | Text preprocessing |
LangDetect | Language detection |
Matplotlib | Charts |
WordCloud | Word cloud generation |
Neo4j | Knowledge Graph storage and querying |
Configuration
Before using the Reddit Fetcher, you'll need Reddit API credentials:
client_id
client_secret
user_agent
username
passwordDon't publish real credentials in the repo.
Local directories used by the MCP servers need to be adapted to your own environment.
For the Knowledge Graph, you'll need a running Neo4j instance with:
NEO4J_URI
NEO4J_USER
NEO4J_PASSWORDReusability
The pipeline isn't tied to the economy example — the same architecture works with any topic ("artificial intelligence", "bitcoin", "climate change", etc.) with no changes needed.
Reddit → NLP → Insights
This server cannot be deployed
Maintenance
Related MCP Connectors
Browse and manage Reddit posts, comments, and threads. Fetch user activity, explore hot/new/rising…
Read-only Reddit search API for AI agents: posts, comments, comment trees, subreddit rules.
Reddit growth toolkit — opportunities, replies, cold DMs, brand mentions, SEO, autopilot.
Find high-intent Reddit conversations and manage lead workflows from MCP-compatible AI agents.
Related MCP Servers
- AlicenseCqualityCmaintenanceEnables comprehensive Reddit interaction including fetching posts, analyzing users and subreddits, searching content, and creating posts/comments. Supports both read-only mode with client credentials and full functionality with user authentication.17465MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to search, monitor, and analyze Reddit's communities and discussions through authenticated API access with intelligent caching and rate limiting.MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to search, read, and analyze Reddit content, including posts, comments, subreddits, and user profiles using natural language commands. It provides atomic tools for interacting with the Reddit API to retrieve trending topics and community metadata.MIT
- AlicenseNot gradedqualityDmaintenanceEnables searching Reddit posts, fetching subreddit content, and retrieving post comments without requiring an API key. It uses public JSON endpoints to provide seamless access to Reddit data for LLM-based applications.2MIT