@convertcom/mcp-server 0.0.1-beta.3 → 0.0.1-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.assets/logo-dark.svg +20 -0
- package/.assets/logo-light.svg +20 -0
- package/README.md +167 -190
- package/build/api-config.js +1 -4
- package/build/api-config.js.map +1 -1
- package/build/debug-log.d.ts +6 -0
- package/build/debug-log.js +46 -0
- package/build/debug-log.js.map +1 -0
- package/build/executor.d.ts +5 -0
- package/build/executor.js +173 -0
- package/build/executor.js.map +1 -0
- package/build/index.d.ts +6 -0
- package/build/index.js +162 -235
- package/build/index.js.map +1 -1
- package/build/kb-search.d.ts +16 -0
- package/build/kb-search.js +73 -0
- package/build/kb-search.js.map +1 -0
- package/build/namespaced.d.ts +4 -0
- package/build/namespaced.js +257 -0
- package/build/namespaced.js.map +1 -0
- package/build/tools.d.ts +3 -0
- package/build/tools.js +917 -517
- package/build/tools.js.map +1 -1
- package/data/convert-kb.json +26397 -0
- package/package.json +22 -5
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 153 33">
|
|
2
|
+
<g fill="#FFFFFF">
|
|
3
|
+
<path
|
|
4
|
+
d="M17.94 24.823h4.699c-.69 2.634-2.007 4.64-3.947 6.018C16.748 32.283 14.308 33 11.365 33c-3.57 0-6.355-1.157-8.36-3.475C1 27.27 0 24.04 0 19.837c0-4.009.968-7.142 2.912-9.397 2-2.319 4.79-3.482 8.36-3.482 3.76 0 6.668 1.13 8.736 3.385 1.127 1.38 1.94 2.978 2.444 4.794h-6.578c-.314-.624-.626-1.092-.936-1.409-.82-.878-1.976-1.317-3.476-1.317-1.382 0-2.508.44-3.383 1.317-1.127 1.254-1.691 3.327-1.691 6.21 0 2.88.564 4.915 1.69 6.107.81 1.002 2.03 1.503 3.664 1.503 1.065 0 1.968-.217 2.724-.657.188-.061.358-.173.514-.329.158-.16.329-.33.52-.517.122-.19.374-.438.748-.752.381-.31.942-.47 1.692-.47"></path>
|
|
5
|
+
<path fill-rule="evenodd" clip-rule="evenodd"
|
|
6
|
+
d="M24.314 25.72c.561 1.912 1.505 3.43 2.818 4.557 1.252 1.127 2.931 1.928 5.029 2.394 2.095.474 4.18.43 6.246-.138 2.314-.502 4.225-1.788 5.735-3.855.681-1.002 1.25-2.222 1.688-3.663.436-1.442.655-3.166.655-5.178 0-2.756-.535-5.165-1.6-7.236-1.124-2.316-2.876-3.95-5.255-4.888-2.066-.756-4.384-.955-6.953-.613-2.569.346-4.667 1.46-6.294 3.34-1.007 1.124-1.74 2.539-2.214 4.232a19.12 19.12 0 00-.7 5.078c0 2.06.28 4.056.845 5.97zm5.549-5.55c-.129-2.853.464-4.998 1.779-6.442.438-.436 1.13-.798 2.068-1.081a4.58 4.58 0 012.815.048c.942.316 1.775 1.033 2.491 2.164.724 1.127 1.081 2.82 1.081 5.078-.06 2.503-.467 4.321-1.22 5.449-.751 1.127-1.617 1.832-2.585 2.117a4.47 4.47 0 01-2.867-.097c-.935-.342-1.594-.763-1.968-1.267-.942-1.124-1.475-3.113-1.594-5.97z"></path>
|
|
7
|
+
<path
|
|
8
|
+
d="M69.311 32.534h-3.285c-.94 0-1.708-.3-2.302-.895-.597-.598-.89-1.362-.89-2.302V16.552c0-1.505-.458-2.604-1.366-3.295a4.928 4.928 0 00-3.054-1.034 4.73 4.73 0 00-3.004 1.034c-.878.69-1.317 1.79-1.317 3.295v15.982h-6.572V17.867c0-4.26 1.107-7.113 3.334-8.558 2.221-1.44 4.677-2.222 7.373-2.351 2.756 0 5.29.723 7.61 2.164 2.318 1.44 3.473 4.358 3.473 8.745v14.667z"></path>
|
|
9
|
+
<path fill-rule="evenodd" clip-rule="evenodd"
|
|
10
|
+
d="M118.667 24.823h-4.698c-.747 0-1.333.159-1.735.47-.408.314-.647.562-.704.752l-.148.147-.372.37a1.33 1.33 0 01-.517.33c-.751.44-1.659.656-2.722.656-1.629 0-2.855-.501-3.666-1.503-.877-.94-1.346-2.383-1.406-4.326h16.249c.064-.123.095-.341.095-.658v-1.034c0-4.134-.999-7.362-3.003-9.684-2.071-2.255-4.982-3.385-8.742-3.385-3.563 0-6.355 1.163-8.357 3.482-1.942 2.255-2.917 5.388-2.917 9.397 0 4.203 1.003 7.433 3.008 9.688 2.004 2.318 4.794 3.475 8.362 3.475 2.945 0 5.388-.718 7.331-2.16 1.936-1.378 3.254-3.384 3.942-6.017zm-6.389-7.335h-9.579c.06-1.628.529-2.88 1.407-3.76.878-.878 2.003-1.317 3.38-1.317 1.504 0 2.662.44 3.48 1.317.751.814 1.186 2.067 1.312 3.76z"></path>
|
|
11
|
+
<path
|
|
12
|
+
d="M120.077 32.533V20.402c0-2.442.362-4.494 1.08-6.157.721-1.66 1.705-2.991 2.96-3.992 1.19-.944 2.583-1.632 4.182-2.07a18.552 18.552 0 014.928-.66H134.168V14.2h-2.158c-1.818 0-3.168.44-4.04 1.311-.879.882-1.318 2.262-1.318 4.142v12.88h-6.575zM145.907 32.533c-2.062.121-4.304.093-6.713-.095-2.414-.188-3.614-1.723-3.614-4.606V.187h3.381c.81 0 1.533.317 2.158.943.627.627.941 1.38.941 2.258v4.229h3.846v1.317c0 .937-.31 1.706-.933 2.304a3.163 3.163 0 01-2.257.894h-.655v13.913c0 1.063.621 1.598 1.878 1.598h1.967v4.89h.001z"></path>
|
|
13
|
+
<path opacity=".5" d="M71.839 8.985l-1.47 3.61 3.073 6.95 3.341-8.689-4.944-1.871z"
|
|
14
|
+
fill="inherit"></path>
|
|
15
|
+
<path opacity=".75" d="M80.39 8.316l-5.478 14.438 3.073 7.085 7.617-19.517-5.211-2.006z"
|
|
16
|
+
fill="inherit"></path>
|
|
17
|
+
<path
|
|
18
|
+
d="M96.025 10.322L94.42 1.098l-7.35 5.614 2.005.802-9.754 25.266h5.612L94.02 9.52l2.005.802zM149.906 3.124c-1.492 0-2.7 1.226-2.7 2.715 0 1.5 1.208 2.714 2.7 2.714a2.715 2.715 0 000-5.43zm0 4.904a2.176 2.176 0 01-2.178-2.19c0-1.204.969-2.189 2.178-2.189a2.19 2.19 0 010 4.379zm1.198-.887c-.577-1.062-.544-1.007-.577-1.05.261-.154.425-.46.425-.81 0-.57-.327-.931-1.1-.931h-.861a.132.132 0 00-.13.131v2.715c0 .077.054.131.13.131h.425a.133.133 0 00.131-.131v-.909h.348l.512.975c.022.043.076.065.12.065h.457c.109 0 .164-.098.12-.186zm-1.198-1.478h-.359v-.7h.294c.348 0 .424.131.424.35 0 .23-.13.35-.359.35z"></path>
|
|
19
|
+
</g>
|
|
20
|
+
</svg>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 153 33">
|
|
2
|
+
<g fill="#24292F">
|
|
3
|
+
<path
|
|
4
|
+
d="M17.94 24.823h4.699c-.69 2.634-2.007 4.64-3.947 6.018C16.748 32.283 14.308 33 11.365 33c-3.57 0-6.355-1.157-8.36-3.475C1 27.27 0 24.04 0 19.837c0-4.009.968-7.142 2.912-9.397 2-2.319 4.79-3.482 8.36-3.482 3.76 0 6.668 1.13 8.736 3.385 1.127 1.38 1.94 2.978 2.444 4.794h-6.578c-.314-.624-.626-1.092-.936-1.409-.82-.878-1.976-1.317-3.476-1.317-1.382 0-2.508.44-3.383 1.317-1.127 1.254-1.691 3.327-1.691 6.21 0 2.88.564 4.915 1.69 6.107.81 1.002 2.03 1.503 3.664 1.503 1.065 0 1.968-.217 2.724-.657.188-.061.358-.173.514-.329.158-.16.329-.33.52-.517.122-.19.374-.438.748-.752.381-.31.942-.47 1.692-.47"></path>
|
|
5
|
+
<path fill-rule="evenodd" clip-rule="evenodd"
|
|
6
|
+
d="M24.314 25.72c.561 1.912 1.505 3.43 2.818 4.557 1.252 1.127 2.931 1.928 5.029 2.394 2.095.474 4.18.43 6.246-.138 2.314-.502 4.225-1.788 5.735-3.855.681-1.002 1.25-2.222 1.688-3.663.436-1.442.655-3.166.655-5.178 0-2.756-.535-5.165-1.6-7.236-1.124-2.316-2.876-3.95-5.255-4.888-2.066-.756-4.384-.955-6.953-.613-2.569.346-4.667 1.46-6.294 3.34-1.007 1.124-1.74 2.539-2.214 4.232a19.12 19.12 0 00-.7 5.078c0 2.06.28 4.056.845 5.97zm5.549-5.55c-.129-2.853.464-4.998 1.779-6.442.438-.436 1.13-.798 2.068-1.081a4.58 4.58 0 012.815.048c.942.316 1.775 1.033 2.491 2.164.724 1.127 1.081 2.82 1.081 5.078-.06 2.503-.467 4.321-1.22 5.449-.751 1.127-1.617 1.832-2.585 2.117a4.47 4.47 0 01-2.867-.097c-.935-.342-1.594-.763-1.968-1.267-.942-1.124-1.475-3.113-1.594-5.97z"></path>
|
|
7
|
+
<path
|
|
8
|
+
d="M69.311 32.534h-3.285c-.94 0-1.708-.3-2.302-.895-.597-.598-.89-1.362-.89-2.302V16.552c0-1.505-.458-2.604-1.366-3.295a4.928 4.928 0 00-3.054-1.034 4.73 4.73 0 00-3.004 1.034c-.878.69-1.317 1.79-1.317 3.295v15.982h-6.572V17.867c0-4.26 1.107-7.113 3.334-8.558 2.221-1.44 4.677-2.222 7.373-2.351 2.756 0 5.29.723 7.61 2.164 2.318 1.44 3.473 4.358 3.473 8.745v14.667z"></path>
|
|
9
|
+
<path fill-rule="evenodd" clip-rule="evenodd"
|
|
10
|
+
d="M118.667 24.823h-4.698c-.747 0-1.333.159-1.735.47-.408.314-.647.562-.704.752l-.148.147-.372.37a1.33 1.33 0 01-.517.33c-.751.44-1.659.656-2.722.656-1.629 0-2.855-.501-3.666-1.503-.877-.94-1.346-2.383-1.406-4.326h16.249c.064-.123.095-.341.095-.658v-1.034c0-4.134-.999-7.362-3.003-9.684-2.071-2.255-4.982-3.385-8.742-3.385-3.563 0-6.355 1.163-8.357 3.482-1.942 2.255-2.917 5.388-2.917 9.397 0 4.203 1.003 7.433 3.008 9.688 2.004 2.318 4.794 3.475 8.362 3.475 2.945 0 5.388-.718 7.331-2.16 1.936-1.378 3.254-3.384 3.942-6.017zm-6.389-7.335h-9.579c.06-1.628.529-2.88 1.407-3.76.878-.878 2.003-1.317 3.38-1.317 1.504 0 2.662.44 3.48 1.317.751.814 1.186 2.067 1.312 3.76z"></path>
|
|
11
|
+
<path
|
|
12
|
+
d="M120.077 32.533V20.402c0-2.442.362-4.494 1.08-6.157.721-1.66 1.705-2.991 2.96-3.992 1.19-.944 2.583-1.632 4.182-2.07a18.552 18.552 0 014.928-.66H134.168V14.2h-2.158c-1.818 0-3.168.44-4.04 1.311-.879.882-1.318 2.262-1.318 4.142v12.88h-6.575zM145.907 32.533c-2.062.121-4.304.093-6.713-.095-2.414-.188-3.614-1.723-3.614-4.606V.187h3.381c.81 0 1.533.317 2.158.943.627.627.941 1.38.941 2.258v4.229h3.846v1.317c0 .937-.31 1.706-.933 2.304a3.163 3.163 0 01-2.257.894h-.655v13.913c0 1.063.621 1.598 1.878 1.598h1.967v4.89h.001z"></path>
|
|
13
|
+
<path opacity=".5" d="M71.839 8.985l-1.47 3.61 3.073 6.95 3.341-8.689-4.944-1.871z"
|
|
14
|
+
fill="inherit"></path>
|
|
15
|
+
<path opacity=".75" d="M80.39 8.316l-5.478 14.438 3.073 7.085 7.617-19.517-5.211-2.006z"
|
|
16
|
+
fill="inherit"></path>
|
|
17
|
+
<path
|
|
18
|
+
d="M96.025 10.322L94.42 1.098l-7.35 5.614 2.005.802-9.754 25.266h5.612L94.02 9.52l2.005.802zM149.906 3.124c-1.492 0-2.7 1.226-2.7 2.715 0 1.5 1.208 2.714 2.7 2.714a2.715 2.715 0 000-5.43zm0 4.904a2.176 2.176 0 01-2.178-2.19c0-1.204.969-2.189 2.178-2.189a2.19 2.19 0 010 4.379zm1.198-.887c-.577-1.062-.544-1.007-.577-1.05.261-.154.425-.46.425-.81 0-.57-.327-.931-1.1-.931h-.861a.132.132 0 00-.13.131v2.715c0 .077.054.131.13.131h.425a.133.133 0 00.131-.131v-.909h.348l.512.975c.022.043.076.065.12.065h.457c.109 0 .164-.098.12-.186zm-1.198-1.478h-.359v-.7h.294c.348 0 .424.131.424.35 0 .23-.13.35-.359.35z"></path>
|
|
19
|
+
</g>
|
|
20
|
+
</svg>
|
package/README.md
CHANGED
|
@@ -1,64 +1,125 @@
|
|
|
1
1
|
# Convert MCP Server
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<div align="center">
|
|
4
|
+
|
|
5
|
+
<a href="https://www.convert.com">
|
|
6
|
+
<picture>
|
|
7
|
+
<source media="(prefers-color-scheme: dark)" srcset=".assets/logo-dark.svg">
|
|
8
|
+
<source media="(prefers-color-scheme: light)" srcset=".assets/logo-light.svg">
|
|
9
|
+
<img alt="Convert Insights, Inc." src=".assets/logo-light.svg" width="250">
|
|
10
|
+
</picture>
|
|
11
|
+
</a>
|
|
12
|
+
|
|
13
|
+
[](https://www.npmjs.com/package/@convertcom/mcp-server)
|
|
14
|
+
[](https://www.typescriptlang.org/)
|
|
15
|
+
[](https://nodejs.org/)
|
|
16
|
+
[](https://modelcontextprotocol.io)
|
|
17
|
+
|
|
18
|
+
**Connect Claude, Cursor, and other AI assistants to your Convert account**
|
|
19
|
+
|
|
20
|
+
</div>
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## 🌟 Overview
|
|
25
|
+
|
|
26
|
+
The Convert MCP server lets AI assistants explore your Convert account without custom integrations. Once connected, the assistant can answer questions, surface insights, and (if you permit) manage entities such as experiences, audiences, and goals.
|
|
4
27
|
|
|
5
28
|
**What is MCP?**
|
|
6
29
|
|
|
7
|
-
MCP (Model Context Protocol) is an
|
|
30
|
+
MCP (Model Context Protocol) is an open standard that allows AI models to interact with applications through a consistent interface. It acts as a bridge, letting AI assistants access your Convert data without needing to understand specific API protocols.
|
|
31
|
+
|
|
32
|
+
**Key Benefits:**
|
|
33
|
+
- 🔌 **Zero-config integration** – Works with Claude Desktop, Cursor, and any MCP-compatible client
|
|
34
|
+
- 🔍 **Full API access** – Comprehensive coverage of Convert's [REST API v2](https://api.convert.com/doc/v2.0.0/)
|
|
35
|
+
- 📚 **Built-in knowledge** – 5,279+ indexed chunks from Convert support documentation
|
|
36
|
+
- 🛡️ **Configurable permissions** – Three access levels from reporting-only to full read/write
|
|
37
|
+
- 🧩 **Namespaced tools** – Clean interface with 13 namespaces instead of 96+ individual tools
|
|
8
38
|
|
|
9
39
|
---
|
|
10
40
|
|
|
11
|
-
##
|
|
41
|
+
## 📚 Table of Contents
|
|
12
42
|
|
|
13
|
-
|
|
43
|
+
- [🚀 Quick Start](#-quick-start)
|
|
44
|
+
- [🔧 Installation Options](#-installation-options)
|
|
45
|
+
- [🔗 Client Integration](#-client-integration)
|
|
46
|
+
- [🛠 Available Tools](#-available-tools)
|
|
47
|
+
- [📊 Example Prompts](#-example-prompts)
|
|
48
|
+
- [🔐 Authentication & Security](#-authentication--security)
|
|
49
|
+
- [❓ Troubleshooting](#-troubleshooting)
|
|
14
50
|
|
|
15
|
-
|
|
51
|
+
---
|
|
16
52
|
|
|
17
|
-
|
|
18
|
-
- Go to Settings → Integrations → API
|
|
19
|
-
- Generate or copy your Application ID and Secret Key
|
|
20
|
-
- _Consider starting with read-only access (`TOOLS_FOR_CLIENT=reporting` or `TOOLS_FOR_CLIENT=readOnly` mod - see below)_
|
|
53
|
+
## 🚀 Quick Start
|
|
21
54
|
|
|
22
|
-
###
|
|
55
|
+
### What you need
|
|
23
56
|
|
|
24
|
-
|
|
57
|
+
1. **Convert API credentials** – In Convert, go to **Settings → Integrations → API** and copy your Application ID and Secret Key.
|
|
58
|
+
2. **Node.js 20+** – Only required if you run the server from source.
|
|
59
|
+
3. **Access level** – Set `TOOLS_FOR_CLIENT` to control what the assistant can do:
|
|
60
|
+
- `reporting` (default) – basic analytics and read-only summaries
|
|
61
|
+
- `readOnly` – detailed configuration data without modifying anything
|
|
62
|
+
- `all` – read/write access (only use when you explicitly want the assistant to make changes)
|
|
25
63
|
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## 🔧 Installation Options
|
|
67
|
+
|
|
68
|
+
### Option A – Run instantly with npx (recommended)
|
|
26
69
|
```bash
|
|
27
|
-
|
|
28
|
-
npx @convertcom/mcp-server
|
|
70
|
+
npx -y @convertcom/mcp-server@latest
|
|
29
71
|
```
|
|
30
72
|
|
|
31
|
-
|
|
73
|
+
### Option B – Install globally
|
|
74
|
+
```bash
|
|
75
|
+
npm install -g @convertcom/mcp-server@latest
|
|
76
|
+
convert-mcp
|
|
77
|
+
```
|
|
32
78
|
|
|
79
|
+
### Option C – Run from source (developers)
|
|
33
80
|
```bash
|
|
34
|
-
|
|
35
|
-
|
|
81
|
+
git clone https://github.com/convertcom/convert-mcp.git
|
|
82
|
+
cd convert-mcp/packages/server
|
|
83
|
+
yarn install
|
|
84
|
+
yarn build
|
|
85
|
+
node build/index.js
|
|
86
|
+
```
|
|
36
87
|
|
|
37
|
-
|
|
38
|
-
|
|
88
|
+
Before launching, export these variables (or set them in your MCP client config):
|
|
89
|
+
```bash
|
|
90
|
+
export CONVERT_API_KEY=your_application_id
|
|
91
|
+
export CONVERT_API_SECRET=your_secret_key
|
|
92
|
+
export TOOLS_FOR_CLIENT=reporting # or readOnly / all
|
|
39
93
|
```
|
|
40
94
|
|
|
41
95
|
---
|
|
42
96
|
|
|
43
|
-
##
|
|
97
|
+
## 🔗 Client Integration
|
|
98
|
+
|
|
99
|
+
The server implements the [Model Context Protocol](https://modelcontextprotocol.io) and works with Claude Desktop, Cursor, and any MCP-compatible client.
|
|
100
|
+
|
|
101
|
+
### Recommended Models
|
|
44
102
|
|
|
45
|
-
|
|
103
|
+
For the best experience, use models with strong agentic capabilities:
|
|
104
|
+
- **Claude Sonnet 4.5** or newer
|
|
105
|
+
- **GPT-5** or newer
|
|
106
|
+
- Other frontier models with multi-step reasoning abilities
|
|
46
107
|
|
|
47
|
-
|
|
108
|
+
**Enable extended thinking** – Extended thinking is a special reasoning mode that significantly improves MCP tool calling, multi-step workflows, and complex API interactions. Enable it in your client settings if available.
|
|
48
109
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
110
|
+
### Configuration
|
|
111
|
+
|
|
112
|
+
Add this configuration to your MCP settings file:
|
|
52
113
|
|
|
53
114
|
```json
|
|
54
115
|
{
|
|
55
116
|
"mcpServers": {
|
|
56
117
|
"convert": {
|
|
57
118
|
"command": "npx",
|
|
58
|
-
"args": ["-y", "@convertcom/mcp-server"],
|
|
119
|
+
"args": ["-y", "@convertcom/mcp-server@latest"],
|
|
59
120
|
"env": {
|
|
60
|
-
"CONVERT_API_KEY": "
|
|
61
|
-
"CONVERT_API_SECRET": "
|
|
121
|
+
"CONVERT_API_KEY": "your_application_id",
|
|
122
|
+
"CONVERT_API_SECRET": "your_secret_key",
|
|
62
123
|
"TOOLS_FOR_CLIENT": "reporting"
|
|
63
124
|
}
|
|
64
125
|
}
|
|
@@ -66,45 +127,66 @@ mcp-server-convert
|
|
|
66
127
|
}
|
|
67
128
|
```
|
|
68
129
|
|
|
69
|
-
|
|
130
|
+
**Configuration file locations:**
|
|
131
|
+
- **Claude Desktop**: `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows)
|
|
132
|
+
- **Cursor**: `.cursor/mcp.json` in your project directory
|
|
133
|
+
- **Other clients**: Refer to your client's documentation for MCP server configuration
|
|
70
134
|
|
|
71
|
-
|
|
135
|
+
Save the file and restart your client to activate the Convert tools.
|
|
72
136
|
|
|
73
|
-
###
|
|
137
|
+
### Environment Variables
|
|
74
138
|
|
|
75
|
-
|
|
139
|
+
| Variable | Required | Description | Default |
|
|
140
|
+
| -------------------- | -------- | ----------------------------------------------- | ----------- |
|
|
141
|
+
| `CONVERT_API_KEY` | ✅ | Your Convert **Application ID** | - |
|
|
142
|
+
| `CONVERT_API_SECRET` | ✅ | Your Convert **Secret Key** | - |
|
|
143
|
+
| `TOOLS_FOR_CLIENT` | | Access level: `reporting`, `readOnly`, or `all` | `reporting` |
|
|
76
144
|
|
|
77
|
-
|
|
78
|
-
mkdir -p .cursor && touch .cursor/mcp.json
|
|
79
|
-
```
|
|
145
|
+
---
|
|
80
146
|
|
|
81
|
-
|
|
147
|
+
## 🛠 What You Can Do
|
|
82
148
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}
|
|
97
|
-
```
|
|
149
|
+
Once connected, your AI assistant can:
|
|
150
|
+
|
|
151
|
+
- 📊 **View experiment performance** – Get real-time stats on your A/B tests and experiences
|
|
152
|
+
- 🎯 **Analyze goals and conversions** – See which goals are tracking and how they're performing
|
|
153
|
+
- 👥 **Explore audience segments** – Understand your targeting rules and segmentation
|
|
154
|
+
- 🔍 **Search Convert documentation** – The assistant has instant access to Convert's full support library
|
|
155
|
+
- 📈 **Access account analytics** – Review live data, history, and visitor tracking
|
|
156
|
+
- ⚙️ **Manage experiments** – Create, update, or pause experiences *(requires `TOOLS_FOR_CLIENT=all`)*
|
|
157
|
+
|
|
158
|
+
The assistant doesn't need to know technical details—just ask questions in plain English.
|
|
159
|
+
|
|
160
|
+
<details>
|
|
161
|
+
<summary><b>13 Available Namespaces</b></summary>
|
|
98
162
|
|
|
99
|
-
|
|
163
|
+
| Namespace | Reporting & readOnly actions | Extra actions in `all` |
|
|
164
|
+
| --- | --- | --- |
|
|
165
|
+
| `accounts` | list, get, get_live_data, get_history, list_users_accesses, list_api_keys, list_sdk_keys | create_sdk_key |
|
|
166
|
+
| `projects` | list, get, get_live_data, get_history | create, update |
|
|
167
|
+
| `domains` | list, get, get_by_url, check_code | create, update, delete |
|
|
168
|
+
| `experiences` | list, get, get_by_key, get_live_data, get_history, aggregated_report, daily_report, daily_traffic_allocation, get_variation_screenshot, get_change | create, clone, update, update_variation, upload_variation_screenshot, convert_variation, update_change |
|
|
169
|
+
| `sections` | list | create, update, update_experience_sections, add_version, update_version |
|
|
170
|
+
| `goals` | list, get, get_by_key | create, update, delete, clone |
|
|
171
|
+
| `tags` | list, get | create, update, delete |
|
|
172
|
+
| `hypotheses` | list, get | create, update, update_status, convert, delete |
|
|
173
|
+
| `knowledgebases` | list, get | create, update, delete |
|
|
174
|
+
| `observations` | list, get | create, update, delete |
|
|
175
|
+
| `locations` | list, get, presets | create, update, delete, clone |
|
|
176
|
+
| `audiences` | list, get, presets | create, update, delete, clone |
|
|
177
|
+
| `features` | list, get, get_by_key | create, update, delete |
|
|
178
|
+
|
|
179
|
+
</details>
|
|
180
|
+
|
|
181
|
+
**Access Control**: With `TOOLS_FOR_CLIENT=all`, additional write actions (create/update/delete) become available. Keep permissions as narrow as possible and escalate only when necessary.
|
|
100
182
|
|
|
101
183
|
---
|
|
102
184
|
|
|
103
|
-
##
|
|
185
|
+
## 📊 Example Prompts
|
|
104
186
|
|
|
105
|
-
Once set up, try these
|
|
187
|
+
Once set up, try these prompts with your AI assistant:
|
|
106
188
|
|
|
107
|
-
### Get Insights from Your
|
|
189
|
+
### Get Insights from Your Data
|
|
108
190
|
|
|
109
191
|
```
|
|
110
192
|
Show me the performance of all active experiments in my account
|
|
@@ -132,170 +214,65 @@ Compare the performance of mobile vs desktop experiments this month
|
|
|
132
214
|
Show me which audience segments are performing best across all active tests
|
|
133
215
|
```
|
|
134
216
|
|
|
135
|
-
###
|
|
217
|
+
### Manage Tests *(Requires `TOOLS_FOR_CLIENT=all`)*
|
|
136
218
|
|
|
137
219
|
```
|
|
138
|
-
Create a new A/B test for the pricing page targeting returning visitors
|
|
220
|
+
Create a new A/B test for the pricing page targeting returning visitors
|
|
139
221
|
```
|
|
140
222
|
|
|
141
223
|
```
|
|
142
|
-
|
|
224
|
+
Update the traffic split on experience 789 to 50/50
|
|
143
225
|
```
|
|
144
226
|
|
|
145
227
|
```
|
|
146
|
-
|
|
228
|
+
Pause any experiences that have been running for more than 30 days with negative lift
|
|
147
229
|
```
|
|
148
230
|
|
|
149
231
|
---
|
|
150
232
|
|
|
151
|
-
##
|
|
152
|
-
|
|
153
|
-
All configuration is handled through environment variables for maximum compatibility across different MCP clients.
|
|
154
|
-
|
|
155
|
-
| Variable | Required | Description | Default |
|
|
156
|
-
| -------------------- | -------- | ----------------------------------------------- | ----------- |
|
|
157
|
-
| `CONVERT_API_KEY` | ✅ | Your Convert **Application ID** | - |
|
|
158
|
-
| `CONVERT_API_SECRET` | ✅ | Your Convert **Secret Key** | - |
|
|
159
|
-
| `TOOLS_FOR_CLIENT` | | Access level: `reporting`, `readOnly`, or `all` | `reporting` |
|
|
160
|
-
|
|
161
|
-
### Access Levels
|
|
162
|
-
|
|
163
|
-
Choose the appropriate access level based on your needs:
|
|
164
|
-
|
|
165
|
-
#### 🔍 `reporting` (Default - Recommended)
|
|
166
|
-
|
|
167
|
-
**Perfect for analytics and insights**
|
|
168
|
-
|
|
169
|
-
- Account data and project information
|
|
170
|
-
- Real-time experiment tracking and performance reports
|
|
171
|
-
- Goals, audiences, and conversion analytics
|
|
172
|
-
- Live visitor data and traffic allocation
|
|
173
|
-
|
|
174
|
-
#### 📖 `readOnly`
|
|
175
|
-
|
|
176
|
-
**All reporting tools plus detailed configuration access**
|
|
177
|
-
|
|
178
|
-
- Everything in `reporting` mode
|
|
179
|
-
- Detailed project and experience configurations
|
|
180
|
-
- Historical data and change logs
|
|
181
|
-
- Advanced analytics and forecasting data
|
|
182
|
-
|
|
183
|
-
#### 🔧 `all` (Use with caution)
|
|
184
|
-
|
|
185
|
-
**Complete access including write operations**
|
|
186
|
-
|
|
187
|
-
- Everything in `readOnly` mode
|
|
188
|
-
- Create, edit, and delete experiments
|
|
189
|
-
- Manage audiences, goals, and project settings
|
|
190
|
-
- Full account administration capabilities
|
|
191
|
-
|
|
192
|
-
> **⚠️ Security Note**: Start with `reporting` mode and only escalate permissions as needed. The `all` access level can modify your Convert account.
|
|
193
|
-
|
|
194
|
-
---
|
|
195
|
-
|
|
196
|
-
## 🛠️ Available Tools
|
|
197
|
-
|
|
198
|
-
The server provides **100+ tools** covering the complete Convert REST API v2. Here's a quick overview:
|
|
199
|
-
|
|
200
|
-
### Core Analytics Tools (All Access Levels)
|
|
233
|
+
## 🔐 Security
|
|
201
234
|
|
|
202
|
-
|
|
203
|
-
| ----------------------- | ---------------------------------------------------------------------- | ---------------------------------------- |
|
|
204
|
-
| **Account Management** | `getaccountslist`, `getaccountlivedata` | Account overview and real-time tracking |
|
|
205
|
-
| **Project Operations** | `getprojectslist`, `getproject`, `getprojectlivedata` | Project configuration and live data |
|
|
206
|
-
| **Experience Tracking** | `getexperienceslist`, `getexperience`, `getexperienceaggregatedreport` | A/B test performance and analytics |
|
|
207
|
-
| **Goal Analytics** | `getgoal`, `getgoalbykey` | Conversion goal tracking and performance |
|
|
208
|
-
| **Audience Insights** | `getaudienceslist`, `getaudience` | Audience segment analysis |
|
|
209
|
-
| **Location Targeting** | `getlocationslist`, `getlocation` | URL targeting and location rules |
|
|
235
|
+
The server uses your Convert API credentials to authenticate requests. Your credentials are stored only in environment variables and never exposed in code.
|
|
210
236
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
| ------------------- | ---------------------------------------------------------------- | -------------------------------- |
|
|
215
|
-
| **Historical Data** | `getaccounthistory`, `getprojecthistory`, `getexperiencehistory` | Change logs and audit trails |
|
|
216
|
-
| **Screenshots** | `getexperiencevariationscreenshot` | Visual variation previews |
|
|
217
|
-
| **Knowledge Base** | `getknowledgebaseslist`, `getknowledgebase` | Test insights and learnings |
|
|
218
|
-
| **Observations** | `getobservationslist` | Recorded insights and hypotheses |
|
|
219
|
-
|
|
220
|
-
### Management Tools (All Access Only)
|
|
221
|
-
|
|
222
|
-
| Category | Tools | Description |
|
|
223
|
-
| -------------------------- | ---------------------------------------------------------- | ------------------------------ |
|
|
224
|
-
| **Experience Management** | `createexperience`, `updateexperience`, `deleteexperience` | Full A/B test lifecycle |
|
|
225
|
-
| **Goal Management** | `creategoal`, `updategoal`, `deletegoal`, `clonegoal` | Conversion goal administration |
|
|
226
|
-
| **Audience Management** | `createaudience`, `updateaudience`, `deleteaudience` | Audience segment management |
|
|
227
|
-
| **Project Administration** | `createproject`, `updateproject` | Project-level configuration |
|
|
237
|
+
**Best practices:**
|
|
238
|
+
- Start with `TOOLS_FOR_CLIENT=reporting` and escalate only when needed
|
|
239
|
+
- Keep your API credentials secure and never commit them to version control
|
|
228
240
|
|
|
229
241
|
---
|
|
230
242
|
|
|
231
|
-
##
|
|
243
|
+
## ❓ Troubleshooting
|
|
232
244
|
|
|
233
|
-
|
|
245
|
+
| Problem | How to fix |
|
|
246
|
+
| ------- | ---------- |
|
|
247
|
+
| Tools not visible after install | Restart the client and confirm the JSON config points to the correct command/env vars. |
|
|
248
|
+
| `401 Unauthorized` | Re-check API key/secret and your account permissions. |
|
|
249
|
+
| Requests blocked or failing | Use a smart model like Claude Sonnet 4.5, GPT-5, or newer with strong agentic capabilities. Enable extended thinking if available. The model needs to handle multi-step API workflows and parse response alerts. |
|
|
250
|
+
| Keyword search feels off | Refine the query with specific terms (product codes, URLs, field names). |
|
|
234
251
|
|
|
235
|
-
|
|
236
|
-
- **Automatic expiration**: Requests expire after 60 seconds
|
|
237
|
-
- **No credential exposure**: API keys never leave your local environment
|
|
252
|
+
Need more help? Visit the [Convert Help Center](https://support.convert.com/).
|
|
238
253
|
|
|
239
254
|
---
|
|
240
255
|
|
|
241
|
-
##
|
|
242
|
-
|
|
243
|
-
### Common Issues
|
|
244
|
-
|
|
245
|
-
| Symptom | Likely Cause | Solution |
|
|
246
|
-
| ---------------------------- | ----------------------------------- | ----------------------------------------------- |
|
|
247
|
-
| `401 Unauthorized` responses | Wrong API credentials or clock skew | Verify credentials, sync system clock |
|
|
248
|
-
| "Server not found" in Claude | JSON config syntax error | Check `command` and `args` fields |
|
|
249
|
-
| Missing expected tools | `TOOLS_FOR_CLIENT` too restrictive | Switch to `readOnly` or `all` and restart |
|
|
250
|
-
| Connection timeouts | Network/firewall issues | Check connectivity to Convert's API endpoints |
|
|
251
|
-
| "No data returned" | Empty account or wrong permissions | Verify account has data and API key permissions |
|
|
256
|
+
## 📦 API Coverage
|
|
252
257
|
|
|
253
|
-
|
|
258
|
+
The server provides comprehensive coverage of Convert's [REST API v2](https://api.convert.com/doc/v2.0.0/):
|
|
254
259
|
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
260
|
+
- **Account Operations**: User management, billing, and settings
|
|
261
|
+
- **Project Management**: Configuration, domains, and collaborators
|
|
262
|
+
- **Experience Control**: A/B tests, MVT, Split URL, and deployments
|
|
263
|
+
- **Analytics & Reporting**: Real-time data, conversion tracking, and statistical analysis
|
|
264
|
+
- **Goal Tracking**: Conversion goals, revenue tracking, and custom events
|
|
265
|
+
- **Audience Management**: Segmentation rules and targeting
|
|
266
|
+
- **Feature Flags**: Feature management and rollout control
|
|
259
267
|
|
|
260
268
|
---
|
|
261
269
|
|
|
262
|
-
|
|
270
|
+
<div align="center">
|
|
263
271
|
|
|
264
|
-
|
|
272
|
+
**Made with ❤️ by the Convert Team**
|
|
265
273
|
|
|
266
|
-
|
|
267
|
-
- Track visitor behavior and conversions
|
|
268
|
-
- Analyze traffic allocation and statistical significance
|
|
269
|
-
- Get instant insights on goal performance
|
|
274
|
+
© 2025 Convert Insights, Inc. Built for the automation-minded optimizer.
|
|
270
275
|
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
- Create and configure A/B tests
|
|
274
|
-
- Set up multivariate experiments
|
|
275
|
-
- Manage audience targeting and segmentation
|
|
276
|
-
- Control traffic allocation and experiment lifecycle
|
|
277
|
-
|
|
278
|
-
### Data-Driven Insights
|
|
279
|
-
|
|
280
|
-
- Historical performance analysis
|
|
281
|
-
- Conversion funnel optimization
|
|
282
|
-
- Audience behavior patterns
|
|
283
|
-
- ROI and revenue impact assessment
|
|
284
|
-
|
|
285
|
-
### AI-Powered Optimization
|
|
286
|
-
|
|
287
|
-
- Let AI analyze your experiment data
|
|
288
|
-
- Get recommendations for test improvements
|
|
289
|
-
- Automate routine optimization tasks
|
|
290
|
-
- Generate insights from complex data patterns
|
|
291
|
-
|
|
292
|
-
---
|
|
293
|
-
|
|
294
|
-
## 🆘 Support
|
|
295
|
-
|
|
296
|
-
- **Documentation**: [Convert API Documentation](https://api.convert.com/doc/)
|
|
297
|
-
- **Convert Support**: [Convert Help Center](https://support.convert.com/)
|
|
298
|
-
|
|
299
|
-
---
|
|
276
|
+
[Website](https://www.convert.com) • [Documentation](https://support.convert.com/) • [API Reference](https://api.convert.com/doc/)
|
|
300
277
|
|
|
301
|
-
|
|
278
|
+
</div>
|
package/build/api-config.js
CHANGED
|
@@ -17,6 +17,7 @@ axios.interceptors.request.use((config) => {
|
|
|
17
17
|
let applicationID = process.env.CONVERT_API_KEY;
|
|
18
18
|
let applicationSecretKey = process.env.CONVERT_API_SECRET;
|
|
19
19
|
let expires = 60; // In seconds. Request lifetime. If your requests take much time, try to increase this value
|
|
20
|
+
// URL already includes query string from executor.ts - use it directly for signing
|
|
20
21
|
let requestURL = config.url;
|
|
21
22
|
// It's already stringified in raw body in Postman but make sure it stringified correctly without whitespaces etc
|
|
22
23
|
let requestBody = config.data ? JSON.stringify(config.data) : '{}';
|
|
@@ -25,10 +26,6 @@ axios.interceptors.request.use((config) => {
|
|
|
25
26
|
let signString = applicationID + '\n' + expiresTimestamp + '\n' + requestURL + '\n' + requestBody;
|
|
26
27
|
let hash = crypto.createHmac('sha256', applicationSecretKey).update(signString).digest('hex');
|
|
27
28
|
let authorization = 'Convert-HMAC-SHA256 Signature=' + hash;
|
|
28
|
-
// console.warn('Debug data:', data); // Or console.warn
|
|
29
|
-
// console.warn(`Debug RequestBody: ${requestBody}`);
|
|
30
|
-
// console.warn(`Debug SigningString: ${signString}`);
|
|
31
|
-
// console.warn(`Debug Api Secret: ${applicationSecretKey ? 'SET' : 'NOT SET'}`); // Avoid logging secrets
|
|
32
29
|
config.headers['Convert-Application-ID'] = applicationID;
|
|
33
30
|
config.headers['Expires'] = expiresTimestamp;
|
|
34
31
|
config.headers['Authorization'] = authorization;
|
package/build/api-config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-config.js","sourceRoot":"","sources":["../src/api-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,CAAC,GAAG,kBAAkB,CAAC;AACjE,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,GAAG,kBAAkB,CAAC;AAChE,kEAAkE;AAClE,KAAK,CAAC,QAAQ,CAAC,gBAAgB,GAAG;IAChC,UAAU,IAAS,EAAE,OAAY;QAC/B,6BAA6B;QAC7B,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,IAAI,GAAG,EAAE,CAAC;QACZ,CAAC;QACD,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;CACF,CAAC;AAEF,gEAAgE;AAChE,KAAK,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAC5B,CAAC,MAAM,EAAE,EAAE;IACT,IAAI,aAAa,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC;IAChD,IAAI,oBAAoB,GAAG,OAAO,CAAC,GAAG,CAAC,kBAA4B,CAAC;IACpE,IAAI,OAAO,GAAG,EAAE,CAAC,CAAC,4FAA4F;
|
|
1
|
+
{"version":3,"file":"api-config.js","sourceRoot":"","sources":["../src/api-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,CAAC,GAAG,kBAAkB,CAAC;AACjE,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,GAAG,kBAAkB,CAAC;AAChE,kEAAkE;AAClE,KAAK,CAAC,QAAQ,CAAC,gBAAgB,GAAG;IAChC,UAAU,IAAS,EAAE,OAAY;QAC/B,6BAA6B;QAC7B,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,IAAI,GAAG,EAAE,CAAC;QACZ,CAAC;QACD,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;CACF,CAAC;AAEF,gEAAgE;AAChE,KAAK,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAC5B,CAAC,MAAM,EAAE,EAAE;IACT,IAAI,aAAa,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC;IAChD,IAAI,oBAAoB,GAAG,OAAO,CAAC,GAAG,CAAC,kBAA4B,CAAC;IACpE,IAAI,OAAO,GAAG,EAAE,CAAC,CAAC,4FAA4F;IAE9G,mFAAmF;IACnF,IAAI,UAAU,GAAG,MAAM,CAAC,GAAG,CAAC;IAE5B,iHAAiH;IACjH,IAAI,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IACnE,yEAAyE;IACzE,IAAI,gBAAgB,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,GAAG,OAAO,CAAC;IAEnD,IAAI,UAAU,GACZ,aAAa,GAAG,IAAI,GAAG,gBAAgB,GAAG,IAAI,GAAG,UAAU,GAAG,IAAI,GAAG,WAAW,CAAC;IAEnF,IAAI,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC,QAAQ,EAAE,oBAAoB,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC9F,IAAI,aAAa,GAAG,gCAAgC,GAAG,IAAI,CAAC;IAE5D,MAAM,CAAC,OAAO,CAAC,wBAAwB,CAAC,GAAG,aAAa,CAAC;IACzD,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,gBAAgB,CAAC;IAC7C,MAAM,CAAC,OAAO,CAAC,eAAe,CAAC,GAAG,aAAa,CAAC;IAEhD,mDAAmD;IAEnD,OAAO,MAAM,CAAC;AAChB,CAAC,EACD,CAAC,KAAK,EAAE,EAAE;IACR,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC/B,CAAC,CACF,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { appendFileSync, mkdirSync, writeFileSync } from 'node:fs';
|
|
2
|
+
import { homedir } from 'node:os';
|
|
3
|
+
import { join } from 'node:path';
|
|
4
|
+
export class DebugLogger {
|
|
5
|
+
filePath;
|
|
6
|
+
enabled;
|
|
7
|
+
constructor(enabled) {
|
|
8
|
+
this.enabled = enabled;
|
|
9
|
+
if (!enabled) {
|
|
10
|
+
this.filePath = null;
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
try {
|
|
14
|
+
const baseDir = join(homedir(), '.convert');
|
|
15
|
+
mkdirSync(baseDir, { recursive: true });
|
|
16
|
+
this.filePath = join(baseDir, 'convert-mcp-debug.log');
|
|
17
|
+
writeFileSync(this.filePath, '', { encoding: 'utf8' });
|
|
18
|
+
}
|
|
19
|
+
catch (error) {
|
|
20
|
+
console.error('[DebugLogger] Failed to initialise debug log file:', error);
|
|
21
|
+
this.filePath = null;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
log(message, payload) {
|
|
25
|
+
if (!this.enabled || !this.filePath) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
try {
|
|
29
|
+
const time = new Date().toISOString();
|
|
30
|
+
const serialized = payload === undefined ? '' : `\n${safeSerialize(payload)}\n`;
|
|
31
|
+
appendFileSync(this.filePath, `[${time}] ${message}${serialized}\n`, { encoding: 'utf8' });
|
|
32
|
+
}
|
|
33
|
+
catch (error) {
|
|
34
|
+
console.error('[DebugLogger] Failed to write debug entry:', error);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
function safeSerialize(value) {
|
|
39
|
+
try {
|
|
40
|
+
return JSON.stringify(value, null, 2);
|
|
41
|
+
}
|
|
42
|
+
catch (error) {
|
|
43
|
+
return `<<unserializable: ${String(error)}>>`;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=debug-log.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug-log.js","sourceRoot":"","sources":["../src/debug-log.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,MAAM,OAAO,WAAW;IACL,QAAQ,CAAgB;IACxB,OAAO,CAAU;IAElC,YAAY,OAAgB;QAC1B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;YACrB,OAAO;QACT,CAAC;QACD,IAAI,CAAC;YACH,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,EAAE,EAAE,UAAU,CAAC,CAAC;YAC5C,SAAS,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;YACxC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,OAAO,EAAE,uBAAuB,CAAC,CAAC;YACvD,aAAa,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;QACzD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,oDAAoD,EAAE,KAAK,CAAC,CAAC;YAC3E,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QACvB,CAAC;IACH,CAAC;IAED,GAAG,CAAC,OAAe,EAAE,OAAiB;QACpC,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACpC,OAAO;QACT,CAAC;QACD,IAAI,CAAC;YACH,MAAM,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;YACtC,MAAM,UAAU,GAAG,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC;YAChF,cAAc,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,IAAI,KAAK,OAAO,GAAG,UAAU,IAAI,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;QAC7F,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,4CAA4C,EAAE,KAAK,CAAC,CAAC;QACrE,CAAC;IACH,CAAC;CACF;AAED,SAAS,aAAa,CAAC,KAAc;IACnC,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IACxC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,qBAAqB,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC;IAChD,CAAC;AACH,CAAC"}
|