@meshstream/docs-mcp 0.0.0-stage → 0.2.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/README.md +25 -2
- package/content/ai-coding.md +161 -0
- package/content/api/bootstrap.md +67 -0
- package/content/api/errors.md +34 -0
- package/content/best-practices.md +145 -0
- package/content/billing/usage.md +38 -0
- package/content/concepts/identity.md +23 -0
- package/content/concepts/multi-region.md +15 -0
- package/content/concepts/p2p.md +79 -0
- package/content/concepts/statistics.md +52 -0
- package/content/intro.md +54 -0
- package/content/legal/privacy.md +110 -0
- package/content/legal/terms.md +173 -0
- package/content/quickstart.md +198 -0
- package/content/sdk/android-advanced.md +228 -0
- package/content/sdk/android-setup.md +139 -0
- package/content/sdk/android.md +190 -0
- package/content/sdk/flutter-advanced.md +285 -0
- package/content/sdk/flutter-setup.md +123 -0
- package/content/sdk/flutter.md +91 -0
- package/content/sdk/ios-advanced.md +268 -0
- package/content/sdk/ios-setup.md +113 -0
- package/content/sdk/ios.md +156 -0
- package/content/sdk/overview.md +40 -0
- package/content/sdk/react-native-advanced.md +269 -0
- package/content/sdk/react-native-setup.md +86 -0
- package/content/sdk/react-native.md +52 -0
- package/content/sdk/uniapp-advanced.md +274 -0
- package/content/sdk/uniapp-setup.md +92 -0
- package/content/sdk/uniapp.md +55 -0
- package/content/sdk/web-advanced.md +241 -0
- package/content/sdk/web-setup.md +42 -0
- package/content/sdk/web.md +105 -0
- package/content/sdk/windows-advanced.md +237 -0
- package/content/sdk/windows-setup.md +53 -0
- package/content/sdk/windows.md +162 -0
- package/content/troubleshooting.md +122 -0
- package/package.json +31 -4
- package/src/catalog.mjs +249 -0
- package/src/server.mjs +74 -0
package/src/catalog.mjs
ADDED
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
import fs from "node:fs/promises";
|
|
2
|
+
import { existsSync } from "node:fs";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
|
|
6
|
+
const packageRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..", "..", "..");
|
|
7
|
+
const bundledDocsRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..", "content");
|
|
8
|
+
const defaultDocsRoot = existsSync(bundledDocsRoot)
|
|
9
|
+
? bundledDocsRoot
|
|
10
|
+
: path.join(packageRoot, "apps", "developer-site", "docs");
|
|
11
|
+
const maxDocumentChars = 18_000;
|
|
12
|
+
|
|
13
|
+
const documentFiles = [
|
|
14
|
+
"intro.md",
|
|
15
|
+
"quickstart.md",
|
|
16
|
+
"ai-coding.md",
|
|
17
|
+
"billing/usage.md",
|
|
18
|
+
"best-practices.md",
|
|
19
|
+
"troubleshooting.md",
|
|
20
|
+
"concepts/p2p.md",
|
|
21
|
+
"concepts/statistics.md",
|
|
22
|
+
"concepts/identity.md",
|
|
23
|
+
"sdk/overview.md",
|
|
24
|
+
"sdk/web-setup.md",
|
|
25
|
+
"sdk/web.md",
|
|
26
|
+
"sdk/web-advanced.md",
|
|
27
|
+
"sdk/android-setup.md",
|
|
28
|
+
"sdk/android.md",
|
|
29
|
+
"sdk/android-advanced.md",
|
|
30
|
+
"sdk/ios-setup.md",
|
|
31
|
+
"sdk/ios.md",
|
|
32
|
+
"sdk/ios-advanced.md",
|
|
33
|
+
"sdk/windows-setup.md",
|
|
34
|
+
"sdk/windows.md",
|
|
35
|
+
"sdk/windows-advanced.md",
|
|
36
|
+
"sdk/flutter-setup.md",
|
|
37
|
+
"sdk/flutter.md",
|
|
38
|
+
"sdk/flutter-advanced.md",
|
|
39
|
+
"sdk/react-native-setup.md",
|
|
40
|
+
"sdk/react-native.md",
|
|
41
|
+
"sdk/react-native-advanced.md",
|
|
42
|
+
"sdk/uniapp-setup.md",
|
|
43
|
+
"sdk/uniapp.md",
|
|
44
|
+
"sdk/uniapp-advanced.md",
|
|
45
|
+
];
|
|
46
|
+
|
|
47
|
+
function docsRoot() {
|
|
48
|
+
return path.resolve(process.env.MESHSTREAM_DOCS_ROOT?.trim() || defaultDocsRoot);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function titleFromMarkdown(markdown, fallback) {
|
|
52
|
+
const match = markdown.match(/^title:\s*["']?(.+?)["']?\s*$/m) || markdown.match(/^#\s+(.+)$/m);
|
|
53
|
+
return match?.[1]?.trim() || fallback;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function stripFrontMatter(markdown) {
|
|
57
|
+
return markdown.replace(/^---\n[\s\S]*?\n---\n/, "").trim();
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function tokenize(value) {
|
|
61
|
+
return value.toLowerCase().split(/[^\p{L}\p{N}]+/u).filter((token) => token.length > 1);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function scoreDocument(query, document) {
|
|
65
|
+
const queryTokens = tokenize(query);
|
|
66
|
+
const haystack = `${document.title} ${document.path} ${document.text}`.toLowerCase();
|
|
67
|
+
return queryTokens.reduce((score, token) => score + (haystack.includes(token) ? (document.title.toLowerCase().includes(token) ? 4 : 1) : 0), 0);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
async function readDocument(relativePath) {
|
|
71
|
+
if (!documentFiles.includes(relativePath)) throw new Error(`Unknown documentation path: ${relativePath}`);
|
|
72
|
+
const absolutePath = path.join(docsRoot(), relativePath);
|
|
73
|
+
const markdown = await fs.readFile(absolutePath, "utf8");
|
|
74
|
+
return {
|
|
75
|
+
path: relativePath,
|
|
76
|
+
title: titleFromMarkdown(markdown, relativePath),
|
|
77
|
+
text: stripFrontMatter(markdown),
|
|
78
|
+
url: `https://meshstream.net/docs/${relativePath.replace(/\.md$/, "").replaceAll("\\\\", "/")}`,
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export async function loadDocuments() {
|
|
83
|
+
const documents = [];
|
|
84
|
+
for (const relativePath of documentFiles) {
|
|
85
|
+
try {
|
|
86
|
+
documents.push(await readDocument(relativePath));
|
|
87
|
+
} catch (error) {
|
|
88
|
+
if (error?.code !== "ENOENT") throw error;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
return documents;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export async function searchDocs(query, limit = 5) {
|
|
95
|
+
const normalizedQuery = String(query || "").trim();
|
|
96
|
+
if (!normalizedQuery) return [];
|
|
97
|
+
const documents = await loadDocuments();
|
|
98
|
+
return documents
|
|
99
|
+
.map((document) => ({ document, score: scoreDocument(normalizedQuery, document) }))
|
|
100
|
+
.filter(({ score }) => score > 0)
|
|
101
|
+
.sort((a, b) => b.score - a.score || a.document.path.localeCompare(b.document.path))
|
|
102
|
+
.slice(0, Math.min(10, Math.max(1, Number(limit) || 5)))
|
|
103
|
+
.map(({ document, score }) => ({
|
|
104
|
+
path: document.path,
|
|
105
|
+
title: document.title,
|
|
106
|
+
score,
|
|
107
|
+
url: document.url,
|
|
108
|
+
excerpt: document.text.slice(0, 1_000),
|
|
109
|
+
}));
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export async function getDocument(relativePath) {
|
|
113
|
+
const document = await readDocument(relativePath);
|
|
114
|
+
return { ...document, text: document.text.slice(0, maxDocumentChars) };
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export async function getSdkRelease(platform = "all") {
|
|
118
|
+
const overview = await getDocument("sdk/overview.md");
|
|
119
|
+
const rows = overview.text.split("\n")
|
|
120
|
+
.filter((line) => /^\|/.test(line) && !/^\|\s*-/.test(line))
|
|
121
|
+
.map((line) => line.split("|").slice(1, -1).map((cell) => cell.trim()))
|
|
122
|
+
.filter((cells) => cells.length >= 4 && cells[0] !== "SDK")
|
|
123
|
+
.map(([sdk, version, android, apple]) => ({ sdk, version, android, apple }));
|
|
124
|
+
const normalized = String(platform || "all").trim().toLowerCase();
|
|
125
|
+
const filtered = normalized === "all" ? rows : rows.filter((row) => row.sdk.toLowerCase().includes(normalized));
|
|
126
|
+
return {
|
|
127
|
+
source: { path: overview.path, url: overview.url },
|
|
128
|
+
platform: normalized,
|
|
129
|
+
releases: filtered,
|
|
130
|
+
note: "仅返回官网公开版本表;发布前仍需从公共渠道验证精确包、哈希和兼容性。",
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export async function getIntegrationGuide(platform = "web", framework = "") {
|
|
135
|
+
const normalized = String(platform || "web").trim().toLowerCase();
|
|
136
|
+
const map = {
|
|
137
|
+
web: ["sdk/web-setup.md", "sdk/web.md", "sdk/web-advanced.md"],
|
|
138
|
+
android: ["sdk/android-setup.md", "sdk/android.md", "sdk/android-advanced.md"],
|
|
139
|
+
ios: ["sdk/ios-setup.md", "sdk/ios.md", "sdk/ios-advanced.md"],
|
|
140
|
+
macos: ["sdk/ios-setup.md", "sdk/ios.md", "sdk/ios-advanced.md"],
|
|
141
|
+
windows: ["sdk/windows-setup.md", "sdk/windows.md", "sdk/windows-advanced.md"],
|
|
142
|
+
flutter: ["sdk/flutter-setup.md", "sdk/flutter.md", "sdk/flutter-advanced.md"],
|
|
143
|
+
reactnative: ["sdk/react-native-setup.md", "sdk/react-native.md", "sdk/react-native-advanced.md"],
|
|
144
|
+
"react-native": ["sdk/react-native-setup.md", "sdk/react-native.md", "sdk/react-native-advanced.md"],
|
|
145
|
+
uniapp: ["sdk/uniapp-setup.md", "sdk/uniapp.md", "sdk/uniapp-advanced.md"],
|
|
146
|
+
};
|
|
147
|
+
const paths = map[normalized] || map.web;
|
|
148
|
+
const guides = await Promise.all(paths.map(getDocument));
|
|
149
|
+
return {
|
|
150
|
+
platform: normalized,
|
|
151
|
+
framework: String(framework || "").trim() || undefined,
|
|
152
|
+
sources: guides.map(({ path: sourcePath, title, url, text }) => ({ path: sourcePath, title, url, text })),
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export async function getTroubleshootingGuide(query = "") {
|
|
157
|
+
const document = await getDocument("troubleshooting.md");
|
|
158
|
+
const matches = query ? await searchDocs(query, 5) : [];
|
|
159
|
+
return {
|
|
160
|
+
source: { path: document.path, title: document.title, url: document.url },
|
|
161
|
+
query: String(query || "").trim() || undefined,
|
|
162
|
+
guide: document.text,
|
|
163
|
+
related: matches,
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
const integrationSources = {
|
|
168
|
+
web: ["sdk/web-setup.md", "sdk/web.md", "sdk/web-advanced.md"],
|
|
169
|
+
android: ["sdk/android-setup.md", "sdk/android.md", "sdk/android-advanced.md"],
|
|
170
|
+
ios: ["sdk/ios-setup.md", "sdk/ios.md", "sdk/ios-advanced.md"],
|
|
171
|
+
macos: ["sdk/ios-setup.md", "sdk/ios.md", "sdk/ios-advanced.md"],
|
|
172
|
+
windows: ["sdk/windows-setup.md", "sdk/windows.md", "sdk/windows-advanced.md"],
|
|
173
|
+
flutter: ["sdk/flutter-setup.md", "sdk/flutter.md", "sdk/flutter-advanced.md"],
|
|
174
|
+
reactnative: ["sdk/react-native-setup.md", "sdk/react-native.md", "sdk/react-native-advanced.md"],
|
|
175
|
+
"react-native": ["sdk/react-native-setup.md", "sdk/react-native.md", "sdk/react-native-advanced.md"],
|
|
176
|
+
uniapp: ["sdk/uniapp-setup.md", "sdk/uniapp.md", "sdk/uniapp-advanced.md"],
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
export async function getIntegrationPlan({ platform = "web", framework = "", player = "", protocol = "", scenario = "", mode = "from-zero" } = {}) {
|
|
180
|
+
const normalizedPlatform = String(platform || "web").trim().toLowerCase();
|
|
181
|
+
const paths = integrationSources[normalizedPlatform] || integrationSources.web;
|
|
182
|
+
const guides = await Promise.all(paths.map(getDocument));
|
|
183
|
+
const normalizedFramework = String(framework || "").trim();
|
|
184
|
+
const normalizedPlayer = String(player || "").trim();
|
|
185
|
+
const normalizedProtocol = String(protocol || "").trim().toUpperCase();
|
|
186
|
+
const normalizedScenario = String(scenario || "").trim();
|
|
187
|
+
const normalizedMode = String(mode || "from-zero").trim().toLowerCase();
|
|
188
|
+
const assumptions = [];
|
|
189
|
+
if (!normalizedFramework) assumptions.push("从项目依赖和入口文件识别框架");
|
|
190
|
+
if (!normalizedPlayer) assumptions.push("保留现有播放器,由 AI 根据项目代码识别播放器");
|
|
191
|
+
if (!normalizedProtocol) assumptions.push("从媒体地址和播放器配置识别 HLS、DASH 或直链协议");
|
|
192
|
+
return {
|
|
193
|
+
request: {
|
|
194
|
+
platform: normalizedPlatform,
|
|
195
|
+
framework: normalizedFramework || undefined,
|
|
196
|
+
player: normalizedPlayer || undefined,
|
|
197
|
+
protocol: normalizedProtocol || undefined,
|
|
198
|
+
scenario: normalizedScenario || undefined,
|
|
199
|
+
},
|
|
200
|
+
assumptions,
|
|
201
|
+
plan: [
|
|
202
|
+
"扫描项目入口、播放器、媒体协议、包管理器和现有鉴权,不覆盖业务代码",
|
|
203
|
+
"安装并锁定公开 SDK 版本,从环境变量读取 SDK Key",
|
|
204
|
+
"创建播放会话,把 SDK 返回的 playbackUrl 交给现有播放器",
|
|
205
|
+
"保留 CDN 回退、ABR、DRM、源站请求头和原有播放器生命周期",
|
|
206
|
+
"在切源、页面隐藏、播放结束和销毁时释放会话与连接",
|
|
207
|
+
"运行项目构建和测试,并输出修改文件、版本和未完成验收项",
|
|
208
|
+
],
|
|
209
|
+
mode: normalizedMode,
|
|
210
|
+
modeSteps: {
|
|
211
|
+
"from-zero": ["确认 SDK 与播放器边界", "生成最小播放接入", "执行构建、播放和双端 P2P 验收"],
|
|
212
|
+
demo: ["定位对应平台的公开示例", "只配置本地环境变量和测试媒体", "运行示例并记录播放、P2P、回退和释放结果"],
|
|
213
|
+
troubleshooting: ["复现并收集错误码和时间线", "检查 Key、bootstrap、Tracker、ICE、分片命中和回退", "给出证据、修复动作和复测命令"],
|
|
214
|
+
"feature-extension": ["读取当前集成和生命周期", "只修改实现目标功能所需的文件", "补齐针对功能的测试和回退验收"],
|
|
215
|
+
docs: ["先用公开文档和版本表回答", "每个结论附来源 URL", "不确定时明确标记未知,不编造 API"],
|
|
216
|
+
}[normalizedMode] || ["先确认任务模式", "按官方平台文档生成方案", "输出构建和验收证据"],
|
|
217
|
+
p2pAcceptance: [
|
|
218
|
+
"使用相同 contentId、内容和清晰度启动发送端与接收端",
|
|
219
|
+
"记录首个 Peer、首个 P2P 字节、P2P 下载、P2P 上传、CDN 字节和 rebuffer",
|
|
220
|
+
"只有接收端下载与发送端上传同时增长才算真实 P2P 通过",
|
|
221
|
+
"停止或阻断 P2P 后验证 CDN 回退,最后验证 dispose/close 释放连接",
|
|
222
|
+
],
|
|
223
|
+
sources: guides.map(({ path: sourcePath, title, url }) => ({ path: sourcePath, title, url })),
|
|
224
|
+
starterPrompt: `在当前${normalizedPlatform}项目中执行${normalizedMode}任务:${normalizedScenario || "接入 MeshStream P2P 媒体加速"}。已知上下文:框架=${normalizedFramework || "待识别"},播放器=${normalizedPlayer || "待识别"},协议=${normalizedProtocol || "待识别"}。先识别并确认上下文,再按官方文档生成最小改动方案。保留现有播放器、CDN、DRM、ABR 和源站鉴权;SDK Key 只能从环境变量读取;输出修改文件、精确依赖版本、构建结果、CDN 回退和真实 P2P 双端证据。`,
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
export function getPlatformMatrix() {
|
|
229
|
+
return {
|
|
230
|
+
platforms: Object.keys(integrationSources).map((platform) => ({
|
|
231
|
+
platform,
|
|
232
|
+
sources: integrationSources[platform].map((path) => ({ path, url: `https://meshstream.net/docs/${path.replace(/\.md$/, "")}` })),
|
|
233
|
+
capabilities: ["playback session", "CDN fallback", "P2P statistics", "lifecycle release"],
|
|
234
|
+
})),
|
|
235
|
+
acceptanceRule: "Peer count or WebSocket connection alone is not P2P proof; receiver download and sender upload bytes must both increase.",
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
export async function getBillingGuidance(query = "") {
|
|
240
|
+
const usage = await getDocument("billing/usage.md");
|
|
241
|
+
const matches = query ? await searchDocs(query, 5) : [];
|
|
242
|
+
return {
|
|
243
|
+
source: { path: usage.path, title: usage.title, url: usage.url },
|
|
244
|
+
pricingUrl: "https://meshstream.net/pricing",
|
|
245
|
+
guidance: usage.text,
|
|
246
|
+
related: matches,
|
|
247
|
+
note: "套餐、额度和用量只返回公开规则;实时余额、订单和支付状态请在控制台查看。",
|
|
248
|
+
};
|
|
249
|
+
}
|
package/src/server.mjs
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
3
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import { getBillingGuidance, getDocument, getIntegrationGuide, getIntegrationPlan, getPlatformMatrix, getSdkRelease, getTroubleshootingGuide, searchDocs } from "./catalog.mjs";
|
|
6
|
+
|
|
7
|
+
const server = new McpServer({ name: "meshstream-docs", version: "0.1.0" });
|
|
8
|
+
|
|
9
|
+
function result(value) {
|
|
10
|
+
return { content: [{ type: "text", text: JSON.stringify(value, null, 2) }] };
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
server.registerTool("search_docs", {
|
|
14
|
+
description: "Search the official MeshStream developer documentation. Read-only; results include source URLs and excerpts.",
|
|
15
|
+
inputSchema: {
|
|
16
|
+
query: z.string().min(1).describe("Question or keywords to search for"),
|
|
17
|
+
limit: z.number().int().min(1).max(10).optional().describe("Maximum number of results"),
|
|
18
|
+
},
|
|
19
|
+
}, async ({ query, limit }) => result({ query, results: await searchDocs(query, limit) }));
|
|
20
|
+
|
|
21
|
+
server.registerTool("get_sdk_release", {
|
|
22
|
+
description: "Read the public SDK version table from the official MeshStream documentation.",
|
|
23
|
+
inputSchema: {
|
|
24
|
+
platform: z.string().optional().describe("Platform filter such as web, android, ios, flutter, or all"),
|
|
25
|
+
},
|
|
26
|
+
}, async ({ platform }) => result(await getSdkRelease(platform)));
|
|
27
|
+
|
|
28
|
+
server.registerTool("get_integration_guide", {
|
|
29
|
+
description: "Return the official setup, integration, and advanced guide for a MeshStream SDK platform.",
|
|
30
|
+
inputSchema: {
|
|
31
|
+
platform: z.string().optional().describe("Platform such as web, android, ios, windows, flutter, react-native, or uniapp"),
|
|
32
|
+
framework: z.string().optional().describe("Optional framework or player context"),
|
|
33
|
+
},
|
|
34
|
+
}, async ({ platform, framework }) => result(await getIntegrationGuide(platform, framework)));
|
|
35
|
+
|
|
36
|
+
server.registerTool("get_troubleshooting_guide", {
|
|
37
|
+
description: "Return the official troubleshooting guide and related documentation matches.",
|
|
38
|
+
inputSchema: {
|
|
39
|
+
query: z.string().optional().describe("Optional symptom, error, or keyword"),
|
|
40
|
+
},
|
|
41
|
+
}, async ({ query }) => result(await getTroubleshootingGuide(query)));
|
|
42
|
+
|
|
43
|
+
server.registerTool("get_document", {
|
|
44
|
+
description: "Read one public MeshStream documentation page by its relative path. Read-only.",
|
|
45
|
+
inputSchema: {
|
|
46
|
+
path: z.string().min(1).describe("Relative path such as sdk/web.md or billing/usage.md"),
|
|
47
|
+
},
|
|
48
|
+
}, async ({ path }) => result(await getDocument(path)));
|
|
49
|
+
|
|
50
|
+
server.registerTool("get_integration_plan", {
|
|
51
|
+
description: "Create a structured, platform-aware MeshStream integration and P2P acceptance plan. Read-only; it does not edit customer files or use credentials.",
|
|
52
|
+
inputSchema: {
|
|
53
|
+
platform: z.string().optional().describe("web, android, ios, macos, windows, flutter, react-native, or uniapp"),
|
|
54
|
+
framework: z.string().optional().describe("Framework such as Vue, React, Flutter, or native"),
|
|
55
|
+
player: z.string().optional().describe("Existing media player such as hls.js, Shaka, Media3, or AVPlayer"),
|
|
56
|
+
protocol: z.string().optional().describe("HLS, DASH, MP4, or another actual media protocol"),
|
|
57
|
+
scenario: z.string().optional().describe("Scenario such as live playback, VOD, or add CDN fallback"),
|
|
58
|
+
mode: z.enum(["from-zero", "demo", "troubleshooting", "feature-extension", "docs"]).optional().describe("Task mode"),
|
|
59
|
+
},
|
|
60
|
+
}, async (args) => result(await getIntegrationPlan(args)));
|
|
61
|
+
|
|
62
|
+
server.registerTool("get_platform_matrix", {
|
|
63
|
+
description: "Return the supported MeshStream platform matrix and shared acceptance rules. Read-only.",
|
|
64
|
+
inputSchema: {},
|
|
65
|
+
}, async () => result(getPlatformMatrix()));
|
|
66
|
+
|
|
67
|
+
server.registerTool("get_billing_guidance", {
|
|
68
|
+
description: "Explain public MeshStream quota and plan rules and point to the pricing page. Read-only; it does not access account balance or place orders.",
|
|
69
|
+
inputSchema: {
|
|
70
|
+
query: z.string().optional().describe("Optional billing or quota question"),
|
|
71
|
+
},
|
|
72
|
+
}, async ({ query }) => result(await getBillingGuidance(query)));
|
|
73
|
+
|
|
74
|
+
await server.connect(new StdioServerTransport());
|