DEV Community

Cover image for How to Connect Cloudflare, PostHog, and Tavily MCP in Cursor (Plus a Single-Endpoint Alternative)
Flowra
Flowra

Posted on Originally published at flowra.dev

How to Connect Cloudflare, PostHog, and Tavily MCP in Cursor (Plus a Single-Endpoint Alternative)

Copy-paste configs for the official Cloudflare, PostHog, and Tavily MCP servers in Cursor and Claude — then how one OAuth URL can expose those toolkits (and more) without stacking every server in mcp.json.

Model Context Protocol (MCP) is a practical way to give an IDE agent real tools: Cloudflare APIs, PostHog product data, live web search. The hard part is not “what is MCP.” It is keeping mcp.json honest when every vendor wants its own remote URL, OAuth popup, or API key.

This guide does two things:

  1. Wire up the official Cloudflare, PostHog, and Tavily MCP servers in Cursor and Claude (Claude Code / Claude Desktop where the vendor documents them).
  2. Show an optional single-endpoint path with Flowra — the product I work on — so one MCP connection can discover and run many toolkits after you connect accounts in Flowra.

You can stop after the vendor sections. The Flowra section is only useful if you already feel the config sprawl.

No fabricated benchmarks or fake tool outputs. Configs below are copied from the vendors’ own docs (re-checked for this draft). Example prompts are suggestions for smoke tests, not transcripts.

What you’ll set up

  • Cursor: project config at .cursor/mcp.json (shared with a repo), or global at ~/.cursor/mcp.json for personal tools everywhere (Cursor MCP docs).
  • Claude Code: claude mcp add … where the vendor documents it.
  • Claude Desktop: edit claude_desktop_config.json via Settings → Developer → Edit Config, or use Connectors / Integrations when the vendor says so (macOS: ~/Library/Application Support/Claude/claude_desktop_config.json; Windows: %APPDATA%\Claude\claude_desktop_config.json).
  • Optional: Railway’s remote MCP for deploys, and Flowra as a hub.

Reload or restart the client after you save config. Cursor and Claude Desktop often only pick up MCP changes after a full restart. If a server stays red, fix auth before debugging prompts.

Cloudflare MCP (official remote)

Cloudflare runs managed remote MCP servers. The Cloudflare API MCP server exposes the Cloudflare API through a Code Mode pattern: the model writes JavaScript against the OpenAPI surface and a sandboxed cloudflare.request() client instead of loading thousands of native tool schemas. Cloudflare’s docs describe that path with search() and execute(); the cloudflare/mcp README also lists a docs tool for developer documentation search.

Use the Streamable HTTP endpoint at /mcp. Prefer that over forcing legacy SSE transport (Cloudflare note).

Auth: browser OAuth when you connect (pick permissions). For CI, Cloudflare documents a API token as a Bearer token in Authorization.

Cursor / generic mcpServers

From Cloudflare’s Agents docs:

