@sassoftware/sas-score-mcp-serverjs 0.3.4 → 0.3.6

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/openApi.json CHANGED
@@ -1,103 +1,148 @@
1
1
  {
2
2
  "swagger": "2.0",
3
3
  "info": {
4
- "title": "SAS Viya Sample MCP Server",
4
+ "title": "SAS Viya Sample MCP Server API",
5
5
  "version": "1.0.0",
6
- "description": "OpenAPI 2.0 spec for the SAS Viya Sample MCP Server"
6
+ "description": "API for interacting with the SAS Viya Sample MCP Server."
7
7
  },
8
8
  "host": "localhost:8080",
9
- "schemes": ["http", "https"],
10
9
  "basePath": "/",
10
+ "schemes": ["http", "https"],
11
+ "consumes": ["application/json"],
12
+ "produces": ["application/json"],
11
13
  "paths": {
12
14
  "/health": {
13
15
  "get": {
14
- "summary": "Health check endpoint",
15
- "description": "Returns server health and metadata",
16
- "produces": ["application/json"],
16
+ "summary": "Health check",
17
+ "description": "Returns health and version information.",
17
18
  "responses": {
18
19
  "200": {
19
- "description": "Health info",
20
- "schema": { "type": "object" }
20
+ "description": "Health information",
21
+ "schema": {
22
+ "type": "object",
23
+ "properties": {
24
+ "name": { "type": "string" },
25
+ "version": { "type": "string" },
26
+ "description": { "type": "string" },
27
+ "endpoints": { "type": "object" },
28
+ "usage": { "type": "string" }
29
+ }
30
+ }
21
31
  }
22
32
  }
23
33
  }
24
34
  },
25
- "/": {
35
+ "/apiMeta": {
26
36
  "get": {
27
- "summary": "Root endpoint",
28
- "description": "Returns server info and usage",
29
- "produces": ["application/json"],
37
+ "summary": "API metadata",
38
+ "description": "Returns the OpenAPI specification for this server.",
30
39
  "responses": {
31
40
  "200": {
32
- "description": "Server info",
41
+ "description": "OpenAPI document",
33
42
  "schema": { "type": "object" }
34
43
  }
35
44
  }
36
45
  }
37
46
  },
38
47
  "/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
- ],
48
+ "options": {
49
+ "summary": "CORS preflight",
50
+ "description": "CORS preflight endpoint.",
51
51
  "responses": {
52
- "200": {
53
- "description": "MCP response",
54
- "schema": { "type": "object" }
55
- }
52
+ "204": { "description": "No Content" }
56
53
  }
57
54
  },
58
55
  "post": {
59
- "summary": "MCP endpoint (POST)",
60
- "description": "Handles MCP protocol requests (POST)",
61
- "consumes": ["application/json"],
62
- "produces": ["application/json"],
56
+ "summary": "MCP request",
57
+ "description": "Handles MCP JSON-RPC requests.",
63
58
  "parameters": [
59
+ {
60
+ "name": "body",
61
+ "in": "body",
62
+ "required": true,
63
+ "schema": { "type": "object" }
64
+ },
64
65
  {
65
66
  "name": "Authorization",
66
67
  "in": "header",
68
+ "required": false,
67
69
  "type": "string",
68
- "required": false
70
+ "description": "Bearer token for authentication"
69
71
  },
70
72
  {
71
73
  "name": "X-VIYA-SERVER",
72
74
  "in": "header",
75
+ "required": false,
73
76
  "type": "string",
74
- "required": false
77
+ "description": "Override VIYA server"
75
78
  },
76
79
  {
77
80
  "name": "X-REFRESH-TOKEN",
78
81
  "in": "header",
82
+ "required": false,
79
83
  "type": "string",
80
- "required": false
84
+ "description": "Refresh token for authentication"
81
85
  },
82
86
  {
83
- "name": "body",
84
- "in": "body",
85
- "schema": { "type": "object" }
87
+ "name": "mcp-session-id",
88
+ "in": "header",
89
+ "required": false,
90
+ "type": "string",
91
+ "description": "Session ID"
86
92
  }
87
93
  ],
88
94
  "responses": {
89
95
  "200": {
90
96
  "description": "MCP response",
91
97
  "schema": { "type": "object" }
98
+ },
99
+ "500": {
100
+ "description": "Server error",
101
+ "schema": { "type": "object" }
92
102
  }
93
103
  }
94
104
  },
95
- "options": {
96
- "summary": "CORS preflight",
97
- "description": "CORS preflight for MCP endpoint",
105
+ "get": {
106
+ "summary": "Get MCP session",
107
+ "description": "Retrieves information for an MCP session.",
108
+ "parameters": [
109
+ {
110
+ "name": "mcp-session-id",
111
+ "in": "header",
112
+ "required": true,
113
+ "type": "string",
114
+ "description": "Session ID"
115
+ }
116
+ ],
98
117
  "responses": {
99
- "204": {
100
- "description": "No Content"
118
+ "200": {
119
+ "description": "Session information",
120
+ "schema": { "type": "object" }
121
+ },
122
+ "400": {
123
+ "description": "Invalid or missing session ID"
124
+ }
125
+ }
126
+ },
127
+ "delete": {
128
+ "summary": "Delete MCP session",
129
+ "description": "Deletes an MCP session.",
130
+ "parameters": [
131
+ {
132
+ "name": "mcp-session-id",
133
+ "in": "header",
134
+ "required": true,
135
+ "type": "string",
136
+ "description": "Session ID"
137
+ }
138
+ ],
139
+ "responses": {
140
+ "200": {
141
+ "description": "Session deleted",
142
+ "schema": { "type": "object" }
143
+ },
144
+ "400": {
145
+ "description": "Invalid or missing session ID"
101
146
  }
102
147
  }
103
148
  }
package/openApi.yaml CHANGED
@@ -1,84 +1,121 @@
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
1
+ swagger: "2.0"
2
+ info:
3
+ title: SAS Viya Sample MCP Server API
4
+ version: "1.0.0"
5
+ description: API for interacting with the SAS Viya Sample MCP Server.
6
+ host: localhost:8080
7
+ basePath: /
8
+ schemes:
9
+ - http
10
+ - https
11
+ consumes:
12
+ - application/json
13
+ produces:
14
+ - application/json
15
+ paths:
16
+ /health:
17
+ get:
18
+ summary: Health check
19
+ description: Returns health and version information.
20
+ responses:
21
+ 200:
22
+ description: Health information
23
+ schema:
24
+ type: object
25
+ properties:
26
+ name:
27
+ type: string
28
+ version:
29
+ type: string
30
+ description:
31
+ type: string
32
+ endpoints:
33
+ type: object
34
+ usage:
35
+ type: string
36
+ /apiMeta:
37
+ get:
38
+ summary: API metadata
39
+ description: Returns the OpenAPI specification for this server.
40
+ responses:
41
+ 200:
42
+ description: OpenAPI document
43
+ schema:
44
+ type: object
45
+ /mcp:
46
+ options:
47
+ summary: CORS preflight
48
+ description: CORS preflight endpoint.
49
+ responses:
50
+ 204:
51
+ description: No Content
52
+ post:
53
+ summary: MCP request
54
+ description: Handles MCP JSON-RPC requests.
55
+ parameters:
56
+ - name: body
57
+ in: body
58
+ required: true
59
+ schema:
60
+ type: object
61
+ - name: Authorization
62
+ in: header
63
+ required: false
64
+ type: string
65
+ description: Bearer token for authentication
66
+ - name: X-VIYA-SERVER
67
+ in: header
68
+ required: false
69
+ type: string
70
+ description: Override VIYA server
71
+ - name: X-REFRESH-TOKEN
72
+ in: header
73
+ required: false
74
+ type: string
75
+ description: Refresh token for authentication
76
+ - name: mcp-session-id
77
+ in: header
78
+ required: false
79
+ type: string
80
+ description: Session ID
81
+ responses:
82
+ 200:
83
+ description: MCP response
84
+ schema:
85
+ type: object
86
+ 500:
87
+ description: Server error
88
+ schema:
89
+ type: object
90
+ get:
91
+ summary: Get MCP session
92
+ description: Retrieves information for an MCP session.
93
+ parameters:
94
+ - name: mcp-session-id
95
+ in: header
96
+ required: true
97
+ type: string
98
+ description: Session ID
99
+ responses:
100
+ 200:
101
+ description: Session information
102
+ schema:
103
+ type: object
104
+ 400:
105
+ description: Invalid or missing session ID
106
+ delete:
107
+ summary: Delete MCP session
108
+ description: Deletes an MCP session.
109
+ parameters:
110
+ - name: mcp-session-id
111
+ in: header
112
+ required: true
113
+ type: string
114
+ description: Session ID
115
+ responses:
116
+ 200:
117
+ description: Session deleted
118
+ schema:
119
+ type: object
120
+ 400:
121
+ description: Invalid or missing session ID
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sassoftware/sas-score-mcp-serverjs",
3
- "version": "0.3.4",
3
+ "version": "0.3.6",
4
4
  "description": "A mcp server for SAS Viya",
5
5
  "author": "Deva Kumar <deva.kumar@sas.com>",
6
6
  "license": "Apache-2.0",
@@ -80,12 +80,18 @@ app.get("/", (req, res) => {
80
80
  });
81
81
  });
82
82
 
83
- // api metadata endpoint
83
+ // api metadata endpoint(for sas specs)
84
84
  app.get("/apiMeta", (req, res) => {
85
85
  let spec = openAPIJson();
86
86
  res.json(spec);
87
87
  });
88
88
 
89
+ // for azure container apps
90
+ app.get("/openapi.json", (req, res) => {
91
+ let spec = openAPIJson();
92
+ res.json(spec);
93
+ });
94
+
89
95
  // handle processing of information in header.
90
96
  function requireBearer(req, res, next) {
91
97
 
@@ -131,9 +131,20 @@ async function hapiMcpServer(mcpServer, cache, baseAppEnvContext) {
131
131
  path: "/apiMeta",
132
132
  options: {
133
133
  handler: async (req, h) => {
134
- let spec = fs.readFileSync("./openApi.json", "utf8");
135
- let specJson = JSON.parse(spec);
136
- return h.response(specJson).code(200).type('application/json');
134
+ let spec = openAPIJson();
135
+ return h.response(spec).code(200).type('application/json');
136
+ },
137
+ auth: false,
138
+ description: "API Metadata"
139
+ }
140
+ },
141
+ {
142
+ method: ["GET"],
143
+ path: "/openapi.json",
144
+ options: {
145
+ handler: async (req, h) => {
146
+ let spec = openAPIJson();
147
+ return h.response(spec).code(200).type('application/json');
137
148
  },
138
149
  auth: false,
139
150
  description: "API Metadata"
@@ -2,156 +2,157 @@
2
2
  * Copyright © 2025, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.
3
3
  * SPDX-License-Identifier: Apache-2.0
4
4
  */
5
- export default function openAPIJson() {
5
+ function openAPIJson() {
6
6
  return {
7
- swagger: "2.0",
8
- info: {
9
- title: "SAS Viya Sample MCP Server API",
10
- version: "1.0.0",
11
- description: "API for interacting with the SAS Viya Sample MCP Server."
12
- },
13
- host: "localhost:8080",
14
- basePath: "/",
15
- schemes: ["http", "https"],
16
- consumes: ["application/json"],
17
- produces: ["application/json"],
18
- paths: {
19
- "/health": {
20
- get: {
21
- summary: "Health check",
22
- description: "Returns health and version information.",
23
- responses: {
24
- 200: {
25
- description: "Health information",
26
- schema: {
27
- type: "object",
28
- properties: {
29
- name: { type: "string" },
30
- version: { type: "string" },
31
- description: { type: "string" },
32
- endpoints: { type: "object" },
33
- usage: { type: "string" }
34
- }
7
+ "swagger": "2.0",
8
+ "info": {
9
+ "title": "SAS Viya Sample MCP Server API",
10
+ "version": "1.0.0",
11
+ "description": "API for interacting with the SAS Viya Sample MCP Server."
12
+ },
13
+ "host": "localhost:8080",
14
+ "basePath": "/",
15
+ "schemes": ["http", "https"],
16
+ "consumes": ["application/json"],
17
+ "produces": ["application/json"],
18
+ "paths": {
19
+ "/health": {
20
+ "get": {
21
+ "summary": "Health check",
22
+ "description": "Returns health and version information.",
23
+ "responses": {
24
+ "200": {
25
+ "description": "Health information",
26
+ "schema": {
27
+ "type": "object",
28
+ "properties": {
29
+ "name": { "type": "string" },
30
+ "version": { "type": "string" },
31
+ "description": { "type": "string" },
32
+ "endpoints": { "type": "object" },
33
+ "usage": { "type": "string" }
35
34
  }
36
35
  }
37
36
  }
38
37
  }
38
+ }
39
+ },
40
+ "/apiMeta": {
41
+ "get": {
42
+ "summary": "API metadata",
43
+ "description": "Returns the OpenAPI specification for this server.",
44
+ "responses": {
45
+ "200": {
46
+ "description": "OpenAPI document",
47
+ "schema": { "type": "object" }
48
+ }
49
+ }
50
+ }
51
+ },
52
+ "/mcp": {
53
+ "options": {
54
+ "summary": "CORS preflight",
55
+ "description": "CORS preflight endpoint.",
56
+ "responses": {
57
+ "204": { "description": "No Content" }
58
+ }
39
59
  },
40
- "/apiMeta": {
41
- get: {
42
- summary: "API metadata",
43
- description: "Returns the OpenAPI specification for this server.",
44
- responses: {
45
- 200: {
46
- description: "OpenAPI document",
47
- schema: { type: "object" }
48
- }
60
+ "post": {
61
+ "summary": "MCP request",
62
+ "description": "Handles MCP JSON-RPC requests.",
63
+ "parameters": [
64
+ {
65
+ "name": "body",
66
+ "in": "body",
67
+ "required": true,
68
+ "schema": { "type": "object" }
69
+ },
70
+ {
71
+ "name": "Authorization",
72
+ "in": "header",
73
+ "required": false,
74
+ "type": "string",
75
+ "description": "Bearer token for authentication"
76
+ },
77
+ {
78
+ "name": "X-VIYA-SERVER",
79
+ "in": "header",
80
+ "required": false,
81
+ "type": "string",
82
+ "description": "Override VIYA server"
83
+ },
84
+ {
85
+ "name": "X-REFRESH-TOKEN",
86
+ "in": "header",
87
+ "required": false,
88
+ "type": "string",
89
+ "description": "Refresh token for authentication"
90
+ },
91
+ {
92
+ "name": "mcp-session-id",
93
+ "in": "header",
94
+ "required": false,
95
+ "type": "string",
96
+ "description": "Session ID"
97
+ }
98
+ ],
99
+ "responses": {
100
+ "200": {
101
+ "description": "MCP response",
102
+ "schema": { "type": "object" }
103
+ },
104
+ "500": {
105
+ "description": "Server error",
106
+ "schema": { "type": "object" }
49
107
  }
50
108
  }
51
109
  },
52
- "/mcp": {
53
- options: {
54
- summary: "CORS preflight",
55
- description: "CORS preflight endpoint.",
56
- responses: {
57
- 204: { description: "No Content" }
110
+ "get": {
111
+ "summary": "Get MCP session",
112
+ "description": "Retrieves information for an MCP session.",
113
+ "parameters": [
114
+ {
115
+ "name": "mcp-session-id",
116
+ "in": "header",
117
+ "required": true,
118
+ "type": "string",
119
+ "description": "Session ID"
58
120
  }
59
- },
60
- post: {
61
- summary: "MCP request",
62
- description: "Handles MCP JSON-RPC requests.",
63
- parameters: [
64
- {
65
- name: "body",
66
- in: "body",
67
- required: true,
68
- schema: { type: "object" }
69
- },
70
- {
71
- name: "Authorization",
72
- in: "header",
73
- required: false,
74
- type: "string",
75
- description: "Bearer token for authentication"
76
- },
77
- {
78
- name: "X-VIYA-SERVER",
79
- in: "header",
80
- required: false,
81
- type: "string",
82
- description: "Override VIYA server"
83
- },
84
- {
85
- name: "X-REFRESH-TOKEN",
86
- in: "header",
87
- required: false,
88
- type: "string",
89
- description: "Refresh token for authentication"
90
- },
91
- {
92
- name: "mcp-session-id",
93
- in: "header",
94
- required: false,
95
- type: "string",
96
- description: "Session ID"
97
- }
98
- ],
99
- responses: {
100
- 200: {
101
- description: "MCP response",
102
- schema: { type: "object" }
103
- },
104
- 500: {
105
- description: "Server error",
106
- schema: { type: "object" }
107
- }
121
+ ],
122
+ "responses": {
123
+ "200": {
124
+ "description": "Session information",
125
+ "schema": { "type": "object" }
126
+ },
127
+ "400": {
128
+ "description": "Invalid or missing session ID"
108
129
  }
109
- },
110
- get: {
111
- summary: "Get MCP session",
112
- description: "Retrieves information for an MCP session.",
113
- parameters: [
114
- {
115
- name: "mcp-session-id",
116
- in: "header",
117
- required: true,
118
- type: "string",
119
- description: "Session ID"
120
- }
121
- ],
122
- responses: {
123
- 200: {
124
- description: "Session information",
125
- schema: { type: "object" }
126
- },
127
- 400: {
128
- description: "Invalid or missing session ID"
129
- }
130
+ }
131
+ },
132
+ "delete": {
133
+ "summary": "Delete MCP session",
134
+ "description": "Deletes an MCP session.",
135
+ "parameters": [
136
+ {
137
+ "name": "mcp-session-id",
138
+ "in": "header",
139
+ "required": true,
140
+ "type": "string",
141
+ "description": "Session ID"
130
142
  }
131
- },
132
- delete: {
133
- summary: "Delete MCP session",
134
- description: "Deletes an MCP session.",
135
- parameters: [
136
- {
137
- name: "mcp-session-id",
138
- in: "header",
139
- required: true,
140
- type: "string",
141
- description: "Session ID"
142
- }
143
- ],
144
- responses: {
145
- 200: {
146
- description: "Session deleted",
147
- schema: { type: "object" }
148
- },
149
- 400: {
150
- description: "Invalid or missing session ID"
151
- }
143
+ ],
144
+ "responses": {
145
+ "200": {
146
+ "description": "Session deleted",
147
+ "schema": { "type": "object" }
148
+ },
149
+ "400": {
150
+ "description": "Invalid or missing session ID"
152
151
  }
153
152
  }
154
153
  }
155
154
  }
156
- };
157
- }
155
+ }
156
+ }
157
+ };
158
+ export default openAPIJson;
@@ -0,0 +1,151 @@
1
+ {
2
+ "swagger": "2.0",
3
+ "info": {
4
+ "title": "sas-score-mcp-serverjs API",
5
+ "version": "1.0.0",
6
+ "description": "API for interacting with the SAS Viya Sample MCP Server."
7
+ },
8
+ "host": "localhost:8080",
9
+ "basePath": "/",
10
+ "schemes": ["http", "https"],
11
+ "consumes": ["application/json"],
12
+ "produces": ["application/json"],
13
+ "paths": {
14
+ "/health": {
15
+ "get": {
16
+ "summary": "Health check",
17
+ "description": "Returns health and version information.",
18
+ "responses": {
19
+ "200": {
20
+ "description": "Health information",
21
+ "schema": {
22
+ "type": "object",
23
+ "properties": {
24
+ "name": { "type": "string" },
25
+ "version": { "type": "string" },
26
+ "description": { "type": "string" },
27
+ "endpoints": { "type": "object" },
28
+ "usage": { "type": "string" }
29
+ }
30
+ }
31
+ }
32
+ }
33
+ }
34
+ },
35
+ "/apiMeta": {
36
+ "get": {
37
+ "summary": "API metadata",
38
+ "description": "Returns the OpenAPI specification for this server.",
39
+ "responses": {
40
+ "200": {
41
+ "description": "OpenAPI document",
42
+ "schema": { "type": "object" }
43
+ }
44
+ }
45
+ }
46
+ },
47
+ "/mcp": {
48
+ "options": {
49
+ "summary": "CORS preflight",
50
+ "description": "CORS preflight endpoint.",
51
+ "responses": {
52
+ "204": { "description": "No Content" }
53
+ }
54
+ },
55
+ "post": {
56
+ "summary": "MCP request",
57
+ "description": "Handles MCP JSON-RPC requests.",
58
+ "parameters": [
59
+ {
60
+ "name": "body",
61
+ "in": "body",
62
+ "required": true,
63
+ "schema": { "type": "object" }
64
+ },
65
+ {
66
+ "name": "Authorization",
67
+ "in": "header",
68
+ "required": false,
69
+ "type": "string",
70
+ "description": "Bearer token for authentication"
71
+ },
72
+ {
73
+ "name": "X-VIYA-SERVER",
74
+ "in": "header",
75
+ "required": false,
76
+ "type": "string",
77
+ "description": "Override VIYA server"
78
+ },
79
+ {
80
+ "name": "X-REFRESH-TOKEN",
81
+ "in": "header",
82
+ "required": false,
83
+ "type": "string",
84
+ "description": "Refresh token for authentication"
85
+ },
86
+ {
87
+ "name": "mcp-session-id",
88
+ "in": "header",
89
+ "required": false,
90
+ "type": "string",
91
+ "description": "Session ID"
92
+ }
93
+ ],
94
+ "responses": {
95
+ "200": {
96
+ "description": "MCP response",
97
+ "schema": { "type": "object" }
98
+ },
99
+ "500": {
100
+ "description": "Server error",
101
+ "schema": { "type": "object" }
102
+ }
103
+ }
104
+ },
105
+ "get": {
106
+ "summary": "Get MCP session",
107
+ "description": "Retrieves information for an MCP session.",
108
+ "parameters": [
109
+ {
110
+ "name": "mcp-session-id",
111
+ "in": "header",
112
+ "required": true,
113
+ "type": "string",
114
+ "description": "Session ID"
115
+ }
116
+ ],
117
+ "responses": {
118
+ "200": {
119
+ "description": "Session information",
120
+ "schema": { "type": "object" }
121
+ },
122
+ "400": {
123
+ "description": "Invalid or missing session ID"
124
+ }
125
+ }
126
+ },
127
+ "delete": {
128
+ "summary": "Delete MCP session",
129
+ "description": "Deletes an MCP session.",
130
+ "parameters": [
131
+ {
132
+ "name": "mcp-session-id",
133
+ "in": "header",
134
+ "required": true,
135
+ "type": "string",
136
+ "description": "Session ID"
137
+ }
138
+ ],
139
+ "responses": {
140
+ "200": {
141
+ "description": "Session deleted",
142
+ "schema": { "type": "object" }
143
+ },
144
+ "400": {
145
+ "description": "Invalid or missing session ID"
146
+ }
147
+ }
148
+ }
149
+ }
150
+ }
151
+ }
@@ -0,0 +1,121 @@
1
+ swagger: "2.0"
2
+ info:
3
+ title: SAS Viya Sample MCP Server API
4
+ version: "1.0.0"
5
+ description: API for interacting with the SAS Viya Sample MCP Server.
6
+ host: localhost:8080
7
+ basePath: /
8
+ schemes:
9
+ - http
10
+ - https
11
+ consumes:
12
+ - application/json
13
+ produces:
14
+ - application/json
15
+ paths:
16
+ /health:
17
+ get:
18
+ summary: Health check
19
+ description: Returns health and version information.
20
+ responses:
21
+ 200:
22
+ description: Health information
23
+ schema:
24
+ type: object
25
+ properties:
26
+ name:
27
+ type: string
28
+ version:
29
+ type: string
30
+ description:
31
+ type: string
32
+ endpoints:
33
+ type: object
34
+ usage:
35
+ type: string
36
+ /apiMeta:
37
+ get:
38
+ summary: API metadata
39
+ description: Returns the OpenAPI specification for this server.
40
+ responses:
41
+ 200:
42
+ description: OpenAPI document
43
+ schema:
44
+ type: object
45
+ /mcp:
46
+ options:
47
+ summary: CORS preflight
48
+ description: CORS preflight endpoint.
49
+ responses:
50
+ 204:
51
+ description: No Content
52
+ post:
53
+ summary: MCP request
54
+ description: Handles MCP JSON-RPC requests.
55
+ parameters:
56
+ - name: body
57
+ in: body
58
+ required: true
59
+ schema:
60
+ type: object
61
+ - name: Authorization
62
+ in: header
63
+ required: false
64
+ type: string
65
+ description: Bearer token for authentication
66
+ - name: X-VIYA-SERVER
67
+ in: header
68
+ required: false
69
+ type: string
70
+ description: Override VIYA server
71
+ - name: X-REFRESH-TOKEN
72
+ in: header
73
+ required: false
74
+ type: string
75
+ description: Refresh token for authentication
76
+ - name: mcp-session-id
77
+ in: header
78
+ required: false
79
+ type: string
80
+ description: Session ID
81
+ responses:
82
+ 200:
83
+ description: MCP response
84
+ schema:
85
+ type: object
86
+ 500:
87
+ description: Server error
88
+ schema:
89
+ type: object
90
+ get:
91
+ summary: Get MCP session
92
+ description: Retrieves information for an MCP session.
93
+ parameters:
94
+ - name: mcp-session-id
95
+ in: header
96
+ required: true
97
+ type: string
98
+ description: Session ID
99
+ responses:
100
+ 200:
101
+ description: Session information
102
+ schema:
103
+ type: object
104
+ 400:
105
+ description: Invalid or missing session ID
106
+ delete:
107
+ summary: Delete MCP session
108
+ description: Deletes an MCP session.
109
+ parameters:
110
+ - name: mcp-session-id
111
+ in: header
112
+ required: true
113
+ type: string
114
+ description: Session ID
115
+ responses:
116
+ 200:
117
+ description: Session deleted
118
+ schema:
119
+ type: object
120
+ 400:
121
+ description: Invalid or missing session ID