@sassoftware/sas-score-mcp-serverjs 0.0.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/.babelrc +6 -0
- package/.env +13 -0
- package/.env.http +29 -0
- package/CHANGES.md +2 -0
- package/CONTRIBUTING.md +14 -0
- package/ContributorAgreement.txt +56 -0
- package/LICENSE +205 -0
- package/LICENSES.json +105 -0
- package/QUICK_REFERENCE.md +378 -0
- package/README.md +267 -0
- package/SECURITY.md +31 -0
- package/SUPPORT.md +3 -0
- package/TOOL_DESCRIPTION_TEMPLATE.md +157 -0
- package/TOOL_UPDATES_SUMMARY.md +208 -0
- package/cli.js +214 -0
- package/labs/.subclass.json +13 -0
- package/labs/README.md +4 -0
- package/mcpConfigurations/README.md +3 -0
- package/mcpConfigurations/http.json +8 -0
- package/mcpConfigurations/stdio.json +20 -0
- package/mcpConfigurations/stdiodev.json +20 -0
- package/mcpserver.png +0 -0
- package/openApi.json +106 -0
- package/openApi.yaml +84 -0
- package/package.json +72 -0
- package/sas-mcp-tools-reference.md +600 -0
- package/sasCode/sas-sql-query.sas +33 -0
- package/sasCode/sas_sql_tool.json +237 -0
- package/scripts/getViyaca.sh +8 -0
- package/src/core.js +19 -0
- package/src/coreSSE.js +14 -0
- package/src/corehttp.js +335 -0
- package/src/createHttpTransport.js +26 -0
- package/src/createMcpServer.js +76 -0
- package/src/db/scrModels.js +23 -0
- package/src/toolSet/devaScore.js +69 -0
- package/src/toolSet/findJob.js +90 -0
- package/src/toolSet/findJobdef.js +95 -0
- package/src/toolSet/findLibrary.js +100 -0
- package/src/toolSet/findModel.js +83 -0
- package/src/toolSet/findTable.js +94 -0
- package/src/toolSet/getEnv.js +72 -0
- package/src/toolSet/listJobdefs.js +96 -0
- package/src/toolSet/listJobs.js +110 -0
- package/src/toolSet/listLibraries.js +90 -0
- package/src/toolSet/listModels.js +83 -0
- package/src/toolSet/listTables.js +95 -0
- package/src/toolSet/makeTools.js +75 -0
- package/src/toolSet/mcp server .png +0 -0
- package/src/toolSet/modelInfo.js +87 -0
- package/src/toolSet/modelScore.js +131 -0
- package/src/toolSet/readTable.js +104 -0
- package/src/toolSet/runCasProgram.js +118 -0
- package/src/toolSet/runJob.js +81 -0
- package/src/toolSet/runJobdef.js +85 -0
- package/src/toolSet/runMacro.js +82 -0
- package/src/toolSet/runProgram.js +145 -0
- package/src/toolSet/sasQuery.js +126 -0
- package/src/toolSet/sasQueryTemplate.js +148 -0
- package/src/toolSet/sasQueryTemplate2.js +140 -0
- package/src/toolSet/scrInfo.js +55 -0
- package/src/toolSet/scrScore.js +71 -0
- package/src/toolSet/searchAssets.js +52 -0
- package/src/toolSet/setContext.js +98 -0
- package/src/toolSet/superstat.js +60 -0
- package/src/toolSet/tableInfo.js +102 -0
- package/src/toolhelpers/_catalogSearch.js +87 -0
- package/src/toolhelpers/_getEnv.js +10 -0
- package/src/toolhelpers/_itemsData.js +28 -0
- package/src/toolhelpers/_jobSubmit.js +78 -0
- package/src/toolhelpers/_listJobdefs.js +59 -0
- package/src/toolhelpers/_listJobs.js +63 -0
- package/src/toolhelpers/_listLibrary.js +56 -0
- package/src/toolhelpers/_listModels.js +41 -0
- package/src/toolhelpers/_listTables.js +52 -0
- package/src/toolhelpers/_masDescribe.js +27 -0
- package/src/toolhelpers/_masScoring.js +64 -0
- package/src/toolhelpers/_readTable.js +69 -0
- package/src/toolhelpers/_scrInfo.js +32 -0
- package/src/toolhelpers/_scrScore.js +49 -0
- package/src/toolhelpers/_submitCasl.js +34 -0
- package/src/toolhelpers/_submitCode.js +96 -0
- package/src/toolhelpers/_submitMacro.js +24 -0
- package/src/toolhelpers/_tableColumns.js +61 -0
- package/src/toolhelpers/_tableInfo.js +72 -0
- package/src/toolhelpers/deleteSession.js +13 -0
- package/src/toolhelpers/getLogonPayload.js +100 -0
- package/src/toolhelpers/getOpts.js +43 -0
- package/src/toolhelpers/getOptsViya.js +38 -0
- package/src/toolhelpers/getStoreOpts.js +18 -0
- package/src/toolhelpers/getToken.js +40 -0
- package/src/toolhelpers/refreshToken.js +48 -0
- package/test/README.md +63 -0
- package/test/listLibraries.test.js +245 -0
- package/tool-developer-guide.md +80 -0
- package/types.js +25 -0
package/openApi.json
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
{
|
|
2
|
+
"swagger": "2.0",
|
|
3
|
+
"info": {
|
|
4
|
+
"title": "SAS Viya Sample MCP Server",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"description": "OpenAPI 2.0 spec for the SAS Viya Sample MCP Server"
|
|
7
|
+
},
|
|
8
|
+
"host": "localhost:8080",
|
|
9
|
+
"schemes": ["http", "https"],
|
|
10
|
+
"basePath": "/",
|
|
11
|
+
"paths": {
|
|
12
|
+
"/health": {
|
|
13
|
+
"get": {
|
|
14
|
+
"summary": "Health check endpoint",
|
|
15
|
+
"description": "Returns server health and metadata",
|
|
16
|
+
"produces": ["application/json"],
|
|
17
|
+
"responses": {
|
|
18
|
+
"200": {
|
|
19
|
+
"description": "Health info",
|
|
20
|
+
"schema": { "type": "object" }
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"/": {
|
|
26
|
+
"get": {
|
|
27
|
+
"summary": "Root endpoint",
|
|
28
|
+
"description": "Returns server info and usage",
|
|
29
|
+
"produces": ["application/json"],
|
|
30
|
+
"responses": {
|
|
31
|
+
"200": {
|
|
32
|
+
"description": "Server info",
|
|
33
|
+
"schema": { "type": "object" }
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"/mcp": {
|
|
39
|
+
"get": {
|
|
40
|
+
"summary": "MCP endpoint (GET)",
|
|
41
|
+
"description": "Handles MCP protocol requests (GET)",
|
|
42
|
+
"produces": ["application/json"],
|
|
43
|
+
"parameters": [
|
|
44
|
+
{
|
|
45
|
+
"name": "Authorization",
|
|
46
|
+
"in": "header",
|
|
47
|
+
"type": "string",
|
|
48
|
+
"required": false
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
"responses": {
|
|
52
|
+
"200": {
|
|
53
|
+
"description": "MCP response",
|
|
54
|
+
"schema": { "type": "object" }
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"post": {
|
|
59
|
+
"summary": "MCP endpoint (POST)",
|
|
60
|
+
"description": "Handles MCP protocol requests (POST)",
|
|
61
|
+
"consumes": ["application/json"],
|
|
62
|
+
"produces": ["application/json"],
|
|
63
|
+
"parameters": [
|
|
64
|
+
{
|
|
65
|
+
"name": "Authorization",
|
|
66
|
+
"in": "header",
|
|
67
|
+
"type": "string",
|
|
68
|
+
"required": false
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"name": "X-VIYA-SERVER",
|
|
72
|
+
"in": "header",
|
|
73
|
+
"type": "string",
|
|
74
|
+
"required": false
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"name": "X-REFRESH-TOKEN",
|
|
78
|
+
"in": "header",
|
|
79
|
+
"type": "string",
|
|
80
|
+
"required": false
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"name": "body",
|
|
84
|
+
"in": "body",
|
|
85
|
+
"schema": { "type": "object" }
|
|
86
|
+
}
|
|
87
|
+
],
|
|
88
|
+
"responses": {
|
|
89
|
+
"200": {
|
|
90
|
+
"description": "MCP response",
|
|
91
|
+
"schema": { "type": "object" }
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"options": {
|
|
96
|
+
"summary": "CORS preflight",
|
|
97
|
+
"description": "CORS preflight for MCP endpoint",
|
|
98
|
+
"responses": {
|
|
99
|
+
"204": {
|
|
100
|
+
"description": "No Content"
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
package/openApi.yaml
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
swagger: "2.0"
|
|
2
|
+
info:
|
|
3
|
+
title: SAS Viya Sample MCP Server
|
|
4
|
+
version: "1.0.0"
|
|
5
|
+
description: OpenAPI 2.0 spec for the SAS Viya MCP Server
|
|
6
|
+
host: localhost:8080
|
|
7
|
+
schemes:
|
|
8
|
+
- http
|
|
9
|
+
- https
|
|
10
|
+
basePath: /
|
|
11
|
+
paths:
|
|
12
|
+
/health:
|
|
13
|
+
get:
|
|
14
|
+
summary: Health check endpoint
|
|
15
|
+
description: Returns server health and metadata
|
|
16
|
+
produces:
|
|
17
|
+
- application/json
|
|
18
|
+
responses:
|
|
19
|
+
"200":
|
|
20
|
+
description: Health info
|
|
21
|
+
schema:
|
|
22
|
+
type: object
|
|
23
|
+
/:
|
|
24
|
+
get:
|
|
25
|
+
summary: Root endpoint
|
|
26
|
+
description: Returns server info and usage
|
|
27
|
+
produces:
|
|
28
|
+
- application/json
|
|
29
|
+
responses:
|
|
30
|
+
"200":
|
|
31
|
+
description: Server info
|
|
32
|
+
schema:
|
|
33
|
+
type: object
|
|
34
|
+
/mcp:
|
|
35
|
+
get:
|
|
36
|
+
summary: MCP endpoint (GET)
|
|
37
|
+
description: Handles MCP protocol requests (GET)
|
|
38
|
+
produces:
|
|
39
|
+
- application/json
|
|
40
|
+
parameters:
|
|
41
|
+
- name: Authorization
|
|
42
|
+
in: header
|
|
43
|
+
type: string
|
|
44
|
+
required: false
|
|
45
|
+
responses:
|
|
46
|
+
"200":
|
|
47
|
+
description: MCP response
|
|
48
|
+
schema:
|
|
49
|
+
type: object
|
|
50
|
+
post:
|
|
51
|
+
summary: MCP endpoint (POST)
|
|
52
|
+
description: Handles MCP protocol requests (POST)
|
|
53
|
+
consumes:
|
|
54
|
+
- application/json
|
|
55
|
+
produces:
|
|
56
|
+
- application/json
|
|
57
|
+
parameters:
|
|
58
|
+
- name: Authorization
|
|
59
|
+
in: header
|
|
60
|
+
type: string
|
|
61
|
+
required: false
|
|
62
|
+
- name: X-VIYA-SERVER
|
|
63
|
+
in: header
|
|
64
|
+
type: string
|
|
65
|
+
required: false
|
|
66
|
+
- name: X-REFRESH-TOKEN
|
|
67
|
+
in: header
|
|
68
|
+
type: string
|
|
69
|
+
required: false
|
|
70
|
+
- name: body
|
|
71
|
+
in: body
|
|
72
|
+
schema:
|
|
73
|
+
type: object
|
|
74
|
+
responses:
|
|
75
|
+
"200":
|
|
76
|
+
description: MCP response
|
|
77
|
+
schema:
|
|
78
|
+
type: object
|
|
79
|
+
options:
|
|
80
|
+
summary: CORS preflight
|
|
81
|
+
description: CORS preflight for MCP endpoint
|
|
82
|
+
responses:
|
|
83
|
+
"204":
|
|
84
|
+
description: No Content
|
package/package.json
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@sassoftware/sas-score-mcp-serverjs",
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"description": "A mcp server for SAS Viya",
|
|
5
|
+
"author": "Deva Kumar <deva.kumar@sas.com>",
|
|
6
|
+
"license": "Apache-2.0",
|
|
7
|
+
"engines": {
|
|
8
|
+
"node": ">=22.16.0",
|
|
9
|
+
"npm": ">=10.9.2"
|
|
10
|
+
},
|
|
11
|
+
"type": "module",
|
|
12
|
+
"scripts": {
|
|
13
|
+
"start": "npx dotenv-cli -e .env -- node cli.js",
|
|
14
|
+
"testi": "cross-env NODE_TLS_REJECT_UNAUTHORIZED=0 npx @modelcontextprotocol/inspector",
|
|
15
|
+
"test": "cd test && node",
|
|
16
|
+
"debug": "cross-env NODE_TLS_REJECT_UNAUTHORIZED=0 node --inspect-brk cli.js",
|
|
17
|
+
"getViyatls": "bash ./scripts/getViyaca.sh",
|
|
18
|
+
"deploy": "bash ./deploy.sh",
|
|
19
|
+
"push2acr": "bash ./push2acr.sh",
|
|
20
|
+
"bump": "npm version prerelease",
|
|
21
|
+
"pub": "npm publish --tag alpha --access public"
|
|
22
|
+
},
|
|
23
|
+
"repository": "https://github.com/sassoftware/sas-score-mcp-serverjs",
|
|
24
|
+
"keywords": [
|
|
25
|
+
"SAS Viya",
|
|
26
|
+
"mcp-serverjs",
|
|
27
|
+
"Agentic AI",
|
|
28
|
+
"Viya actions",
|
|
29
|
+
"restaf",
|
|
30
|
+
"restafedit",
|
|
31
|
+
"restaflib",
|
|
32
|
+
"model context protocol"
|
|
33
|
+
],
|
|
34
|
+
"main": "./cli.js",
|
|
35
|
+
"bin": {
|
|
36
|
+
"@sassoftware/sas-score-mcp-serverjs": "./cli.js"
|
|
37
|
+
},
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"@modelcontextprotocol/sdk": "^1.25.1",
|
|
40
|
+
"@sassoftware/restaf": "^5.6.0",
|
|
41
|
+
"@sassoftware/restafedit": "^3.11.1-10",
|
|
42
|
+
"@sassoftware/restaflib": "^5.6.0",
|
|
43
|
+
"axios": "^1.13.2",
|
|
44
|
+
"body-parser": "^2.2.1",
|
|
45
|
+
"cors": "^2.8.5",
|
|
46
|
+
"cross-env": "^10.1.0",
|
|
47
|
+
"debug": "^4.4.3",
|
|
48
|
+
"dotenv": "^17.2.3",
|
|
49
|
+
"dotenv-expand": "^12.0.3",
|
|
50
|
+
"express": "^5.2.1",
|
|
51
|
+
"express-list-endpoints": "^7.1.1",
|
|
52
|
+
"express-rate-limit": "^8.2.1",
|
|
53
|
+
"helmet": "^8.1.0",
|
|
54
|
+
"mcp-framework": "^0.2.16",
|
|
55
|
+
"node-cache": "^5.1.2",
|
|
56
|
+
"selfsigned": "^5.2.0",
|
|
57
|
+
"undici": "^7.16.0",
|
|
58
|
+
"uuid": "^13.0.0",
|
|
59
|
+
"zod": "^4.2.1"
|
|
60
|
+
},
|
|
61
|
+
"devDependencies": {
|
|
62
|
+
"@babel/cli": "^7.28.3",
|
|
63
|
+
"@babel/core": "^7.28.5",
|
|
64
|
+
"@babel/eslint-parser": "^7.28.5",
|
|
65
|
+
"@babel/preset-env": "^7.28.5",
|
|
66
|
+
"@types/debug": "^4.1.12",
|
|
67
|
+
"@types/node": "^25.0.3",
|
|
68
|
+
"npm-check-updates": "^19.2.0",
|
|
69
|
+
"rimraf": "^6.1.2",
|
|
70
|
+
"typescript": "^5.9.3"
|
|
71
|
+
}
|
|
72
|
+
}
|