OpenCode MCP setup for TikTok and Instagram research
Updated
Virlo is social listening for TikTok and Instagram Reels. OpenCode writes and refactors code well, but it has no feed telling it which TikTok or Instagram videos are working. Run opencode mcp add, sign in once, and OpenCode can search a database of 23.1M viral videos for trends, breakout sounds, hooks and outliers, then turn them into files in your project. OpenCode is an open-source AI coding agent for the terminal that works with many model providers and connects to MCP servers.
- One opencode mcp add command per project or with --global
- OAuth handled by OpenCode, credentials kept out of your repo
- Optional Virlo skills for better research choices
Part of Virlo's AI assistant guides. Using OpenCode inside an editor? See Zed. Comparing agents? See Claude Code.
How do I add an MCP server to OpenCode?
Run the add command from the project that should use Virlo, then sign in. Skills are optional.
Step 1: Create your Virlo account for free
Step 2: Add Virlo with opencode mcp add
Run this inside your project. OpenCode writes virlo into the project config; add
--globalto make it available in every project.Terminalopencode mcp add virlo --url https://dev.virlo.ai/api/mcp/mcpStep 3: Sign in from /mcps
Remote servers use OAuth by default, so
opencode mcp listfirst shows virlo as needing authentication. Open OpenCode, run/mcps, select virlo and approve the Virlo page in your browser.opencode mcp auth virlodoes the same from the shell.Inside OpenCode/mcpsStep 4: Optional: add the Virlo skills
OpenCode loads skills when a task matches them. The
virloskill steers tool choice and Virality Score ranking;short-form-trend-researchshapes trend data into a content plan.Terminalnpx skills add Virlo-AI/Virlo-Agent-PluginStep 5: Give OpenCode its first research job
Check that
opencode mcp listnow shows virlo as connected, then ask in plain English and name the file you want back.Your first promptUse virlo to find the Instagram Reels sounds breaking out this week, then write the top 10 to data/sounds.json with title, artist and number of Reels.
Running OpenCode on a remote box? When the sign-in callback fails to load, copy that page's URL and paste it into the OpenCode prompt to finish the login.
opencode mcp add vs opencode.json vs API key header: which setup should I use?
| Setup | Where it is saved | Sign-in | Best for |
|---|---|---|---|
opencode mcp add virlo --url https://dev.virlo.ai/api/mcp/mcp | Project config | OAuth from /mcps | One repo that needs social data |
Same command with --global | Your global OpenCode config | OAuth from /mcps | Using Virlo in every project |
Hand-written mcp.servers.virlo entry | opencode.json or opencode.jsonc | OAuth, or a header if oauth is false | Config you keep in version control |
Header with "oauth": false | Same entry plus headers | Authorization: Bearer {env:VIRLO_API_KEY} | CI and headless runs |
OpenCode stores OAuth credentials outside project configuration, so committing the config never leaks a login.
OpenCode without Virlo vs OpenCode with Virlo
| Request | OpenCode alone | OpenCode with Virlo |
|---|---|---|
| "Which Reels sounds are taking off?" | Cannot check any chart | Breakout sounds for Instagram Reels and TikTok |
| "Build me a trends page" | Scaffolds it with sample data | Fills it with live trends to copy and example videos |
| "Why did this TikTok work?" | Guesses from the caption you paste | Reads the transcript, hook and Virality Score |
| "Who are the rising creators in [niche]?" | No creator data | Creators posting this week's trends, with their outliers |
Which Instagram Reels sounds is OpenCode seeing break out?
Real numbers OpenCode can pull from Virlo's breakout sound ranking: Instagram Reels sounds whose use is climbing fastest, ready to land in data/sounds.json.
In Virlo's data, "Dilruba Dilnasheen" is the fastest-rising sound on Instagram Reels: 46 Reels used it in the last 7 days, against about 14 a week before, as of November 19, 2026.
As of November 19, 2026 at 12:03 UTC
| Sound | Artist | Reels (7 days) | Usual week before |
|---|---|---|---|
Dilruba Dilnasheen | Rito Riba, Siddhant kaushal | 46 | 14 |
| What's Up - Deep house | HARDMAX | 24 | 5 |
| Vintage November | Peaceful Reveries | 25 | 12 |
| James Bond Theme | John Barry Orchestra | 15 | 2 |
| Blood In Your Eyes (from GTAVI: The Album) | Tove Lo, Grand Theft Auto VI | 11 | 3 |
See all 27 breakout sounds on Instagram Reels
Usage history and the Reels behind every sound are in the Virlo app.
Open sounds in VirloHow this sample is made
- Source
- Virlo's sound rankings for Instagram Reels, built from the Reels Virlo collects.
- Window
- Reels posted in the last 7 days that Virlo collected. Counts are Reels in Virlo's data, not every video on the platform.
- Method
- Ranked by breakout score: use in the last 7 days against the sound's usual weekly use before that, so a sound rising from a small base ranks above an old hit.
- As of
- November 19, 2026 at 12:03 UTC. Rebuilt every day.
- Made by
- Numbers are pulled automatically from Virlo's data; the text around them is written by the Virlo team.
Suggested citation: Source: Virlo, “OpenCode MCP setup for TikTok and Instagram research”, virlo.ai/opencode
What does the Virlo entry in opencode.json look like?
If you would rather write the config by hand, OpenCode V2 expects servers under mcp.servers, each with a unique name. The minimal Virlo entry: { "$schema": "https://opencode.ai/config.json", "mcp": { "servers": { "virlo": { "type": "remote", "url": "https://dev.virlo.ai/api/mcp/mcp" } } } }
For a key instead of a browser login, add "oauth": false and a headers object to the same entry. OpenCode substitutes {env:VIRLO_API_KEY} from your environment, so the key itself never sits in the file.
| Field | Value for Virlo |
|---|---|
type | "remote", because Virlo is hosted |
url | "https://dev.virlo.ai/api/mcp/mcp" |
oauth | Leave it out for sign-in; set false when you send a header |
headers | { "Authorization": "Bearer {env:VIRLO_API_KEY}" } on the key route |
disabled | true keeps virlo configured without connecting it |
Keys start with virlo_tkn_ and are made on Virlo API Keys.
How marketers use OpenCode with Virlo
OpenCode is popular with people who want a terminal agent that works with their own choice of model. With Virlo connected it handles research jobs like these:
- Refresh a research folder in the repo every week with trends, sounds and outliers.
- Build a lightweight internal tool on real TikTok and Instagram rows instead of mock data.
- Rewrite top-performing TikTok transcripts into scripts stored next to your product docs.
- Rank competitor videos by Virality Score so a small account's breakout is not drowned out by big ones.
What can I ask OpenCode to research?
Use these in OpenCode with virlo connected. Replace the brackets with your own details.
Breakout sounds
Which sounds are breaking out on Instagram Reels and TikTok this week? Save them to data/sounds.json and flag any that appear on both.
Trend digest
Pull the trends to copy for [your niche] and write research/trends.md with the part to keep and the part to make yours for each one.
Outlier set
Find 40 TikTok videos about [topic] from the last 30 days ranked by Virality Score and export them to data/outliers.csv.
Creator file
Look up @[creator] on TikTok and Instagram and write creators/[creator].md with their outlier videos and recurring hooks.
Script template
Get the transcript of [TikTok link] and turn it into templates/[name].md with the hook, setup and payoff labelled.
Hook study
Which hook types reach a Virality Score of 18+ most often in [your niche]? Write a ranked table to docs/hooks.md.
Build from data
Read data/outliers.csv and build a small dashboard page that sorts the videos by Virality Score.
Hashtag watch
List the hashtags growing fastest around [topic] on TikTok and Instagram this week and append them to research/hashtags.md with one example video each.
OpenCode vs Crush vs Codex: which tool is this guide for?
A few terminal agents have similar names or histories. This guide covers OpenCode from opencode.ai.
OpenCode (this page)
The open-source terminal coding agent at opencode.ai. Add Virlo with opencode mcp add and sign in from /mcps.
Crush
An earlier Go project once published as opencode-ai/opencode continued under the name Crush, and it is a separate tool with its own config.
OpenAI Codex
OpenAI's coding agent, often confused with OpenCode because of the name. It has its own Virlo guide.
OpenCode in Zed
Zed can run OpenCode as an external agent. Zed may forward its own MCP servers to it, and OpenCode also reads its own config.
What are the limits?
- Virlo serves public TikTok and Instagram data and cannot post, comment or touch your accounts from OpenCode.
- MCP tools take up model context, so OpenCode suggests adding only the servers a project actually needs; set
disabledon virlo in repos that never research. - Trends to copy refresh hourly after a check by the Virlo team; sound rankings move as new videos arrive.
- Transcripts are available for TikTok videos; Instagram Reels return hooks, format and numbers instead.
- Virlo plans are on pricing.
Frequently asked questions
How do I add an MCP server in OpenCode?
Run opencode mcp add with a name and --url. For Virlo: opencode mcp add virlo --url https://dev.virlo.ai/api/mcp/mcp. The server is written to the project config, or to every project with --global. Then run /mcps inside OpenCode to sign in, and opencode mcp list shows it connected.
What is OpenCode?
OpenCode is an open-source AI coding agent that runs in your terminal and works with many model providers. It reads your project, edits files, runs commands and calls MCP servers. Connected to Virlo, it can also research TikTok and Instagram and write the results into the repo.
Does OpenCode support remote MCP servers with OAuth?
Yes. OAuth is on by default for remote servers. OpenCode discovers the authorization server, signs in with PKCE and refreshes tokens, registering through client ID metadata or dynamic registration when needed. Virlo supports both, so the sign-in completes without any client setup.
Where is the MCP config in opencode.json?
In OpenCode V2, servers sit under mcp.servers, each keyed by a unique name, rather than directly under mcp as older V1 configs did. A remote entry needs type set to remote and a url, with optional headers, oauth and disabled fields. The file can be opencode.json or the commented opencode.jsonc.
How do I use an API key with OpenCode instead of signing in?
Set oauth to false on the virlo entry and add a headers object with Authorization set to Bearer {env:VIRLO_API_KEY}. OpenCode reads the key from your environment at startup, which keeps it out of the config file and suits CI runs or shared servers where nobody can approve a browser login.
Can OpenCode research TikTok trends?
Once Virlo is connected, yes. Ask for trends to copy, breakout sounds, hashtags or the highest Virality Score videos on a topic, and OpenCode calls the matching Virlo tool and returns real rows with links to each TikTok or Instagram video.
Does OpenCode work with Virlo skills?
Yes. Install them with npx skills add Virlo-AI/Virlo-Agent-Plugin from your project. The virlo skill helps OpenCode pick the right research tool and rank by Virality Score, and short-form-trend-research turns trend data into a weekly content plan. Both rely on the virlo MCP server being connected.
How do I sign out of Virlo in OpenCode?
Run opencode mcp logout virlo. That removes the stored OAuth credentials while keeping the server in your config, so the next session simply asks you to sign in again from /mcps. To stop connecting entirely without deleting anything, set disabled to true on the virlo entry instead.
Can OpenCode post to Instagram through Virlo?
No. Virlo only reads public TikTok and Instagram data and has no access to anyone's accounts. OpenCode can analyse that data, build tools on it and write scripts from it, but publishing to Instagram or TikTok stays with you and the posting tools you already use.
Give OpenCode real social media data
Add Virlo with one command and research TikTok and Instagram from any project.
More AI assistant guides
- AI assistant guides
- Claude
- Claude Code
- Cursor
- MCP server
- TikTok MCP server
- Instagram MCP server
- ChatGPT
- ChatGPT dots
- OpenAI Codex
- Gemini CLI
- Grok Build
- Claude Cowork
- n8n
- Zapier
- Grok Bot
- Muse
- Claude Duet
- Hermes Agent
- Kimi K3
- Cue
- Manus
- Perplexity Computer
- Paperclip
- OpenClaw
- NanoClaw
- DeepSeek
- AI agents CLI
- ChatGPT agent
- Perplexity
- Microsoft Copilot
- Le Chat
- Notion
- Slack
- Discord
- Telegram
- Google Sheets
- Windsurf
- VS Code
- GitHub Copilot
- Cline
- JetBrains
- Kiro
- Google Antigravity
- goose
- Warp
- Zed
- Amp
- Factory Droid
- Raycast
- Lovable
- Replit
- Bolt.new
- v0
- Ollama
- LM Studio
- Open WebUI
- LibreChat
- Make
- Pipedream
- Gumloop
- Lindy
- Relevance AI
- Airtable
- ClickUp
- Dify
- Flowise
- LangChain
- CrewAI
- OpenAI Agents SDK
- Mastra
- Vercel AI SDK
- Claude Agent SDK
