Social Media MCP Server: Give Your AI Agent Data (2026)
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:
- Pasting screenshots or copied text into the chat. It works for one account and stops being practical at ten.
- Letting the agent browse the page. Networks often show a login wall or a partial page to an automated browser, and the layout is different on every network.
- Writing a scraper. It breaks when the network changes its page, and you end up maintaining one per network.
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.
- Download the repository from github.com/sociallensapi/sociallens-mcp to your machine.
- 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:
- 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." - It calls the tool with these arguments:
{"platform": "tiktok", "username": "nasa"}
- The server sends
GET /v1/profilewith 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"
}
- The agent answers with the number in
followersand can quotefetched_atas 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
- One successful read is 1 credit.
get_profileandget_postcost 1 credit per call. - Paginated tools cost 1 credit per page. That covers
get_profile_posts,get_post_comments,get_followersandget_following. check_api_keycosts 0.- Errors are not charged.
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
- Follower and following lists are TikTok only. Called with another network,
get_followersstops before reaching the API and returns "followers is TikTok only. For the count on other networks, use get_profile." The follower count itself works on every network throughget_profile. - YouTube rounds its numbers. YouTube publishes a rounded subscriber count for everyone. The same read for the NASA channel returned
"followers": 15100000with"is_exact": false, so the agent should say "about 15.1 million" and not present it as exact. - Not every tool covers every network.
get_postworks on all networks except LinkedIn, andget_post_commentson TikTok, Instagram, YouTube, Facebook and Reddit. - Older pages are not available everywhere. Paging through older posts works on Facebook, Reddit and Pinterest boards, and through older comments on Facebook. On the other networks those two tools return the first page. TikTok follower and following lists do page.
- Reddit, LinkedIn and Pinterest have their own rules. On Reddit the handle is a subreddit name and the profile comes back with subreddit fields. On LinkedIn the profile is a company page by default, or a person with
typeset toperson, and only company pages have posts. On Pinterest, posts are read from the full URL of a board. - Public data, read only. The server needs no login to any network and sees nothing private. It has no search by keyword or topic, and it cannot post, follow or message.
- It is a local server. It runs on your machine over stdio. There is no hosted endpoint to paste into a web chat.
When another route fits better
- Your stack does not speak MCP. Use the HTTP API directly with function calling or the OpenAPI file. The setup is in Social Media Data for AI Agents and No Code Tools.
- You want a whole store of scrapers behind one server. Apify's MCP server lets agents discover and run Actors from its store. The cost and the output format then depend on each Actor.
- You need private data from accounts you own. Insights such as reach and audience demographics come from the official platform APIs, with their login and review. The trade is laid out in Instagram Graph API vs a public data read.
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.
Related guides
- Social media data for AI agents and no code tools
- n8n workflow: follower count tracker for 9 networks
- Unified Social Media Data API
- Follower Count API
- Social media post metrics API
- How to read public subreddit data via API
- Track TikTok follower growth
- Instagram Graph API vs a public data read: which to use