Reddit and X data in LangChain
langchain-mcp-adapters turns ChatterAPI's hosted MCP server into LangChain tools in a few lines of Python. Your agent can search Reddit and X and read threads and users, and the key goes in a header.
https://api.chatterapi.com/mcpWhat you get
- Every live Reddit and X tool as a LangChain tool, with names, descriptions and input schemas from the server.
- No scraping code for you to maintain.
- Every tool result includes credits, so the agent can track spend.
Set it up
Create an API key
Sign in at chatterapi.com/signup with Google and create a key on the Keys page. You get 100 free credits. A
ca_test_key returns recorded samples for 0 credits, which helps while you set things up.Install the adapter
Install the adapter alongside LangChain.
terminalpip install langchain-mcp-adaptersLoad the tools
Point the client at the MCP URL with the
httptransport and the header.get_tools()returns LangChain tools you can pass to any agent.agent.pyimport asyncio, os from langchain_mcp_adapters.client import MultiServerMCPClient client = MultiServerMCPClient({ "chatterapi": { "transport": "http", "url": "https://api.chatterapi.com/mcp", "headers": {"Authorization": f"Bearer {os.environ['CHATTERAPI_KEY']}"}, } }) async def main(): tools = await client.get_tools() print([t.name for t in tools]) asyncio.run(main())
A tool call from the agent
When the agent calls reddit_search, it sends arguments like these. The response comes from a real recorded call.
What do small businesses say about choosing a CRM on Reddit this year?
{
"method": "tools/call",
"params": {
"name": "reddit_search",
"arguments": {
"q": "best crm for small business",
"time": "year"
}
}
}{
"data": [
{
"id": "1wdihhj",
"fullname": "t3_1wdihhj",
"title": "What CRM should a small business use?",
"body": "We’re a small B2B business with 6 people and sales is still pretty founder led, but revenue has grown enough that keeping leads, follow ups and customer conversations spread across spreadsheets and inboxes is starting to…",
"author": "NotedWhisky",
"subreddit": "CRM",
"permalink": "/r/CRM/comments/1wdihhj/what_crm_should_a_small_business_use/",
"url": "https://www.reddit.com/r/CRM/comments/1wdihhj/what_crm_should_a_small_business_use/",
"externalUrl": null,
"score": 51,
"numComments": 186,
"upvoteRatio": null,
"createdAt": "2026-09-11T14:52:16.000Z",
"nsfw": false,
"locked": null,
"media": null
},
{
"id": "1vmy4xb",
"fullname": "t3_1vmy4xb",
"title": "If You Had to Pick the Best CRM for Small Business Today, What Would It Be?",
"body": "I've spent the last few days reading reviews and watching videos, and somehow I'm even more undecided than when I started.\n\nEvery CRM looks amazing on its website, but that doesn't tell you what it's like after you've be…",
"author": "Living_Dependent242",
"subreddit": "CRMSoftware",
"permalink": "/r/CRMSoftware/comments/1vmy4xb/if_you_had_to_pick_the_best_crm_for_small/",
"url": "https://www.reddit.com/r/CRMSoftware/comments/1vmy4xb/if_you_had_to_pick_the_best_crm_for_small/",
"externalUrl": null,
"score": 10,
"numComments": 56,
"upvoteRatio": null,
"createdAt": "2026-08-13T02:25:31.000Z",
"nsfw": false,
"locked": null,
"media": null
}
],
"page": {
"nextCursor": "AX-v…",
"hasMore": true
}
}Recorded from a live call on . Long text is shortened and the cursor is cut. A live key is charged 2 credits for this call. A test key returns this same sample for 0 credits.
Limits worth knowing
- In
langchain-mcp-adapters,httpandstreamable_httpname the same transport. Only thesseandhttptransports support runtime headers. source
Last checked . Sources: langchain-mcp-adapters on GitHub.
Questions
Is there a LangChain document loader?
Does it cost more through LangChain than through REST?
Can I try it without spending credits?
ca_test_ key. Every tool returns a recorded sample for 0 credits, whatever you ask.