MCP Integration
BeatAPI MCP is BeatAPI’s hosted remote tool server at https://beatapi.io/mcp. After you connect an AI client to https://beatapi.io/mcp, the AI client can search Xiaohongshu, Douyin, X, YouTube, and other social platforms, check SEO rankings, search and read live web pages, and call 70+ text, image, video, and music models directly inside chat.
BeatAPI MCP uses the Model Context Protocol (MCP) over Streamable HTTP. You do not need to install or run a local MCP server on your computer. Connecting requires only two values: the server URL https://beatapi.io/mcp and a BeatAPI API key.
Two different setups: This page gives an AI client access to BeatAPI tools (social data, SEO, web search, media models). To switch the chat model inside Claude Code, Codex CLI, Gemini CLI, or Cursor to BeatAPI, use the model-provider guides under Integrations: Claude Code, Codex CLI, Gemini CLI, or Cursor.
Step 1: Create a BeatAPI API key
Every HTTP MCP client starts with a BeatAPI API key.
- Open BeatAPI Dashboard → API Keys and sign in.
- Create a new key and name the key after your AI client (for example,
cursor-mcporclaude-code-mcp). Using one key per AI client lets you track each client’s spending and disable one client without affecting other clients. - Copy the new BeatAPI API key (usually starting with
sk-). BeatAPI displays the full key only once. Keep the key private and do not post the key in public chats or repositories.
Every HTTP MCP client uses these exact two connection values:
- Server URL:
https://beatapi.io/mcp - Authorization header: Header name
Authorization, header valueBearer sk-YOUR-BEATAPI-KEY(keep one space betweenBearerand the key)
Step 2: Configure your AI client
Find your AI client below and follow the numbered steps. If your config file already lists other MCP servers, add the beatapi block alongside those entries without deleting your existing servers.
Claude Code
In the terminal, one command adds BeatAPI MCP to Claude Code.
- Open your terminal.
- Replace
sk-YOUR-BEATAPI-KEYwith your BeatAPI API key, then run:
- Run
claude mcp list. Seeingbeatapiin the output confirms Claude Code registered the server. - Start Claude Code and type
/mcp. If Claude Code prompts for project approval, confirm the server URL ishttps://beatapi.io/mcpand approve.
If you prefer a project config file instead of the command, create or open .mcp.json in your project root and add the block below (replace sk-YOUR-BEATAPI-KEY with your BeatAPI API key, and never commit a file with a raw key to a public Git repository):
Codex (CLI and Desktop)
Codex reads MCP servers from ~/.codex/config.toml and reads your BeatAPI API key from the BEATAPI_API_KEY environment variable.
- Save your BeatAPI API key as
BEATAPI_API_KEY:- macOS / Linux: Add
export BEATAPI_API_KEY="sk-YOUR-BEATAPI-KEY"to the end of~/.zshrc(or~/.bashrcon Linux), save the file, and runsource ~/.zshrc. - Windows (PowerShell): Run
[System.Environment]::SetEnvironmentVariable("BEATAPI_API_KEY", "sk-YOUR-BEATAPI-KEY", "User"), then close PowerShell and open a new PowerShell window.
- macOS / Linux: Add
- Open
~/.codex/config.toml(create~/.codex/config.tomlif the file does not exist). - Add these three lines to
~/.codex/config.tomland save the file:
- Start a new Codex session. Run
codex mcp listin the terminal or type/mcpinside Codex to confirmbeatapiis loaded.
Cursor
Adding BeatAPI MCP to ~/.cursor/mcp.json makes BeatAPI MCP available in every Cursor workspace.
- Open Cursor and click the gear icon to open Cursor Settings → Tools & Integrations → MCP.
- Click Add new global MCP server. Cursor opens
~/.cursor/mcp.json. - Add the block below to
~/.cursor/mcp.jsonand replacesk-YOUR-BEATAPI-KEYwith your BeatAPI API key:
- Save
~/.cursor/mcp.json, then fully quit Cursor and reopen Cursor. - Open Cursor Settings → Tools & Integrations → MCP again. Seeing a green dot and 7 tools next to
beatapiconfirms the connection works.
Gemini CLI
Gemini CLI reads remote MCP servers from ~/.gemini/settings.json using the httpUrl field.
- Open
~/.gemini/settings.json(create~/.gemini/settings.jsonif the file does not exist). - Add
beatapiinsidemcpServersand replacesk-YOUR-BEATAPI-KEYwith your BeatAPI API key:
- Save
~/.gemini/settings.jsonand start a new Gemini CLI session. - Type
/mcpinside Gemini CLI. Seeingbeatapiconnected confirms setup is complete.
Antigravity
Antigravity reads remote MCP servers from mcp_config.json using the serverUrl field.
- Open Antigravity’s MCP panel and click Manage MCP Servers → View raw config to open
mcp_config.json. - Add
beatapiinsidemcpServersand replacesk-YOUR-BEATAPI-KEYwith your BeatAPI API key:
- Save
mcp_config.json, return to Antigravity’s MCP panel, and click Refresh. - Confirm that Antigravity shows
beatapias connected with 7 tools.
OpenCode
OpenCode reads remote MCP servers from opencode.json.
- Open or create
opencode.jsonin your project root (or global OpenCode config folder). - Add
beatapiand replacesk-YOUR-BEATAPI-KEYwith your BeatAPI API key (or writeBearer {env:BEATAPI_API_KEY}if you store the key in an environment variable):
- Save
opencode.json. Runopencode mcp listin the terminal to confirmbeatapiappears.
VS Code (GitHub Copilot)
VS Code reads workspace MCP servers from .vscode/mcp.json and collects your BeatAPI API key through a hidden password prompt, without storing a plaintext key in .vscode/mcp.json.
- Create or open
.vscode/mcp.jsonin your workspace and paste the block below as-is:
- Save
.vscode/mcp.json, then click the Start button abovebeatapiinside.vscode/mcp.json. - Paste your BeatAPI API key into the VS Code password box and press Enter.
Hermes
Open your Hermes YAML config and add beatapi under mcp_servers (replace sk-YOUR-BEATAPI-KEY with your BeatAPI API key):
Other clients (WorkBuddy, Doubao Work, QwenWork, and generic HTTP MCP apps)
Any client that supports Remote MCP / Streamable HTTP with custom HTTP headers uses these four steps:
- Open the client’s MCP or Connectors settings and choose Add custom MCP server.
- Enter
https://beatapi.io/mcpas the server URL. - Add one custom header: header name
Authorization, header valueBearer sk-YOUR-BEATAPI-KEY. - Save the configuration and refresh the tool list.
Using Muse, Grok Bot, Manus, or OpenClaw? Cloud chat clients do not use local MCP config files. Follow the Agent Skill Integration and send
set up https://beatapi.io/SKILL.mdin chat.
Step 3: Verify the connection for free
Send this test prompt to your connected AI client. Verification costs $0:
List the BeatAPI tools you can see. Then search BeatAPI for Xiaohongshu note search, check the required inputs and single-call price, and stop before running a paid call.
All three outcomes confirm BeatAPI MCP is working:
- Your AI client lists the 7 BeatAPI tools.
- Your AI client returns a real Xiaohongshu note search capability ID.
- Your AI client shows the required inputs and single-call price without charging your BeatAPI balance.
Billing and cost control
Once connected to BeatAPI MCP, your AI client can run data queries, read web pages, or generate media directly. Paid runs deduct from your BeatAPI balance at the same rates as direct API calls.
- Searching and price checks are free:
capabilities_searchandcapabilities_inspectcost$0. Failed calls also cost$0. - Check the price first and start small: Ask your AI client to show the price first, wait for your approval, and fetch 1 page or generate 1 test output before scaling up.
- Retrieve full results free within 1 hour: BeatAPI MCP returns a 10-item preview first to save chat tokens. If you want the remaining items from that same batch, ask your AI client to fetch the full saved result from the previous request — BeatAPI returns the saved result for free within 1 hour.
Key management and disconnecting
Create one key per AI client in BeatAPI Dashboard → API Keys so you can view spending per client.
To revoke an AI client’s access completely, delete or disable that client’s key in BeatAPI Dashboard → API Keys. Deleting the local MCP config file inside Cursor or Claude Code does not revoke the key on BeatAPI.
Optional tip for shared Git repositories: Never commit a raw
sk-...key to Git. Store your key in theBEATAPI_API_KEYenvironment variable and reference the variable using your client’s syntax:${BEATAPI_API_KEY}in Claude Code,${env:BEATAPI_API_KEY}in Cursor,{env:BEATAPI_API_KEY}in OpenCode, or$BEATAPI_API_KEYin Gemini CLI.
The 7 tools exposed by BeatAPI MCP
After connecting to https://beatapi.io/mcp, your AI client receives 7 hosted tools. You can describe your goal in plain language without typing tool names:
capabilities_search(free): search BeatAPI for social data, SEO data, ads data, AI models, and media workflows.capabilities_inspect(free): check the required inputs and single-call price of a capability before running it.capabilities_run(paid per call): execute the selected BeatAPI capability and check status on slower image or video jobs.web_search(paid per call): search the live web and return titles, URLs, and snippets.web_read(paid per call): fetch and read the main text of a webpage URL.web_map(paid per call): list URLs inside a website so your AI client knows which pages to read.web_research(paid per call): run multi-source web research and return cited findings.
Example prompts
After free verification succeeds, try any of these prompts:
- “Use BeatAPI to search Xiaohongshu notes about ‘portable espresso maker’. Tell me the price for 1 page first. After I confirm, fetch 1 page and summarize the top 5 user complaints with note links.”
- “Use BeatAPI to check the SEO domain overview and top pages for
redis.io, and present the findings in a table.” - “Use
web_searchandweb_readto check Cloudflare Workers’ current pricing tiers and list the official URLs you actually read.” - “Search BeatAPI for a product-demo video model, show me the required inputs and single-clip price, and wait for my approval before generating.”
Troubleshooting
- No
beatapitools appear in your AI client: Check your JSON or TOML file for missing quotes or extra commas, then fully quit and restart the AI client. Confirm the client supports remote HTTP MCP (stdio-only clients cannot connect to a remote URL). - 401 error (missing or invalid key): Confirm
Authorizationstarts withBearerwith one space beforesk-.... If you use an environment variable, fully restart your desktop app after setting the variable. If the error continues, create a fresh key in BeatAPI Dashboard → API Keys. - 400 error (missing required inputs): Your AI client skipped checking the inputs. Tell your AI client to call
capabilities_inspectfirst and retry. Installing the Agent Skill alongside MCP prevents skipped checks. - Only 10 results appear: BeatAPI MCP returns a 10-item preview by default. Ask your AI client to fetch the full saved result from the previous request (free within 1 hour) instead of running a second search.
- Video generation or deep research times out: Slow jobs can exceed a single request timeout without failing. Ask your AI client to check the status of the returned task ID instead of starting a second paid run.
Related pages
- Agent Skill Integration — pair with MCP so your AI client checks prices before running, or connect Muse, Grok Bot, Manus, and OpenClaw.
- CLI Integration — run BeatAPI from the terminal and upload local media files to public URLs.
- Capabilities API Reference — full developer reference for the underlying HTTP endpoints.

