@boyanivskyy-packages/sendkit-mcp 0.0.0 → 0.0.2
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/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
1
2
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
3
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
3
4
|
import { sendTelegramMessage, telegramMessageInputSchema } from "@boyanivskyy-packages/sendkit-core";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["#!/usr/bin/env node\nimport { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';\nimport {\n sendTelegramMessage,\n telegramMessageInputSchema,\n} from '@boyanivskyy-packages/sendkit-core';\n\nconst server = new McpServer({\n name: 'sendkit-local',\n version: '0.0.0',\n});\n\nfunction getTelegramBotToken(): string {\n const token = process.env.TELEGRAM_BOT_TOKEN;\n\n if (!token) {\n throw new Error('TELEGRAM_BOT_TOKEN is required. Configure it in your MCP client environment.');\n }\n\n return token;\n}\n\nserver.registerTool(\n 'telegram',\n {\n title: 'Telegram',\n description: 'Send a Telegram message',\n inputSchema: telegramMessageInputSchema.shape,\n },\n async (input) => {\n const result = await sendTelegramMessage({\n ...input,\n botToken: getTelegramBotToken(),\n });\n\n return {\n content: [\n {\n type: 'text',\n text: `Sent Telegram message ${result.messageId} to chat ${result.chatId}`,\n },\n ],\n structuredContent: result,\n };\n },\n);\n\nconst transport = new StdioServerTransport();\nawait server.connect(transport);\n"],"mappings":";;;;;AAQA,MAAM,SAAS,IAAI,UAAU;CAC3B,MAAM;CACN,SAAS;AACX,CAAC;AAED,SAAS,sBAA8B;CACrC,MAAM,QAAQ,QAAQ,IAAI;CAE1B,IAAI,CAAC,OACH,MAAM,IAAI,MAAM,8EAA8E;CAGhG,OAAO;AACT;AAEA,OAAO,aACL,YACA;CACE,OAAO;CACP,aAAa;CACb,aAAa,2BAA2B;AAC1C,GACA,OAAO,UAAU;CACf,MAAM,SAAS,MAAM,oBAAoB;EACvC,GAAG;EACH,UAAU,oBAAoB;CAChC,CAAC;CAED,OAAO;EACL,SAAS,CACP;GACE,MAAM;GACN,MAAM,yBAAyB,OAAO,UAAU,WAAW,OAAO;EACpE,CACF;EACA,mBAAmB;CACrB;AACF,CACF;AAEA,MAAM,YAAY,IAAI,qBAAqB;AAC3C,MAAM,OAAO,QAAQ,SAAS"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@boyanivskyy-packages/sendkit-mcp",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"bin": {
|
|
5
5
|
"sendkit-mcp": "./dist/index.js"
|
|
6
6
|
},
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
],
|
|
10
10
|
"type": "module",
|
|
11
11
|
"main": "./dist/index.js",
|
|
12
|
-
"module": "
|
|
13
|
-
"types": "
|
|
12
|
+
"module": "./dist/index.js",
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
14
|
"exports": {
|
|
15
15
|
".": {
|
|
16
16
|
"types": "./dist/index.d.ts",
|