cas-parser-node-mcp 1.4.1 → 1.7.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/LICENSE +1 -1
- package/README.md +29 -147
- package/auth.d.mts +6 -0
- package/auth.d.mts.map +1 -0
- package/auth.d.ts +6 -0
- package/auth.d.ts.map +1 -0
- package/auth.js +22 -0
- package/auth.js.map +1 -0
- package/auth.mjs +17 -0
- package/auth.mjs.map +1 -0
- package/code-tool-types.d.mts +7 -7
- package/code-tool-types.d.mts.map +1 -1
- package/code-tool-types.d.ts +7 -7
- package/code-tool-types.d.ts.map +1 -1
- package/code-tool.d.mts +6 -3
- package/code-tool.d.mts.map +1 -1
- package/code-tool.d.ts +6 -3
- package/code-tool.d.ts.map +1 -1
- package/code-tool.js +86 -133
- package/code-tool.js.map +1 -1
- package/code-tool.mjs +86 -100
- package/code-tool.mjs.map +1 -1
- package/{tools/cas-generator/generate-cas-cas-generator.d.ts → docs-search-tool.d.mts} +23 -11
- package/docs-search-tool.d.mts.map +1 -0
- package/{tools/cas-generator/generate-cas-cas-generator.d.mts → docs-search-tool.d.ts} +23 -11
- package/docs-search-tool.d.ts.map +1 -0
- package/docs-search-tool.js +55 -0
- package/docs-search-tool.js.map +1 -0
- package/docs-search-tool.mjs +51 -0
- package/docs-search-tool.mjs.map +1 -0
- package/http.d.mts +9 -4
- package/http.d.mts.map +1 -1
- package/http.d.ts +9 -4
- package/http.d.ts.map +1 -1
- package/http.js +35 -48
- package/http.js.map +1 -1
- package/http.mjs +35 -48
- package/http.mjs.map +1 -1
- package/index.js +8 -40
- package/index.js.map +1 -1
- package/index.mjs +8 -40
- package/index.mjs.map +1 -1
- package/instructions.d.mts +2 -0
- package/instructions.d.mts.map +1 -0
- package/instructions.d.ts +2 -0
- package/instructions.d.ts.map +1 -0
- package/instructions.js +55 -0
- package/instructions.js.map +1 -0
- package/instructions.mjs +52 -0
- package/instructions.mjs.map +1 -0
- package/methods.d.mts +10 -0
- package/methods.d.mts.map +1 -0
- package/methods.d.ts +10 -0
- package/methods.d.ts.map +1 -0
- package/methods.js +167 -0
- package/methods.js.map +1 -0
- package/methods.mjs +163 -0
- package/methods.mjs.map +1 -0
- package/options.d.mts +6 -9
- package/options.d.mts.map +1 -1
- package/options.d.ts +6 -9
- package/options.d.ts.map +1 -1
- package/options.js +42 -360
- package/options.js.map +1 -1
- package/options.mjs +42 -360
- package/options.mjs.map +1 -1
- package/package.json +67 -79
- package/server.d.mts +10 -16
- package/server.d.mts.map +1 -1
- package/server.d.ts +10 -16
- package/server.d.ts.map +1 -1
- package/server.js +89 -101
- package/server.js.map +1 -1
- package/server.mjs +88 -96
- package/server.mjs.map +1 -1
- package/src/auth.ts +25 -0
- package/src/code-tool-types.ts +7 -5
- package/src/code-tool.ts +113 -117
- package/src/docs-search-tool.ts +68 -0
- package/src/http.ts +52 -52
- package/src/index.ts +9 -52
- package/src/instructions.ts +74 -0
- package/src/methods.ts +188 -0
- package/src/options.ts +55 -382
- package/src/server.ts +98 -117
- package/src/stdio.ts +4 -4
- package/src/{tools/types.ts → types.ts} +25 -5
- package/src/util.ts +25 -0
- package/stdio.d.mts +1 -1
- package/stdio.d.mts.map +1 -1
- package/stdio.d.ts +1 -1
- package/stdio.d.ts.map +1 -1
- package/stdio.js +3 -3
- package/stdio.js.map +1 -1
- package/stdio.mjs +3 -3
- package/stdio.mjs.map +1 -1
- package/{tools/types.d.mts → types.d.mts} +10 -2
- package/types.d.mts.map +1 -0
- package/{tools/types.d.ts → types.d.ts} +10 -2
- package/types.d.ts.map +1 -0
- package/{tools/types.js → types.js} +12 -0
- package/types.js.map +1 -0
- package/{tools/types.mjs → types.mjs} +11 -0
- package/types.mjs.map +1 -0
- package/util.d.mts +4 -0
- package/util.d.mts.map +1 -0
- package/util.d.ts +4 -0
- package/util.d.ts.map +1 -0
- package/util.js +30 -0
- package/util.js.map +1 -0
- package/util.mjs +24 -0
- package/util.mjs.map +1 -0
- package/code-tool-paths.cjs +0 -6
- package/code-tool-paths.cjs.map +0 -1
- package/code-tool-paths.d.cts +0 -2
- package/code-tool-paths.d.cts.map +0 -1
- package/code-tool-worker.d.mts +0 -5
- package/code-tool-worker.d.mts.map +0 -1
- package/code-tool-worker.d.ts +0 -5
- package/code-tool-worker.d.ts.map +0 -1
- package/code-tool-worker.js +0 -45
- package/code-tool-worker.js.map +0 -1
- package/code-tool-worker.mjs +0 -40
- package/code-tool-worker.mjs.map +0 -1
- package/compat.d.mts +0 -58
- package/compat.d.mts.map +0 -1
- package/compat.d.ts +0 -58
- package/compat.d.ts.map +0 -1
- package/compat.js +0 -387
- package/compat.js.map +0 -1
- package/compat.mjs +0 -378
- package/compat.mjs.map +0 -1
- package/dynamic-tools.d.mts +0 -12
- package/dynamic-tools.d.mts.map +0 -1
- package/dynamic-tools.d.ts +0 -12
- package/dynamic-tools.d.ts.map +0 -1
- package/dynamic-tools.js +0 -135
- package/dynamic-tools.js.map +0 -1
- package/dynamic-tools.mjs +0 -132
- package/dynamic-tools.mjs.map +0 -1
- package/filtering.d.mts +0 -2
- package/filtering.d.mts.map +0 -1
- package/filtering.d.ts +0 -2
- package/filtering.d.ts.map +0 -1
- package/filtering.js +0 -20
- package/filtering.js.map +0 -1
- package/filtering.mjs +0 -13
- package/filtering.mjs.map +0 -1
- package/headers.d.mts +0 -4
- package/headers.d.mts.map +0 -1
- package/headers.d.ts +0 -4
- package/headers.d.ts.map +0 -1
- package/headers.js +0 -10
- package/headers.js.map +0 -1
- package/headers.mjs +0 -6
- package/headers.mjs.map +0 -1
- package/src/code-tool-paths.cts +0 -3
- package/src/code-tool-worker.ts +0 -46
- package/src/compat.ts +0 -483
- package/src/dynamic-tools.ts +0 -159
- package/src/filtering.ts +0 -14
- package/src/headers.ts +0 -10
- package/src/tools/cas-generator/generate-cas-cas-generator.ts +0 -67
- package/src/tools/cas-parser/cams-kfintech-cas-parser.ts +0 -47
- package/src/tools/cas-parser/cdsl-cas-parser.ts +0 -47
- package/src/tools/cas-parser/nsdl-cas-parser.ts +0 -47
- package/src/tools/cas-parser/smart-parse-cas-parser.ts +0 -47
- package/src/tools/index.ts +0 -79
- package/src/tools.ts +0 -1
- package/tools/cas-generator/generate-cas-cas-generator.d.mts.map +0 -1
- package/tools/cas-generator/generate-cas-cas-generator.d.ts.map +0 -1
- package/tools/cas-generator/generate-cas-cas-generator.js +0 -62
- package/tools/cas-generator/generate-cas-cas-generator.js.map +0 -1
- package/tools/cas-generator/generate-cas-cas-generator.mjs +0 -58
- package/tools/cas-generator/generate-cas-cas-generator.mjs.map +0 -1
- package/tools/cas-parser/cams-kfintech-cas-parser.d.mts +0 -45
- package/tools/cas-parser/cams-kfintech-cas-parser.d.mts.map +0 -1
- package/tools/cas-parser/cams-kfintech-cas-parser.d.ts +0 -45
- package/tools/cas-parser/cams-kfintech-cas-parser.d.ts.map +0 -1
- package/tools/cas-parser/cams-kfintech-cas-parser.js +0 -43
- package/tools/cas-parser/cams-kfintech-cas-parser.js.map +0 -1
- package/tools/cas-parser/cams-kfintech-cas-parser.mjs +0 -39
- package/tools/cas-parser/cams-kfintech-cas-parser.mjs.map +0 -1
- package/tools/cas-parser/cdsl-cas-parser.d.mts +0 -45
- package/tools/cas-parser/cdsl-cas-parser.d.mts.map +0 -1
- package/tools/cas-parser/cdsl-cas-parser.d.ts +0 -45
- package/tools/cas-parser/cdsl-cas-parser.d.ts.map +0 -1
- package/tools/cas-parser/cdsl-cas-parser.js +0 -43
- package/tools/cas-parser/cdsl-cas-parser.js.map +0 -1
- package/tools/cas-parser/cdsl-cas-parser.mjs +0 -39
- package/tools/cas-parser/cdsl-cas-parser.mjs.map +0 -1
- package/tools/cas-parser/nsdl-cas-parser.d.mts +0 -45
- package/tools/cas-parser/nsdl-cas-parser.d.mts.map +0 -1
- package/tools/cas-parser/nsdl-cas-parser.d.ts +0 -45
- package/tools/cas-parser/nsdl-cas-parser.d.ts.map +0 -1
- package/tools/cas-parser/nsdl-cas-parser.js +0 -43
- package/tools/cas-parser/nsdl-cas-parser.js.map +0 -1
- package/tools/cas-parser/nsdl-cas-parser.mjs +0 -39
- package/tools/cas-parser/nsdl-cas-parser.mjs.map +0 -1
- package/tools/cas-parser/smart-parse-cas-parser.d.mts +0 -45
- package/tools/cas-parser/smart-parse-cas-parser.d.mts.map +0 -1
- package/tools/cas-parser/smart-parse-cas-parser.d.ts +0 -45
- package/tools/cas-parser/smart-parse-cas-parser.d.ts.map +0 -1
- package/tools/cas-parser/smart-parse-cas-parser.js +0 -43
- package/tools/cas-parser/smart-parse-cas-parser.js.map +0 -1
- package/tools/cas-parser/smart-parse-cas-parser.mjs +0 -39
- package/tools/cas-parser/smart-parse-cas-parser.mjs.map +0 -1
- package/tools/index.d.mts +0 -10
- package/tools/index.d.mts.map +0 -1
- package/tools/index.d.ts +0 -10
- package/tools/index.d.ts.map +0 -1
- package/tools/index.js +0 -63
- package/tools/index.js.map +0 -1
- package/tools/index.mjs +0 -56
- package/tools/index.mjs.map +0 -1
- package/tools/types.d.mts.map +0 -1
- package/tools/types.d.ts.map +0 -1
- package/tools/types.js.map +0 -1
- package/tools/types.mjs.map +0 -1
- package/tools.d.mts +0 -2
- package/tools.d.mts.map +0 -1
- package/tools.d.ts +0 -2
- package/tools.d.ts.map +0 -1
- package/tools.js +0 -18
- package/tools.js.map +0 -1
- package/tools.mjs +0 -2
- package/tools.mjs.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cas-parser-node-mcp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.2",
|
|
4
4
|
"description": "The official MCP Server for the Cas Parser API",
|
|
5
5
|
"author": "Cas Parser <sameer@casparser.in>",
|
|
6
6
|
"types": "./index.d.ts",
|
|
@@ -13,28 +13,24 @@
|
|
|
13
13
|
},
|
|
14
14
|
"homepage": "https://github.com/CASParser/cas-parser-node/tree/main/packages/mcp-server#readme",
|
|
15
15
|
"license": "Apache-2.0",
|
|
16
|
-
"packageManager": "yarn@1.22.22",
|
|
17
16
|
"private": false,
|
|
18
17
|
"publishConfig": {
|
|
19
18
|
"access": "public"
|
|
20
19
|
},
|
|
21
|
-
"scripts": {
|
|
22
|
-
"test": "jest",
|
|
23
|
-
"build": "bash ./build",
|
|
24
|
-
"format": "prettier --write --cache --cache-strategy metadata . !dist",
|
|
25
|
-
"tsn": "ts-node -r tsconfig-paths/register",
|
|
26
|
-
"lint": "eslint --ext ts,js .",
|
|
27
|
-
"fix": "eslint --fix --ext ts,js ."
|
|
28
|
-
},
|
|
29
20
|
"dependencies": {
|
|
30
|
-
"cas-parser-node": "^1.
|
|
21
|
+
"cas-parser-node": "^1.7.2",
|
|
31
22
|
"@cloudflare/cabidela": "^0.2.4",
|
|
32
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
23
|
+
"@modelcontextprotocol/sdk": "^1.25.2",
|
|
33
24
|
"@valtown/deno-http-worker": "^0.0.21",
|
|
25
|
+
"cookie-parser": "^1.4.6",
|
|
34
26
|
"cors": "^2.8.5",
|
|
35
27
|
"express": "^5.1.0",
|
|
36
|
-
"
|
|
37
|
-
"
|
|
28
|
+
"fuse.js": "^7.1.0",
|
|
29
|
+
"jq-web": "https://github.com/stainless-api/jq-web/releases/download/v0.8.8/jq-web.tar.gz",
|
|
30
|
+
"morgan": "^1.10.0",
|
|
31
|
+
"morgan-body": "^2.6.9",
|
|
32
|
+
"qs": "^6.14.1",
|
|
33
|
+
"typescript": "5.8.3",
|
|
38
34
|
"yargs": "^17.7.2",
|
|
39
35
|
"zod": "^3.25.20",
|
|
40
36
|
"zod-to-json-schema": "^3.24.5",
|
|
@@ -56,11 +52,15 @@
|
|
|
56
52
|
"types": "./index.d.mts",
|
|
57
53
|
"default": "./index.mjs"
|
|
58
54
|
},
|
|
59
|
-
"./
|
|
60
|
-
"
|
|
55
|
+
"./auth": {
|
|
56
|
+
"import": "./auth.mjs",
|
|
57
|
+
"require": "./auth.js"
|
|
58
|
+
},
|
|
59
|
+
"./auth.js": {
|
|
60
|
+
"default": "./auth.js"
|
|
61
61
|
},
|
|
62
|
-
"./
|
|
63
|
-
"default": "./
|
|
62
|
+
"./auth.mjs": {
|
|
63
|
+
"default": "./auth.mjs"
|
|
64
64
|
},
|
|
65
65
|
"./code-tool-types": {
|
|
66
66
|
"import": "./code-tool-types.mjs",
|
|
@@ -72,16 +72,6 @@
|
|
|
72
72
|
"./code-tool-types.mjs": {
|
|
73
73
|
"default": "./code-tool-types.mjs"
|
|
74
74
|
},
|
|
75
|
-
"./code-tool-worker": {
|
|
76
|
-
"import": "./code-tool-worker.mjs",
|
|
77
|
-
"require": "./code-tool-worker.js"
|
|
78
|
-
},
|
|
79
|
-
"./code-tool-worker.js": {
|
|
80
|
-
"default": "./code-tool-worker.js"
|
|
81
|
-
},
|
|
82
|
-
"./code-tool-worker.mjs": {
|
|
83
|
-
"default": "./code-tool-worker.mjs"
|
|
84
|
-
},
|
|
85
75
|
"./code-tool": {
|
|
86
76
|
"import": "./code-tool.mjs",
|
|
87
77
|
"require": "./code-tool.js"
|
|
@@ -92,45 +82,15 @@
|
|
|
92
82
|
"./code-tool.mjs": {
|
|
93
83
|
"default": "./code-tool.mjs"
|
|
94
84
|
},
|
|
95
|
-
"./
|
|
96
|
-
"import": "./
|
|
97
|
-
"require": "./
|
|
98
|
-
},
|
|
99
|
-
"./compat.js": {
|
|
100
|
-
"default": "./compat.js"
|
|
101
|
-
},
|
|
102
|
-
"./compat.mjs": {
|
|
103
|
-
"default": "./compat.mjs"
|
|
104
|
-
},
|
|
105
|
-
"./dynamic-tools": {
|
|
106
|
-
"import": "./dynamic-tools.mjs",
|
|
107
|
-
"require": "./dynamic-tools.js"
|
|
108
|
-
},
|
|
109
|
-
"./dynamic-tools.js": {
|
|
110
|
-
"default": "./dynamic-tools.js"
|
|
111
|
-
},
|
|
112
|
-
"./dynamic-tools.mjs": {
|
|
113
|
-
"default": "./dynamic-tools.mjs"
|
|
114
|
-
},
|
|
115
|
-
"./filtering": {
|
|
116
|
-
"import": "./filtering.mjs",
|
|
117
|
-
"require": "./filtering.js"
|
|
85
|
+
"./docs-search-tool": {
|
|
86
|
+
"import": "./docs-search-tool.mjs",
|
|
87
|
+
"require": "./docs-search-tool.js"
|
|
118
88
|
},
|
|
119
|
-
"./
|
|
120
|
-
"default": "./
|
|
89
|
+
"./docs-search-tool.js": {
|
|
90
|
+
"default": "./docs-search-tool.js"
|
|
121
91
|
},
|
|
122
|
-
"./
|
|
123
|
-
"default": "./
|
|
124
|
-
},
|
|
125
|
-
"./headers": {
|
|
126
|
-
"import": "./headers.mjs",
|
|
127
|
-
"require": "./headers.js"
|
|
128
|
-
},
|
|
129
|
-
"./headers.js": {
|
|
130
|
-
"default": "./headers.js"
|
|
131
|
-
},
|
|
132
|
-
"./headers.mjs": {
|
|
133
|
-
"default": "./headers.mjs"
|
|
92
|
+
"./docs-search-tool.mjs": {
|
|
93
|
+
"default": "./docs-search-tool.mjs"
|
|
134
94
|
},
|
|
135
95
|
"./http": {
|
|
136
96
|
"import": "./http.mjs",
|
|
@@ -152,6 +112,26 @@
|
|
|
152
112
|
"./index.mjs": {
|
|
153
113
|
"default": "./index.mjs"
|
|
154
114
|
},
|
|
115
|
+
"./instructions": {
|
|
116
|
+
"import": "./instructions.mjs",
|
|
117
|
+
"require": "./instructions.js"
|
|
118
|
+
},
|
|
119
|
+
"./instructions.js": {
|
|
120
|
+
"default": "./instructions.js"
|
|
121
|
+
},
|
|
122
|
+
"./instructions.mjs": {
|
|
123
|
+
"default": "./instructions.mjs"
|
|
124
|
+
},
|
|
125
|
+
"./methods": {
|
|
126
|
+
"import": "./methods.mjs",
|
|
127
|
+
"require": "./methods.js"
|
|
128
|
+
},
|
|
129
|
+
"./methods.js": {
|
|
130
|
+
"default": "./methods.js"
|
|
131
|
+
},
|
|
132
|
+
"./methods.mjs": {
|
|
133
|
+
"default": "./methods.mjs"
|
|
134
|
+
},
|
|
155
135
|
"./options": {
|
|
156
136
|
"import": "./options.mjs",
|
|
157
137
|
"require": "./options.js"
|
|
@@ -182,25 +162,33 @@
|
|
|
182
162
|
"./stdio.mjs": {
|
|
183
163
|
"default": "./stdio.mjs"
|
|
184
164
|
},
|
|
185
|
-
"./
|
|
186
|
-
"
|
|
165
|
+
"./types": {
|
|
166
|
+
"import": "./types.mjs",
|
|
167
|
+
"require": "./types.js"
|
|
187
168
|
},
|
|
188
|
-
"./
|
|
189
|
-
"default": "./
|
|
169
|
+
"./types.js": {
|
|
170
|
+
"default": "./types.js"
|
|
190
171
|
},
|
|
191
|
-
"./
|
|
192
|
-
"
|
|
193
|
-
"require": "./tools/*.js"
|
|
172
|
+
"./types.mjs": {
|
|
173
|
+
"default": "./types.mjs"
|
|
194
174
|
},
|
|
195
|
-
"./
|
|
196
|
-
"import": "./
|
|
197
|
-
"require": "./
|
|
175
|
+
"./util": {
|
|
176
|
+
"import": "./util.mjs",
|
|
177
|
+
"require": "./util.js"
|
|
198
178
|
},
|
|
199
|
-
"./
|
|
200
|
-
"default": "./
|
|
179
|
+
"./util.js": {
|
|
180
|
+
"default": "./util.js"
|
|
201
181
|
},
|
|
202
|
-
"./
|
|
203
|
-
"default": "./
|
|
182
|
+
"./util.mjs": {
|
|
183
|
+
"default": "./util.mjs"
|
|
204
184
|
}
|
|
185
|
+
},
|
|
186
|
+
"scripts": {
|
|
187
|
+
"test": "jest",
|
|
188
|
+
"build": "bash ./build",
|
|
189
|
+
"format": "prettier --write --cache --cache-strategy metadata . !dist",
|
|
190
|
+
"tsn": "ts-node -r tsconfig-paths/register",
|
|
191
|
+
"lint": "eslint --ext ts,js .",
|
|
192
|
+
"fix": "eslint --fix --ext ts,js ."
|
|
205
193
|
}
|
|
206
194
|
}
|
package/server.d.mts
CHANGED
|
@@ -1,18 +1,9 @@
|
|
|
1
1
|
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
2
2
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
3
|
-
import { Endpoint, HandlerFunction } from "./tools.mjs";
|
|
4
|
-
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
5
3
|
import { ClientOptions } from 'cas-parser-node';
|
|
6
|
-
import CasParser from 'cas-parser-node';
|
|
7
|
-
import { ClientCapabilities } from "./compat.mjs";
|
|
8
4
|
import { McpOptions } from "./options.mjs";
|
|
9
|
-
|
|
10
|
-
export
|
|
11
|
-
export { Filter } from "./tools.mjs";
|
|
12
|
-
export { ClientOptions } from 'cas-parser-node';
|
|
13
|
-
export { endpoints } from "./tools.mjs";
|
|
14
|
-
export declare const newMcpServer: () => McpServer;
|
|
15
|
-
export declare const server: McpServer;
|
|
5
|
+
import { HandlerFunction, McpRequestContext, ToolCallResult, McpTool } from "./types.mjs";
|
|
6
|
+
export declare const newMcpServer: (stainlessApiKey: string | undefined) => Promise<McpServer>;
|
|
16
7
|
/**
|
|
17
8
|
* Initializes the provided MCP Server with the given tools and handlers.
|
|
18
9
|
* If not provided, the default client, tools and handlers will be used.
|
|
@@ -21,15 +12,18 @@ export declare function initMcpServer(params: {
|
|
|
21
12
|
server: Server | McpServer;
|
|
22
13
|
clientOptions?: ClientOptions;
|
|
23
14
|
mcpOptions?: McpOptions;
|
|
24
|
-
|
|
15
|
+
stainlessApiKey?: string | undefined;
|
|
16
|
+
}): Promise<void>;
|
|
25
17
|
/**
|
|
26
18
|
* Selects the tools to include in the MCP Server based on the provided options.
|
|
27
19
|
*/
|
|
28
|
-
export declare function selectTools(
|
|
20
|
+
export declare function selectTools(options?: McpOptions): McpTool[];
|
|
29
21
|
/**
|
|
30
22
|
* Runs the provided handler with the given client and arguments.
|
|
31
23
|
*/
|
|
32
|
-
export declare function executeHandler(
|
|
33
|
-
|
|
34
|
-
|
|
24
|
+
export declare function executeHandler({ handler, reqContext, args, }: {
|
|
25
|
+
handler: HandlerFunction;
|
|
26
|
+
reqContext: McpRequestContext;
|
|
27
|
+
args: Record<string, unknown> | undefined;
|
|
28
|
+
}): Promise<ToolCallResult>;
|
|
35
29
|
//# sourceMappingURL=server.d.mts.map
|
package/server.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.mts","sourceRoot":"","sources":["src/server.ts"],"names":[],"mappings":"OAEO,EAAE,MAAM,EAAE,MAAM,2CAA2C;OAC3D,EAAE,SAAS,EAAE,MAAM,yCAAyC;
|
|
1
|
+
{"version":3,"file":"server.d.mts","sourceRoot":"","sources":["src/server.ts"],"names":[],"mappings":"OAEO,EAAE,MAAM,EAAE,MAAM,2CAA2C;OAC3D,EAAE,SAAS,EAAE,MAAM,yCAAyC;OAM5D,EAAE,aAAa,EAAE,MAAM,iBAAiB;OAKxC,EAAE,UAAU,EAAE;OAEd,EAAE,eAAe,EAAE,iBAAiB,EAAE,cAAc,EAAE,OAAO,EAAE;AAGtE,eAAO,MAAM,YAAY,GAAU,iBAAiB,MAAM,GAAG,SAAS,uBAUnE,CAAC;AAEJ;;;GAGG;AACH,wBAAsB,aAAa,CAAC,MAAM,EAAE;IAC1C,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACtC,iBAkHA;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,OAAO,CAAC,EAAE,UAAU,GAAG,OAAO,EAAE,CAU3D;AAED;;GAEG;AACH,wBAAsB,cAAc,CAAC,EACnC,OAAO,EACP,UAAU,EACV,IAAI,GACL,EAAE;IACD,OAAO,EAAE,eAAe,CAAC;IACzB,UAAU,EAAE,iBAAiB,CAAC;IAC9B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;CAC3C,GAAG,OAAO,CAAC,cAAc,CAAC,CAE1B"}
|
package/server.d.ts
CHANGED
|
@@ -1,18 +1,9 @@
|
|
|
1
1
|
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
2
2
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
3
|
-
import { Endpoint, HandlerFunction } from "./tools.js";
|
|
4
|
-
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
5
3
|
import { ClientOptions } from 'cas-parser-node';
|
|
6
|
-
import CasParser from 'cas-parser-node';
|
|
7
|
-
import { ClientCapabilities } from "./compat.js";
|
|
8
4
|
import { McpOptions } from "./options.js";
|
|
9
|
-
|
|
10
|
-
export
|
|
11
|
-
export { Filter } from "./tools.js";
|
|
12
|
-
export { ClientOptions } from 'cas-parser-node';
|
|
13
|
-
export { endpoints } from "./tools.js";
|
|
14
|
-
export declare const newMcpServer: () => McpServer;
|
|
15
|
-
export declare const server: McpServer;
|
|
5
|
+
import { HandlerFunction, McpRequestContext, ToolCallResult, McpTool } from "./types.js";
|
|
6
|
+
export declare const newMcpServer: (stainlessApiKey: string | undefined) => Promise<McpServer>;
|
|
16
7
|
/**
|
|
17
8
|
* Initializes the provided MCP Server with the given tools and handlers.
|
|
18
9
|
* If not provided, the default client, tools and handlers will be used.
|
|
@@ -21,15 +12,18 @@ export declare function initMcpServer(params: {
|
|
|
21
12
|
server: Server | McpServer;
|
|
22
13
|
clientOptions?: ClientOptions;
|
|
23
14
|
mcpOptions?: McpOptions;
|
|
24
|
-
|
|
15
|
+
stainlessApiKey?: string | undefined;
|
|
16
|
+
}): Promise<void>;
|
|
25
17
|
/**
|
|
26
18
|
* Selects the tools to include in the MCP Server based on the provided options.
|
|
27
19
|
*/
|
|
28
|
-
export declare function selectTools(
|
|
20
|
+
export declare function selectTools(options?: McpOptions): McpTool[];
|
|
29
21
|
/**
|
|
30
22
|
* Runs the provided handler with the given client and arguments.
|
|
31
23
|
*/
|
|
32
|
-
export declare function executeHandler(
|
|
33
|
-
|
|
34
|
-
|
|
24
|
+
export declare function executeHandler({ handler, reqContext, args, }: {
|
|
25
|
+
handler: HandlerFunction;
|
|
26
|
+
reqContext: McpRequestContext;
|
|
27
|
+
args: Record<string, unknown> | undefined;
|
|
28
|
+
}): Promise<ToolCallResult>;
|
|
35
29
|
//# sourceMappingURL=server.d.ts.map
|
package/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["src/server.ts"],"names":[],"mappings":"OAEO,EAAE,MAAM,EAAE,MAAM,2CAA2C;OAC3D,EAAE,SAAS,EAAE,MAAM,yCAAyC;
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["src/server.ts"],"names":[],"mappings":"OAEO,EAAE,MAAM,EAAE,MAAM,2CAA2C;OAC3D,EAAE,SAAS,EAAE,MAAM,yCAAyC;OAM5D,EAAE,aAAa,EAAE,MAAM,iBAAiB;OAKxC,EAAE,UAAU,EAAE;OAEd,EAAE,eAAe,EAAE,iBAAiB,EAAE,cAAc,EAAE,OAAO,EAAE;AAGtE,eAAO,MAAM,YAAY,GAAU,iBAAiB,MAAM,GAAG,SAAS,uBAUnE,CAAC;AAEJ;;;GAGG;AACH,wBAAsB,aAAa,CAAC,MAAM,EAAE;IAC1C,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACtC,iBAkHA;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,OAAO,CAAC,EAAE,UAAU,GAAG,OAAO,EAAE,CAU3D;AAED;;GAEG;AACH,wBAAsB,cAAc,CAAC,EACnC,OAAO,EACP,UAAU,EACV,IAAI,GACL,EAAE;IACD,OAAO,EAAE,eAAe,CAAC;IACzB,UAAU,EAAE,iBAAiB,CAAC;IAC9B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;CAC3C,GAAG,OAAO,CAAC,cAAc,CAAC,CAE1B"}
|
package/server.js
CHANGED
|
@@ -4,51 +4,32 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
5
|
};
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.
|
|
7
|
+
exports.newMcpServer = void 0;
|
|
8
8
|
exports.initMcpServer = initMcpServer;
|
|
9
9
|
exports.selectTools = selectTools;
|
|
10
10
|
exports.executeHandler = executeHandler;
|
|
11
11
|
const mcp_js_1 = require("@modelcontextprotocol/sdk/server/mcp.js");
|
|
12
|
-
const tools_1 = require("./tools.js");
|
|
13
12
|
const types_js_1 = require("@modelcontextprotocol/sdk/types.js");
|
|
14
13
|
const cas_parser_node_1 = __importDefault(require("cas-parser-node"));
|
|
15
|
-
const compat_1 = require("./compat.js");
|
|
16
|
-
const dynamic_tools_1 = require("./dynamic-tools.js");
|
|
17
14
|
const code_tool_1 = require("./code-tool.js");
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const newMcpServer = () => new mcp_js_1.McpServer({
|
|
15
|
+
const docs_search_tool_1 = __importDefault(require("./docs-search-tool.js"));
|
|
16
|
+
const instructions_1 = require("./instructions.js");
|
|
17
|
+
const methods_1 = require("./methods.js");
|
|
18
|
+
const util_1 = require("./util.js");
|
|
19
|
+
const newMcpServer = async (stainlessApiKey) => new mcp_js_1.McpServer({
|
|
23
20
|
name: 'cas_parser_node_api',
|
|
24
|
-
version: '1.
|
|
25
|
-
}, {
|
|
21
|
+
version: '1.7.2',
|
|
22
|
+
}, {
|
|
23
|
+
instructions: await (0, instructions_1.getInstructions)(stainlessApiKey),
|
|
24
|
+
capabilities: { tools: {}, logging: {} },
|
|
25
|
+
});
|
|
26
26
|
exports.newMcpServer = newMcpServer;
|
|
27
|
-
// Create server instance
|
|
28
|
-
exports.server = (0, exports.newMcpServer)();
|
|
29
27
|
/**
|
|
30
28
|
* Initializes the provided MCP Server with the given tools and handlers.
|
|
31
29
|
* If not provided, the default client, tools and handlers will be used.
|
|
32
30
|
*/
|
|
33
|
-
function initMcpServer(params) {
|
|
31
|
+
async function initMcpServer(params) {
|
|
34
32
|
const server = params.server instanceof mcp_js_1.McpServer ? params.server.server : params.server;
|
|
35
|
-
const mcpOptions = params.mcpOptions ?? {};
|
|
36
|
-
let providedEndpoints = null;
|
|
37
|
-
let endpointMap = null;
|
|
38
|
-
const initTools = async (implementation) => {
|
|
39
|
-
if (implementation && (!mcpOptions.client || mcpOptions.client === 'infer')) {
|
|
40
|
-
mcpOptions.client =
|
|
41
|
-
implementation.name.toLowerCase().includes('claude') ? 'claude'
|
|
42
|
-
: implementation.name.toLowerCase().includes('cursor') ? 'cursor'
|
|
43
|
-
: undefined;
|
|
44
|
-
mcpOptions.capabilities = {
|
|
45
|
-
...(mcpOptions.client && compat_1.knownClients[mcpOptions.client]),
|
|
46
|
-
...mcpOptions.capabilities,
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
providedEndpoints ?? (providedEndpoints = await selectTools(tools_1.endpoints, mcpOptions));
|
|
50
|
-
endpointMap ?? (endpointMap = Object.fromEntries(providedEndpoints.map((endpoint) => [endpoint.tool.name, endpoint])));
|
|
51
|
-
};
|
|
52
33
|
const logAtLevel = (level) => (message, ...rest) => {
|
|
53
34
|
void server.sendLoggingMessage({
|
|
54
35
|
level,
|
|
@@ -61,110 +42,117 @@ function initMcpServer(params) {
|
|
|
61
42
|
warn: logAtLevel('warning'),
|
|
62
43
|
error: logAtLevel('error'),
|
|
63
44
|
};
|
|
64
|
-
let
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
45
|
+
let _client;
|
|
46
|
+
let _clientError;
|
|
47
|
+
let _logLevel;
|
|
48
|
+
const getClient = () => {
|
|
49
|
+
if (_clientError)
|
|
50
|
+
throw _clientError;
|
|
51
|
+
if (!_client) {
|
|
52
|
+
try {
|
|
53
|
+
_client = new cas_parser_node_1.default({
|
|
54
|
+
...{ environment: ((0, util_1.readEnv)('CAS_PARSER_ENVIRONMENT') || undefined) },
|
|
55
|
+
logger,
|
|
56
|
+
...params.clientOptions,
|
|
57
|
+
defaultHeaders: {
|
|
58
|
+
...params.clientOptions?.defaultHeaders,
|
|
59
|
+
'X-Stainless-MCP': 'true',
|
|
60
|
+
},
|
|
61
|
+
});
|
|
62
|
+
if (_logLevel) {
|
|
63
|
+
_client = _client.withOptions({ logLevel: _logLevel });
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
catch (e) {
|
|
67
|
+
_clientError = e instanceof Error ? e : new Error(String(e));
|
|
68
|
+
throw _clientError;
|
|
69
|
+
}
|
|
75
70
|
}
|
|
71
|
+
return _client;
|
|
72
|
+
};
|
|
73
|
+
const providedTools = selectTools(params.mcpOptions);
|
|
74
|
+
const toolMap = Object.fromEntries(providedTools.map((mcpTool) => [mcpTool.tool.name, mcpTool]));
|
|
75
|
+
server.setRequestHandler(types_js_1.ListToolsRequestSchema, async () => {
|
|
76
76
|
return {
|
|
77
|
-
tools:
|
|
77
|
+
tools: providedTools.map((mcpTool) => mcpTool.tool),
|
|
78
78
|
};
|
|
79
79
|
});
|
|
80
80
|
server.setRequestHandler(types_js_1.CallToolRequestSchema, async (request) => {
|
|
81
|
-
if (endpointMap === null) {
|
|
82
|
-
await initTools(server.getClientVersion());
|
|
83
|
-
}
|
|
84
81
|
const { name, arguments: args } = request.params;
|
|
85
|
-
const
|
|
86
|
-
if (!
|
|
82
|
+
const mcpTool = toolMap[name];
|
|
83
|
+
if (!mcpTool) {
|
|
87
84
|
throw new Error(`Unknown tool: ${name}`);
|
|
88
85
|
}
|
|
89
|
-
|
|
86
|
+
let client;
|
|
87
|
+
try {
|
|
88
|
+
client = getClient();
|
|
89
|
+
}
|
|
90
|
+
catch (error) {
|
|
91
|
+
return {
|
|
92
|
+
content: [
|
|
93
|
+
{
|
|
94
|
+
type: 'text',
|
|
95
|
+
text: `Failed to initialize client: ${error instanceof Error ? error.message : String(error)}`,
|
|
96
|
+
},
|
|
97
|
+
],
|
|
98
|
+
isError: true,
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
return executeHandler({
|
|
102
|
+
handler: mcpTool.handler,
|
|
103
|
+
reqContext: {
|
|
104
|
+
client,
|
|
105
|
+
stainlessApiKey: params.stainlessApiKey ?? params.mcpOptions?.stainlessApiKey,
|
|
106
|
+
},
|
|
107
|
+
args,
|
|
108
|
+
});
|
|
90
109
|
});
|
|
91
110
|
server.setRequestHandler(types_js_1.SetLevelRequestSchema, async (request) => {
|
|
92
111
|
const { level } = request.params;
|
|
112
|
+
let logLevel;
|
|
93
113
|
switch (level) {
|
|
94
114
|
case 'debug':
|
|
95
|
-
|
|
115
|
+
logLevel = 'debug';
|
|
96
116
|
break;
|
|
97
117
|
case 'info':
|
|
98
|
-
|
|
118
|
+
logLevel = 'info';
|
|
99
119
|
break;
|
|
100
120
|
case 'notice':
|
|
101
121
|
case 'warning':
|
|
102
|
-
|
|
122
|
+
logLevel = 'warn';
|
|
103
123
|
break;
|
|
104
124
|
case 'error':
|
|
105
|
-
|
|
125
|
+
logLevel = 'error';
|
|
106
126
|
break;
|
|
107
127
|
default:
|
|
108
|
-
|
|
128
|
+
logLevel = 'off';
|
|
109
129
|
break;
|
|
110
130
|
}
|
|
131
|
+
_logLevel = logLevel;
|
|
132
|
+
if (_client) {
|
|
133
|
+
_client = _client.withOptions({ logLevel });
|
|
134
|
+
}
|
|
111
135
|
return {};
|
|
112
136
|
});
|
|
113
137
|
}
|
|
114
138
|
/**
|
|
115
139
|
* Selects the tools to include in the MCP Server based on the provided options.
|
|
116
140
|
*/
|
|
117
|
-
|
|
118
|
-
const
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
else {
|
|
126
|
-
if (options?.includeAllTools) {
|
|
127
|
-
includedTools = endpoints;
|
|
128
|
-
}
|
|
129
|
-
else if (options?.includeDynamicTools) {
|
|
130
|
-
includedTools = (0, dynamic_tools_1.dynamicTools)(endpoints);
|
|
131
|
-
}
|
|
132
|
-
else if (options?.includeCodeTools) {
|
|
133
|
-
includedTools = [await (0, code_tool_1.codeTool)()];
|
|
134
|
-
}
|
|
135
|
-
else {
|
|
136
|
-
includedTools = endpoints;
|
|
137
|
-
}
|
|
141
|
+
function selectTools(options) {
|
|
142
|
+
const includedTools = [
|
|
143
|
+
(0, code_tool_1.codeTool)({
|
|
144
|
+
blockedMethods: (0, methods_1.blockedMethodsForCodeTool)(options),
|
|
145
|
+
}),
|
|
146
|
+
];
|
|
147
|
+
if (options?.includeDocsTools ?? true) {
|
|
148
|
+
includedTools.push(docs_search_tool_1.default);
|
|
138
149
|
}
|
|
139
|
-
|
|
140
|
-
return (0, compat_1.applyCompatibilityTransformations)(includedTools, capabilities);
|
|
150
|
+
return includedTools;
|
|
141
151
|
}
|
|
142
152
|
/**
|
|
143
153
|
* Runs the provided handler with the given client and arguments.
|
|
144
154
|
*/
|
|
145
|
-
async function executeHandler(
|
|
146
|
-
|
|
147
|
-
if (!options.validJson && args) {
|
|
148
|
-
args = (0, compat_1.parseEmbeddedJSON)(args, tool.inputSchema);
|
|
149
|
-
}
|
|
150
|
-
return await handler(client, args || {});
|
|
155
|
+
async function executeHandler({ handler, reqContext, args, }) {
|
|
156
|
+
return await handler({ reqContext, args: args || {} });
|
|
151
157
|
}
|
|
152
|
-
const readEnv = (env) => {
|
|
153
|
-
if (typeof globalThis.process !== 'undefined') {
|
|
154
|
-
return globalThis.process.env?.[env]?.trim();
|
|
155
|
-
}
|
|
156
|
-
else if (typeof globalThis.Deno !== 'undefined') {
|
|
157
|
-
return globalThis.Deno.env?.get?.(env)?.trim();
|
|
158
|
-
}
|
|
159
|
-
return;
|
|
160
|
-
};
|
|
161
|
-
exports.readEnv = readEnv;
|
|
162
|
-
const readEnvOrError = (env) => {
|
|
163
|
-
let envValue = (0, exports.readEnv)(env);
|
|
164
|
-
if (envValue === undefined) {
|
|
165
|
-
throw new Error(`Environment variable ${env} is not set`);
|
|
166
|
-
}
|
|
167
|
-
return envValue;
|
|
168
|
-
};
|
|
169
|
-
exports.readEnvOrError = readEnvOrError;
|
|
170
158
|
//# sourceMappingURL=server.js.map
|
package/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["src/server.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["src/server.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;AAmCtF,sCAuHC;AAKD,kCAUC;AAKD,wCAUC;AArLD,oEAAoE;AACpE,iEAI4C;AAE5C,sEAAwC;AACxC,8CAAuC;AACvC,6EAAgD;AAChD,oDAAiD;AAEjD,0CAAsD;AAEtD,oCAAiC;AAE1B,MAAM,YAAY,GAAG,KAAK,EAAE,eAAmC,EAAE,EAAE,CACxE,IAAI,kBAAS,CACX;IACE,IAAI,EAAE,qBAAqB;IAC3B,OAAO,EAAE,OAAO;CACjB,EACD;IACE,YAAY,EAAE,MAAM,IAAA,8BAAe,EAAC,eAAe,CAAC;IACpD,YAAY,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;CACzC,CACF,CAAC;AAVS,QAAA,YAAY,gBAUrB;AAEJ;;;GAGG;AACI,KAAK,UAAU,aAAa,CAAC,MAKnC;IACC,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,YAAY,kBAAS,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC;IAEzF,MAAM,UAAU,GACd,CAAC,KAA6C,EAAE,EAAE,CAClD,CAAC,OAAe,EAAE,GAAG,IAAe,EAAE,EAAE;QACtC,KAAK,MAAM,C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