WEIR

AI Social Listening Agent: Build One for X in 2026

Build an AI social listening agent for X (Twitter) with Claude and MCP: the exact prompt, the tools it calls, a real run, and a daily monitor for cents.


Published · Updated · 7 min read

Cover image: Listen with AI, answer by hand

An AI social listening agent reads what people post about your brand, sorts it into themes and flags the posts a person should answer.

You can build a small one for X (Twitter) with one prompt and an MCP client, such as Claude Code, Claude or Cowork. This guide gives you the prompt, the tools it calls, a real run and a daily monitor. We run Weir, the data source it uses.

Paste this into any client with Weir connected, with your brand in place of Figma:

Use Weir to write today's X brief for Figma.
1. search_x: query "figma -from:figma", language en, since 24 hours ago,
   limit 20. Follow meta.nextCursor for at most 3 pages.
2. search_x: fromUsers ["figma", "canva"], since 24 hours ago, onlyOriginal true.
3. Group the posts into 3 to 5 themes. Give each a post count, a rough
   sentiment (positive, mixed or negative) and one example link.
4. List up to 5 posts worth answering by hand: questions, bugs, complaints.
   Link each one and say why. Never reply, like or post.
5. End with the credits used: add up meta.creditsCharged.
  1. Connect WeirAdd the MCP server to Claude Code, Claude, Cowork or OpenClaw.
  2. Paste the promptKeywords, accounts and the brief's format.
  3. Read the briefThemes, rough sentiment and posts to answer by hand.
  4. Make it dailyA search monitor and a signed webhook.

Step 1: Connect an MCP client to X data

Your agent needs a tool that searches X, and Weir's X MCP server is one. It's a URL you add once, with nothing to install:

  • Claude Code: run the command below, then type /mcp to sign in.
  • Claude: add the URL as a custom connector, as our Claude guide shows.
  • Cowork: follow our Cowork guide, which also sets up a scheduled run.
  • OpenClaw: two commands from our OpenClaw guide add it.
claude mcp add --transport http weir https://api.weirapp.io/mcp

Then ask "What's my Weir usage?" The agent calls the free get_usage tool, so you know it works before you spend.

Step 2: Write the AI social listening agent prompt

The prompt is the whole agent: what you search, how you sort it, and what it must never do. Here is why each part is there:

  • Your keyword search finds the talk. query takes X's own syntax, so -from:figma drops the brand's own posts.
  • Replies stay in. Two of our three test mentions were replies in other people's threads.
  • The accounts call adds context. fromUsers shows what you and a rival posted that day.
  • Pages are capped. X serves about 20 posts a page, so the brief reads about 60 posts at most.
  • The limits are written down. No replies, no likes, and nothing about people beyond their posts.

Each search_x call costs 1 credit plus 1 per post. Every reply carries meta.creditsCharged, so the agent can add up its own bill.

Step 3: Read the brief: themes, sentiment and posts to answer

You get the brief in three parts: themes with counts and rough sentiment, up to five posts to answer, and the credits used. The contents change daily, so here is what the agent reads.

We ran its first call on 22 October 2026 with limit: 3:

→ search_x {"query": "figma -from:figma", "language": "en",
            "since": "2026-10-21T00:00:00Z", "limit": 3}
← 3 posts · 4 credits (1 + 3 × 1) · nextCursor set
  reply      0 likes · 3 views · personal account, 12 followers
  original   0 likes · 4 views · personal account, 384 followers
  reply      0 likes · 3 views · personal account, 1,356 followers

All three came from personal accounts, so we show numbers only. Three things stood out:

  • Fresh mentions had no likes yet. Your agent has to judge a post by what it says, not by its counts.
  • The pace was high. The posts came within seven minutes, so one 20-post page may cover under an hour.
  • A check mark isn't reach. One account had verified: true and 12 followers.

