> Documentation index: https://www.socialcrawl.dev/llms.txt > Every page is also available as Markdown by adding .md. # Use an API key (/docs/mcp/for-agents) Start with no key, then add one to fetch data. This page is for an agent, a script, a CI job, or a person who prefers a key. Three of the server's tools need no key. You can connect and price a call before you create one. ## Start with no key Point your client at the server address: ```text title="MCP URL" https://mcp.socialcrawl.dev/mcp ``` The address is a client setting, not a page to open in a browser. With no key, the client still reaches `socialcrawl_find`, `socialcrawl_endpoint` and `socialcrawl_estimate`. They list the platforms, describe an endpoint and price a call. None of them spends a credit. ## Add the server [#add-the-server] Each line below adds the hosted server to one client with your key in a header. Replace `sc_your_key_here` with a key from **Dashboard → API Keys**. **Claude Code** Run this in your terminal: ```bash claude mcp add --transport http socialcrawl https://mcp.socialcrawl.dev/mcp \ --header "Authorization: Bearer sc_your_key_here" ``` **Cursor** Add this to `.cursor/mcp.json`: ```json { "mcpServers": { "socialcrawl": { "url": "https://mcp.socialcrawl.dev/mcp", "headers": { "Authorization": "Bearer sc_your_key_here" } } } } ``` **Claude Desktop** Add this to the config file for your system: - macOS: `~/Library/Application Support/Claude/claude_desktop_config.json` - Windows: `%APPDATA%\Claude\claude_desktop_config.json` ```json { "mcpServers": { "socialcrawl": { "command": "npx", "args": ["-y", "socialcrawl-mcp"], "env": { "SOCIALCRAWL_API_KEY": "sc_your_key_here" } } } } ``` **VS Code** Add this to `.vscode/mcp.json`: ```json { "servers": { "socialcrawl": { "type": "http", "url": "https://mcp.socialcrawl.dev/mcp", "headers": { "Authorization": "Bearer sc_your_key_here" } } } } ``` **Codex** Run this in your terminal: ```bash export SOCIALCRAWL_API_KEY=sc_your_key_here codex mcp add socialcrawl --url https://mcp.socialcrawl.dev/mcp --bearer-token-env-var SOCIALCRAWL_API_KEY ``` **Windsurf** Add this to `~/.codeium/windsurf/mcp_config.json`: ```json { "mcpServers": { "socialcrawl": { "serverUrl": "https://mcp.socialcrawl.dev/mcp", "headers": { "Authorization": "Bearer sc_your_key_here" } } } } ``` **Gemini CLI** Run this in your terminal: ```bash gemini mcp add -s user --transport http --header "Authorization: Bearer sc_your_key_here" socialcrawl https://mcp.socialcrawl.dev/mcp ``` **OpenCode** Run this in your terminal: ```bash export SOCIALCRAWL_API_KEY=sc_your_key_here opencode mcp add socialcrawl --url https://mcp.socialcrawl.dev/mcp --header 'Authorization=Bearer {env:SOCIALCRAWL_API_KEY}' --global ``` **Kiro** Add this to `~/.kiro/settings/mcp.json`: ```json { "mcpServers": { "socialcrawl": { "url": "https://mcp.socialcrawl.dev/mcp", "headers": { "Authorization": "Bearer sc_your_key_here" } } } } ``` **Goose** Open this link to add SocialCrawl to Goose: [Add to Goose](goose://extension?cmd=npx&arg=-y&arg=socialcrawl-mcp&id=socialcrawl&name=SocialCrawl&description=Social+media+and+web+data+from+one+API&env=SOCIALCRAWL_API_KEY) **Antigravity** Add this to the MCP config in Antigravity: ```json { "mcpServers": { "socialcrawl": { "serverUrl": "https://mcp.socialcrawl.dev/mcp", "headers": { "Authorization": "Bearer sc_your_key_here" } } } } ``` [All clients](/docs/clients.md) lists every other client we know of. ## Add your key The hosted server reads your key from the `Authorization` header, as `Bearer` and then the key. It also reads `x-api-key`. It has no key of its own, so a client that sends none gets only the three free tools. ```text title="Header" Authorization: Bearer sc_your_key_here ``` ## Verify your connection Ask the agent "List the platforms SocialCrawl covers." That runs `socialcrawl_find` with no task, which is free and needs no key. An answer proves the client reached the server. Then ask "What is my SocialCrawl balance?" That runs `socialcrawl_account`, which is free but needs a key. A number in the reply proves your key arrived too. ## Run it locally [#run-it-locally] Run the `socialcrawl-mcp` package on your own machine when the client cannot send a header or reach the hosted server. It needs Node.js with `npx`. It reads the key from its own environment block, not from your shell. ```bash title="Claude Code" claude mcp add --scope user socialcrawl -e SOCIALCRAWL_API_KEY=sc_your_key_here -- npx -y socialcrawl-mcp ``` Flags go before the `--`, and everything after it is the command Claude Code runs. A client configured by JSON takes the same three values: ```json title="mcp.json" { "mcpServers": { "socialcrawl": { "command": "npx", "args": ["-y", "socialcrawl-mcp"], "env": { "SOCIALCRAWL_API_KEY": "sc_your_key_here" } } } } ``` ## Try it ```text title="Prompt" Get the TikTok profile for @charlidamelio and show me what it would cost first. ``` ```text title="Prompt" Find the five most recent Instagram posts from nasa, then summarize what they are about. ``` - [Tools](/docs/mcp/tools.md): Every tool the server offers, what it costs and when to use it. - [Agent skill](/docs/agent-skill.md): Teach an agent every endpoint with one install line. - [MCP server](/docs/mcp.md): The other ways to connect, and the fixes for common problems.