Social Media MCP Server: Give Your AI Agent Data (2026)

Published · 9 min read

Last updated and tested: .

To give your AI agent social media data, connect it to a social media MCP server: a small program that exposes read tools the agent can call. sociallens-mcp is the official MCP server of SocialLens (sociallens.dev). It gives Claude Code, Cursor and any other MCP client 7 tools that read public profiles, posts, comments and TikTok follower lists on 9 networks, and it hands the JSON of the API to the model unchanged. It runs on your machine, needs one API key, and a new account starts with 250 free reads and no card.

This page covers the problem it solves, what MCP is in three sentences, the install commands for Claude Code and Cursor, a real tool call with its real response, the cost per read and the limits.

The problem: your agent cannot see social media

An agent that researches creators, competitors or communities needs today's numbers: how many followers an account has, what it posted this week, what people wrote under a video. A model does not have them. It knows what was in its training data, and it will state an old number with confidence.

The usual workarounds do not last:

What the agent needs is a tool it can call: send a network and a handle, get structured data back. That is the simplest way to read social media data with an AI agent, and MCP is the standard way to plug that tool in.

What MCP is, in three sentences

MCP (Model Context Protocol) is an open standard that connects AI applications to external tools and data. An MCP server publishes a list of tools, each with a name, a description and typed parameters, and the agent reads that list and decides on its own when to call one. You register the server once in your MCP client, and every conversation after that can use its tools.

That last part is the difference from wiring a function by hand. With function calling you write the tool definition and the handler yourself. With an MCP server for social media, both are already written: you add one entry to a config file.

What the social media MCP server gives your agent

sociallens-mcp is open source under the MIT license and lives at github.com/sociallensapi/sociallens-mcp. It talks to your MCP client over stdio and calls the SocialLens (sociallens.dev) API over HTTPS. These are the 7 tools the server lists:

Tool What the agent can read Networks
get_profile Public profile: followers, following, bio, verified and private flags, avatar All 9
get_post Metrics of one post or video by URL: likes, views, comments, shares, author, caption All except LinkedIn
get_profile_posts Recent posts of a profile with their counters, one page per call All 9
get_post_comments Public comments of one post: text, author, likes, replies TikTok, Instagram, YouTube, Facebook, Reddit
get_followers Accounts that follow a profile, one page per call TikTok only
get_following Accounts a profile follows, one page per call TikTok only
check_api_key Checks that your key works. Free Not tied to a network

The 9 networks are Instagram, TikTok, X, Reddit, YouTube, Facebook, LinkedIn, Threads and Pinterest. The network is a parameter called platform, so the agent uses the same tool for all of them. Every tool returns the JSON of the API as it came: no field is renamed or summarized on the way to the model.

Install the MCP server

You need Python 3.10 or newer and an API key. Create a free SocialLens (sociallens.dev) account to get one: 250 free reads, no credit card.

  1. Download the repository from github.com/sociallensapi/sociallens-mcp to your machine.
  2. Install the two dependencies with the same Python that will run the server:
pip install -r requirements.txt

The server reads the key only from the SOCIALLENS_API_KEY environment variable and refuses to start without it. The key stays in the config of your MCP client. It never goes in the prompt.

Claude Code

claude mcp add --env SOCIALLENS_API_KEY=sk_live_YOUR_KEY --transport stdio sociallens -- python /absolute/path/to/sociallens-mcp/server.py

Keep --transport stdio between --env and the server name, otherwise the CLI reads the name as another env pair.

Cursor and other MCP clients

Add the server to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (one project):

{
  "mcpServers": {
    "sociallens": {
      "command": "python",
      "args": ["/absolute/path/to/sociallens-mcp/server.py"],
      "env": {
        "SOCIALLENS_API_KEY": "sk_live_YOUR_KEY"
      }
    }
  }
}

Other clients that use the mcpServers JSON format take the same block. If your system only has python3, use it as the command.

To confirm the setup, ask the agent to run check_api_key. It answers with "ok": true and costs no credits.

Ask a question and watch the tool call

Ask your agent:

How many followers does @nasa have on TikTok?

