Model Context Protocol

Social data for AI agents,
via MCP

KeyAPI exposes its full social media data suite as native MCP tools using Streamable HTTP. Plug it into any MCP-compatible AI client and let your agents fetch creator profiles, videos, comments, reviews, and more across 11 platforms in real time.

Model Context Protocol

MCP configuration guide

What is MCP?

MCP is a unified connection protocol between AI clients and external tools. After connecting KeyAPI MCP, your AI assistant can discover and call platform data tools in conversation, such as creator profiles, videos, comments, products, and search results.

KeyAPI implements MCP with Streamable HTTP. Each platform has its own endpoint. TikTok is selected by default, and you can add Instagram, YouTube, Reddit, Amazon, and more as needed.

Preparation

Get your API Key from Dashboard

Create and copy your KeyAPI API key from the Dashboard.

Choose an AI client

Choose the AI client you use, then copy the matching configuration.

Configuration method

Select platforms

Each platform has an independent endpoint. Select the platforms you need, then copy the generated configuration.

Copy this and send it to your AI assistant. It can help you finish the setup. Remember to replace the API key with your own.

mcp.jsonJSON
{
  "mcpServers": {
    "keyapi-tiktok": {
      "type": "streamable-http",
      "url": "https://mcp.keyapi.ai/tiktok/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_KEYAPI_TOKEN"
      }
    }
  }
}

Restart the selected client after updating the configuration. To connect multiple platforms, select them above and the guide will generate multiple server entries.

MCP Protocol Flow

How AI Uses the MCP Server

The following requests illustrate the standard MCP interaction between an AI client and the KeyAPI MCP Server. Most MCP-compatible clients, such as Claude, Cursor, and the OpenAI Agents SDK, perform these requests automatically, so developers typically don't need to send them manually.

01

Establish an MCP Session

The AI client sends an initialize request to establish a session with the MCP Server and negotiate the protocol version, client information, and supported capabilities.

curl -X POST https://mcp.keyapi.ai/tiktok/mcp \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "initialize",
    "params": {
      "protocolVersion": "2024-11-05",
      "capabilities": {},
      "clientInfo": {
        "name": "my-client",
        "version": "1.0.0"
      }
    }
  }'
02

Retrieve the Tool List

The AI client sends a tools/list request to discover all tools exposed by the MCP Server, along with their descriptions and input schemas.

curl -X POST https://mcp.keyapi.ai/tiktok/mcp \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 2,
    "method": "tools/list",
    "params": {}
  }'
03

Automatically Execute a Tool

When the AI determines that a tool is required, it automatically sends a tools/call request with the appropriate parameters and API Key to execute the tool and retrieve the requested data.

curl -X POST https://mcp.keyapi.ai/tiktok/mcp \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $KEYAPI_TOKEN" \
  -d '{
    "jsonrpc": "2.0",
    "id": 3,
    "method": "tools/call",
    "params": {
      "name": "search_shop_creator",
      "arguments": {
        "unique_id": "maccagames",
        "region": "US"
      }
    }
  }'

The requests shown above demonstrate the standard MCP protocol flow for reference. When using MCP-compatible clients such as Claude, Cursor, or the OpenAI Agents SDK, these requests are handled automatically and do not need to be sent manually.

Why KeyAPI MCP

Built for how agents actually work

One-line integration

Point any MCP-compatible client at our server endpoint. No SDKs to install and no auth flows to wire up.

Works with any AI agent

Claude, GPT models, open-source LLMs, and custom agents can use the same MCP tools.

11 platforms, one connection

TikTok, Instagram, YouTube, Twitter, Threads, Reddit, LinkedIn, Facebook, Google, Pinterest, and Amazon are available through one MCP server family.

Structured JSON responses

Every tool returns clean JSON that can be used immediately downstream.

Compatibility

Works with your existing stack

Any client that supports MCP Streamable HTTP can connect to KeyAPI.

Claude DesktopCursorWindsurfClineContinueCustom agentsLangChainAutoGen

FAQ

Frequently asked questions