MCP Server
Let AI assistants
query your analytics.
The GhostlyX MCP server gives AI tools direct, authenticated access to your analytics data through the Model Context Protocol. Ask your AI assistant about traffic, conversions, uptime, and more without leaving your editor.
MCP Tool Calls
GhostlyX MCP server connected. I have access to 10 analytics tools. Ask me anything about your sites.
An AI assistant querying GhostlyX analytics in real time via the MCP server. All data is simulated.
What is the GhostlyX MCP server?
The Model Context Protocol (MCP) is an open standard that allows AI assistants to interact with external data sources through structured tool calls. GhostlyX implements an MCP server so your AI tools can read your analytics without you having to copy and paste data from the dashboard.
Every tool exposed through the MCP server is authenticated with Sanctum API tokens. The same tokens you use for the REST API work here too. Read-only tools never modify your data, and write-capable tools respect the same role-based permissions as the dashboard.
Point your AI assistant at the /mcp/v1 endpoint, provide a Bearer token, and start asking questions about your sites.
10 built-in tools
Site stats, top pages, traffic sources, real-time visitors, uptime, goals, funnels, annotations, and support tickets.
Sanctum token authentication
Reuse the same API tokens you already have. No separate credentials needed for the MCP server.
Read-only by default
Most tools only read data. Write tools for annotations and tickets check role permissions before making any changes.
Works with any MCP client
OpenCode, Claude Desktop, Cursor, and any other tool that supports the Model Context Protocol.
Same data as the dashboard
The MCP server queries the same services that power the GhostlyX dashboard. No discrepancies between what you see and what your AI sees.
Configurable time periods
Query stats for 24 hours, 7 days, 30 days, 6 months, or 12 months using the period parameter.
Available MCP tools
Every tool listed below is available to any MCP-compatible AI assistant connected to your GhostlyX account.
List sites
ReadReturns all sites you own and sites you are a member of.
Get site stats
ReadAggregate pageviews, visitors, bounce rate, and average visit duration for any time period.
Get top pages
ReadRanked list of your most visited pages with pageview and visitor counts.
Get traffic sources
ReadTop referrers driving traffic to your site, excluding self-referrals.
Get real-time visitors
ReadNumber of unique visitors active on your site in the last 5 minutes.
Get uptime status
ReadMonitor status, uptime percentage, and average response time.
List goals
ReadAll goals with conversion counts, unique converters, and conversion rates.
Get funnel stats
ReadStep-by-step conversion data for any funnel you have configured.
Manage annotations
Read/WriteList existing annotations or create new ones (requires write access).
Support tickets
Read/WriteList, view, create, or reply to support tickets.
Connect in minutes
Add GhostlyX as a remote MCP server in your AI assistant's configuration file.
opencode.json
{
"mcp": {
"ghostlyx": {
"type": "remote",
"url": "https://ghostlyx.com/mcp/v1",
"enabled": true,
"headers": {
"Authorization": "Bearer YOUR_API_TOKEN"
}
}
}
}
Full setup instructions for different AI assistants are in the MCP Server documentation.
What you can ask your AI assistant
Traffic summaries
"Show me my top 10 pages this week and compare them to last week." Your AI assistant pulls the data from GhostlyX and formats it however you prefer.
Uptime and performance
"Is my site up right now? What is the average response time over the last 30 days?" Get instant answers without opening the dashboard.
Conversion analysis
"Which goals had the highest conversion rate this month? Walk me through the checkout funnel drop-off." Let AI crunch the numbers for you.
Frequently asked questions
What is the GhostlyX MCP server?
The GhostlyX MCP server is a built-in implementation of the Model Context Protocol that gives AI assistants direct, authenticated access to your analytics data. It exposes 10 tools covering site stats, top pages, traffic sources, real-time visitor counts, uptime, goals, funnels, annotations, and support tickets. Any MCP-compatible AI client can connect by pointing at the /mcp/v1 endpoint with a valid API token.
What is the Model Context Protocol (MCP)?
MCP is an open standard that lets AI assistants interact with external tools and data sources through structured, authenticated tool calls. GhostlyX implements an MCP server so AI coding agents, chatbots, and other AI tools can query your analytics data without you having to copy and paste numbers manually.
Which AI assistants work with the GhostlyX MCP server?
Any AI assistant that supports the Model Context Protocol can connect to GhostlyX. This includes OpenCode, Claude Desktop, Cursor, and other MCP-compatible clients. Configuration requires pointing the client at the /mcp/v1 endpoint with a valid API token in the Authorization header.
Is the MCP server available on all plans?
MCP server access follows the same plan restrictions as the REST API. It is available on the Business plan and above.
What data can AI assistants access through the MCP server?
The MCP server exposes 10 tools covering site listing, aggregate statistics, top pages, traffic sources, real-time visitor counts, uptime monitor status, goal conversions, funnel step data, annotations, and support tickets. All tools respect the same permissions as the dashboard.
Is the MCP server secure?
Yes. All MCP requests are authenticated through Sanctum API tokens, the same tokens used for the REST API. Read-only tools never modify your data, and write-capable tools enforce role-based permissions so team members with viewer access cannot create annotations or tickets through the MCP server.
Can I use the same API token for the MCP server and the REST API?
Yes. The MCP server and the REST API share the same Sanctum token authentication. Any token you have already generated for the REST API will work with the MCP server. There is no need to create separate credentials.
What time periods can I query through the MCP server?
All stat-based tools accept a period parameter with the following options: 24h, 7d, 30d, 6mo, and 12mo. The default period when none is specified is 30 days.
Your analytics, AI-ready
Connect your AI assistant to GhostlyX and start querying your analytics data in natural language.