Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions deploy.json
Original file line number Diff line number Diff line change
Expand Up @@ -420,5 +420,14 @@
"veo/**",
"shared/**"
]
},
"vwo": {
"site": "vwo",
"entrypoint": "./dist/server/main.js",
"platformName": "kubernetes-bun",
"watch": [
"vwo/**",
"shared/**"
]
}
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
"virtual-try-on",
"vtex",
"vtex-docs",
"vwo",
"whatsapp",
"whatsapp-management",
"whisper"
Expand Down
33 changes: 33 additions & 0 deletions vwo/.gitignore
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

13 changes: 13 additions & 0 deletions vwo/README.md
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
Comment thread
cubic-dev-ai[bot] marked this conversation as resolved.
Outdated
5. Test with `bun run dev`

See [template-minimal/README.md](../template-minimal/README.md) for detailed instructions.
33 changes: 33 additions & 0 deletions vwo/app.json
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."
}
}
25 changes: 25 additions & 0 deletions vwo/app.json.example
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]."
}
}

26 changes: 26 additions & 0 deletions vwo/package.json
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"
}
}
1 change: 1 addition & 0 deletions vwo/server/constants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const VWO_API_BASE = "https://app.vwo.com/api/v2";
25 changes: 25 additions & 0 deletions vwo/server/lib/env.ts
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) {
Comment thread
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;
}
Loading
Loading