@pushizo/mcp-server 0.1.0 → 0.3.0
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/LICENSE +21 -21
- package/README.md +176 -185
- package/dist/kit.d.ts +11 -2
- package/dist/kit.d.ts.map +1 -1
- package/dist/kit.js +41 -15
- package/dist/kit.js.map +1 -1
- package/dist/server.d.ts +12 -2
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +79 -60
- package/dist/server.js.map +1 -1
- package/dist/stdio.js +3 -3
- package/dist/stdio.js.map +1 -1
- package/dist/tools-data.d.ts +13 -0
- package/dist/tools-data.d.ts.map +1 -0
- package/dist/tools-data.js +223 -0
- package/dist/tools-data.js.map +1 -0
- package/dist/tools-engage.d.ts +11 -0
- package/dist/tools-engage.d.ts.map +1 -0
- package/dist/tools-engage.js +226 -0
- package/dist/tools-engage.js.map +1 -0
- package/dist/tools-insights.d.ts +10 -0
- package/dist/tools-insights.d.ts.map +1 -0
- package/dist/tools-insights.js +207 -0
- package/dist/tools-insights.js.map +1 -0
- package/dist/tools-ops.d.ts +11 -0
- package/dist/tools-ops.d.ts.map +1 -0
- package/dist/tools-ops.js +96 -0
- package/dist/tools-ops.js.map +1 -0
- package/dist/tools-read.d.ts.map +1 -1
- package/dist/tools-read.js +59 -64
- package/dist/tools-read.js.map +1 -1
- package/dist/tools-write.d.ts +3 -3
- package/dist/tools-write.d.ts.map +1 -1
- package/dist/tools-write.js +101 -24
- package/dist/tools-write.js.map +1 -1
- package/package.json +60 -60
- package/server.json +3 -3
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Pushizo contributors
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Pushizo contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,185 +1,176 @@
|
|
|
1
|
-
<!-- pushizo:header -->
|
|
2
|
-
<p align="center">
|
|
3
|
-
<a href="https://pushizo.com"><img src="https://raw.githubusercontent.com/pushizo/.github/main/profile/assets/mark.svg" alt="Pushizo" width="56" height="56"></a>
|
|
4
|
-
</p>
|
|
5
|
-
<p align="center">
|
|
6
|
-
<a href="https://docs.pushizo.com/docs/integrations/mcp"><img src="https://img.shields.io/badge/docs-docs.pushizo.com-5b4bdb" alt="Docs"></a>
|
|
7
|
-
<a href="https://docs.pushizo.com/docs/api"><img src="https://img.shields.io/badge/API-reference-b44fc4" alt="API reference"></a>
|
|
8
|
-
<a href="https://github.com/pushizo/pushizo-mcp/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-16130f" alt="License: MIT"></a>
|
|
9
|
-
</p>
|
|
10
|
-
<p align="center"><a href="#english">English</a> · <a href="#türkçe">Türkçe</a></p>
|
|
11
|
-
|
|
12
|
-
## English
|
|
13
|
-
|
|
14
|
-
**Pushizo MCP server** — Model Context Protocol server for Pushizo. AI clients such as Claude, Cursor and VS Code can read segments, campaigns, messages, templates and analytics, and create draft campaigns and segments with explicit approval. There are no send, schedule or delete tools. The remote server works without installation (OAuth 2.1); the local server runs over stdio.
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
{
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
- **Help · Destek:** [support@pushizo.com](mailto:support@pushizo.com)
|
|
178
|
-
|
|
179
|
-
This repository is mirrored automatically from the Pushizo main repository on every release. Please open an issue
|
|
180
|
-
instead of a pull request; fixes land in the main repository and ship with the next release.
|
|
181
|
-
Bu depo her sürümde Pushizo ana deposundan otomatik yansıtılır. Pull request yerine issue açın; düzeltmeler ana depoda
|
|
182
|
-
yapılır ve bir sonraki sürümle buraya gelir.
|
|
183
|
-
|
|
184
|
-
Released under the MIT License · MIT lisanslıdır — [LICENSE](https://github.com/pushizo/pushizo-mcp/blob/main/LICENSE).
|
|
185
|
-
<!-- /pushizo:footer -->
|
|
1
|
+
<!-- pushizo:header -->
|
|
2
|
+
<p align="center">
|
|
3
|
+
<a href="https://pushizo.com"><img src="https://raw.githubusercontent.com/pushizo/.github/main/profile/assets/mark.svg" alt="Pushizo" width="56" height="56"></a>
|
|
4
|
+
</p>
|
|
5
|
+
<p align="center">
|
|
6
|
+
<a href="https://docs.pushizo.com/docs/integrations/mcp"><img src="https://img.shields.io/badge/docs-docs.pushizo.com-5b4bdb" alt="Docs"></a>
|
|
7
|
+
<a href="https://docs.pushizo.com/docs/api"><img src="https://img.shields.io/badge/API-reference-b44fc4" alt="API reference"></a>
|
|
8
|
+
<a href="https://github.com/pushizo/pushizo-mcp/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-16130f" alt="License: MIT"></a>
|
|
9
|
+
</p>
|
|
10
|
+
<p align="center"><a href="#english">English</a> · <a href="#türkçe">Türkçe</a></p>
|
|
11
|
+
|
|
12
|
+
## English
|
|
13
|
+
|
|
14
|
+
**Pushizo MCP server** — Model Context Protocol server for Pushizo. AI clients such as Claude, Cursor and VS Code can read segments, campaigns, messages, templates and analytics, and create draft campaigns and segments with explicit approval. There are no send, schedule or delete tools. The remote server works without installation (OAuth 2.1); the local server runs over stdio.
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
# Remote server (no install)
|
|
18
|
+
claude mcp add --transport http pushizo https://api.pushizo.com/mcp
|
|
19
|
+
|
|
20
|
+
# Local server (stdio)
|
|
21
|
+
PUSHIZO_API_KEY=hs_live_… npx -y @pushizo/mcp-server
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
The detailed guide below is in Turkish; code samples are language-neutral. Full documentation:
|
|
25
|
+
[docs.pushizo.com/docs/integrations/mcp](https://docs.pushizo.com/docs/integrations/mcp) · API reference: [docs.pushizo.com/docs/api](https://docs.pushizo.com/docs/api).
|
|
26
|
+
|
|
27
|
+
## Türkçe
|
|
28
|
+
<!-- /pushizo:header -->
|
|
29
|
+
|
|
30
|
+
# Pushizo MCP sunucusu
|
|
31
|
+
|
|
32
|
+
Pushizo için [Model Context Protocol](https://modelcontextprotocol.io) (MCP) sunucusu. Claude, Cursor, VS Code gibi
|
|
33
|
+
yapay zekâ istemcileri segment, kampanya, mesaj, şablon ve analitik verisini okuyabilir; onaylı modda yalnızca
|
|
34
|
+
**taslak** kampanya ve segment oluşturabilir. Gönderim, zamanlama ve silme aracı yoktur; taslaklar panelden gözden
|
|
35
|
+
geçirilip gönderilir.
|
|
36
|
+
|
|
37
|
+
Araçlar yalnızca Pushizo public REST API'sini çağırır: yetki (API anahtarı kapsamları), IP izin listesi ve kiracı
|
|
38
|
+
izolasyonu her çağrıda public API ile birebir aynıdır. Ayrıntılı rehber:
|
|
39
|
+
[docs.pushizo.com/docs/integrations/mcp](https://docs.pushizo.com/docs/integrations/mcp).
|
|
40
|
+
|
|
41
|
+
| Bağlantı | Ne zaman | Kimlik |
|
|
42
|
+
|----------|----------|--------|
|
|
43
|
+
| **Uzak sunucu** `https://api.pushizo.com/mcp` (Streamable HTTP) | Kurulum istemeyen istemciler (Claude.ai, Claude Desktop bağlayıcısı, Claude Code, Cursor, VS Code) | OAuth 2.1 (tarayıcıda onay) ya da kapsamlı API anahtarı |
|
|
44
|
+
| **Yerel sunucu** `npx -y @pushizo/mcp-server` (stdio) | Yerel çalıştırmak ya da kendi kodunuza gömmek | `PUSHIZO_API_KEY` |
|
|
45
|
+
|
|
46
|
+
## Uzak sunucu (kurulumsuz)
|
|
47
|
+
|
|
48
|
+
**Claude.ai / Claude Desktop:** Settings → Connectors → **Add custom connector** → URL: `https://api.pushizo.com/mcp`.
|
|
49
|
+
Claude tarayıcıda Pushizo yetkilendirme ekranını açar; onayladığınız organizasyon, app ve kapsamlarla çalışır.
|
|
50
|
+
|
|
51
|
+
**Claude Code:**
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
claude mcp add --transport http pushizo https://api.pushizo.com/mcp
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
**Cursor** (`~/.cursor/mcp.json`):
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
"mcpServers": {
|
|
62
|
+
"pushizo": { "url": "https://api.pushizo.com/mcp" }
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
**VS Code** (`.vscode/mcp.json`):
|
|
68
|
+
|
|
69
|
+
```json
|
|
70
|
+
{
|
|
71
|
+
"servers": {
|
|
72
|
+
"pushizo": { "type": "http", "url": "https://api.pushizo.com/mcp" }
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
OAuth desteklemeyen istemcilerde `Authorization: Bearer hs_live_…` başlığıyla kapsamlı bir API anahtarı verilebilir:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
curl -s -X POST https://api.pushizo.com/mcp -H "Authorization: Bearer $PUSHIZO_API_KEY" -H 'content-type: application/json' -H 'accept: application/json, text/event-stream' -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Yerel sunucu (stdio)
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
PUSHIZO_API_KEY=hs_live_… npx -y @pushizo/mcp-server
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Paket `pushizo-mcp` komutunu da sağlar (`npm install -g @pushizo/mcp-server` sonrası `pushizo-mcp`).
|
|
90
|
+
|
|
91
|
+
| Ortam değişkeni | Zorunlu | Açıklama |
|
|
92
|
+
|---|---|---|
|
|
93
|
+
| `PUSHIZO_API_KEY` | evet | `hs_live_…` API anahtarı. Okuma için `segments:read`, `analytics:read`; kullanıcı araçları için `users:read`; taslak ve test gönderimi için `mcp:write`. |
|
|
94
|
+
| `PUSHIZO_API_URL` | hayır | API kök adresi; varsayılan `https://api.pushizo.com`. `https` olmalı; yerel geliştirmede `http://localhost:<port>` veya `http://127.0.0.1:<port>` kabul edilir. |
|
|
95
|
+
| `PUSHIZO_APP_ID` | hayır | Araçta `app_id` verilmezse kullanılacak app. App'e bağlı anahtarda gerekmez. |
|
|
96
|
+
|
|
97
|
+
stdout yalnızca MCP iletileri içindir; tanılama ve hata metinleri stderr'e yazılır. Anahtar eksikse veya adres
|
|
98
|
+
geçersizse süreç 1 koduyla çıkar.
|
|
99
|
+
|
|
100
|
+
## Claude Desktop
|
|
101
|
+
|
|
102
|
+
`claude_desktop_config.json` (macOS: `~/Library/Application Support/Claude/`, Windows: `%APPDATA%\Claude\`):
|
|
103
|
+
|
|
104
|
+
```json
|
|
105
|
+
{
|
|
106
|
+
"mcpServers": {
|
|
107
|
+
"pushizo": {
|
|
108
|
+
"command": "npx",
|
|
109
|
+
"args": ["-y", "@pushizo/mcp-server"],
|
|
110
|
+
"env": {
|
|
111
|
+
"PUSHIZO_API_KEY": "hs_live_…",
|
|
112
|
+
"PUSHIZO_API_URL": "https://api.pushizo.com",
|
|
113
|
+
"PUSHIZO_APP_ID": "app_…"
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## Araçlar
|
|
121
|
+
|
|
122
|
+
228 araç (218 okuma, 9 taslak, test gönderimi); public API'deki her okuma ucunun bir aracı vardır. Ayrıntılı liste
|
|
123
|
+
`docs/guides/mcp.md` içindedir. Özet:
|
|
124
|
+
|
|
125
|
+
| Araç | Tür | Gerekli kapsam |
|
|
126
|
+
|---|---|---|
|
|
127
|
+
| `list_segments`, `get_segment`, `preview_segment`, `estimate_segment`, `list_segment_campaigns` | okuma | `segments:read` |
|
|
128
|
+
| Kampanya, şablon, journey, analitik, in-app, web büyüme ve gelen kutusu okuma araçları | okuma | `analytics:read` |
|
|
129
|
+
| RFM, öngörü, karar ajanı, kanal skoru, özellik bayrağı, rapor, yol analizi, katalog ve öneri, bölge araçları | okuma | `analytics:read` |
|
|
130
|
+
| `list_messages`, `get_message` | okuma | `analytics:read` veya `notifications:write` |
|
|
131
|
+
| `get_app`, `search_users`, `get_user`, `get_user_journeys`, `get_user_preferences`, `list_categories`, `list_rfm_users`, `list_prediction_users`, `list_wallet_templates` | okuma | `users:read` |
|
|
132
|
+
| Şirket, ilgi etiketleri, SQL sorgu (`run_sql_query`, yalnız SELECT), veri boru hattı, ambar segmenti, konuşma ve AI ajanı, özel AI ajanları, web kişiselleştirme, site içi arama, reklam, kaldırma ve Android teslimat raporu okuma araçları | okuma | `users:read`, `analytics:read`, `segments:read` veya `admin` (araca göre) |
|
|
133
|
+
| `create_campaign_draft`, `create_segment_draft`, `create_template_draft`, `create_journey_draft`, `create_in_app_draft`, `create_web_campaign_draft`, `create_web_personalization_draft`, `create_survey_draft`, `create_landing_page_draft` | onaylı mod — taslak | `mcp:write` |
|
|
134
|
+
| `send_test_notification` | onaylı mod — yalnız test cihazı | `mcp:write` |
|
|
135
|
+
|
|
136
|
+
`admin` kapsamı tüm araçları açar. Taslak araçları gönderim, zamanlama ve yayın yapmaz (kampanya, journey, in-app, web kampanyası, web kişiselleştirme, anket ve landing
|
|
137
|
+
`draft`, şablon ve kampanyaya `mcp` etiketi, segment dinamik). `send_test_notification` gerçek kitleye gidemez.
|
|
138
|
+
Asistandan çağırmadan önce kullanıcının açık onayı istenir.
|
|
139
|
+
|
|
140
|
+
## Kütüphane olarak
|
|
141
|
+
|
|
142
|
+
```ts
|
|
143
|
+
import { createFetchApi, createPushizoMcpServer } from '@pushizo/mcp-server';
|
|
144
|
+
|
|
145
|
+
const server = createPushizoMcpServer({
|
|
146
|
+
api: createFetchApi({ baseUrl: 'https://api.pushizo.com', apiKey: process.env.PUSHIZO_API_KEY! }),
|
|
147
|
+
defaultAppId: process.env.PUSHIZO_APP_ID,
|
|
148
|
+
});
|
|
149
|
+
// server.connect(<MCP taşıması>)
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
## Geliştirme
|
|
153
|
+
|
|
154
|
+
Paket Pushizo ana deposunda geliştirilir ve test edilir; bu depo her sürümde oradan otomatik yansıtılır. Kullanmak
|
|
155
|
+
için npm paketini (`@pushizo/mcp-server`) ya da uzak sunucuyu tercih edin.
|
|
156
|
+
|
|
157
|
+
<!-- pushizo:footer -->
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
## Support · Destek
|
|
161
|
+
|
|
162
|
+
- **Guide · Rehber:** [docs.pushizo.com/docs/integrations/mcp](https://docs.pushizo.com/docs/integrations/mcp)
|
|
163
|
+
- **API reference & OpenAPI · API referansı ve OpenAPI:** [docs.pushizo.com/docs/api](https://docs.pushizo.com/docs/api) ·
|
|
164
|
+
[pushizo-openapi](https://github.com/pushizo/pushizo-openapi)
|
|
165
|
+
- **Bugs & ideas · Hata ve öneri:** [Issues](https://github.com/pushizo/pushizo-mcp/issues)
|
|
166
|
+
- **Security · Güvenlik:** please do not open public issues; email [security@pushizo.com](mailto:security@pushizo.com) ·
|
|
167
|
+
herkese açık issue açmayın, bu adrese yazın.
|
|
168
|
+
- **Help · Destek:** [support@pushizo.com](mailto:support@pushizo.com)
|
|
169
|
+
|
|
170
|
+
This repository is mirrored automatically from the Pushizo main repository on every release. Please open an issue
|
|
171
|
+
instead of a pull request; fixes land in the main repository and ship with the next release.
|
|
172
|
+
Bu depo her sürümde Pushizo ana deposundan otomatik yansıtılır. Pull request yerine issue açın; düzeltmeler ana depoda
|
|
173
|
+
yapılır ve bir sonraki sürümle buraya gelir.
|
|
174
|
+
|
|
175
|
+
Released under the MIT License · MIT lisanslıdır — [LICENSE](https://github.com/pushizo/pushizo-mcp/blob/main/LICENSE).
|
|
176
|
+
<!-- /pushizo:footer -->
|
package/dist/kit.d.ts
CHANGED
|
@@ -12,6 +12,12 @@ export declare const cursorArg: z.ZodOptional<z.ZodString>;
|
|
|
12
12
|
export declare const idArg: (what: string) => z.ZodString;
|
|
13
13
|
export declare const fromArg: z.ZodOptional<z.ZodString>;
|
|
14
14
|
export declare const toArg: z.ZodOptional<z.ZodString>;
|
|
15
|
+
/** Kullanıcıyı kimlik etiketiyle seçen ortak argümanlar (`/users/by/{label}/{value}` uçları). */
|
|
16
|
+
export declare const aliasArgs: {
|
|
17
|
+
label: z.ZodString;
|
|
18
|
+
value: z.ZodString;
|
|
19
|
+
};
|
|
20
|
+
export declare const compareArg: z.ZodOptional<z.ZodBoolean>;
|
|
15
21
|
/** Segment/arama tanımı: all/any/none koşul grupları (segment taslağıyla aynı biçim). */
|
|
16
22
|
export declare const definitionArg: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
17
23
|
export declare function query(params: Record<string, string | number | boolean | undefined>): string;
|
|
@@ -25,6 +31,9 @@ export interface ToolKit {
|
|
|
25
31
|
run: (fn: () => Promise<unknown>) => Promise<CallToolResult>;
|
|
26
32
|
}
|
|
27
33
|
export declare function createToolKit(api: PushizoApi, defaultAppId?: string): ToolKit;
|
|
28
|
-
/**
|
|
29
|
-
|
|
34
|
+
/**
|
|
35
|
+
* Yol parçası (kimlik, alias değeri, olay adı) güvenli kodlama. `encodeURIComponent` noktayı kodlamaz; `.` ve `..`
|
|
36
|
+
* tek başına yol parçası olunca istek başka uca gider, bu yüzden reddedilir.
|
|
37
|
+
*/
|
|
38
|
+
export declare function seg(value: string): string;
|
|
30
39
|
//# sourceMappingURL=kit.d.ts.map
|
package/dist/kit.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kit.d.ts","sourceRoot":"","sources":["../src/kit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAC1F,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAmB,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAE5D,0EAA0E;AAC1E,eAAO,MAAM,IAAI,EAAE,eAA4G,CAAC;AAChI,4GAA4G;AAC5G,eAAO,MAAM,KAAK,EAAE,eAA8G,CAAC;AAEnI,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"kit.d.ts","sourceRoot":"","sources":["../src/kit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAC1F,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAmB,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAE5D,0EAA0E;AA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ist/kit.js
CHANGED
|
@@ -4,18 +4,30 @@ import { PushizoApiError } from './api.js';
|
|
|
4
4
|
export const READ = { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false };
|
|
5
5
|
/** Yazma araçları: yalnızca taslak oluşturur (gönderim/silme yok), sunucuda `mcp:write` kapsamı zorunlu. */
|
|
6
6
|
export const WRITE = { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false };
|
|
7
|
-
export const WRITE_NOTE = '[
|
|
8
|
-
'API
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
export const WRITE_NOTE = '[Approved mode — write] This tool creates a record in Pushizo. It only creates a DRAFT and never sends or schedules a message; ' +
|
|
8
|
+
'the API key needs the `mcp:write` scope. Get explicit approval from the user before calling it.';
|
|
9
|
+
/**
|
|
10
|
+
* Kimlikler URL yoluna yazılır: `.` ve `..` WHATWG URL çözümlemesinde başka uca kayar, `/` yolu böler. Desen bunları
|
|
11
|
+
* dışarıda bırakır (ADR-0076 §5).
|
|
12
|
+
*/
|
|
13
|
+
const ID_PATTERN = /^(?!\.{1,2}$)[A-Za-z0-9_.:-]+$/;
|
|
14
|
+
const ID_MESSAGE = 'ID may only contain letters, digits, `_`, `-`, `.` and `:`.';
|
|
15
|
+
export const appIdArg = z.string().min(1).max(64).regex(ID_PATTERN, ID_MESSAGE).optional().describe('App ID (app_…). Not needed with an app-scoped key or when a default app is configured.');
|
|
16
|
+
export const limitArg = z.number().int().min(1).max(100).optional().describe('Page size (default 20).');
|
|
17
|
+
export const cursorArg = z.string().max(500).optional().describe('The `next_cursor` value from the previous response.');
|
|
18
|
+
export const idArg = (what) => z.string().min(1).max(64).regex(ID_PATTERN, ID_MESSAGE).describe(`${what} ID`);
|
|
19
|
+
export const fromArg = z.string().max(40).optional().describe('ISO-8601 start (e.g. 2026-10-01T00:00:00Z); defaults to the report default.');
|
|
20
|
+
export const toArg = z.string().max(40).optional().describe('ISO-8601 end.');
|
|
21
|
+
/** Kullanıcıyı kimlik etiketiyle seçen ortak argümanlar (`/users/by/{label}/{value}` uçları). */
|
|
22
|
+
export const aliasArgs = {
|
|
23
|
+
label: z.string().min(1).max(64).describe('Identity label: `external_id`, `pushizo_id` or a defined alias (e.g. `crm_id`).'),
|
|
24
|
+
value: z.string().min(1).max(255).describe('Value for the label (e.g. the external_id value).'),
|
|
25
|
+
};
|
|
26
|
+
export const compareArg = z.boolean().optional().describe('true: adds a comparison with the previous period of equal length.');
|
|
15
27
|
/** Segment/arama tanımı: all/any/none koşul grupları (segment taslağıyla aynı biçim). */
|
|
16
28
|
export const definitionArg = z
|
|
17
29
|
.record(z.string(), z.unknown())
|
|
18
|
-
.describe('
|
|
30
|
+
.describe('Condition definition, e.g. {"all":[{"field":"tags.plan","op":"eq","value":"pro"},{"field":"last_active_at","op":"within_days","value":30}]}.');
|
|
19
31
|
export function query(params) {
|
|
20
32
|
const q = new URLSearchParams();
|
|
21
33
|
for (const [k, v] of Object.entries(params))
|
|
@@ -27,11 +39,18 @@ export function query(params) {
|
|
|
27
39
|
export function ok(data) {
|
|
28
40
|
return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
|
|
29
41
|
}
|
|
42
|
+
/** Sık görülen durum kodları için modelin sonraki adımını belirleyen ipucu. */
|
|
43
|
+
const HTTP_HINTS = {
|
|
44
|
+
403: ' — Check the API key scopes.',
|
|
45
|
+
429: ' — Rate limited; wait a few seconds and retry, and reduce back-to-back calls.',
|
|
46
|
+
};
|
|
30
47
|
export function fail(err) {
|
|
31
48
|
const text = err instanceof PushizoApiError
|
|
32
|
-
? `${err.code} (HTTP ${err.status}): ${err.message}${err.status
|
|
49
|
+
? `${err.code} (HTTP ${err.status}): ${err.message}${HTTP_HINTS[err.status] ?? ''}`
|
|
33
50
|
: err instanceof Error
|
|
34
|
-
? err.
|
|
51
|
+
? err.name === 'TimeoutError' || err.name === 'AbortError'
|
|
52
|
+
? 'Request timed out; retry with a narrower date range or a smaller `limit`.'
|
|
53
|
+
: err.message
|
|
35
54
|
: String(err);
|
|
36
55
|
return { isError: true, content: [{ type: 'text', text }] };
|
|
37
56
|
}
|
|
@@ -39,8 +58,8 @@ export function createToolKit(api, defaultAppId) {
|
|
|
39
58
|
function app(appId) {
|
|
40
59
|
const id = appId ?? defaultAppId;
|
|
41
60
|
if (!id)
|
|
42
|
-
throw new Error('app_id
|
|
43
|
-
return
|
|
61
|
+
throw new Error('app_id is required (pass app_id in the tool call when the key is organization-wide).');
|
|
62
|
+
return seg(id);
|
|
44
63
|
}
|
|
45
64
|
async function run(fn) {
|
|
46
65
|
try {
|
|
@@ -52,6 +71,13 @@ export function createToolKit(api, defaultAppId) {
|
|
|
52
71
|
}
|
|
53
72
|
return { api, app, run };
|
|
54
73
|
}
|
|
55
|
-
/**
|
|
56
|
-
|
|
74
|
+
/**
|
|
75
|
+
* Yol parçası (kimlik, alias değeri, olay adı) güvenli kodlama. `encodeURIComponent` noktayı kodlamaz; `.` ve `..`
|
|
76
|
+
* tek başına yol parçası olunca istek başka uca gider, bu yüzden reddedilir.
|
|
77
|
+
*/
|
|
78
|
+
export function seg(value) {
|
|
79
|
+
if (value === '.' || value === '..')
|
|
80
|
+
throw new Error('Invalid value: `.` and `..` cannot be used as path segments.');
|
|
81
|
+
return encodeURIComponent(value);
|
|
82
|
+
}
|
|
57
83
|
//# sourceMappingURL=kit.js.map
|
package/dist/kit.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kit.js","sourceRoot":"","sources":["../src/kit.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAmB,MAAM,UAAU,CAAC;AAE5D,0EAA0E;AAC1E,MAAM,CAAC,MAAM,IAAI,GAAoB,EAAE,YAAY,EAAE,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,a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IAAI,KAAK,cAAc,IAAI,GAAG,CAAC,IAAI,KAAK,YAAY;gBACxD,CAAC,CAAC,2EAA2E;gBAC7E,CAAC,CAAC,GAAG,CAAC,OAAO;YACf,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACpB,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;AAC9D,CAAC;AAUD,MAAM,UAAU,aAAa,CAAC,GAAe,EAAE,YAAqB;IAClE,SAAS,GAAG,CAAC,KAAc;QACzB,MAAM,EAAE,GAAG,KAAK,IAAI,YAAY,CAAC;QACjC,IAAI,CAAC,EAAE;YAAE,MAAM,IAAI,KAAK,CAAC,sFAAsF,CAAC,CAAC;QACjH,OAAO,GAAG,CAAC,EAAE,CAAC,CAAC;IACjB,CAAC;IACD,KAAK,UAAU,GAAG,CAAC,EAA0B;QAC3C,IAAI,CAAC;YACH,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QACxB,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;QACnB,CAAC;IACH,CAAC;IACD,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAC3B,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,GAAG,CAAC,KAAa;IAC/B,IAAI,KAAK,KAAK,GAAG,IAAI,KAAK,KAAK,IAAI;QAAE,MAAM,IAAI,KAAK,CAAC,8DAA8D,CAAC,CAAC;IACrH,OAAO,kBAAkB,CAAC,KAAK,CAAC,CAAC;AACnC,CAAC"}
|
package/dist/server.d.ts
CHANGED
|
@@ -1,15 +1,25 @@
|
|
|
1
1
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
2
|
import type { PushizoApi } from './api.js';
|
|
3
3
|
export declare const MCP_SERVER_NAME = "pushizo";
|
|
4
|
-
|
|
4
|
+
/** `serverInfo.version`; `package.json` sürümüyle aynı olmalıdır (test zorlar). */
|
|
5
|
+
export declare const MCP_SERVER_VERSION = "0.3.0";
|
|
5
6
|
export interface PushizoMcpOptions {
|
|
6
7
|
api: PushizoApi;
|
|
7
8
|
/** Araçta `app_id` verilmezse kullanılan app (app'e bağlı anahtarda anahtarın app'i). */
|
|
8
9
|
defaultAppId?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Anahtarın kapsamları biliniyorsa (HTTP taşıma): yazma araçları yalnızca `mcp:write` veya `admin` varken listelenir.
|
|
12
|
+
* Verilmezse (stdio) tüm araçlar listelenir; yetki her çağrıda yine sunucuda denetlenir.
|
|
13
|
+
*/
|
|
14
|
+
scopes?: readonly string[];
|
|
9
15
|
}
|
|
16
|
+
/** Yazma araçları listelensin mi: kapsam bilinmiyorsa evet, biliniyorsa `mcp:write` veya `admin` gerekir. */
|
|
17
|
+
export declare function canListWriteTools(scopes: readonly string[] | undefined): boolean;
|
|
10
18
|
/**
|
|
11
19
|
* Pushizo MCP sunucusu (ADR-0031 §6, ADR-0043): segment, kampanya, mesaj, şablon, journey, kullanıcı, olay, analitik,
|
|
12
|
-
* in-app ve web büyüme okuma araçları;
|
|
20
|
+
* in-app ve web büyüme okuma araçları; veri (şirket, SQL, boru hattı, ambar) ve etkileşim (konuşma, AI ajanı, site
|
|
21
|
+
* araması, reklam) okuma araçları; kampanya/segment/şablon/journey/in-app/web kampanyası/web kişiselleştirme/anket/
|
|
22
|
+
* landing taslağı ve test cihazlarına test gönderimi.
|
|
13
23
|
* Taşıma bağımsızdır (stdio, Streamable HTTP, testte in-memory).
|
|
14
24
|
*/
|
|
15
25
|
export declare function createPushizoMcpServer(options: PushizoMcpOptions): McpServer;
|
package/dist/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAS3C,eAAO,MAAM,eAAe,YAAY,CAAC;AACzC,mFAAmF;AACnF,eAAO,MAAM,kBAAkB,UAAU,CAAC;AAE1C,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,UAAU,CAAC;IAChB,yFAAyF;IACzF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC5B;AAED,6GAA6G;AAC7G,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,GAAG,OAAO,CAEhF;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,iBAAiB,GAAG,SAAS,CAiK5E"}
|