Smart Conversion Debugging MCP Server
Helps debug conversion tracking issues across GoHighLevel, Meta CAPI, webhooks, and GTM by providing tools to fetch events, contacts, logs, and perform full analysis.
README
Smart Conversion Debugging MCP Server
An MCP server that helps debug conversion tracking issues across GoHighLevel, Meta CAPI, webhooks, and GTM.
Quick Start
# Install dependencies
npm install
# Test tools locally
node test.js
# Run interactive CLI agent
node agent.js
# Start MCP server (for AI client connections)
node index.js
Available Tools
| Tool | Description |
|---|---|
getWebhookEvents |
Returns stored webhook events |
getGHLContacts |
Fetch contacts from GoHighLevel |
getMetaEvents |
Returns Meta CAPI tracked events |
getGTMEvents |
Returns frontend GTM events |
getSystemLogs |
Returns error logs |
debugConversion |
Full analysis with issues + fixes |
Connecting to MCP Clients
1. Claude Desktop
Edit your Claude Desktop config file:
Windows: %APPDATA%\Claude\claude_desktop_config.json
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"conversion-debugger": {
"command": "node",
"args": ["D:/first mcp server/index.js"],
"env": {
"USE_MOCK_DATA": "true"
}
}
}
}
Restart Claude Desktop after saving. You'll see the tools available in the chat.
2. VS Code with GitHub Copilot
Add to your VS Code settings.json or workspace settings:
{
"github.copilot.chat.mcpServers": {
"conversion-debugger": {
"command": "node",
"args": ["D:/first mcp server/index.js"],
"env": {
"USE_MOCK_DATA": "true"
}
}
}
}
Or create .vscode/mcp.json in your workspace:
{
"servers": {
"conversion-debugger": {
"command": "node",
"args": ["${workspaceFolder}/index.js"],
"env": {
"USE_MOCK_DATA": "true"
}
}
}
}
3. Cursor IDE
Add to Cursor settings (~/.cursor/mcp.json or project .cursor/mcp.json):
{
"mcpServers": {
"conversion-debugger": {
"command": "node",
"args": ["D:/first mcp server/index.js"],
"env": {
"USE_MOCK_DATA": "true"
}
}
}
}
4. Continue.dev
Add to your Continue config (~/.continue/config.json):
{
"experimental": {
"modelContextProtocolServers": [
{
"transport": {
"type": "stdio",
"command": "node",
"args": ["D:/first mcp server/index.js"]
}
}
]
}
}
5. Custom MCP Client (Node.js)
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
import { spawn } from "child_process";
const transport = new StdioClientTransport({
command: "node",
args: ["D:/first mcp server/index.js"],
});
const client = new Client({ name: "my-client", version: "1.0.0" });
await client.connect(transport);
// List available tools
const tools = await client.listTools();
console.log(tools);
// Call a tool
const result = await client.callTool({
name: "debugConversion",
arguments: {},
});
console.log(result);
await client.close();
Environment Variables
Copy .env.example to .env and configure:
# Use mock data (set to false for live API calls)
USE_MOCK_DATA=true
# GoHighLevel
GHL_API_KEY=your_api_key
GHL_LOCATION_ID=your_location_id
# Meta CAPI
META_ACCESS_TOKEN=your_access_token
META_PIXEL_ID=your_pixel_id
Example AI Prompts
Once connected to an MCP client, try these prompts:
-
"Debug my conversion tracking"
- The AI will call
debugConversionand explain the issues
- The AI will call
-
"Show me all GHL contacts from today"
- Calls
getGHLContactswith date filters
- Calls
-
"Compare webhook events with Meta events"
- Calls multiple tools and cross-references data
-
"Why are some conversions not reaching Meta?"
- Full debugging workflow with root cause analysis
Project Structure
first mcp server/
├── index.js # MCP server entry point
├── agent.js # Interactive CLI agent
├── test.js # Tool testing script
├── package.json
├── .env.example
├── config/
│ └── env.js # Environment configuration
├── clients/
│ ├── httpClient.js # HTTP utilities
│ ├── ghlClient.js # GoHighLevel API client
│ └── metaClient.js # Meta CAPI client
├── data/
│ ├── mockData.js # Mock data for testing
│ └── dataProvider.js # Live/mock data switching
└── tools/
├── utils.js
├── getWebhookEvents.js
├── getGHLContacts.js
├── getMetaEvents.js
├── getGTMEvents.js
├── getSystemLogs.js
└── debugConversion.js
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.