tuandad-mcp-test 1.0.3

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/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,21 @@
1
+ {
2
+ "name": "tuandad-mcp-test",
3
+ "version": "1.0.3",
4
+ "type": "module",
5
+ "bin": {
6
+ "mcp-server": "build/index.js"
7
+ },
8
+ "scripts": {
9
+ "build": "tsc && chmod 755 build/index.js",
10
+ "start": "node build/index.js",
11
+ "prepublishOnly": "npm run build"
12
+ },
13
+ "dependencies": {
14
+ "@modelcontextprotocol/sdk": "^1.25.2",
15
+ "zod": "^4.3.5"
16
+ },
17
+ "devDependencies": {
18
+ "@types/node": "^25.0.9",
19
+ "typescript": "^5.9.3"
20
+ }
21
+ }
package/src/index.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":""}
package/src/index.js ADDED
@@ -0,0 +1,129 @@
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
+ });
129
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;4CAE4C;AAC5C,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC;IACzB,IAAI,EAAE,UAAU;IAChB,OAAO,EAAE,OAAO;CACnB,CAAC,CAAC;AAEH;;4CAE4C;AAC5C,MAAM,CAAC,IAAI,CACP,iBAAiB,EACjB;IACI,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,2BAA2B,CAAC;CACzD,EACD,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;IACf,OAAO;QACH,OAAO,EAAE;YACL;gBACI,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,qCAAqC,IAAI,EAAE;aACpD;SACJ;KACJ,CAAC;AACN,CAAC,CACJ,CAAC;AAEF;;4CAE4C;AAC5C,MAAM,CAAC,IAAI,CACP,gBAAgB,EAChB;IACI,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,uCAAuC,CAAC;CACrE,EACD,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;IACf,OAAO;QACH,OAAO,EAAE;YACL;gBACI,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,oCAAoC,IAAI,EAAE;aACnD;SACJ;KACJ,CAAC;AACN,CAAC,CACJ,CAAC;AAEF;;4CAE4C;AAC5C,MAAM,CAAC,IAAI,CACP,YAAY,EACZ;IACI,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iCAAiC,CAA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,aAAa,EACb;IACI,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,oCAAoC,CAAC;CAClE,EACD,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;IACf,OAAO;QACH,OAAO,EAAE;YACL;gBACI,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,iCAAiC,IAAI,EAAE;aAChD;SACJ;KACJ,CAAC;AACN,CAAC,CACJ,CAAC;AAEF;;4CAE4C;AAC5C,KAAK,UAAU,IAAI;IACf,OAAO,CAAC,GAAG,CAAC,+BAA+B,CAAC,CAAC;IAC7C,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;AACpC,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACjB,OAAO,CAAC,KAAK,CAAC,0BAA0B,EAAE,GAAG,CAAC,CAAC;IAC/C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC"}
package/src/index.ts ADDED
@@ -0,0 +1,167 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
4
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
5
+ import { z } from "zod";
6
+
7
+ /* =========================================
8
+ INIT MCP SERVER
9
+ ========================================= */
10
+ const server = new McpServer({
11
+ name: "eservice",
12
+ version: "1.0.0",
13
+ });
14
+
15
+ /* =========================================
16
+ TOOL: search_eservice
17
+ ========================================= */
18
+ server.tool(
19
+ "search_eservice",
20
+ {
21
+ text: z.string().describe("Câu hỏi tìm kiếm eservice"),
22
+ },
23
+ async ({ text }) => {
24
+ return {
25
+ content: [
26
+ {
27
+ type: "text",
28
+ text: `[TOOL: search_eservice]\nCâu hỏi: ${text}`,
29
+ },
30
+ ],
31
+ };
32
+ }
33
+ );
34
+
35
+ /* =========================================
36
+ TOOL: answer_ehoadon
37
+ ========================================= */
38
+ server.tool(
39
+ "answer_ehoadon",
40
+ {
41
+ text: z.string().describe("Câu hỏi liên quan đến hóa đơn điện tử"),
42
+ },
43
+ async ({ text }) => {
44
+ return {
45
+ content: [
46
+ {
47
+ type: "text",
48
+ text: `[TOOL: answer_ehoadon]\nCâu hỏi: ${text}`,
49
+ },
50
+ ],
51
+ };
52
+ }
53
+ );
54
+
55
+ /* =========================================
56
+ TOOL: answer_cks
57
+ ========================================= */
58
+ server.tool(
59
+ "answer_cks",
60
+ {
61
+ text: z.string().describe("Câu hỏi liên quan đến chữ ký số"),
62
+ },
63
+ async ({ text }) => {
64
+ return {
65
+ content: [
66
+ {
67
+ type: "text",
68
+ text: `[TOOL: answer_cks]\nCâu hỏi: ${text}`,
69
+ },
70
+ ],
71
+ };
72
+ }
73
+ );
74
+
75
+ /* =========================================
76
+ TOOL: answer_ivan
77
+ ========================================= */
78
+ server.tool(
79
+ "answer_ivan",
80
+ {
81
+ text: z.string().describe("Câu hỏi liên quan đến chứng thư số"),
82
+ },
83
+ async ({ text }) => {
84
+ return {
85
+ content: [
86
+ {
87
+ type: "text",
88
+ text: `[TOOL: answer_ivan]\nCâu hỏi: ${text}`,
89
+ },
90
+ ],
91
+ };
92
+ }
93
+ );
94
+
95
+ /* =========================================
96
+ TOOL: answer_eqlhd
97
+ ========================================= */
98
+ server.tool(
99
+ "answer_eqlhd",
100
+ {
101
+ text: z.string().describe("Câu hỏi liên quan đến quản lý hóa đơn điện tử"),
102
+ },
103
+ async ({ text }) => {
104
+ return {
105
+ content: [
106
+ {
107
+ type: "text",
108
+ text: `[TOOL: answer_eqlhd]\nCâu hỏi: ${text}`,
109
+ },
110
+ ],
111
+ };
112
+ }
113
+ );
114
+
115
+ /* =========================================
116
+ TOOL: answer_echungtu
117
+ ========================================= */
118
+ server.tool(
119
+ "answer_echungtu",
120
+ {
121
+ text: z.string().describe("Câu hỏi liên quan đến chứng từ điện tử"),
122
+ },
123
+ async ({ text }) => {
124
+ return {
125
+ content: [
126
+ {
127
+ type: "text",
128
+ text: `[TOOL: answer_echungtu]\nCâu hỏi: ${text}`,
129
+ },
130
+ ],
131
+ };
132
+ }
133
+ );
134
+
135
+ /* =========================================
136
+ TOOL: answer_tvan
137
+ ========================================= */
138
+ server.tool(
139
+ "answer_tvan",
140
+ {
141
+ text: z.string().describe("Câu hỏi liên quan đến thuế điện tử"),
142
+ },
143
+ async ({ text }) => {
144
+ return {
145
+ content: [
146
+ {
147
+ type: "text",
148
+ text: `[TOOL: answer_tvan]\nCâu hỏi: ${text}`,
149
+ },
150
+ ],
151
+ };
152
+ }
153
+ );
154
+
155
+ /* =========================================
156
+ START MCP SERVER
157
+ ========================================= */
158
+ async function main() {
159
+ console.log("✅ MCP eservice server started");
160
+ const transport = new StdioServerTransport();
161
+ await server.connect(transport);
162
+ }
163
+
164
+ main().catch((err) => {
165
+ console.error("❌ Error starting server:", err);
166
+ process.exit(1);
167
+ });
package/tsconfig.json ADDED
@@ -0,0 +1,19 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "NodeNext",
5
+ "moduleResolution": "NodeNext",
6
+ "rootDir": "src",
7
+ "outDir": "build",
8
+ "types": [
9
+ "node"
10
+ ],
11
+ "esModuleInterop": true,
12
+ "forceConsistentCasingInFileNames": true,
13
+ "strict": false,
14
+ "skipLibCheck": true
15
+ },
16
+ "include": [
17
+ "src"
18
+ ]
19
+ }