@sassoftware/sas-score-mcp-serverjs 0.3.0 → 0.3.1-1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sassoftware/sas-score-mcp-serverjs",
3
- "version": "0.3.0",
3
+ "version": "0.3.1-1",
4
4
  "description": "A mcp server for SAS Viya",
5
5
  "author": "Deva Kumar <deva.kumar@sas.com>",
6
6
  "license": "Apache-2.0",
@@ -18,7 +18,7 @@
18
18
  "deploy": "bash ./deploy.sh",
19
19
  "push2acr": "bash ./push2acr.sh",
20
20
  "bump": "npm version prerelease",
21
- "pub": "npm publish --tag dev --access public"
21
+ "pub": "npm publish --tag alpha --access public"
22
22
  },
23
23
  "repository": "https://github.com/sassoftware/sas-score-mcp-serverjs",
24
24
  "keywords": [
@@ -35,6 +35,12 @@
35
35
  "bin": {
36
36
  "@sassoftware/sas-score-mcp-serverjs": "./cli.js"
37
37
  },
38
+ "files": [
39
+ "src",
40
+ "cli.js",
41
+ "openApi.json",
42
+ "openApi.yaml"
43
+ ],
38
44
  "dependencies": {
39
45
  "@modelcontextprotocol/sdk": "^1.25.1",
40
46
  "@sassoftware/restaf": "^5.6.0",
@@ -6,19 +6,21 @@ import appServer from "@sassoftware/viya-serverjs";
6
6
  import handleRequest from "./handleRequest.js";
7
7
  import handleGetDelete from "./handleGetDelete.js";
8
8
  import urlOpen from "./urlOpen.js";
9
+ import fs from "fs";
9
10
 
10
11
  async function hapiMcpServer(mcpServer, cache, baseAppEnvContext) {
11
12
 
12
13
  console.error('Starting Hapi MCP server...');
13
14
  console.error("[Note]: Hapi MCP server started...", baseAppEnvContext.AUTHFLOW);
14
- process.env.REDIRECT=`/status`;
15
- let r = await appServer.asyncCore(mcpHandlers, true, 'app', null);
16
- console.error('Hapi server running result:', r);
15
+ process.env.REDIRECT = `/status`;
16
+ process.env.APPHOST = '0.0.0.0';
17
+ let r = await appServer.asyncCore(mcpHandlers, true, 'app', null);
18
+ console.error('Hapi server running result:', r);
17
19
  if (baseAppEnvContext.AUTHFLOW === 'code' && baseAppEnvContext.AUTOLOGON !== 'FALSE') {
18
20
  await urlOpen(r);
19
21
  }
20
22
  return r;
21
-
23
+
22
24
  // add MCP handlers to the app server
23
25
 
24
26
  function mcpHandlers() {
@@ -95,7 +97,7 @@ async function hapiMcpServer(mcpServer, cache, baseAppEnvContext) {
95
97
  </body>
96
98
  </html>
97
99
  `;
98
-
100
+
99
101
  }
100
102
  let routes = [
101
103
  {
@@ -123,6 +125,19 @@ async function hapiMcpServer(mcpServer, cache, baseAppEnvContext) {
123
125
  tags: ["mcp"],
124
126
  }
125
127
  },
128
+ {
129
+ method: ["GET"],
130
+ path: "/apiMeta",
131
+ options: {
132
+ handler: async (req, h) => {
133
+ let spec = fs.readFileSync("./openApi.json", "utf8");
134
+ let specJson = JSON.parse(spec);
135
+ return h.response(specJson).code(200).type('application/json');
136
+ },
137
+ auth: false,
138
+ description: "API Metadata"
139
+ }
140
+ },
126
141
  {
127
142
  method: ["GET"],
128
143
  path: `/${baseAppEnvContext.contexts.APPNAME}/status`,
@@ -130,7 +145,7 @@ async function hapiMcpServer(mcpServer, cache, baseAppEnvContext) {
130
145
  handler: async (req, h) => {
131
146
  let ht = getHtml();
132
147
  return h.response(ht).code(200).type('text/html');
133
- // return h.abandon;
148
+ // return h.abandon;
134
149
  },
135
150
  auth: false,
136
151
  description: "Help",
package/src/urlOpen.js CHANGED
@@ -1,13 +1,13 @@
1
- /*
2
- * Copyright © 2026, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.
3
- * SPDX-License-Identifier: Apache-2.0
4
- */
5
- import open from 'open';
6
-
7
- async function urlOpen(url) {
8
-
9
- console.error(`[Note]Opening URL: ${url} for user authentication`);
10
- await open(url, {wait:true});
11
- console.error(`[Note] User has closed the informational window after authentication.`);
12
- }
1
+ /*
2
+ * Copyright © 2026, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ import open from 'open';
6
+
7
+ async function urlOpen(url) {
8
+
9
+ console.error(`[Note]Opening URL: ${url} for user authentication`);
10
+ await open(url, {wait:true});
11
+ console.error(`[Note] User has closed the informational window after authentication.`);
12
+ }
13
13
  export default urlOpen;
package/.babelrc DELETED
@@ -1,6 +0,0 @@
1
- {
2
- "presets": [
3
- "@babel/preset-env"
4
- ]
5
-
6
- }
package/.env DELETED
@@ -1,16 +0,0 @@
1
- PORT=8080
2
- HTTPS=TRUE
3
- MCPTYPE=http
4
- AUTHFLOW=code
5
- CLIENTID=sasscore
6
- CLIENTSECRET=jellico
7
- # VIYA_SERVER= set globally
8
- SSLCERT=c:\Users\kumar\.tls
9
- VIYACERT=c:\Users\kumar\viyaCert\xf1
10
- CAS_SERVER=cas-shared-default
11
- # APPNAME defaults to sas-score-mcp-serverjs but you can override it here
12
- APPNAME=sas-score-mcp-serverjs
13
- COMPUTECONTEXT=SAS Job Execution compute context
14
- SAMESITE=Lax,secure
15
- REDIRECT=/info
16
- # AUTOLOGON=FALSE
package/CHANGES.md DELETED
@@ -1,8 +0,0 @@
1
- # Changes
2
- All notable changes to this project will be documented in this file in accordance with semantic versioning.
3
-
4
- ## V 0.2.0
5
-
6
- 1. Added support for authorization_code flow.(AUTHFLOW=code)
7
- 2. Logon dialog is auto started.
8
- 3. Marked as experimental until further testing is completed.
package/CONTRIBUTING.md DELETED
@@ -1,14 +0,0 @@
1
- # Contributing
2
- Maintainers are accepting patches and contributions to this project.
3
- Please note the following contribution guidelines.
4
-
5
- ## Contributor License Agreement
6
- Contributions to this project must be accompanied by a signed [Contributor Agreement](ContributorAgreement.txt).
7
- You (or your employer) retain the copyright to your contribution.
8
- This simply permits the project maintainers to use and redistribute your contributions as part of the project.
9
-
10
- ## Code Reviews
11
- All submissions, including submissions by project members, require review.
12
- GitHub pull requests are used for this purpose.
13
- Please fork this project and open a pull request to propose a change.
14
- Consult [GitHub Help](https://help.github.com/articles/about-pull-requests/) for more information about using pull requests.
@@ -1,56 +0,0 @@
1
- Contributor Agreement
2
-
3
- Version 1.1
4
-
5
- Contributions to this software are accepted only when they are
6
- properly accompanied by a Contributor Agreement. The Contributor
7
- Agreement for this software is the Developer's Certificate of Origin
8
- 1.1 (DCO) as provided with and required for accepting contributions
9
- to the Linux kernel.
10
-
11
- In each contribution proposed to be included in this software, the
12
- developer must include a "sign-off" that denotes consent to the
13
- terms of the Developer's Certificate of Origin. The sign-off is
14
- a line of text in the description that accompanies the change,
15
- certifying that you have the right to provide the contribution
16
- to be included. For changes provided in source code control (for
17
- example, via a Git pull request) the sign-off must be included in
18
- the commit message in source code control. For changes provided
19
- in email or issue tracking, the sign-off must be included in the
20
- email or the issue, and the sign-off will be incorporated into the
21
- permanent commit message if the contribution is accepted into the
22
- official source code.
23
-
24
- If you can certify the below:
25
-
26
- Developer's Certificate of Origin 1.1
27
-
28
- By making a contribution to this project, I certify that:
29
-
30
- (a) The contribution was created in whole or in part by me and I
31
- have the right to submit it under the open source license
32
- indicated in the file; or
33
-
34
- (b) The contribution is based upon previous work that, to the best
35
- of my knowledge, is covered under an appropriate open source
36
- license and I have the right under that license to submit that
37
- work with modifications, whether created in whole or in part
38
- by me, under the same open source license (unless I am
39
- permitted to submit under a different license), as indicated
40
- in the file; or
41
-
42
- (c) The contribution was provided directly to me by some other
43
- person who certified (a), (b) or (c) and I have not modified
44
- it.
45
-
46
- (d) I understand and agree that this project and the contribution
47
- are public and that a record of the contribution (including all
48
- personal information I submit with it, including my sign-off) is
49
- maintained indefinitely and may be redistributed consistent with
50
- this project or the open source license(s) involved.
51
-
52
- then you just add a line saying
53
-
54
- Signed-off-by: Random J Developer <random@developer.example.org>
55
-
56
- using your real name (sorry, no pseudonyms or anonymous contributions.)
package/LICENSES.json DELETED
@@ -1,105 +0,0 @@
1
- {
2
- "@modelcontextprotocol/sdk": {
3
- "version": "1.19.1",
4
- "licenses": "MIT",
5
- "repository": "https://github.com/modelcontextprotocol/typescript-sdk",
6
- "publisher": "Anthropic, PBC",
7
- "url": "https://anthropic.com"
8
- },
9
- "@sassoftware/restaf": {
10
- "version": "5.5.1-9",
11
- "licenses": "Apache-2.0",
12
- "repository": "https://github.com/sassoftware/restaf/tree/main/packages/restaf",
13
- "publisher": "Deva Kumaraswamy",
14
- "email": "deva.kumar@sas.com"
15
- },
16
- "@sassoftware/restafedit": {
17
- "version": "3.11.1-10",
18
- "licenses": "Apache-2.0",
19
- "repository": "https://github.com/sassoftware/restaf/tree/restafedit",
20
- "publisher": "devaKumaraswamy"
21
- },
22
- "@sassoftware/restaflib": {
23
- "version": "5.5.1-9",
24
- "licenses": "Apache-2.0",
25
- "repository": "https://github.com/sassoftware/restaf/tree/master/packages/restaflib",
26
- "publisher": "Deva Kumar",
27
- "email": "deva.kumar@sas.com"
28
- },
29
- "axios": {
30
- "version": "1.12.2",
31
- "licenses": "MIT",
32
- "repository": "https://github.com/axios/axios",
33
- "publisher": "Matt Zabriskie"
34
- },
35
- "cors": {
36
- "version": "2.8.5",
37
- "licenses": "MIT",
38
- "repository": "https://github.com/expressjs/cors",
39
- "publisher": "Troy Goode",
40
- "email": "troygoode@gmail.com",
41
- "url": "https://github.com/troygoode/"
42
- },
43
- "cross-env": {
44
- "version": "7.0.3",
45
- "licenses": "MIT",
46
- "repository": "https://github.com/kentcdodds/cross-env",
47
- "publisher": "Kent C. Dodds",
48
- "email": "me@kentcdodds.com",
49
- "url": "https://kentcdodds.com"
50
- },
51
- "debug": {
52
- "version": "4.4.1",
53
- "licenses": "MIT",
54
- "repository": "https://github.com/debug-js/debug",
55
- "publisher": "Josh Junon",
56
- "url": "https://github.com/qix-"
57
- },
58
- "dotenv-expand": {
59
- "version": "12.0.3",
60
- "licenses": "BSD-2-Clause",
61
- "repository": "https://github.com/motdotla/dotenv-expand",
62
- "publisher": "motdotla"
63
- },
64
- "dotenv": {
65
- "version": "17.2.0",
66
- "licenses": "BSD-2-Clause",
67
- "repository": "https://github.com/motdotla/dotenv"
68
- },
69
- "express-list-endpoints": {
70
- "version": "7.1.1",
71
- "licenses": "MIT",
72
- "repository": "https://github.com/AlbertoFdzM/express-list-endpoints"
73
- },
74
- "express": {
75
- "version": "5.1.0",
76
- "licenses": "MIT",
77
- "repository": "https://github.com/expressjs/express",
78
- "publisher": "TJ Holowaychuk",
79
- "email": "tj@vision-media.ca"
80
- },
81
- "mcp-framework": {
82
- "version": "0.2.15",
83
- "licenses": "MIT*",
84
- "publisher": "Alex Andru",
85
- "email": "alex@andru.codes"
86
- },
87
- "selfsigned": {
88
- "version": "2.4.1",
89
- "licenses": "MIT",
90
- "repository": "https://github.com/jfromaniello/selfsigned",
91
- "publisher": "José F. Romaniello",
92
- "email": "jfromaniello@gmail.com",
93
- "url": "http://joseoncode.com"
94
- },
95
- "undici": {
96
- "version": "7.13.0",
97
- "licenses": "MIT",
98
- "repository": "https://github.com/nodejs/undici"
99
- },
100
- "uuid": {
101
- "version": "11.1.0",
102
- "licenses": "MIT",
103
- "repository": "https://github.com/uuidjs/uuid"
104
- }
105
- }
package/Public/index.html DELETED
@@ -1,70 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>sas-score-mcp-server</title>
7
- <style>
8
- * {
9
- margin: 0;
10
- padding: 0;
11
- box-sizing: border-box;
12
- }
13
-
14
- body {
15
- font-family: Arial, sans-serif;
16
- height: 100vh;
17
- overflow: hidden;
18
- }
19
-
20
- dialog {
21
- position: fixed;
22
- left: 50%;
23
- right: auto;
24
- top: 0;
25
- transform: translateX(-50%);
26
- width: fit-content;
27
- height: fit-content;
28
- border: none;
29
- border-radius: 4px;
30
- padding: 16px;
31
- box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
32
- }
33
-
34
- dialog::backdrop {
35
- background-color: rgba(0, 0, 0, 0.1);
36
- }
37
-
38
- dialog h2 {
39
- font-size: 18px;
40
- margin-bottom: 12px;
41
- color: #000;
42
- }
43
-
44
- dialog p {
45
- font-family: 'Courier New', monospace;
46
- font-size: 12px;
47
- width: fit-content;
48
- line-height: 1.6;
49
- color: #333;
50
- word-wrap: break-word;
51
- white-space: pre-wrap;
52
- }
53
-
54
- /* Window styling to show it's 10px larger than dialog */
55
- body::before {
56
- display: none;
57
- }
58
- </style>
59
- </head>
60
- <body>
61
- <dialog open>
62
- <h2>sas-score-mcp-server</h2>
63
- <p>The mcp server is now ready for use. </p>
64
- <p>You can close this window</p>
65
- <p>For information on the tools see this documentation link:</p>
66
- <a href="https://github.com/sassoftware/sas-score-mcp-serverjs/wiki " target="_blank">Summary of tools </a>
67
- </p>
68
- </dialog>
69
- </body>
70
- </html>