Skip to content

Connect AI agents

leadmaps speaks MCP (the Model Context Protocol), so any MCP-capable AI agent can read your analytics. Claude Code, Cursor, VS Code, and anything that speaks MCP over HTTP all work.

The fastest path is in your dashboard. Open Settings, Connect AI agents and we hand you a finished config with your real key and site id already filled in. This page is the generic reference if you would rather assemble it yourself.

  • A leadmaps api key with the query:read scope. Make one in Settings, API keys. A read-only key is enough. Your agent can read your data but cannot change anything.
  • A site id. Your agent will ask which site to look at. You can see your site ids in Settings, Connect AI agents or in your dashboard.

In the blocks below, replace <key> with your api key and <site_id> with the site you want your agent to read.

leadmaps runs a hosted MCP endpoint. Most clients only need this url and a header:

POST https://api.leadmaps.nl/mcp
Authorization: Bearer <key>

There is nothing to install for the hosted setup. Your agent connects straight to the endpoint.

Run this once in your terminal. It connects leadmaps to Claude Code:

Terminal window
claude mcp add --transport http leadmaps https://api.leadmaps.nl/mcp --header "Authorization: Bearer <key>"

Your agent will ask which site to look at. Give it your <site_id>.

Save this in your project at .cursor/mcp.json, then reload Cursor:

{
"mcpServers": {
"leadmaps": {
"url": "https://api.leadmaps.nl/mcp",
"headers": {
"Authorization": "Bearer <key>"
}
}
}
}

Save this in your project at .vscode/mcp.json, then reload the window:

{
"servers": {
"leadmaps": {
"type": "http",
"url": "https://api.leadmaps.nl/mcp",
"headers": {
"Authorization": "Bearer <key>"
}
}
}
}

For tools that run a local command instead of connecting over HTTP, drop this into the MCP config of your tool:

{
"command": "npx",
"args": ["-y", "@syntarie/mcp"],
"env": {
"LEATMAP_API_KEY": "<key>"
}
}

For any client that speaks MCP over HTTP, point it at the url with this header:

https://api.leadmaps.nl/mcp (header: Authorization: Bearer <key>)

The tools your agent can use depend on your plan. The hosted endpoint is the single place that checks your plan, so every client gets the same set.

  • Visitors and sessions over time. Ask for pageviews, sessions, and active visitors by day.
  • Top pages and top sources. See your most-visited pages and where visitors came from.
  • Referring links. List the sites that send you traffic.
  • Events list. Browse the custom events your site sends.
  • Funnels. Check how many people finish a step-by-step flow.
  • Returning visitors. See how many visitors come back week to week.
  • Paths and lifecycle. Follow the routes visitors take and how new and returning visitors split.
  • Your sites and workspace info. Ask which sites you have and read your plan details.
  • Stats summary and trends. Get a rolled-up summary and the trend behind any number.
  • Visitors by country. Break your traffic down by location.
  • Visitor journeys. Trace the path visitors take across pages, up to three steps deep.
  • Notes on your timeline. Read the deploy and campaign notes on your charts, up to five.
  • Run SQL. Let your agent run a read-only SQL query over your data.
  • Tracking plan groups. Read the way your events are grouped in your tracking plan.
  • Unlimited notes and full journeys. No limit on timeline notes and no depth cap on visitor journeys.

If a tool needs a higher plan, your agent gets a clear message with an upgrade nudge instead of a failure. Upgrade any time in Settings, Billing.