@sendkit-cli-mcp/stdio-mcp 0.0.0 → 0.0.1
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 +1 -1
package/dist/index.js
CHANGED
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 { sendTelegramMessage, telegramMessageInputSchema } from \"@sendkit-cli-mcp/core\";\n\nconst server = new McpServer({\n name: \"sendkit-stdio-mcp\",\n version: \"0.0.0\",\n});\n\nfunction getTelegramBotToken() {\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 message to telegram chat\",\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\nasync function main(): Promise<void> {\n const transport = new StdioServerTransport();\n await server.connect(transport);\n}\n\nmain();\n"],"mappings":";;;;;AAKA,MAAM,SAAS,IAAI,UAAU;CAC3B,MAAM;CACN,SAAS;AACX,CAAC;AAED,SAAS,sBAAsB;CAC7B,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,eAAe,OAAsB;CACnC,MAAM,YAAY,IAAI,qBAAqB;CAC3C,MAAM,OAAO,QAAQ,SAAS;AAChC;AAEA,KAAK"}
|