|
This article covers the following: |
Overview
The VWO Model Context Protocol (MCP) server allows you to connect VWO’s experimentation and insights data directly to Gemini Command Line Interface (CLI). By establishing this connection, you can query the campaign data in your VWO account directly from your terminal using natural language in Gemini CLI.
This connection bridges the gap between AI-driven analysis and your optimization workflow. Instead of navigating through the VWO dashboard to find specific campaign details, you can ask Gemini to retrieve reports, check the status of feature flags, or summarize recent experiment results with the terminal.
For example, a developer working in the command-line terminal can quickly query: Give me the last paused campaign in my VWO account. Gemini CLI fetches this data through VWO’S MCP server in real-time and displays a structured report without the user ever leaving their coding environment.
Key Benefits:
- Contextual Efficiency: Access VWO data directly within your developer tools and terminal.
- Natural Language Interaction: Query complex campaign data using simple English commands.
- Unified Workflow: Seamlessly switch between code execution and experimentation analysis.
- Rapid Troubleshooting: Quickly identify the state of campaigns or feature flags during development.
The next section explains a step-by-step procedure to integrate the VWO MCP server with Gemini CLI.
Configure the VWO MCP Server with Gemini CLI
Follow these steps to integrate the VWO MCP server with Gemini CLI:
Step 1 - Install and Authenticate Gemini CLI
To connect VWO’s MCP server with Gemini, you must have the Gemini CLI installed and authenticated in your command line terminal.
For more information, refer to Gemini CLI’s installation and authentication steps.
Step 2: Generate your VWO Developer API Token
The MCP server URL is https://mcp.vwo.io/mcp?key=DEV_API_TOKEN. It contains a placeholder, DEV_API_TOKEN. You must replace this placeholder with your personal Developer API token. This token securely authenticates your requests.
To create your personal API token:
- Log in to your VWO account.
- Scroll down to the bottom of the dashboard and click Developer resources.
- On the Developer Dashboard, go to the Tokens tab.
- Click Add another API token.
-
Enter the Token Name.
- From the Select Permission dropdown, select the permission type as per your requirement, for example, Admin.
Your end users can manage VWO data in Gemini CLI based on the permissions assigned to the token. You can select from the following permissions to manage how end users interact with VWO data through the MCP server.
| Permission | Description |
| Browse |
Grants read-only access to VWO data for Session Recordings, Heatmaps, and Split URL, Multivariate, and A/B tests. Users with this permission cannot perform any edit operations. |
| Design | Enables users to create new A/B or Split URL tests via the MCP. |
| Publish/Admin | Provides full control to create, edit, start, pause, or delete A/B tests and Split URL tests. |
- After selecting the permission, click Generate. Once you click Generate, a token appears. Use this newly generated token in the DEV_API_TOKEN placeholder in the MCP server URL (https://mcp.vwo.io/mcp?key=DEV_API_TOKEN) to form the complete URL.
After replacing the placeholder in the MCP URL with your API token, your complete MCP server URL is formed and ready. You can now use it in your Gemini CLI for establishing the connection with VWO’s MCP server .
Step 3: Connect the VWO MCP Server in Gemini CLI
- Open a new terminal session on your system.
-
Run the following command to establish a connection with the VWO MCP server:
gemini mcp add vwo "https://mcp.vwo.io/mcp?key=[DEV-API-TOKEN]" --transport http
Ensure you replace [DEV-API-TOKEN] with the token you generated in Step 2.
- A confirmation message MCP server "vwo" added to project settings appears upon successful connection.
The next section explains how to verify if the VWO MCP connection is working correctly in Gemini CLI.
Verify the VWO MCP Connection
To ensure Gemini CLI can successfully communicate with your VWO account, follow these steps:
- In the terminal, enter the command - gemini to enter Gemini CLI.
-
Run the command /mcp to list all configured servers.
Verify that vwo appears in the list of active MCP servers along with its available tools, such as mcp_vwo_get_campaigns_overview_tool and mcp_create_ab_campaign.
Alternatively, you can verify the connection by running a sample prompt in the terminal. For example, Give me the last paused campaign in my VWO account.
Gemini will fetch the data and display a table containing the Campaign ID, Name, Status, and Creation Date directly in the terminal.
Troubleshooting
| Issue | Possible Cause | Recommended Solution |
| MCP server connection fails. | Incorrect URL or expired token. | Verify that the MCP URL and token you entered in the command are accurate when connecting to the MCP server, as explained in Step 3. Ensure the --transport http flag is included. |
| VWO MCP tools are not appearing in the Gemini CLI. | Connection timeout or network restrictions. | Check your internet connection and ensure your firewall allows outgoing requests to the VWO MCP endpoint. |
FAQs
-
Do I need to add the VWO MCP server every time I open the terminal?
No. Once added, the configuration is saved in your Gemini local settings. You only need to run the gemini command to start interacting with the server.
-
What should I do if the MCP server stops responding?
You can try removing and re-adding the VWO MCP server using the gemini mcp remove vwo and gemini mcp add commands, respectively.
Need more help?
For further assistance or more information, contact VWO Support.