Skip to content

Lantern Analytics MCP server

Web analytics with a built-in MCP server: ask Claude or Cursor about your traffic and revenue

Yes, Lantern Analytics has one built in. Its MCP server lets Claude, Cursor, Codex, VS Code and any other MCP client answer questions about your traffic, the visitors AI assistants send you, your funnels, and the revenue each channel brings. It is read-only, it is on every plan, and connecting it takes about a minute.

Last updated 10 November 2026.

The short answer

  • Endpoint: https://visitlantern.com/api/mcp, over Streamable HTTP. There is nothing to install or run on your computer.
  • Sign-in: OAuth in Claude (web, desktop and mobile), where Lantern is in the connectors directory. An API key from your dashboard in Claude Code, Cursor, Codex and VS Code.
  • Access: read-only. Ten tools, and none of them can change anything.
  • Data: visitors, sources, AI assistants as their own channel, AI crawlers, goals, funnels, and revenue from seven payment providers credited to the channel that first brought each customer.
  • Price: included in every plan, from $8 a month, with a 7-day free trial and no card.

Which channels brought paying customers this month? And where do people from ChatGPT land?

  • lantern · get_revenue by channel, last 30 days
  • lantern · get_breakdown entry pages where channel = AI

Google search is still first: $1,519 from 31 customers. ChatGPT is right behind with $1,258 from 22, and its customers pay more on average, $57 against $49.

61% of ChatGPT visitors land on /pricing, most of the rest on /docs/install. They arrive ready to compare, so that's the page to keep sharp.

Example data, in Claude Code.

What you can ask

Lantern's MCP server has ten tools. Your assistant picks the right one, so you ask in plain words.

ToolWhat it returnsA question that uses it
list_sitesEvery site in your accountWhich sites do I have in Lantern?
get_overviewVisitors, pageviews, sessions, bounce rate and time on site, against the previous periodHow did last week compare with the week before?
get_timeseriesThe same numbers by hour or dayDid traffic change after Tuesday's launch?
get_breakdownChannels, referrers, UTM campaigns, pages, countries, cities, devices and goals, with filtersWhich pages do visitors from ChatGPT land on?
get_revenueRevenue, refunds and customers by channel, referrer or campaignWhich channel brought the most revenue in the last 90 days?
get_ai_crawlersAI crawlers that read your site, by company and by pageWhich AI crawlers read my docs this week?
get_realtimeWho is on the site now and what they are readingIs anyone on the site right now?
get_funnelsYour saved funnelsWhat funnels have I set up?
run_funnelConversion and drop-off between any pages and goalsWhere do visitors drop off between pricing and checkout?
get_event_propertiesThe details sent with a goalBreak down sign-ups by plan.

Two details make the answers better:

  • Filters combine with breakdowns. One question can filter to the AI channel and then break the result down by landing page, country or campaign.
  • Date ranges use each site's own time zone. "Yesterday" means yesterday where your site is.

How to connect it

Claude, on the web, desktop or phone

  1. Open Lantern in Claude's connectors directory and click Connect.
  2. Sign in to Lantern and click Allow.
  3. Ask a question. Claude finds your sites by itself.

No key is needed. You can also add it by hand: Settings → Connectors → Add custom connector, and paste https://visitlantern.com/api/mcp.

Claude Code, Cursor and Codex

Create an API key at your dashboard's AI assistants page. That page shows each config with your key filled in.

Claude Code: Terminal
claude mcp add --transport http --scope user lantern https://visitlantern.com/api/mcp --header "Authorization: Bearer YOUR_LANTERN_API_KEY"
Codex: ~/.codex/config.toml
[mcp_servers.lantern]
url = "https://visitlantern.com/api/mcp"
bearer_token_env_var = "LANTERN_API_KEY"

# Then set the key, once.
# Mac or Linux, in ~/.zshrc or ~/.bashrc:
#   export LANTERN_API_KEY="YOUR_LANTERN_API_KEY"
# Windows, in PowerShell:
#   setx LANTERN_API_KEY "YOUR_LANTERN_API_KEY"
Cursor: ~/.cursor/mcp.json
{
  "mcpServers": {
    "lantern": {
      "url": "https://visitlantern.com/api/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_LANTERN_API_KEY"
      }
    }
  }
}

