MCP Integration
MCP Tools: Connect AI Agents to Social Media Data
Use the Model Context Protocol (MCP) to give Claude, Cursor, VS Code, and any MCP-compatible AI agent direct access to 990+ social data tools across 16 platforms. Build AI-powered social media workflows with real-time data.
990+
MCP Tools
Across all platforms
16
Platform MCPs
Dedicated servers
3
Transports
Stdio Β· SSE Β· Streamable HTTP
3 lines
3 lines
Paste config and go
Pick Your Transport
TikHub MCP supports three transport modes. Pick the one that fits your client.
Stdio
Default for desktop MCP clients. Uses npx mcp-remote to bridge HTTP to stdio. Requires Node.js.
- Best for
- Claude Desktop, VS Code, Claude Code
- Auth method
- npx mcp-remote bridges HTTP β stdio
SSE
Server-Sent Events transport. For legacy clients that need a streaming connection.
- Best for
- Legacy clients needing Server-Sent Events
- Auth method
- Bearer token in header
Streamable HTTP
Direct HTTP β most efficient for clients with native support.
- Best for
- Cherry Studio, Cursor, Cline, curl, custom clients
- Auth method
- Bearer token in header
Stdio
1. Stdio Transport
Stdio is the default for desktop MCP clients. Since the TikHub MCP server is remote, we use npx mcp-remote to bridge HTTP to stdio. Requires Node.js installed.
Replace YOUR_API_KEY with your TikHub key from tikhub.io.
Stdio Configurator
Pick a client and the platforms you need β we generate the exact config to paste in.
Choose your client
Config file location
Mac: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Select platforms 1 selected
1{2 "mcpServers": {3 "tikhub-tiktok": {4 "command": "npx",5 "args": ["mcp-remote", "https://mcp.tikhub.io/tiktok/mcp", "--header", "Authorization: Bearer YOUR_API_KEY"]6 }7 }8}Restart your client after saving. Add only the platforms you use.
SSE
2. SSE Transport
For clients that connect over Server-Sent Events. Same hosted server, with the /sse path.
Hosted endpoint
Self-hosted SSE
Run a single platform locally as an SSE server. Clients connect to http://localhost:8001/sse.
1tikhub-mcp --platform tiktok --transport sse --port 8001Streamable HTTP
3. Streamable HTTP Transport
For clients that natively support streamable HTTP (no stdio bridge). The most direct and efficient method.
- 1Open Settings β MCP Servers
- 2Click Add Server and select Streamable HTTP
- 3Set name, URL, and the Authorization header
- 4Repeat for each platform you need
LangChain
4. LangChain / LangGraph Integration
Use TikHub MCP tools in your LangChain agents via langchain-mcp-adapters.
Install
1pip install langchain-mcp-adapters langgraph langchain-openaiSingle platform (Streamable HTTP)
1import asyncio2from langchain_mcp_adapters.client import MultiServerMCPClient3from langgraph.prebuilt import create_react_agent4from langchain_openai import ChatOpenAI56async def main():7 async with MultiServerMCPClient(8 {9 "tikhub-tiktok": {10 "transport": "streamable_http",11 "url": "https://mcp.tikhub.io/tiktok/mcp",12 "headers": {"Authorization": "Bearer YOUR_API_KEY"},13 },14 }15 ) as client:16 tools = client.get_tools()17 agent = create_react_agent(ChatOpenAI(model="gpt-4o"), tools)18 response = await agent.ainvoke(19 {"messages": [{"role": "user", "content": "Get TikTok video details for ID 7350810998023949599"}]}20 )21 print(response)2223asyncio.run(main())Multiple platforms
1async with MultiServerMCPClient(2 {3 "tikhub-tiktok": {4 "transport": "streamable_http",5 "url": "https://mcp.tikhub.io/tiktok/mcp",6 "headers": {"Authorization": "Bearer YOUR_API_KEY"},7 },8 "tikhub-instagram": {9 "transport": "streamable_http",10 "url": "https://mcp.tikhub.io/instagram/mcp",11 "headers": {"Authorization": "Bearer YOUR_API_KEY"},12 },13 "tikhub-youtube": {14 "transport": "streamable_http",15 "url": "https://mcp.tikhub.io/youtube/mcp",16 "headers": {"Authorization": "Bearer YOUR_API_KEY"},17 },18 }19) as client:20 tools = client.get_tools()21 agent = create_react_agent(ChatOpenAI(model="gpt-4o"), tools)Stdio variant (with mcp-remote)
1from langchain_mcp_adapters.client import MultiServerMCPClient23async with MultiServerMCPClient(4 {5 "tikhub-tiktok": {6 "transport": "stdio",7 "command": "npx",8 "args": [9 "mcp-remote",10 "https://mcp.tikhub.io/tiktok/mcp",11 "--header",12 "Authorization: Bearer YOUR_API_KEY",13 ],14 },15 }16) as client:17 tools = client.get_tools()Server Endpoints
Two unauthenticated meta-endpoints on the hosted server.
Health check
1curl https://mcp.tikhub.io/healthList all platforms
1curl https://mcp.tikhub.io/platformsJSON-RPC 2.0 Primer
All HTTP / SSE requests follow the JSON-RPC 2.0 spec. The flow is: initialize β store the session id β tools/list β tools/call.
1. Initialize session (required first)
Returns an Mcp-Session-Id you must include on every subsequent call.
1curl -X POST https://mcp.tikhub.io/tiktok/mcp \2 -H "Authorization: Bearer YOUR_API_KEY" \3 -H "Content-Type: application/json" \4 -H "Accept: application/json, text/event-stream" \5 -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"my-client","version":"1.0"}}}'2. List tools
Returns the catalog of tools the platform exposes β names, descriptions, and JSON schemas.
1curl -X POST https://mcp.tikhub.io/tiktok/mcp \2 -H "Authorization: Bearer YOUR_API_KEY" \3 -H "Content-Type: application/json" \4 -H "Accept: application/json, text/event-stream" \5 -H "Mcp-Session-Id: SESSION_ID_FROM_INITIALIZE" \6 -d '{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}'3. Call a tool
Pass the tool name and the arguments matching its schema.
1curl -X POST https://mcp.tikhub.io/tiktok/mcp \2 -H "Authorization: Bearer YOUR_API_KEY" \3 -H "Content-Type: application/json" \4 -H "Accept: application/json, text/event-stream" \5 -d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"tiktok_web_fetch_post_detail","arguments":{"itemId":"7350810998023949599"}}}'Available Platforms
Replace {platform} in any URL with the slug from the table.
- TikTok
tiktok204toolsVideos, users, search, ads, shop, analytics, creator tools
- Douyin
douyin247toolsVideos, users, search, billboard, creator, Xingtu
- Instagram
instagram82toolsPosts, reels, stories, users, comments, hashtags
- Xiaohongshu
xiaohongshu71toolsNotes, users, search, comments
- Weibo
weibo64toolsPosts, users, comments, search, trending
- Others
others64toolsLemon8, PiPiXia, Xigua, Toutiao, Sora2
- Bilibili
bilibili41toolsVideos, users, comments, danmaku, search
- YouTube
youtube37toolsVideos, channels, comments, search, playlists
- Kuaishou
kuaishou33toolsVideos, users, comments, search
- Zhihu
zhihu32toolsQuestions, answers, users, topics, search
- LinkedIn
linkedin25toolsProfiles, posts, companies, search
- Reddit
reddit24toolsPosts, comments, subreddits, users, search
- TikHub Utilities
tikhub23toolsAccount info, downloader, health check, hybrid parsing, temp mail
- WeChat
wechat19toolsArticles, accounts, channels, search
- Twitter
twitter13toolsTweets, users, search, timelines
- @Threads
threads11toolsPosts, users, replies, search