Connect OpenCode to BeatAPI Data and Tools

Connect OpenCode to BeatAPI MCP for Social Data and tools. Compare V2 and V1 setup, environment variable syntax, verification, and example tasks.

Manual setup · Bearer API key

OpenCode V2 · opencode.json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "servers": {
      "beatapi": {
        "type": "remote",
        "url": "https://beatapi.io/mcp",
        "oauth": false,
        "headers": {
          "Authorization": "Bearer {env:BEATAPI_API_KEY}"
        }
      }
    }
  }
}

Keep the key in your local environment or secret storage. Never paste it into a chat, commit it to Git, or embed it in browser code.

Connect your client

Merge this example into your existing configuration. Do not replace unrelated servers or settings. Client versions and workspace policies can affect setup.

Client configuration reference

1. Prepare the environment

Use an OpenCode version that supports remote MCP servers. Start the process with BEATAPI_API_KEY available in its environment; do not paste the key into the prompt.

BEATAPI_API_KEY

2. Merge the configuration

For OpenCode V2, merge beatapi under mcp.servers in opencode.json. OpenCode V1 uses the separate example below. Use the shown environment-variable syntax and keep oauth: false for Bearer-key authentication.

opencode.json

3. Check tool discovery

Run opencode mcp list and inspect the server status. Confirm tool discovery before asking the agent to execute anything. An MCP connection does not change the configured reasoning model.

opencode mcp list

A saved configuration does not prove a working connection. Inspect the client’s connection status and tool list before attempting a task. Do not disable approval or trust checks.

Using OpenCode V1?

V1 puts server names directly under mcp. Use this version-specific config only if your OpenCode installation is V1.

OpenCode V1 · opencode.json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "beatapi": {
      "type": "remote",
      "url": "https://beatapi.io/mcp",
      "oauth": false,
      "headers": {
        "Authorization": "Bearer {env:BEATAPI_API_KEY}"
      }
    }
  }
}

Client configuration reference

Two different ways to use BeatAPI

MCP: add data and tools

Keep your agent’s reasoning model and connect external capabilities. The setup on this page is for this tool connection.

Read documentation

Model provider: configure inference

Changing the model’s base URL or API key is a separate setup. It does not automatically add Social Data tools. Follow the client-specific provider guide and verify model support.

Model-provider setup

See a task from request to result

Research a YouTube topic with your chosen model

Sample brief for your own run. This page has not generated the result.

Try this task brief
Keep my current model provider. Use BeatAPI MCP to inspect YouTube search and comment capabilities for my topic. Propose a limited sample and cost, wait for approval, and then create a source-backed question map with an explicit note about what was not retrieved.

Target deliverable

A source-backed research note created with the existing model plus external tools.

Use MCP to inspect, confirm and run.

Search for the data action, inspect its required inputs and current price, then approve the run. An estimate does not promise the returned data or final cost.

  1. 01capabilities_search

    Find a relevant data, model or tool capability.

  2. 02capabilities_inspect

    Read the required inputs, restrictions and billing details.

  3. 03confirm price

    Agree on the scope and expected spend before a paid operation.

  4. 04capabilities_run

    Run the approved capability and preserve returned IDs, source links and usage details when available.

Know the boundaries before you build

Review pricing and billing

Inputs and fields vary by action

IDs and pagination parameters vary by action. Check capabilities_inspect for output_schema. If readiness is runnable, the output structure is not yet published, so use the actual response as your guide. Allow for missing fields and empty pages.

Review the current billing unit

Prices and billing units vary by action and can change. Check the selected action's current billing details before running a request.

Third-party access, not an official platform API

BeatAPI is independent of the named platforms and client vendors. Use data only with appropriate authorization and respect applicable platform terms, privacy and access restrictions.

OpenCode Integration FAQ

Price, one key, hosted output, refunds, and the same task shape for video, image, and workflow.

Get your API key

Create a key, choose the action for your task, and check its required inputs and current price before you run it.

Create an API key

Use an OpenCode version that supports remote MCP servers. Start the process with BEATAPI_API_KEY available in its environment; do not paste the key into the prompt. For OpenCode V2, merge beatapi under mcp.servers in opencode.json. OpenCode V1 uses the separate example below. Use the shown environment-variable syntax and keep oauth: false for Bearer-key authentication.

Run opencode mcp list and inspect the server status. Confirm tool discovery before asking the agent to execute anything. An MCP connection does not change the configured reasoning model.

No. This configuration adds tools. Model-provider settings and any client subscription are separate from the BeatAPI operations you choose to run.

The snippets are request examples and the workflow describes a target deliverable. This page does not display invented response payloads, live performance measurements or customer endorsements.

Start with one well-scoped request.

Create a key, choose the action for your task, and check its required inputs and current price before you run it.

Create an API key