Handles API
Guide

MCP server

Give an AI assistant direct access to Handles API. One remote MCP server, your own API key, and the same credits as the REST API.

Overview

The Model Context Protocol (MCP) lets an AI assistant call tools you connect to it. Handles API runs a remote MCP server, so Claude Code, Claude Desktop, Cursor, VS Code and other MCP clients can look up accounts, read catalogs and run the same queries as the REST API without you writing a request by hand.

Server URL
https://api.handlesapi.com/mcp
  • Transport: Streamable HTTP. Every call is one POST that returns a JSON answer; there is no session to keep alive. GET returns 405.
  • Protocol versions: 2026-07-28, 2025-11-25, 2025-06-18, 2025-03-26 and 2024-11-05. The server also answers server/discover.
  • Each tool call is an ordinary call to the REST API made on your behalf with your key, so limits, credits and error codes are identical.

Authentication

Send your API key on every request, as Authorization: Bearer hk_live_... or as an x-api-key header, exactly as for the REST API. A request without a valid key gets 401 and a JSON-RPC error. Create a key in the dashboard; see Authentication for scopes.

Install

Replace hk_live_... with your key. The examples that read HANDLES_API_KEY expect it as an environment variable, so the key never lands in a file you commit.

Claude Code

shell
claude mcp add --transport http handles https://api.handlesapi.com/mcp \
  --header "Authorization: Bearer hk_live_..."

Check it with claude mcp list, or /mcp inside a session. To share the server with a team, put it in .mcp.json at the project root and let each person supply their own key through the environment:

.mcp.json
{
  "mcpServers": {
    "handles": {
      "type": "http",
      "url": "https://api.handlesapi.com/mcp",
      "headers": {
        "Authorization": "Bearer ${HANDLES_API_KEY}"
      }
    }
  }
}

Claude Desktop

Claude Desktop starts local servers from claude_desktop_config.json (Settings, Developer, Edit Config). mcp-remote bridges that to a remote server and adds the header. The key goes in env; the header argument has no space after the colon because some Windows versions mangle spaces inside args.

claude_desktop_config.json
{
  "mcpServers": {
    "handles": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://api.handlesapi.com/mcp",
        "--header",
        "Authorization:${HANDLES_AUTH}"
      ],
      "env": {
        "HANDLES_AUTH": "Bearer hk_live_..."
      }
    }
  }
}

Claude can also reach the server as a custom connector (Settings, Connectors, Add custom connector), which has a field for request headers. A connector is called from Anthropic's servers and the key is stored with your Claude account, so use the file above if you want the key to stay on your machine.

Cursor

Add it to ~/.cursor/mcp.json for every project, or .cursor/mcp.json for one. Cursor resolves ${env:NAME} from your environment.

mcp.json
{
  "mcpServers": {
    "handles": {
      "url": "https://api.handlesapi.com/mcp",
      "headers": {
        "Authorization": "Bearer ${env:HANDLES_API_KEY}"
      }
    }
  }
}

VS Code

Save this as .vscode/mcp.json in the workspace. VS Code asks for the key the first time the server starts and stores it securely, so it never sits in the file.

.vscode/mcp.json
{
  "inputs": [
    {
      "type": "promptString",
      "id": "handles-api-key",
      "description": "Handles API key",
      "password": true
    }
  ],
  "servers": {
    "handles": {
      "type": "http",
      "url": "https://api.handlesapi.com/mcp",
      "headers": {
        "Authorization": "Bearer ${input:handles-api-key}"
      }
    }
  }
}

Any other client

Any client that speaks Streamable HTTP and can send a custom header works: point it at the server URL and set Authorization: Bearer hk_live_.... To see the raw protocol, call a tool yourself:

curl
curl https://api.handlesapi.com/mcp \
  -H "Authorization: Bearer $HANDLES_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "handles_check_account",
      "arguments": { "platform": "x", "handle": "nasa" }
    }
  }'
response
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\"data\":{\"platform\":\"x\",\"handle\":\"nasa\",\"exists\":true,\"evidence\":\"catalog\",\"identity\":{\"id\":\"11348282\",\"handle\":\"NASA\",\"name\":\"NASA\"},\"audience\":{\"count\":92086118,\"metric\":\"followers\"},\"flags\":{\"verified\":true},...},\"meta\":{\"request_id\":\"req_66108f6ecccbbfce\"}}"
      },
      {
        "type": "text",
        "text": "Credits: 1 spent, 1199410 remaining this period."
      }
    ]
  }
}

Tools