{
  "mcpServers": {
    "cloudflare-api": {
      "url": "https://mcp.cloudflare.com/mcp"
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

The same URL works in any MCP client that supports remote HTTP. For Claude Code, Cloudflare’s documented path on that page is the Skills plugin (/plugin marketplace add cloudflare/skills), which bundles MCP servers with agent skills — not a separate invented claude mcp add line.

Cloudflare also ships many product-specific MCP URLs (docs, bindings, builds, observability, and more). See the table on the same docs page if you want a narrower server.

Try asking: “Search Cloudflare docs for Workers KV binding limits, then find the API path to list namespaces.”

Treat execute as write-capable. Use a least-privilege OAuth grant or API token, and confirm the agent’s proposed JavaScript before you approve changes in production.

PostHog MCP (official)

PostHog’s hosted MCP endpoint is https://mcp.posthog.com/mcp. It routes you to the correct US/EU region from the account you log in with (PostHog MCP overview).

Connecting and calling MCP tools is free on PostHog’s side; some tools that use LLMs internally may bill as PostHog AI spend when AI data processing is enabled (same page).

Fastest install

npx @posthog/wizard mcp add
Enter fullscreen mode Exit fullscreen mode

Cursor (manual)

From PostHog MCP for Cursor:

{
  "mcpServers": {
    "posthog": {
      "url": "https://mcp.posthog.com/mcp"
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

First use prompts a PostHog login.

Claude Desktop

Prefer the PostHog connector in Claude’s connector directory, or the wizard above. Manual claude_desktop_config.json from PostHog’s docs:

{
  "mcpServers": {
    "posthog": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote@latest",
        "https://mcp.posthog.com/mcp"
      ]
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Save, fully quit Claude Desktop, relaunch. Review tool calls before approving writes — PostHog’s own docs warn about prompt injection.

Try asking: “What are the top errors in my project this week?” or “List feature flags.”

Tavily MCP (search, extract, map, crawl)

Tavily’s MCP docs cover a remote server and a local npx server. Remote URL shape:

https://mcp.tavily.com/mcp/?tavilyApiKey=<your-api-key>
Enter fullscreen mode Exit fullscreen mode

You can also use OAuth without putting the key in the URL. Putting a key in a query string is convenient and easy to leak via screenshots or shared repos — prefer OAuth or env-based local config when you can.

Cursor (remote via mcp-remote)

From Tavily’s docs (replace the placeholder key):

{
  "mcpServers": {
    "tavily-remote-mcp": {
      "command": "npx -y mcp-remote https://mcp.tavily.com/mcp/?tavilyApiKey=<your-api-key>",
      "env": {}
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

OAuth without a key in the URL:

{
  "mcpServers": {
    "tavily-remote-mcp": {
      "command": "npx mcp-remote https://mcp.tavily.com/mcp",
      "env": {}
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

If OAuth credentials get stuck, Tavily documents clearing ~/.mcp-auth.

Claude Code

claude mcp add tavily-remote-mcp --transport http https://mcp.tavily.com/mcp/
Enter fullscreen mode Exit fullscreen mode

Claude Code opens a browser for OAuth; no API key in the URL.

Claude Desktop (local stdio)

From Tavily’s docs (paths: macOS ~/Library/Application Support/Claude/claude_desktop_config.json, Windows %APPDATA%\Claude\claude_desktop_config.json):

{
  "mcpServers": {
    "tavily-mcp": {
      "command": "npx",
      "args": ["-y", "tavily-mcp@0.1.2"],
      "env": {
        "TAVILY_API_KEY": "tvly-YOUR_API_KEY-here"
      }
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Claude Desktop can also add the remote URL under Integrations (beta) with your API key — see Tavily’s Claude Desktop section.

Remote and local surfaces include search and extract; map and crawl are part of the production server. Flowra’s toolkit page also lists a research action — use whatever tools your connected server actually exposes.

Try asking: “Search for MCP Streamable HTTP vs SSE and extract the key differences from the top official doc.”

Railway MCP (short)

If your loop includes deploy and logs, Railway’s remote MCP is at https://mcp.railway.com (setup, full docs).

Cursor (.cursor/mcp.json):

{
  "mcpServers": {
    "railway": {
      "url": "https://mcp.railway.com"
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Claude Code:

claude mcp add railway --transport http https://mcp.railway.com
Enter fullscreen mode Exit fullscreen mode

Auth is OAuth in the browser (or Railway’s CLI bridge if you use railway setup agent). Hosted and local Railway MCP tool sets are not identical — read Railway’s docs before assuming every CLI operation exists on the remote server. Destructive actions such as accept-deploy are marked for confirmation.

The sprawl problem

Three or four remote servers × Cursor + Claude means:

  • Several OAuth consent flows (and keys if you mix local/stdio bridges).
  • Duplicate entries every time you onboard a teammate’s laptop or a second machine.
  • A longer tool list fighting for context before you have asked a question.
  • Different failure modes: Node/npx missing for one bridge, OAuth expired for another, API key in a URL you accidentally committed.

None of that means MCP is broken. It means remote MCP is a real integration surface, and each vendor owns its auth and tool design for good reasons.

Standalone is still the right default when you live inside one product: PostHog’s wizard and connector, Cloudflare’s skills plugin, or a single Tavily search habit. Stay there if that matches how you work.

A hub earns its keep when the same agent needs infra + analytics + web research — and later Slack, GitHub, or a custom API — without another MCP block each time. It does not remove the need to authorize those apps; it moves app OAuth into one place and keeps the IDE config to a single server entry.

Flowra as one MCP endpoint

Disclosure: I work on Flowra, an AI agent and workflow platform with a hosted MCP endpoint and a toolkit catalog. This section is optional; the vendor configs above stand on their own.

Connect once

Hosted URL (documented for Cursor, Claude Code, Codex, and other streamable HTTP clients):

https://mcp.flowra.dev/mcp
Enter fullscreen mode Exit fullscreen mode

Auth (preferred): add the URL with no headers. The client opens Flowra sign-in (Google, GitHub, or email); you pick a project. Connecting Gmail, Cloudflare, PostHog, and so on is a separate toolkit OAuth step inside Flowra — not the same as MCP sign-in (MCP guide).

Cursor (from Use MCP in Cursor and flowra.dev/cursor):

{
  "mcpServers": {
    "flowra": {
      "url": "https://mcp.flowra.dev/mcp",
      "transport": "http"
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Claude Code (from flowra.dev/claude):

claude mcp add --transport http flowra https://mcp.flowra.dev/mcp
Enter fullscreen mode Exit fullscreen mode

Claude Desktop: follow the current Flowra MCP install steps in the MCP docs (OAuth to https://mcp.flowra.dev/mcp). Client UIs differ by version, so prefer the docs over copying an unverified Desktop JSON block here.

CI / no OAuth UI (same recipe):

{
  "mcpServers": {
    "flowra": {
      "url": "https://mcp.flowra.dev/mcp",
      "transport": "http",
      "headers": {
        "x-api-key": "<your-project-api-key>",
        "x-username": "project_default_user"
      }
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Meta tools instead of loading the whole catalog

In Smart (META) mode the client sees orchestration tools first, then discovers catalog actions on demand (meta tools):

  1. FLOWRA_DISCOVER_TOOLS — find slugs for a job
  2. FLOWRA_GET_TOOL_SCHEMAS — load argument schemas (do not invent fields)
  3. FLOWRA_MANAGE_CONNECTIONS — start toolkit OAuth if needed
  4. FLOWRA_MULTI_EXECUTE_TOOL — run action tools by slug

In the Flowra dashboard: Toolkits → connect the apps you need (Cloudflare MCP, PostHog MCP, Tavily MCP, optional Railway MCP). Browse everything else in the toolkit catalog.

Verified action slugs on those toolkit pages (and live discover) include:

  • Cloudflare: CLOUDFLARE_MCP_DOCS, CLOUDFLARE_MCP_SEARCH, CLOUDFLARE_MCP_EXECUTE
  • PostHog: POSTHOG_MCP_EXEC (CLI-style command strings such as search, info, call — aligned with PostHog’s CLI-mode exec docs)
  • Tavily: TAVILY_MCP_TAVILY_SEARCH, _EXTRACT, _MAP, _CRAWL, _RESEARCH

Railway’s toolkit page lists a large set of deploy and ops actions; open the page for the current list rather than memorizing every slug.

Flowra also documents approval gates and a run ledger for risky steps — useful when execute or deploy tools can change production. See human-in-the-loop. For plan limits and how usage is billed, see flowra.dev and the Flowra docs.

If you only need Cloudflare or only PostHog, prefer that vendor’s MCP. Flowra is the “I keep adding servers” option, not a mandatory middleman. How individual toolkits are wired under the hood is an implementation detail — for setup, treat them as catalog toolkits you connect in Flowra, then call through the meta tools above (MCP guide).

Try asking (after Flowra MCP is connected): “Discover Cloudflare MCP tools, connect if needed, then search Workers AI docs for …”

Side-by-side cheatsheet

Server Standalone Cursor gist Claude Via Flowra
Cloudflare https://mcp.cloudflare.com/mcp · OAuth url in mcpServers Skills plugin / remote URL per CF docs Toolkit cloudflare_mcp after Flowra OAuth
PostHog https://mcp.posthog.com/mcp · OAuth / wizard url or wizard Connector, wizard, or mcp-remote Toolkit posthog_mcp → POSTHOG_MCP_EXEC
Tavily Remote URL or local tavily-mcp · API key / OAuth mcp-remote or local command claude mcp add … (OAuth) or Desktop local JSON Toolkit tavily_mcp
Railway https://mcp.railway.com · OAuth url claude mcp add railway --transport http … Toolkit railway_mcp
Flowra hub https://mcp.flowra.dev/mcp · Flowra OAuth url + transport: http claude mcp add --transport http flowra … —

Full JSON for each row is in the sections above. Official deep links: Cloudflare, PostHog, Tavily, Railway, Flowra MCP.

Security and ops

  • Prefer OAuth over long-lived keys in committed mcp.json. Treat Tavily’s tavilyApiKey query param as a secret; use env vars or OAuth when you can.
  • Review destructive calls before you approve them: Cloudflare execute, Railway accept-deploy, PostHog write tools, Flowra FLOWRA_MULTI_EXECUTE_TOOL against production accounts.
  • Scope tokens and Cloudflare OAuth permissions to what the agent actually needs. Do not paste unrestricted API tokens into shared project configs.
  • Keep production accounts off experimental agents when you can; use a staging Cloudflare/PostHog/Railway project for early smoke tests.
  • After config edits: reload MCP in Cursor, or fully quit and relaunch Claude Desktop so the new server list is loaded.

Troubleshooting

  • MCP shows red / disconnected: finish OAuth; for npx bridges, confirm Node is on PATH (node --version, which npx).
  • Claude Desktop ignores JSON: full quit (not only close window), then reopen.
  • Flowra meta tools work but toolkit calls fail: connect the toolkit in the dashboard or via FLOWRA_MANAGE_CONNECTIONS; MCP login ≠ app login.
  • Cloudflare oddities with SSE: use https://mcp.cloudflare.com/mcp with Streamable HTTP / auto transport, not a forced legacy SSE client mode.
  • Tavily OAuth stuck: rm -rf ~/.mcp-auth then reconnect (Tavily docs).
  • Wrong project / wrong PostHog region: re-run OAuth and pick the account you intended; PostHog routes region from the login (PostHog MCP).
  • Tools missing after a successful connect: confirm the server is enabled in the client UI, then ask the agent to list MCP tools before blaming the prompt.

FAQ

Do I need all three MCP servers at once?

No. Start with the official Cloudflare, PostHog, or Tavily config if you only use that product. Add more servers (or a hub) when the same Cursor or Claude session needs several of them.

Where does Cursor store MCP config?

Project tools go in .cursor/mcp.json. Personal tools for every project go in ~/.cursor/mcp.json. Cursor’s MCP docs cover remote url servers and command/stdio servers.

How do I connect Flowra without putting an API key in mcp.json?

Add https://mcp.flowra.dev/mcp with no headers and complete Flowra OAuth (Google, GitHub, or email), then pick a project. Connecting Cloudflare, PostHog, Tavily, or other apps is a separate toolkit OAuth step in Flowra. Details: MCP docs.

Is Claude Desktop the same as Claude Code for Flowra?

Claude Code is documented with claude mcp add --transport http flowra https://mcp.flowra.dev/mcp. For Claude Desktop, follow the current steps in the Flowra MCP docs rather than assuming one JSON shape forever.

What happens if I put a Tavily API key in the MCP URL?

It works for remote setup, but the key can leak via screenshots or shared repos. Prefer OAuth or an env-based local tavily-mcp config when you can, as described in Tavily’s MCP docs.

When should I use Flowra instead of stacking vendor MCPs?

When the same agent needs several vendors plus other apps, and you want one IDE MCP entry with discover → connect → execute. If you live inside one product, that vendor’s official MCP is usually enough.

Closing

Official remote MCPs for Cloudflare, PostHog, and Tavily are ready today: paste the vendor JSON, sign in, and ask a real question. Keep that setup when one product is enough.

When the same Cursor or Claude session needs those tools plus the rest of your stack, a single Flowra MCP URL is a workable alternative — discover, connect, execute — with app credentials living in Flowra rather than one more block per vendor. Start from the free tier on flowra.dev if you want to try the hub; otherwise stay on the official servers and you are done.

Useful bookmarks:

MCP client configs change. If a snippet drifts, trust the linked official page over this article and send a correction.

Top comments (0)