-
Notifications
You must be signed in to change notification settings - Fork 4
feat(vwo): add VWO MCP for A/B testing and experiments #313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
viniciusventura29
wants to merge
3
commits into
main
Choose a base branch
from
viniciusventura29/vwo-mcp
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -70,6 +70,7 @@ | |
| "virtual-try-on", | ||
| "vtex", | ||
| "vtex-docs", | ||
| "vwo", | ||
| "whatsapp", | ||
| "whatsapp-management", | ||
| "whisper" | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| # Dependencies | ||
| node_modules/ | ||
|
|
||
| # Build output | ||
| dist/ | ||
|
|
||
| # Environment | ||
| .env | ||
| .env.local | ||
|
|
||
| # OS files | ||
| .DS_Store | ||
| Thumbs.db | ||
|
|
||
| # IDE | ||
| .vscode/ | ||
| .idea/ | ||
|
|
||
| # Logs | ||
| *.log | ||
| npm-debug.log* | ||
| yarn-debug.log* | ||
| yarn-error.log* | ||
|
|
||
| # Data | ||
| data/ | ||
| *.db | ||
| *.sqlite | ||
|
|
||
| # Template files | ||
| # Note: Keep app.json.example, ignore app.json if it's just a copy | ||
| # app.json | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # vwo | ||
|
|
||
| Connect AI agents to VWO for A/B testing, experiment management, and optimization insights. | ||
|
|
||
| ## Getting Started | ||
|
|
||
| 1. Configure your MCP in `server/types/env.ts` | ||
| 2. Implement tools in `server/tools/` | ||
| 3. Rename `app.json.example` to `app.json` and customize | ||
| 4. Add to `deploy.json` for deployment | ||
| 5. Test with `bun run dev` | ||
|
|
||
| See [template-minimal/README.md](../template-minimal/README.md) for detailed instructions. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| { | ||
| "scopeName": "deco", | ||
| "name": "vwo", | ||
| "friendlyName": "VWO (Visual Website Optimizer)", | ||
| "connection": { | ||
| "type": "HTTP", | ||
| "url": "https://sites-vwo.decocache.com/mcp" | ||
| }, | ||
| "description": "Connect AI agents to VWO for A/B testing, experiment management, and optimization insights.", | ||
| "icon": "https://assets.decocache.com/mcp/{uuid}/icon.png", | ||
| "unlisted": false, | ||
| "auth": { | ||
| "type": "token", | ||
| "header": "Authorization", | ||
| "prefix": "Bearer" | ||
| }, | ||
| "metadata": { | ||
| "categories": [ | ||
| "Analytics", | ||
| "Marketing" | ||
| ], | ||
| "official": false, | ||
| "tags": [ | ||
| "vwo", | ||
| "ab-testing", | ||
| "experiments", | ||
| "feature-flags", | ||
| "optimization" | ||
| ], | ||
| "short_description": "VWO A/B testing, experiments, and feature flag management.", | ||
| "mesh_description": "The VWO MCP provides AI agents with access to VWO's REST API for managing A/B testing campaigns, feature flags, and optimization experiments. **Key Features** - List and inspect campaigns with detailed variation data. - Track goals and conversion metrics per campaign. - Manage feature flags with environment-specific rules. - Access metric reports for experiment analysis. - View workspaces, users, websites, and drafts. **Authentication** - Uses a VWO API token generated at https://app.vwo.com/#/developers/tokens. Perfect for teams automating experiment analysis and collecting A/B testing insights." | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| { | ||
| "scopeName": "deco", | ||
| "name": "my-mcp", | ||
| "friendlyName": "My MCP", | ||
| "connection": { | ||
| "type": "HTTP", | ||
| "url": "https://sites-my-mcp.decocache.com/mcp" | ||
| }, | ||
| "description": "Short description of what this MCP does (1-2 sentences)", | ||
| "icon": "https://assets.decocache.com/mcp/{uuid}/icon.png", | ||
| "unlisted": false, | ||
| "auth": { | ||
| "type": "token", | ||
| "header": "Authorization", | ||
| "prefix": "Bearer" | ||
| }, | ||
| "metadata": { | ||
| "categories": ["Productivity"], | ||
| "official": false, | ||
| "tags": ["example", "template", "mcp"], | ||
| "short_description": "Short description of what this MCP does", | ||
| "mesh_description": "Detailed description of your MCP (max 1500 characters). Explain what it does, key features, use cases, and authentication method. Use **bold** for feature names. Example: **Key Features** - Feature 1 description. **Use Cases** - Use case description. **Authentication** - How to authenticate. Perfect for developers who need [your use case]. Provides [your benefit]." | ||
| } | ||
| } | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| { | ||
| "name": "vwo", | ||
| "version": "1.0.0", | ||
| "description": "Connect AI agents to VWO for A/B testing, experiment management, and optimization insights.", | ||
| "private": true, | ||
| "type": "module", | ||
| "scripts": { | ||
| "dev": "bun run --hot server/main.ts", | ||
| "check": "tsc --noEmit", | ||
| "build:server": "NODE_ENV=production bun build server/main.ts --target=bun --outfile=dist/server/main.js", | ||
| "build": "bun run build:server" | ||
| }, | ||
| "dependencies": { | ||
| "@decocms/runtime": "1.2.8", | ||
| "zod": "^4.0.0" | ||
| }, | ||
| "devDependencies": { | ||
| "@decocms/mcps-shared": "1.0.0", | ||
| "@modelcontextprotocol/sdk": "^1.25.1", | ||
| "deco-cli": "^0.28.0", | ||
| "typescript": "^5.7.2" | ||
| }, | ||
| "engines": { | ||
| "node": ">=22.0.0" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| export const VWO_API_BASE = "https://app.vwo.com/api/v2"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| import type { Env } from "../types/env.ts"; | ||
|
|
||
| export function getApiToken(env: Env): string { | ||
| const auth = env.MESH_REQUEST_CONTEXT?.authorization; | ||
| if (!auth) { | ||
| throw new Error( | ||
| "Missing authorization header. Please provide your VWO API token.", | ||
| ); | ||
| } | ||
| const match = auth.match(/^Bearer\s+(.+)$/i); | ||
| if (!match || !match[1].trim()) { | ||
| throw new Error("Invalid authorization header. Expected Bearer token."); | ||
| } | ||
| return match[1].trim(); | ||
| } | ||
|
|
||
| export function getAccountId(env: Env, override?: string): string { | ||
| const id = override || env.MESH_REQUEST_CONTEXT?.state?.accountId; | ||
| if (!id) { | ||
|
cubic-dev-ai[bot] marked this conversation as resolved.
|
||
| throw new Error( | ||
| "Account ID is required. Provide it as a parameter or configure it in the MCP settings.", | ||
| ); | ||
| } | ||
| return id; | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.