23 tools, not one per endpoint: a short list keeps the assistant's context small and its choices accurate. Every tool name starts with handles_. Arguments follow the REST parameters of the same endpoint; the full parameter list for each is in the API reference.

ToolEndpointCredits
handles_check_accountCheck one account against the catalog: identity, audience, verification, data age.GET /accounts/{platform}/{handle}1
handles_directory_listList or search one platform's catalog with filters, sorting and cursors.GET /directory/{platform}1
handles_directory_getFull record of one account, by handle or platform id.GET /directory/{platform}/{id}1
handles_directory_growthDaily audience history of one account, up to 365 days.GET /directory/{platform}/{id}/growth1
handles_directory_searchSearch by handle or name across several platforms at once.GET /directory/search1
handles_people_lookupFind a handle on every platform, with the evidence it is the same owner.GET /people/lookup1
handles_people_searchFind accounts by audience size, engagement, language, category and verification.GET /people/search1
handles_identity_graphA company's accounts across networks, from a handle, a domain or a LinkedIn slug.GET /identity/graph1
handles_x_userLive X profile, as X reports it right now.GET /x/users/{handle}2
handles_x_user_tweetsLive X timeline with engagement counts.GET /x/users/{handle}/tweets2
handles_x_search_tweetsLive X search with advanced-search syntax.GET /x/search/tweets2
handles_x_user_followersLive list of an X account's followers.GET /x/users/{handle}/followers2
handles_insights_x_accountOne-call dossier on an X account: engagement, volume, best posts, peer benchmark.GET /insights/x/{handle}1
handles_x_top_tweetsAn X account's best-performing posts.GET /insights/x/{handle}/top-tweets1
handles_instagram_top_postsAn Instagram account's best posts with measured likes, comments and views.GET /insights/instagram/{handle}/top-posts1
handles_instagram_content_mixWhich format works on an Instagram account: reels, carousels or images.GET /insights/instagram/{handle}/content-mix1
handles_trends_moversAccounts that gained or lost the most audience on the freshest day.GET /trends/{platform}/movers1
handles_tool_valuationDollar estimate of an X account, as a low, expected and high range.POST /tools/valuation2
handles_tool_engagement_calculatorTrue engagement rate of an X account from its recent posts.POST /tools/engagement-calculator2
handles_linkedin_companiesSearch LinkedIn companies by country, industry, size and contactability.GET /leads/linkedin/companies1
handles_linkedin_companyOne LinkedIn company with socials, contacts and decision makers.GET /leads/linkedin/companies/{id}1
handles_requestCall any endpoint in the catalog by method, path, query and body. A path that is not sold is refused.any sold endpointas the endpoint
handles_list_endpointsLists every sold endpoint by tag with its credit cost. Use it to find what to pass to handles_request.none0

The platform argument accepts x, instagram, tiktok, youtube, telegram, bluesky, twitch and kick where the endpoint covers them; LinkedIn companies have their own tools. See Platforms and coverage.

Credits

A tool call costs exactly what the endpoint behind it costs: 1 credit for catalog reads and insights, 2 for live reads. There is no surcharge for MCP, and listing tools or endpoints is free. The per-minute limit of your plan applies as usual, and the Free trial's credits are spent the same way and never renew. Every successful result ends with a line such as Credits: 1 spent, 14999 remaining this period., so the assistant can see what a session has used. Details: Credits and limits.

Results and errors

  • A successful call returns the JSON body of the endpoint as text, then the credits line. A very large list is shortened to about 40,000 characters by dropping rows from its end, and a note says so; ask for a smaller limit or use fields to avoid it.
  • A failed call returns isError: true with the status, error code and message from the error envelope, so the assistant can read it and adjust. Failed calls are charged by the same rules as in the REST API.
  • Bad arguments (a missing handle, an unknown platform) are caught before any request is made and cost nothing.
error result
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "isError": true,
    "content": [
      {
        "type": "text",
        "text": "Error 402 quota_exceeded: You have used your 100 free trial credits. Pick a plan at https://handlesapi.com/pricing to keep going. (request_id req_...)"
      }
    ]
  }
}

Security

The assistant spends your credits

Anything the assistant can call, it can call repeatedly. Use a key with only the scopes you want it to have, keep the plan's overage off if you want a hard stop, and revoke the key in the dashboard when you are done.
  • The key stays in your own configuration: the client sends it straight to api.handlesapi.com/mcp in the request header. It is never part of a tool argument, so it does not enter the conversation.
  • Prefer environment variables, or VS Code's input prompt, over a key typed into a file you commit.
  • Every tool is read-only: they query public social data and change nothing on any account. Most MCP clients still ask you to approve a tool the first time it runs.