---
title: "Connect Your Client to the MCP Server"
description: "Configuration for Claude Code, Claude Desktop, Cursor and Windsurf to connect to the SocialData MCP server"
source: "https://docs.socialdata.tools/mcp/connecting/"
---

> **Summary**
> 
> Point your client at `https://api.socialdata.tools/mcp` over HTTP transport, with the header `Authorization: Bearer YOUR_API_KEY`

Every configuration below uses the same three things: the endpoint, HTTP (streamable) transport, and your API key as a bearer token. Replace `YOUR_API_KEY` with the key from your [dashboard](https://socialdata.tools/dashboard?utm_source=docs).

> **Your API key is a credential**
> 
> These configuration files sit on your machine in plain text. Treat them as you would any file containing a password — do not commit them to a repository, and do not paste them into a shared channel or a screenshot.

## Claude Code

Run this in your terminal:

```bash
claude mcp add --transport http socialdata https://api.socialdata.tools/mcp \
    --header "Authorization: Bearer YOUR_API_KEY"
```

Verify it connected:

```bash
claude mcp list
```

## Claude Desktop

Open **Settings → Developer → Edit Config**, which opens `claude_desktop_config.json`. Add the `socialdata` entry:

```json
{
  "mcpServers": {
    "socialdata": {
      "type": "http",
      "url": "https://api.socialdata.tools/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}
```

Restart Claude Desktop. The SocialData tools appear in the tools menu in the chat input.

## Cursor

Create or edit `.cursor/mcp.json` in your project (or `~/.cursor/mcp.json` to make it available everywhere):

```json
{
  "mcpServers": {
    "socialdata": {
      "url": "https://api.socialdata.tools/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}
```

Then open **Settings → MCP** and confirm `socialdata` shows as connected.

## Windsurf

Edit `~/.codeium/windsurf/mcp_config.json`:

```json
{
  "mcpServers": {
    "socialdata": {
      "serverUrl": "https://api.socialdata.tools/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}
```

Reload the MCP servers from the Cascade panel.

## Verifying it works

Ask your assistant something that requires a real lookup:

> Using SocialData, what is @elonmusk’s follower count?

A working setup produces an answer with a real number, and your client shows that a tool such as `get_user_by_username` was called. That call is billed like the equivalent REST request — see [Pricing](https://docs.socialdata.tools/getting-started/pricing/).

If the assistant answers from memory instead of calling a tool, say “use the SocialData tools” explicitly.

## Troubleshooting

**The client reports 401 Unauthorized.** The key is missing, mistyped, or the header is malformed. It must read `Bearer YOUR_API_KEY` — the word `Bearer`, one space, then the key. Confirm the key works against the REST API:

```bash
curl -X GET "https://api.socialdata.tools/twitter/user/elonmusk" \
    -H "Authorization: Bearer YOUR_API_KEY"
```

**The client reports 402 or a balance error.** Your account is out of credit. Top up in the dashboard; no tool will succeed until you do.

**The client reports 429.** You are making requests faster than your rate limit allows. Slow down — see [Rate limits](https://docs.socialdata.tools/getting-started/rate-limits/).

**The server connects but no tools appear.** Confirm the transport is HTTP (not stdio) and the URL has no trailing slash.

**Nothing works from claude.ai or ChatGPT.** These are not supported — see below.

> **Web connectors are not supported**
> 
> The connector interfaces in claude.ai and ChatGPT cannot use this server. They require OAuth 2.1 with dynamic client registration; our server authenticates with your API key. Use one of the desktop or CLI clients above.

## Next steps

-   [Available tools](https://docs.socialdata.tools/mcp/tools/) — all 14 tools, their parameters, and what they return