VS Code, Windsurf, Zed, Cline and Goose connect the same way: the URL above, Streamable HTTP, and the header Authorization: Bearer <your key>. The docs have every client. A key reads every site in your account, and deleting it cuts off access at once.

Revenue questions, not only traffic

Most analytics MCP servers can say how many visitors came from Reddit. Lantern can say how much those visitors paid, because the payment data is already joined to the visit.

  • Seven payment providers connect directly: Stripe, Razorpay, Cashfree, Dodo Payments, Paddle, Polar and Lemon Squeezy.
  • Credit goes to the first visit. Someone who read a post on Monday and paid on Friday counts for the post, not for Direct.
  • Renewals and refunds follow the first payment, so a channel is credited for the lifetime of the customers it brought.
  • AI assistants are their own channel, so "how much revenue came from ChatGPT this quarter?" has an answer.

More on how the join works: revenue analytics.

Which web analytics tools have an MCP server?

Several do. They differ in three ways: whether the server is hosted or runs on your machine, whether it can write as well as read, and whether revenue from your payment provider is in the data.

ToolMCP serverRead or writePayment providers connected directly
Lantern AnalyticsBuilt in, hosted. OAuth in Claude, API key elsewhereRead-onlyStripe, Razorpay, Cashfree, Dodo Payments, Paddle, Polar, Lemon Squeezy
PostHogOfficial, hosted. Free to connectReads and writes across PostHog's productsStripe, as a data warehouse source (revenue analytics is in beta)
DataFastOfficial, hostedReads, and can act with the permissions you chooseStripe, Lemon Squeezy, Polar and Shopify; guides for Paddle and Dodo Payments
ChartsyOfficial, hosted. 19 toolsRead-onlyStripe, Paddle, Polar, Lemon Squeezy, Creem, Freemius
UmamiOfficial since v3.4.0, on Umami Cloud or self-hostedRead-onlyNone. Revenue comes from events you send
Google Analytics 4Official and open source. Runs on your own computerRead-only by defaultNone. Revenue comes from purchase events you send

Details are from each vendor's own site on 10 November 2026. They change often, so check before you decide. Setting up Google's server is covered step by step in how to connect Google Analytics to Claude.

When another tool fits better

  • PostHog if you want product analytics, session replay and feature flags in one place, or want the assistant to create dashboards for you.
  • Google Analytics 4 if you depend on Google Ads and BigQuery and a free tool matters more than a quick setup.
  • Umami if you must self-host.
  • Chartsy if the questions are about MRR, churn and expansion more than about where visitors came from.
  • Lantern if the question you ask most is "which channel brought paying customers?", and you want AI assistants and AI crawlers in the answer.

Questions

Is there a web analytics tool with a built-in MCP server?

Yes. Lantern Analytics has a built-in MCP server on every plan, so Claude, Cursor, Codex, VS Code and other MCP clients can query your traffic, AI referrals, funnels and revenue by channel. PostHog, Umami, DataFast, Chartsy and Google Analytics 4 also have MCP servers; they differ in what data sits underneath and whether they can change anything.

Can I ask Claude about revenue, not just pageviews?

Yes. Lantern's get_revenue tool returns revenue, refunds and customers by channel, referrer or campaign, read from Stripe, Razorpay, Cashfree, Dodo Payments, Paddle, Polar or Lemon Squeezy. Each payment is credited to the channel that first brought that customer.

Is Lantern's MCP server read-only?

Yes. All ten tools read the same numbers as your dashboard. None of them can change a site, a goal, a funnel or your tracking.

Is the MCP server included on every plan?

Yes. Every Lantern feature is on every plan, and plans differ only by traffic. They start at $8 a month, after a 7-day free trial with no card.

Do I need an API key?

Not in Claude. Lantern is in Claude's connectors directory and signs in with OAuth. Claude Code, Cursor, Codex and VS Code use an API key that you create in your dashboard and can delete at any time.

Can I query more than one site?

Yes. The list_sites tool returns every site in your account, and you can name the site in your question.