social-search-mcp
Provides tools for searching Reddit and reading full comment trees, with features like cross-subreddit deduplication, engagement-based re-ranking, and configurable search modes (discussion, fresh, evergreen), returning raw structured data via a self-hosted Redlib instance.
Social Search
Personal Codex plugin for Reddit and X search and post retrieval. It packages a short Skill and four MCP tools around one tested provider implementation. The CLI and legacy HTTP adapters reuse that implementation.
Installed Architecture
Codex plugin -> existing SSH connection -> VPS stdio MCP
|- Reddit -> loopback Redlib -> Reddit
`- X -> TwitterAPI.io
Existing n8n -> Docker bridge -> legacy HTTP adapters -> same providers
Browser -> Cloudflare -> nginx -> Redlib (static/media cache; dynamic no-store)Current repair and rollback evidence: 2026-09-07 verification.
The MCP transport has no public listening port. Configure scripts/connect-vps
with SOCIAL_SEARCH_VPS_HOST, SOCIAL_SEARCH_VPS_PORT, SOCIAL_SEARCH_VPS_KEY,
and (when needed) SOCIAL_SEARCH_VPS_USER; no host address, key or credential is
included in this repository. X credentials are read inside the VPS process from
the protected runtime configuration.
Related MCP server: hidrix-tools
Tools
Tool | Behavior |
| Native ordering, canonical source URLs, bounded session pagination |
| Original post and comments, parent IDs, hard count/depth limits, coverage |
| One complete provider page, original order, IDs and next cursor |
| Read requested IDs and available quote/reply context; report missing IDs |
Errors remain errors, including authentication, quota, rate limits and malformed upstream pages. Results retain source links and distinguish returned content from loaded or source-reported totals. Comment permalink pages disclose unknown parents.
Reddit search cursors expire after 15 minutes and belong to one server process. A new Codex task or restarted MCP server requires a new search. Separate CLI invocations cannot continue those in-memory cursors. X calls use an existing paid third-party account and are not automatically retried. A page is usually 20 posts; requesting fewer locally does not reduce the upstream page charge.
Development
Node.js 22 or newer is required for the provider package on the VPS. The installed
local bridge requires only SSH. Dependencies are pinned in package-lock.json.
npm ci --ignore-scripts
npm test
node src/cli.mjs doctor
node scripts/verify-live.mjs ./scripts/connect-vpsThe final command performs live Reddit requests and a small paid X search/read.
Use it deliberately, not as a periodic free health probe. The ordinary X health
endpoint checks configuration only and explicitly says upstream_verified:false.
Compatibility and Caching
Existing Reddit GET /api/search, GET /api/post, and X POST /api/search routes
remain available on loopback and Docker bridge addresses. Legacy Reddit modes are
accepted as labels, with native ordering; old popularity filters are removed.
The legacy X limit is an explicitly reported preview and may omit rows from the
provider page. Use MCP for full-page pagination.
All /api/ responses bypass nginx cache and declare private, no-store for CDN
caches. Normal Redlib webpage and media caching remains enabled. MCP reads Redlib
on loopback directly, bypassing both nginx and Cloudflare page caches.
See deployment verification for observed results, current release locations, rollback steps, and remaining boundaries.
Provenance
The archived reference repository was reviewed at commit
3e9dea1951ce359f9232378efb6edb81126d1526; its source remains untouched. The new
package lives separately. Real HTML fixtures were captured from the existing
Redlib deployment. The comment-template fixture comes from Redlib commit
a4d36e954cf1bd64f209cd8868c5a29edc81b374. Upstream fixtures retain their respective
project provenance. This package is private and no publication license is granted.
Available Tools
4 toolsreddit_postARead-onlyIdempotent
Read a Reddit post and loaded comments with original links, parent IDs and explicit coverage. The count is a hard budget; results are not a complete or unbiased survey. Follow next_links for more threads.
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | ||
| sort | No | confidence | |
| maxDepth | No | ||
| maxComments | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnly/idempotent/non-destructive/open-world, so safety is covered. The description adds genuinely new behavioral context beyond annotations: the count is a hard budget and results are not a complete or unbiased survey, warning the agent about sampling limits.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three tight sentences with the core purpose front-loaded and no filler. Each sentence carries distinct information: what is read, the budget caveat, and the continuation path.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, the description usefully enumerates what comes back (links, parent IDs, coverage, next_links). The main gap is the undocumented parameters, but for a read-only retrieval tool the behavioral picture is otherwise complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% across 4 parameters, so the description must compensate, and it largely does not. It alludes to maxComments via 'the count is a hard budget' but never explains url, sort, or maxDepth, leaving the agent to infer all parameter meaning from bare schema types.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb (read) and resource (a Reddit post and its loaded comments), plus the shape of the return (original links, parent IDs, coverage). It implicitly distinguishes itself from reddit_search by fetching a single post rather than searching, though it never names the siblings explicitly.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The closing line 'Follow next_links for more threads' gives real continuation guidance for paginating, and the budget caveat implies when results are partial. However, it never states when to prefer this over reddit_search or x_post, leaving alternative selection to inference.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
reddit_searchARead-onlyIdempotent
Search Reddit with original ordering and canonical links. Cursor is valid only within this server session for 15 minutes; keep query and filters unchanged when paging.
| Name | Required | Description | Default |
|---|---|---|---|
| sub | No | ||
| sort | No | relevance | |
| time | No | all | |
| limit | No | ||
| query | Yes | ||
| cursor | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare read-only, idempotent, open-world behavior, so the safety profile is covered. The description adds genuinely new behavioral context: cursor lifetime is session-scoped to 15 minutes and filters must remain stable across pages, which is not derivable from the schema or annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two tight sentences with zero filler: purpose first, then the pagination constraint. Every clause carries information the agent needs.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 6-parameter search tool with no output schema and 0% schema coverage, the definition covers purpose and cursor behavior but omits the semantics of the filtering and sorting parameters that materially change results. Annotations carry the safety profile, so the remaining gap is parameter guidance.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% across 6 parameters, so the description must carry the burden. It explains cursor semantics well but leaves sub, sort, time, and limit completely undocumented, and the enum members for sort/time are only visible in the raw schema with no explanation of their meaning.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb+resource ('Search Reddit') and adds a distinguishing detail ('original ordering and canonical links') that separates it from the x_* siblings. It never explicitly contrasts itself with siblings like reddit_post, so it falls short of a 5.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides real paging guidance ('cursor is valid only within this server session for 15 minutes; keep query and filters unchanged when paging'), which tells the agent how to iterate correctly. However, it says nothing about when to pick this over reddit_post, x_search, or x_post, so usage context is only partially covered.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
x_postARead-onlyIdempotent
Read X posts by numeric ID through TwitterAPI.io, including available quotes and reply references. Reports missing IDs; does not fetch a full reply thread. Billed per returned post.
| Name | Required | Description | Default |
|---|---|---|---|
| ids | Yes | ||
| detail | No | Compact retains full post text and essential context; full also retains author profiles and raw media metadata. | compact |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare the read-only, idempotent, non-destructive profile, so the bar is lower, yet the description adds real traits beyond them: it reports missing IDs rather than failing, explicitly does not expand full reply threads, and discloses per-returned-post billing. That cost and missing-ID behavior are genuinely useful and not inferable from the annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three short sentences, front-loaded with the core action and progressively adding scope, exclusion, and cost. No sentence is redundant and nothing is buried.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, the description usefully characterizes the response (includes quotes and reply references, reports missing IDs). Cost and scope limits are covered. It is only slightly incomplete in not describing the compact/full detail tradeoff at a level beyond the schema's own text.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 50%: the detail enum is self-documented in the schema, while ids has no schema description beyond its numeric pattern. The description says 'numeric ID' but adds no meaning about batch size, format, or what compact vs full actually returns, so it does not compensate for the coverage gap. Baseline 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb (Read) and resource (X posts) with the exact lookup key (numeric ID) and even names the data provider (TwitterAPI.io). The 'by numeric ID' qualifier cleanly separates it from the sibling x_search, which is for discovery rather than direct ID retrieval.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The 'by numeric ID' framing clearly implies the precondition (you already have post IDs), and 'does not fetch a full reply thread' is an explicit scope exclusion that prevents misuse. It stops short of naming x_search as the alternative for ID discovery, so it isn't a full when/when-not routing statement.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
x_searchARead-onlyIdempotent
Search X through TwitterAPI.io. Returns one whole upstream page (normally up to 20 posts), preserving Latest or Top order and reply/quote context. Billed per returned post. Pass next_cursor to page; no automatic retries or popularity filters.
| Name | Required | Description | Default |
|---|---|---|---|
| sort | No | Latest | |
| query | Yes | ||
| cursor | No | ||
| detail | No | Compact retains full post text and essential context; full also retains author profiles and raw media metadata. | compact |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already cover the safety profile (readOnly, idempotent, non-destructive, openWorld), and the description adds meaningful traits beyond them: per-post billing, a ~20-post page size, preserved Latest/Top ordering, retained reply/quote context, and the absence of automatic retries or popularity filters. Error-handling and rate-limit behavior beyond 'no retries' is left unstated, so not a full 5.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Four compact sentences, front-loaded with the purpose and return shape, each carrying distinct information (source, page size, ordering, billing, paging, retry policy). Slightly dense but no filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, the description correctly carries the return-value burden by describing page size, ordering preservation, and included reply/quote context. What remains thin is guidance on query construction and how cursor paging terminates, which a low-coverage schema does not cover.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is only 25% (only 'detail' is documented), so the description must compensate and partly does: it explains ordering via the Latest/Top mention and paging via the cursor. However, it refers to 'next_cursor' while the actual parameter is named 'cursor', and it never characterizes the required 'query' parameter's syntax or the compact/full tradeoff.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ('Search X through TwitterAPI.io') and describes the return shape ('one whole upstream page... up to 20 posts'). An agent can immediately distinguish this from reddit_search and x_post without opening any schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives operational context ('Pass next_cursor to page') but never states when to choose this over reddit_search or x_post, nor any exclusions. Usage is implied by the resource name rather than explicitly routed.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
4 tool updates
v0.1.0- First observed
reddit_post - First observed
reddit_search - First observed
x_post - First observed
x_search
TDQS
Scored across 4 tools
Each tool pairs a platform with a clear action (search vs. reading a specific post), so boundaries are largely distinct. The verb 'post' is mildly ambiguous since it means 'read a post object' rather than 'publish', but descriptions resolve this.
All four tools follow a strict platform_action pattern (reddit_search/reddit_post, x_search/x_post) with consistent snake_case and parallel verb usage across both platforms.
Four tools is well-scoped: a symmetric 2x2 grid of two platforms times two operations (search and read). Every tool earns its place with no redundancy.
Search-plus-read coverage exists for both Reddit and X, including comment/quote context and pagination. Gaps remain for user/timeline lookups and full reply threads (x_post explicitly does not fetch them), but core workflows are workable via next_links/cursors.
Maintenance
Related MCP Connectors
Reddit & X data for AI agents over MCP. Semantic search, hosted, no Reddit API.
Hosted MCP with 91 agent tools: X, domains, SEO, Maps, Trends, Search, YouTube, TikTok, and more.
Live X/Twitter and Reddit research. 10 read-only MCP tools, Google/GitHub sign-in. Free tier.
Your agent needs to know what a community actually thinks — which subreddit is discussing your category, what the top posts argue, what the comment tree says underneath. **What you can ask for** • "Which subreddits discuss project-management tools, and how big are they?" • "Find posts complaining about Notion pricing in the last month." • "Read the full comment tree on this thread and summarise the disagreement." • "What is r/selfhosted posting about this week?" • "Search every community for mentions of our product name." **How to use it** Point any MCP client at https://mcp.aisa.one/reddit/mcp and sign in with OAuth — there is no key to create or paste. 5 read tools: search across all of Reddit or inside one subreddit, browse a subreddit's post stream, read a subreddit's details, and pull a post's comment tree. **It is also a door to the rest** The same login reaches 26 sources and 580+ operations. Find the complaint here, then ask the same agent what the competitor's traffic or backlinks look like — without adding a second server. **What it costs** Finding and inspecting an operation is free. Running one is billed per call at API prices, with no seat and no monthly minimum, and every call takes max_price_usd so an agent cannot overspend by accident. **Where else it reaches** https://mcp.aisa.one/social/mcp for X plus Instagram, Reddit, Pinterest and YouTube; https://mcp.aisa.one/gtm/mcp for those plus Similarweb and Apollo.
Related MCP Servers
- AlicenseAqualityCmaintenanceMCP server for Twitter/X enabling AI agents to search, post, reply, and engage with tweets.143 npm2MIT
- AlicenseNot gradedqualityDmaintenanceMCP tool server that gives any AI agent the ability to search, scrape, and analyze content across the internet.41MIT
- AlicenseNot gradedqualityAmaintenanceMCP server for realtime X (Twitter) search enabling keyword/semantic search, filters, date ranges, and citations for coding agents.6 npmMIT
- AlicenseNot gradedqualityCmaintenanceLive X/Twitter and Reddit research. 10 read-only MCP tools, Google/GitHub sign-in. Free tier.1MIT