Lcontext MCP Server

MCP server for Lcontext - gives AI coding agents real user behavior data to build better software

Local serverstdio

What is the Lcontext MCP server?

MCP server for Lcontext - gives AI coding agents real user behavior data to build better software. The lcontext mcp server wraps that behind the Model Context Protocol, so an assistant can use it through 10 defined tools rather than through you.

What it actually does

The product analytics agent for your AI coding tools. Lcontext studies how users navigate your product, where they engage, hesitate, and drop off, and delivers behavioral context via MCP.

Its toolset

Everything the assistant can do here goes through one of these:

  • get_page_context — Get comprehensive analytics context for a page including stats, visitor metrics, Web Vitals (LCP, FCP, FID, CLS), and all interactive elements with
  • list_pages — The list_pages tool exposed by this server
  • get_element_context — Get detailed analytics for a specific interactive element by its label or ID
  • get_app_context — Get application-wide analytics including sessions, visitors, page views, engagement metrics, device breakdown (mobile/tablet/desktop), top browsers
  • get_visitors — Get a list of visitors with AI-generated profiles, interests, engagement trends, segment assignments, device info (type, browser, OS), and location
  • get_visitor_detail — Get detailed profile and recent sessions for a specific visitor, including device info (type, browser, OS) and location
  • get_sessions — Get a list of user sessions with AI-generated summaries, titles, sentiment analysis, and device type
  • get_session_detail — Get detailed information about a specific session including full event timeline, visitor context, device type, and location (city, region, country)
  • get_user_flows — Get automatically detected user journey patterns showing how users navigate through the application. Each flow represents a common page sequence with
  • get_analysis — Get a pre-computed daily or weekly analysis report. Contains problem areas, funnel health, session findings, and prioritized recommendations — all

Adding it to your client

Installation goes through your MCP client rather than a global install: point it at lcontext-mcp on npm and it is fetched when the client starts. The copy-paste blocks for Claude Desktop, Claude Code and Cursor are further down this page.

Configuration

You will need 2 environment variables: LCONTEXT_API_KEY, LCONTEXT_API_URL. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

When to reach for it

Plenty of browser automation servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call. Lcontext's toolset — get_page_context, list_pages, get_element_context and 7 more — is a fair guide to whether it matches your workflow. It is maintained by lcontext; worth a glance at recent repository activity before you build anything load-bearing on it.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Caveats

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 10 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Lcontext.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the lcontext mcp server does with a few real requests.

Available tools

ToolWhat it does
get_page_contextGet comprehensive analytics context for a page including stats, visitor metrics, Web Vitals (LCP, FCP, FID, CLS), and all interactive elements with their engagement data.
list_pagesThe list_pages tool exposed by this server.
get_element_contextGet detailed analytics for a specific interactive element by its label or ID.
get_app_contextGet application-wide analytics including sessions, visitors, page views, engagement metrics, device breakdown (mobile/tablet/desktop), top browsers, top OS, Web Vitals (LCP, FCP, FID, CLS), and AI-generated insights.
get_visitorsGet a list of visitors with AI-generated profiles, interests, engagement trends, segment assignments, device info (type, browser, OS), and location (city, region, country).
get_visitor_detailGet detailed profile and recent sessions for a specific visitor, including device info (type, browser, OS) and location.
get_sessionsGet a list of user sessions with AI-generated summaries, titles, sentiment analysis, and device type.
get_session_detailGet detailed information about a specific session including full event timeline, visitor context, device type, and location (city, region, country).
get_user_flowsGet automatically detected user journey patterns showing how users navigate through the application. Each flow represents a common page sequence with engagement metrics and drop-off points.
get_analysisGet a pre-computed daily or weekly analysis report. Contains problem areas, funnel health, session findings, and prioritized recommendations — all referencing specific page paths, element IDs, and session IDs you can inv

How to install the Lcontext MCP server

{
  "mcpServers": {
    "lcontext": {
      "command": "npx",
      "args": ["-y", "lcontext-mcp"],
      "env": {
        "LCONTEXT_API_KEY": "your-value",
        "LCONTEXT_API_URL": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

VariableDescriptionRequired
LCONTEXT_API_KEYCredential the server authenticates with.Yes
LCONTEXT_API_URLEndpoint or connection string the server talks to.Yes

Example prompts to try

  • Use Lcontext to get page context.
  • Use Lcontext to list pages.
  • Use Lcontext to get element context.

Frequently asked questions

It connects Lcontext to MCP-compatible AI assistants such as Claude and Cursor, exposing 10 tools (get_page_context, list_pages, get_element_context, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Lcontext directly.