@sassoftware/sas-score-mcp-serverjs 1.0.1-4 → 1.0.1-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/cli.js
CHANGED
|
@@ -107,6 +107,12 @@ const args = parseArgs({
|
|
|
107
107
|
alias: 'mcpclient',
|
|
108
108
|
description: 'MCP client name (github, claude...). Defaults to \'github\''
|
|
109
109
|
},
|
|
110
|
+
agentfolder: {
|
|
111
|
+
type: 'string',
|
|
112
|
+
short: 'f',
|
|
113
|
+
description: 'Subfolder under the client folder to copy the skills to, used to have different set of skills for different agents under the same client'
|
|
114
|
+
|
|
115
|
+
},
|
|
110
116
|
help: {
|
|
111
117
|
type: 'boolean',
|
|
112
118
|
short: 'h',
|
|
@@ -141,6 +147,7 @@ Options:
|
|
|
141
147
|
Agent options:
|
|
142
148
|
--agent Enable agent mode with a pre-configured set of skills based on the client specified (default: false)
|
|
143
149
|
--client <name> MCP client name (github, claude...). Defaults to 'github'.Use to install skills
|
|
150
|
+
--agentfolder <folder> Subfolder under the client folder to copy the skills to, used to have different set of skills for different agents under the same client
|
|
144
151
|
Authentication options:
|
|
145
152
|
-a, --authflow <flow> Authentication flow: oauth, oauthclient, sascli, code, token(default oauth)
|
|
146
153
|
-s, --clientsecret <secret> Client Secret for oauth authentication (not needed for pkce)
|
|
@@ -219,6 +226,7 @@ if (args.values.version) {
|
|
|
219
226
|
console.error(`[Note] MCP client set to: ${process.env.CLIENT}`);
|
|
220
227
|
|
|
221
228
|
|
|
229
|
+
|
|
222
230
|
/********************************* */
|
|
223
231
|
const BRAND = 'sas-score'
|
|
224
232
|
/********************************* */
|
|
@@ -376,7 +384,7 @@ if (appEnvBase.TOKENFILE != null) {
|
|
|
376
384
|
if (process.env.AGENT === 'TRUE') {
|
|
377
385
|
if (process.env.CLIENT !== 'none') {
|
|
378
386
|
console.error(`[Note] Setting up skills for client: ${process.env.CLIENT}...`);
|
|
379
|
-
setupSkills(process.env.CLIENT);
|
|
387
|
+
setupSkills(process.env.CLIENT, args.values.agentfolder);
|
|
380
388
|
}
|
|
381
389
|
} else {
|
|
382
390
|
console.error(`[Note] Agent mode not enabled`);
|
package/package.json
CHANGED
package/src/setupSkills.js
CHANGED
|
@@ -4,7 +4,7 @@ import path from 'path';
|
|
|
4
4
|
import os from 'os';
|
|
5
5
|
import { fileURLToPath } from 'url';
|
|
6
6
|
|
|
7
|
-
function setupSkills(clientName) {
|
|
7
|
+
function setupSkills(clientName,agentFolder) {
|
|
8
8
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
9
9
|
// Paths
|
|
10
10
|
let destination;
|
|
@@ -13,9 +13,12 @@ function setupSkills(clientName) {
|
|
|
13
13
|
destination = path.join(process.cwd(), clientName);
|
|
14
14
|
clientName = clientName.slice(1);
|
|
15
15
|
} else {
|
|
16
|
-
destination = path.join(os.homedir(), '.' + clientName);
|
|
16
|
+
destination = path.join(os.homedir(), '.' + clientName );
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
if (agentFolder) {
|
|
20
|
+
destination = path.join(destination, agentFolder);
|
|
21
|
+
}
|
|
19
22
|
const source = path.join(__dirname, `../.skills` + '_' + clientName.toLowerCase());
|
|
20
23
|
console.error("==================================================================");
|
|
21
24
|
console.error(` Copying ${source} to ${destination}...`);
|
|
@@ -54,7 +54,7 @@ async function _listLibrary(params) {
|
|
|
54
54
|
if (appControl != null) {
|
|
55
55
|
await deleteSession(appControl);
|
|
56
56
|
}
|
|
57
|
-
return { isError: true, content: [{ type: 'text', text: JSON.stringify(err) }] };
|
|
57
|
+
return { isError: true, content: [{ type: 'text', text: (typeof err === 'string') ? err : JSON.stringify(err) }] };
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
|
|
@@ -44,7 +44,7 @@ async function _listTables(params) {
|
|
|
44
44
|
structuredContent: response};
|
|
45
45
|
} catch (err) {
|
|
46
46
|
console.error(JSON.stringify(err));
|
|
47
|
-
return {isError: true, content: [{ type: 'text', text: JSON.stringify(err) }] }
|
|
47
|
+
return {isError: true, content: [{ type: 'text', text: (typeof err === 'string') ? err : JSON.stringify(err) }] }
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"permissions": {
|
|
3
|
-
"allow": [
|
|
4
|
-
"mcp__sasmcp__sas-score-deva-score",
|
|
5
|
-
"mcp__sasmcp__sas-score-find-model",
|
|
6
|
-
"mcp__sasmcp__sas-score-model-info",
|
|
7
|
-
"Bash(cp \"C:/dev/github/7-skill-integration/.claude/skills/sas-read-and-score/SKILL.md\" \"C:/dev/github/7-skill-integration/skills/sas-read-and-score/SKILL.md\")",
|
|
8
|
-
"Bash(cp \"C:/dev/github/7-skill-integration/.claude/skills/sas-read-strategy/SKILL.md\" \"C:/dev/github/7-skill-integration/skills/sas-read-strategy/SKILL.md\")",
|
|
9
|
-
"Bash(cp \"C:/dev/github/7-skill-integration/.claude/skills/sas-score-workflow/SKILL.md\" \"C:/dev/github/7-skill-integration/skills/sas-score-workflow/SKILL.md\")",
|
|
10
|
-
"WebSearch"
|
|
11
|
-
]
|
|
12
|
-
}
|
|
13
|
-
}
|