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