This is what happens next:

  1. The agent reads the tool list and picks get_profile. Its description starts with "Read one public social media profile: follower count, following, bio, verified and private flags."
  2. It calls the tool with these arguments:
{"platform": "tiktok", "username": "nasa"}
  1. The server sends GET /v1/profile with those two parameters and your key, and hands the response back.

Real response, read through the MCP server on November 30, 2026, trimmed to the main fields:

{
  "exists": true,
  "username": "nasa",
  "platform": "tiktok",
  "nickname": "NASA",
  "verified": true,
  "private": false,
  "followers": 2262158,
  "followers_rounded": 2300000,
  "is_exact": true,
  "following": 23,
  "likes": 12095924,
  "videos": 70,
  "bio": "Making the seemingly impossible, possible.✨",
  "fetched_at": "2026-11-30T02:36:42Z"
}
  1. The agent answers with the number in followers and can quote fetched_at as the time of the read.

The full response also carries avatar, id, created_at, external_link, category, cached, source_cached and a credits block. In this read the block showed "charged": 1.

What we tested: the server from the repository, over a real MCP stdio session (initialize, tools/list and tools/call) with version 2.3 of the MCP Python SDK. The install commands are the ones in the README of the repository. We did not record a chat inside Claude Code or Cursor. The client only decides when to call the tool, and the call and the response are the ones shown here.

More questions the same server answers

Each row maps a request to the tool the agent would call and the number of reads it uses.

Ask the agent Tool Reads
How many likes and views does this video have? (with the URL) get_post 1
What did this account post lately, and which post did best? get_profile_posts 1 per page
What are people saying under this post? (with the URL) get_post_comments 1 per page
Compare the follower counts of these five accounts get_profile, five calls 5
Which accounts follow this TikTok profile? get_followers 1 per page

Agents can send tool calls in parallel. Requests in parallel on the same key are supported, up to 60 requests per minute.

What each tool call costs

A new account has 250 free reads. After that, credits are prepaid and never expire. The smallest pack is $19 for 8,000 reads, which is $0.0024 per read. The packs are on the pricing page.

Agent task Reads Cost at the Starter rate
One follower count 1 $0.0024
Vet a creator: the profile plus one page of recent posts 2 $0.0048
Compare 10 accounts by followers 10 $0.024
Read one page of comments on 20 posts 20 $0.048
An assistant that makes 100 lookups a day for a month 3,000 $7.13

The table uses the exact Starter rate, $19 divided by 8,000 reads.

To keep the bill predictable, tell the agent to keep a result in the conversation and not read the same account twice.

Honest scope

When another route fits better

Frequently asked questions

What is a social media MCP server?

It is a program that exposes social media reads as tools an AI agent can call through the Model Context Protocol. sociallens-mcp exposes 7 tools backed by the SocialLens (sociallens.dev) API, covering profiles, posts, comments and TikTok follower lists on 9 networks.

How do I give Claude Code access to social media data?

Install the dependencies of sociallens-mcp and register it with the claude mcp add command shown above, passing your key in SOCIALLENS_API_KEY. After that you ask in plain language and the agent calls the tools.

Does it work with Cursor?

Yes. Add the mcpServers block shown above to ~/.cursor/mcp.json or to .cursor/mcp.json in a project. Other MCP clients that use the same JSON format take the same block.

Does the agent need my Instagram or TikTok login?

No. The server reads public data and never asks for a login to a social network. The only credential is the SocialLens (sociallens.dev) API key in the environment of the server.

Which networks can the agent read?

Instagram, TikTok, X, Reddit, YouTube, Facebook, LinkedIn, Threads and Pinterest. Profiles work on all 9. Single posts work on all except LinkedIn. Comments work on TikTok, Instagram, YouTube, Facebook and Reddit. Follower lists are TikTok only.

How much does a tool call cost?

One credit per successful read, and one credit per page on the paginated tools. check_api_key is free and errors are not charged. A new account starts with 250 free reads.

Can I use the data without MCP?

Yes. Every tool maps to one endpoint of the HTTP API, which you can call from any language. The reference is in the docs.

Run these requests yourself

Every example on this page is a real call to the SocialLens API. A new account starts with 250 free reads, no card needed, and a read that fails is never charged.

Keep reading