fypnow
← Back to blog
gemini-cligooglemcpaitiktok

How to Connect TikTok Data to Gemini CLI (MCP Setup, 2026)

FYPNow Team··4 min read

Gemini CLI is a quick way to research from the terminal, and it can write what it finds to files in your project. On its own it can't see TikTok. Add the FYPNow MCP server and it can pull the week's top videos in a niche, the hooks that opened them and the hashtags gaining new creators. Setup is one entry in settings.json.

What you need

  • Gemini CLI, installed.
  • A FYPNow workspace on a paid plan. Creator and Starter include a 7-day free trial.
  • An API key from FYPNow → Settings → API. It is shown once.

Step 1: Add the server

Open ~/.gemini/settings.json and add:

{
  "mcpServers": {
    "fypnow": {
      "httpUrl": "https://api.fypnow.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_FYPNOW_API_KEY"
      }
    }
  }
}

Replace YOUR_FYPNOW_API_KEY with your key. This file holds the key in plain text, so keep it out of any shared repository. If you put this entry in a project's .gemini/settings.json, add that file to .gitignore.

Prefer a command? With FYPNOW_API_KEY set in your shell, this writes the same entry to the project's .gemini/settings.json. The key ends up in that file, so add it to .gitignore:

gemini mcp add --transport http --header "Authorization: Bearer $FYPNOW_API_KEY" fypnow https://api.fypnow.com/mcp

Step 2: Check it

Start Gemini CLI and ask:

What's trending across niches this week?

What you can ask it

  • "Which Gaming videos from the past week got the most views for their follower count?" Ranked by the multiple, with the hook for each.
  • "Find analysed hooks of the curiosity-gap type and write five templates to hooks.md."
  • "Is #cleantok growing? Show its daily video count and top videos."
  • "What trends are open in Beauty right now, and which hashtag do they share?"
  • "Compare the top hooks in Fitness and Food this week. What do they have in common?"

What the data is

FYPNow tracks public TikTok videos in niches built from keywords and hashtags. Each niche refreshes on a schedule, so the newest videos may be a few days old. The multiple is views compared with the creator's follower count, which lets a small account's hit outrank a famous account's average post. It does not include private analytics.

Niches cover YouTube Shorts too. The same keywords are searched on Shorts, and a Short is ranked the same way, with subscribers in place of followers. To see one platform, tell Gemini CLI, for example "only YouTube Shorts in Food". The trending-videos tool takes a platform filter. Shorts show views, likes and comments but no shares or saves, because YouTube does not publish those. Tracking a creator works for TikTok accounts only for now.

Troubleshooting

  • /mcp shows fypnow as disconnected. Check you used httpUrl, not url. url is for the older SSE transport and fails here.
  • The server doesn't appear at all. A JSON error makes Gemini CLI skip the file. Check commas and brackets, and check you edited the file Gemini CLI is reading (the project file overrides the user file).
  • 401 invalid_api_key. The placeholder is still there, or the key is cut short. FYPNow keys start with fyp_sk_.
  • 403 write_scope_required. A read key can't analyse new videos or search trends. Create a read+write key for those.

Limits

  • It reads and analyses. It does not post for you.
  • A key acts on one workspace. If the file leaks, revoke the key in Settings → API.
  • Results describe what has happened to other videos. They are not a forecast.

The same server works in Claude Code, Codex CLI and OpenCode. The Claude setup guide has more prompts and a note on speed, and the MCP server page lists every tool.

Frequently asked questions

What is the difference between httpUrl and url in Gemini CLI?

Use httpUrl for a Streamable HTTP server, which FYPNow is. Use url only for Server-Sent Events servers. If you set both, httpUrl wins.

Where does Gemini CLI keep MCP servers?

The user file is ~/.gemini/settings.json. A project file at .gemini/settings.json overrides it. The gemini mcp add command writes to the project file by default.

Can Gemini CLI sign in with OAuth instead of a key?

Gemini CLI discovers OAuth automatically when a server asks for it, and FYPNow's server supports OAuth. Leave out the headers block, then run /mcp auth fypnow to sign in. The key route is the one FYPNow documents.

How do I check the server loaded in Gemini CLI?

Run /mcp inside Gemini CLI. It lists each configured server, whether it is connected, and the tools it offers.

Can Gemini CLI analyse a TikTok video?

Yes, with a read+write FYPNow key. Give it the video link and it returns the hook, scene cuts and transcript. A fresh analysis takes about a minute.

Start free trial

See why any TikTok or YouTube Short went viral with a frame-by-frame AI breakdown.

Start your 7-day free trial to analyze this video.

Prefer to explore first? Start free trial