MCP Server
The Model Context Protocol (MCP) is an open standard that lets AI assistants like Claude or Cursor interact with external tools and services. Seline MCP server allows you to access your analytics data from your favorite AI tools. It is based on the Seline public API and has tools for all of its endpoints. Currently, you can retrieve everything we have at the Dashboard: visit metrics, statistics, revenue data, custom events, and more.
Coding agents can also use it to set up Seline on a new website: create a project, link it to your Pro subscription, and install the tracking script right in your codebase.
Hosted MCP
ChatGPT, Claude, and other remote MCP clients connect to:
https://api.seline.com/mcp
Sign in with your Seline account when the assistant asks you to connect. The assistant gets access to every project on the account. All tools are read-only except seline_create_project. Use seline_list_projects to get a projectId, then pass it on other tools.
Local MCP
Cursor, Claude Code, and Codex can also run the local stdio server with an API token.
You can use either:
- A project API token from project settings → integrations (scoped to one project)
- An account API token from project settings → integrations (access to all projects)
With an account token, the MCP can list projects via seline_list_projects and pass a projectId when querying analytics. Creating projects also requires an account token.
Set up Seline with an agent
Connect the MCP, then ask your agent something like "add Seline analytics to this site". The agent will:
- Read
seline_get_guidanceto learn how Seline and its tools work. The same text is available as the guidance endpoint. - List your projects and ask you which Pro project the new site should share a subscription with. One Pro plan covers unlimited websites.
- Create the project with
seline_create_projectand get its project token. - Install the tracking script in your codebase using that token.
New projects must be linked to a project with an active Pro subscription. If you don't have one yet, start a plan in the dashboard first.
Cursor setup
{"mcpServers": {"seline": {"command": "npx","args": ["-y", "@seline-analytics/mcp", "sln_your_api_key"]}}}
Then restart Cursor so it reconnects MCP servers.
Claude Code setup
Run this command:
claude mcp add seline -- npx -y @seline-analytics/mcp sln_your_api_key
Then restart Claude Code.
Codex setup
If your Codex client uses mcpServers JSON config, add:
{"mcpServers": {"seline": {"command": "npx","args": ["-y", "@seline-analytics/mcp", "sln_your_api_key"]}}}
Then restart Codex and confirm the seline_* tools appear.
Tools
Guidance:
seline_get_guidance->GET /api/v1/guidance
Projects:
seline_list_projects->POST /api/v1/projectsseline_create_project->POST /api/v1/projects/create
Data over time:
seline_get_data->POST /api/v1/dataseline_get_charges->POST /api/v1/charges
Counts and totals:
seline_get_top_visitors->POST /api/v1/statsseline_get_pages->POST /api/v1/pagesseline_get_visit_metrics->POST /api/v1/visit-metricsseline_get_custom_events->POST /api/v1/custom-events
Events and properties:
seline_get_events->POST /api/v1/eventsseline_get_property_values->POST /api/v1/property-valuesseline_get_field_keys->POST /api/v1/event-dataseline_get_field_values->POST /api/v1/field-values
Funnels:
seline_get_funnel->POST /api/v1/funnel
Visitors:
seline_get_visitors->POST /api/v1/visitorsseline_get_visitor->POST /api/v1/visitorseline_get_visitor_events->POST /api/v1/visitor-eventsseline_get_most_active_visitors->POST /api/v1/most-active-visitorsseline_get_visitor_insight->POST /api/v1/visitor-insight