Add the Optimizely Analytics MCP server to each supported AI client with the following steps. The server URL is the same for every client, and authentication is handled by an OAuth 2.0 flow that opens in your browser the first time you use an oa_ tool.
Prerequisites
Before you start, make sure you have the following:
- An Opti ID account.
- An Optimizely account with Opal enabled and connected to at least one Optimizely Analytics app.
- An AI client that supports remote MCP.
Claude Desktop (macOS or Windows)
Open MCP configuration
In Claude Desktop, go to Settings > Developer > Edit Config. This opens claude_desktop_config.json in your default text editor. You can also open it directly at the following locations:
-
macOS –
~/Library/Application Support/Claude/claude_desktop_config.json -
Windows –
%APPDATA%\Claude\claude_desktop_config.json
Add the Optimizely Analytics server
Add the following to your configuration file. If you already have other MCP servers configured, add the "optimizely-analytics" entry inside the existing "mcpServers" object.
{
"mcpServers": {
"optimizely-analytics": {
"url": "https://analytics.mcp.opal.optimizely.com/mcp"
}
}
}Restart Claude Desktop
Save the file and fully restart the app. The Analytics server appears in your list of connected MCP servers.
Authenticate
The first time you call an Analytics tool, Claude Desktop prompts you to sign in. Complete the OAuth flow with your Optimizely credentials and connect to your Opal instance.
Verify
Ask Claude, List my Optimizely Analytics apps. If you see your apps listed, the install is complete.
Cursor
Open MCP settings
In Cursor, go to Settings > Tools & MCPs > Add a Custom MCP Server. You can also edit the configuration file directly at .cursor/mcp.json in your project's root directory.
Add the Optimizely Analytics server
{
"mcpServers": {
"optimizely-analytics": {
"url": "https://analytics.mcp.opal.optimizely.com/mcp"
}
}
}Authenticate
Cursor prompts the OAuth flow the first time you call an Analytics tool. Sign in with your Optimizely credentials and connect to your Opal instance.
Verify
In Composer or Chat, ask, List my Optimizely Analytics apps. If you see your apps listed, the install is complete.
Claude Code (CLI)
Add the server
Use one of the following two options to add the MCP server:
Option 1: CLI command
Run the following command in your terminal:
claude mcp add --transport http optimizely-analytics https://analytics.mcp.opal.optimizely.com/mcp
Option 2: Configuration file
Create or edit .mcp.json in your project root (for project-scoped access) or ~/.claude/.mcp.json (for global access) and add the following:
{
"mcpServers": {
"optimizely-analytics": {
"type": "http",
"url": "https://analytics.mcp.opal.optimizely.com/mcp"
}
}
}Authenticate
Claude Code opens an OAuth window in your browser the first time you call an Optimizely Analytics tool. Sign in with your Optimizely credentials and connect to your Opal instance.
Verify
Ask Claude, List my Optimizely Analytics apps. If you see your apps listed, the install is complete.
Claude.ai (Web)
Open the Connectors settings
In Claude.ai, go to Settings > Connectors.
Add the Optimizely Analytics server
Click Add custom connector and enter the MCP server URL.
https://analytics.mcp.opal.optimizely.com/mcp
Authenticate
Complete the OAuth flow when prompted, signing in with your Optimizely credentials and connecting to your Opal instance.
Verify
Start a new conversation and ask, List my Optimizely Analytics apps. If you see your apps listed, the install is complete.
Visual Studio Code and GitHub Copilot
Open MCP settings
In Visual Studio Code, open Settings and search for "MCP" under the GitHub Copilot section, or edit your settings.json directly.
Add the Optimizely Analytics server
Add the following to your Visual Studio Code settings.json:
{
"github.copilot.chat.mcpServers": {
"optimizely-analytics": {
"type": "http",
"url": "https://analytics.mcp.opal.optimizely.com/mcp"
}
}
}Authenticate
Visual Studio Code opens a browser window for OAuth the first time you call an Optimizely Analytics tool from Copilot Chat. Sign in with your Optimizely credentials.
Verify
In Copilot Chat, ask, List my Optimizely Analytics apps. If you see your apps listed, the install is complete..
Windsurf
Open MCP configuration
Go to Settings > MCP Servers, or edit .windsurf/mcp.json in your project root.
Add the Optimizely Analytics server
Add the following configuration to the file:
{
"mcpServers": {
"optimizely-analytics": {
"url": "https://analytics.mcp.opal.optimizely.com/mcp"
}
}
}Authenticate
When prompted, complete the OAuth flow by connecting to your Opal instance with your Optimizely credentials.
Verify
Ask Windsurf, List my Optimizely Analytics apps. If apps are returned, the install is complete.
Other clients
Any AI client that supports remote MCP can connect to Analytics MCP server using the same URL and OAuth flow:
https://analytics.mcp.opal.optimizely.com/mcp
Refer to your client's documentation for how to add a remote MCP server.
Remove the MCP server
To disconnect the Analytics MCP server from your AI client, remove the entry you added during configuration.
-
Claude Code – Run
claude mcp remove optimizely-analyticsin your terminal. -
Claude Desktop – Delete the
"optimizely-analytics"block frommcpServersinclaude_desktop_config.json, then restart the app. - Claude.ai – Go to Settings > Connectors and remove the Optimizely Analytics connector.
-
Cursor – Delete the
"optimizely-analytics"block from.cursor/mcp.json. -
Visual Studio Code – Delete the
"optimizely-analytics"block fromsettings.json. -
Windsurf – Delete the
"optimizely-analytics"block from.windsurf/mcp.json.
Common configuration notes
Same server, every platform – All platforms connect to the same MCP server URL and use the same OAuth 2.0 flow. You can connect from more than one client at the same time.
Your permissions carry over – The MCP server uses your Optimizely identity. You see the same apps, events, dashboards, and experiments you can access in the Optimizely Analytics UI. You do not need additional permissions.
Network access – Make sure analytics.mcp.opal.optimizely.com is reachable from your network. If you are behind a corporate proxy or VPN and have trouble connecting, contact your network administrator.
Troubleshoot
Optimizely Analytics server does not display after setup
Check that your configuration file is valid JSON. A missing comma or bracket is the most common cause. Validate the file with a JSON validator, save, and fully restart your AI client.
The OAuth browser window does not open
Some clients only start the OAuth flow when you call an Analytics tool. Try asking List my Optimizely Analytics apps to trigger it. If that does not work, check that your default browser is set correctly in your operating system.
Tools prefixed with oa_ do not display
This usually means authentication did not finish. Call any Analytics tool to retrigger the OAuth flow. If you are already authenticated but the tools still do not appear, remove the server, add it again, and re-authenticate.
Queries return no results or an access error
Confirm your Optimizely account has access to at least one Optimizely Analytics app. The MCP server only returns data for apps you can see in the Optimizely Analytics UI. If access looks correct and the issue persists, contact Optimizely Support.
Article is closed for comments.