tuandad-mcp-eservice 1.0.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.
Files changed (2) hide show
  1. package/build/index.js +128 -0
  2. package/package.json +35 -0
package/build/index.js ADDED
@@ -0,0 +1,128 @@
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
+ /* =========================================
6
+ INIT MCP SERVER
7
+ ========================================= */
8
+ const server = new McpServer({
9
+ name: "eservice",
10
+ version: "1.0.0",
11
+ });
12
+ /* =========================================
13
+ TOOL: search_eservice
14
+ ========================================= */
15
+ server.tool("search_eservice", {
16
+ text: z.string().describe("Câu hỏi tìm kiếm eservice"),
17
+ }, async ({ text }) => {
18
+ return {
19
+ content: [
20
+ {
21
+ type: "text",
22
+ text: `[TOOL: search_eservice]\nCâu hỏi: ${text}`,
23
+ },
24
+ ],
25
+ };
26
+ });
27
+ /* =========================================
28
+ TOOL: answer_ehoadon
29
+ ========================================= */
30
+ server.tool("answer_ehoadon", {
31
+ text: z.string().describe("Câu hỏi liên quan đến hóa đơn điện tử"),
32
+ }, async ({ text }) => {
33
+ return {
34
+ content: [
35
+ {
36
+ type: "text",
37
+ text: `[TOOL: answer_ehoadon]\nCâu hỏi: ${text}`,
38
+ },
39
+ ],
40
+ };
41
+ });
42
+ /* =========================================
43
+ TOOL: answer_cks
44
+ ========================================= */
45
+ server.tool("answer_cks", {
46
+ text: z.string().describe("Câu hỏi liên quan đến chữ ký số"),
47
+ }, async ({ text }) => {
48
+ return {
49
+ content: [
50
+ {
51
+ type: "text",
52
+ text: `[TOOL: answer_cks]\nCâu hỏi: ${text}`,
53
+ },
54
+ ],
55
+ };
56
+ });
57
+ /* =========================================
58
+ TOOL: answer_ivan
59
+ ========================================= */
60
+ server.tool("answer_ivan", {
61
+ text: z.string().describe("Câu hỏi liên quan đến chứng thư số"),
62
+ }, async ({ text }) => {
63
+ return {
64
+ content: [
65
+ {
66
+ type: "text",
67
+ text: `[TOOL: answer_ivan]\nCâu hỏi: ${text}`,
68
+ },
69
+ ],
70
+ };
71
+ });
72
+ /* =========================================
73
+ TOOL: answer_eqlhd
74
+ ========================================= */
75
+ server.tool("answer_eqlhd", {
76
+ text: z.string().describe("Câu hỏi liên quan đến quản lý hóa đơn điện tử"),
77
+ }, async ({ text }) => {
78
+ return {
79
+ content: [
80
+ {
81
+ type: "text",
82
+ text: `[TOOL: answer_eqlhd]\nCâu hỏi: ${text}`,
83
+ },
84
+ ],
85
+ };
86
+ });
87
+ /* =========================================
88
+ TOOL: answer_echungtu
89
+ ========================================= */
90
+ server.tool("answer_echungtu", {
91
+ text: z.string().describe("Câu hỏi liên quan đến chứng từ điện tử"),
92
+ }, async ({ text }) => {
93
+ return {
94
+ content: [
95
+ {
96
+ type: "text",
97
+ text: `[TOOL: answer_echungtu]\nCâu hỏi: ${text}`,
98
+ },
99
+ ],
100
+ };
101
+ });
102
+ /* =========================================
103
+ TOOL: answer_tvan
104
+ ========================================= */
105
+ server.tool("answer_tvan", {
106
+ text: z.string().describe("Câu hỏi liên quan đến thuế điện tử"),
107
+ }, async ({ text }) => {
108
+ return {
109
+ content: [
110
+ {
111
+ type: "text",
112
+ text: `[TOOL: answer_tvan]\nCâu hỏi: ${text}`,
113
+ },
114
+ ],
115
+ };
116
+ });
117
+ /* =========================================
118
+ START MCP SERVER
119
+ ========================================= */
120
+ async function main() {
121
+ console.log("✅ MCP eservice server started");
122
+ const transport = new StdioServerTransport();
123
+ await server.connect(transport);
124
+ }
125
+ main().catch((err) => {
126
+ console.error("❌ Error starting server:", err);
127
+ process.exit(1);
128
+ });
package/package.json ADDED
@@ -0,0 +1,35 @@
1
+ {
2
+ "name": "tuandad-mcp-eservice",
3
+ "version": "1.0.4",
4
+ "main": "build/index.js",
5
+ "type": "module",
6
+ "bin": {
7
+ "vietnvc-mcp": "./build/index.js"
8
+ },
9
+ "scripts": {
10
+ "build": "tsc && chmod 755 build/index.js",
11
+ "start": "node build/index.js",
12
+ "prepublishOnly": "npm run build"
13
+ },
14
+ "files": [
15
+ "build"
16
+ ],
17
+ "keywords": [
18
+ "mcp",
19
+ "eservice",
20
+ "vietnamese",
21
+ "legal"
22
+ ],
23
+ "author": "",
24
+ "license": "ISC",
25
+ "description": "MCP server for Vietnamese eService legal documents",
26
+ "dependencies": {
27
+ "@modelcontextprotocol/sdk": "^1.10.2",
28
+ "node-fetch": "^3.3.2",
29
+ "zod": "^3.24.3"
30
+ },
31
+ "devDependencies": {
32
+ "@types/node": "^22.14.1",
33
+ "typescript": "^5.8.3"
34
+ }
35
+ }