Skip to main content

MCP Server for AI Assistants

The SealMetrics MCP Server enables AI assistants like Claude to access your analytics data through natural language queries. Ask questions about your traffic, conversions, campaigns, and more — directly from your AI assistant.

What is MCP?

The Model Context Protocol (MCP) is an open standard that allows AI assistants to securely connect to external data sources. The SealMetrics MCP server runs locally on your machine and acts as a bridge between Claude and your SealMetrics analytics data.

What can you ask Claude?

Once connected, you can ask questions like:

  • "Show me an overview of my site for the last 7 days"
  • "What are the top traffic sources this month?"
  • "Compare this month's conversions with last month"
  • "Which landing pages have the highest bounce rate?"
  • "Show me revenue by country for the last quarter"
  • "What devices do my visitors use?"
  • "Analyze my top 3 campaigns and tell me which has the best conversion rate"

Setup (step by step)

Step 1: Verify Node.js is installed

Open your terminal and run:

node --version

You need v18 or higher. If you don't have it, download it from nodejs.org.

Step 2: Get your API Key

  1. Log in to your SealMetrics dashboard at my.sealmetrics.com
  2. Go to Settings > API Keys (direct link)
  3. Click Create API Key
  4. Give it a name (e.g. "Claude MCP") and click Create
  5. Copy the key — it starts with sm_ (e.g. sm_AbCdEf123...)
Important

The full API key is only shown once. Copy it immediately and store it in a safe place.

Step 3: Find your Site ID

  1. Go to Settings > Sites (direct link)
  2. Click on the site you want to query
  3. The Site ID is displayed at the top of the site settings page (e.g. my-store)
tip

If you only have one site, you can skip this step — just ask Claude to "list my sites" and it will find it for you.

Step 4: Configure your Claude client

Choose the client you use:

Claude Code

Create a file called .mcp.json in your project root:

{
"mcpServers": {
"sealmetrics": {
"command": "npx",
"args": ["-y", "@sealmetrics/mcp-server"],
"env": {
"SEALMETRICS_API_KEY": "sm_your_key_here",
"SEALMETRICS_SITE_ID": "your-site-id"
}
}
}
}

Replace sm_your_key_here with your API key from Step 2, and your-site-id with your Site ID from Step 3.

Global configuration

To make SealMetrics available in all your projects, add the same config to ~/.claude/settings.json instead of a project-level .mcp.json.

Claude Desktop

  1. Open Claude Desktop
  2. Go to Settings (gear icon) > Developer > Edit Config
  3. Add the following configuration:
{
"mcpServers": {
"sealmetrics": {
"command": "npx",
"args": ["-y", "@sealmetrics/mcp-server"],
"env": {
"SEALMETRICS_API_KEY": "sm_your_key_here",
"SEALMETRICS_SITE_ID": "your-site-id"
}
}
}
}
  1. Save and restart Claude Desktop completely (Cmd+Q on macOS, then reopen)

Step 5: Verify it works

Open Claude and ask:

"List my SealMetrics sites"

Claude should respond with a list of your sites. If it does, you're all set!


Configuration reference

VariableRequiredDescription
SEALMETRICS_API_KEYYesYour API key from Settings > API Keys. Starts with sm_.
SEALMETRICS_SITE_IDNoDefault Site ID from Settings > Sites. If set, you don't need to specify the site in every query.
SEALMETRICS_BASE_URLNoAPI base URL. Default: https://my.sealmetrics.com/api/v1. Only change this for custom deployments.

Available tools

Claude uses these tools automatically when you ask questions — you never need to call them directly.

ToolDescription
list_sitesList all sites accessible with your API key
get_overviewDashboard KPIs: pageviews, bounce rate, conversions, revenue with time series
get_traffic_sourcesTraffic by source (google, facebook, direct...)
get_traffic_mediumsTraffic by medium (organic, cpc, email...)
get_campaignsCampaign performance with conversions and revenue
get_pagesMetrics per page URL path
get_landing_pagesLanding page performance with bounce rate
get_conversionsConversions by type with revenue and average order value
get_microconversionsEngagement events (add_to_cart, signup, newsletter...)
get_countriesGeographic breakdown by country
get_devicesDevice type, browser, and OS breakdown
get_funnelFunnel analysis with step-by-step conversion rates

Common parameters

ParameterValuesDefaultDescription
site_idstring$SEALMETRICS_SITE_IDSite to query
periodtoday, yesterday, 7d, 30d, 90d, this_month, last_month, this_year, etc.30dTime period
compareprevious, yoynoneCompare with previous period or year-over-year
limit1-10020Max rows returned
pagenumber1Page number for paginated results
sort_byvaries per toolvariesSort field
sort_orderasc, descdescSort direction

All period values

PeriodDescription
todayToday
yesterdayYesterday
7d, 30d, 90d, 12mLast N days/months
this_week, this_month, this_quarter, this_yearCurrent period
wtd, mtd, qtd, ytdPeriod to date
last_week, last_month, last_quarter, last_yearPrevious period

Troubleshooting

Claude doesn't see the SealMetrics tools

  1. Claude Code: Make sure .mcp.json is in your project root and restart Claude Code
  2. Claude Desktop: Save the config file and restart the app completely (Cmd+Q on macOS)
  3. Verify Node.js 18+ is installed: node --version

"Invalid API key"

Your API key is incorrect or expired. Go to Settings > API Keys and generate a new one.

"site_id is required"

Either set SEALMETRICS_SITE_ID in your config, or ask Claude to "list my sites" first, then specify the site in your question.

"Access denied to site X"

Your API key doesn't have permission for that site. Check your token permissions in Settings > API Keys.

"npx: command not found"

Install Node.js from nodejs.org. npx is bundled with Node.js.

Test the server manually

You can verify the server starts correctly from your terminal:

SEALMETRICS_API_KEY="sm_your_key_here" npx -y @sealmetrics/mcp-server

If it starts without errors, the server is working. Press Ctrl+C to stop it.


How it works

The MCP server runs locally on your machine and communicates with the SealMetrics API over HTTPS. No analytics data is stored locally.

Your machine                             SealMetrics cloud
┌──────────────────────────┐ ┌──────────────────────┐
│ │ │ │
│ Claude Code / Desktop │ │ my.sealmetrics.com │
│ | │ │ │
│ @sealmetrics/mcp-server │── HTTPS ──>│ /api/v1/* │
│ (runs locally via npx) │<── JSON ───│ │
│ | │ │ │
│ Claude reads the data │ └──────────────────────┘
│ and answers your query │
│ │
└──────────────────────────┘
  • Authenticated via X-API-Key header (your key never leaves your machine)
  • Automatic retries with exponential backoff on rate limits
  • 30-second timeout per request
  • No data stored locally

Resources

Need help?