Sentiment from a language model is rough. It can miss sarcasm and in-jokes, so read each post it flags before you act. For scores you can chart, see X sentiment analysis in Python.

Step 4: Run social listening on X every day

You can schedule the prompt itself. Cowork runs it as a scheduled task, and OpenClaw as an automation that posts to your chat. In Claude Code, add Weir with a key and call it from cron:

claude -p "$(cat brief-prompt.txt)" --allowedTools "mcp__weir__*" > brief.md

Those runs pay for every post the search returns. For production, let a monitor do the collecting. It searches on a schedule, bills only results it hasn't shown you, and sends them to a signed webhook.

Create the webhook in Weir's dashboard first, then the monitor:

curl --request POST --url https://api.weirapp.io/v1/monitors \
  --header "Authorization: Bearer $WEIR_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{"name": "Figma on X", "schedule": "daily", "webhookId": "YOUR_WEBHOOK_ID",
    "target": {"kind": "search", "query": "figma -from:figma", "sources": ["x"]}}'

Know what you're getting:

  • One page per run. Each run reads the newest matches, about 20 posts, and a busier query loses the oldest.
  • Hourly needs a paid tier. The free tier runs daily or weekly, with one monitor and one webhook.
  • It polls, so it isn't real time. A post made after a run waits for the next one.
  • Deliveries are signed. Check the HMAC on the raw body, as our brand mention monitor guide does in Python.
  • Your agent reads results free. Swap steps 1 and 2 of the prompt for list_monitor_results, keeping what was first seen in the last day.

What does an AI social listening agent cost per day?

A call costs 1 credit plus 1 per X post, and a monitor run that finds nothing new costs 1 credit. These are busy-day figures:

Credits per day when every post is new
Prompt, run once a day84
Daily monitor, X onlyabout 21
Hourly monitor, paid tierabout 504

In money, as of October 2026:

105credits on a busy day for the daily prompt and monitor together
10¢for an hourly monitor's 480 posts a day, at the $5 pack rate
$2.40for those 480 posts on X's own API, at $0.005 per post read

Your 5,000 free credits a month cover the first line on every day of the month.

If the agent misses posts

  • It answers from memory. Start the prompt with "Use Weir", or switch the connector on for that chat.
  • Mentions slip through. A daily run keeps about 20 posts, so go hourly or narrow the query.
  • It stops with a 402. You're out of credits, and retrying won't help until you add some.

When not to use Weir

  • You need posts within seconds. X's filtered stream lists about 4 to 5 seconds of latency, and TwitterAPI.io's filter rules can check every 0.05 seconds.
  • Auto-replies are the goal. Weir is read-only, and X limits automated replies anyway.
  • Price per tweet comes first. TwitterAPI.io lists $0.15 per 1,000 tweets as of October 2026, less than our $5 pack.
  • You listen beyond X and Reddit. Weir reads only those two, so TikTok or news needs another tool.

Weir isn't licensed by X, so access can change. Check X's terms for your use; this isn't legal advice.

FAQ

What is a social listening AI agent?

It's an AI model with a social data tool and a standing job. It searches posts about your brand, groups them, judges the tone and flags what needs a person. Unlike a dashboard, it hands you a short brief in plain words.

Can AI agents for social listening reply to posts?

They shouldn't on X. X's Developer Guidelines bar auto-replies to anyone who mentions a keyword, and an app's AI-written replies need X's approval. Weir can't post at all, so your agent drafts notes and a person replies.

Can I build a social listening tool without code?

Yes. Connect Weir to Claude or Cowork, paste the prompt and schedule it as a Cowork task, which needs a paid Claude plan. For alerts that skip repeats, create a monitor in Weir's dashboard instead of writing code.

Is there a free Twitter social listening tool?

Searching X by hand is free. For a daily written brief, Weir's 5,000 free credits a month cover the prompt and a daily monitor. Hourly runs need a paid tier.

Sources

All checked on 22 October 2026: