@sassoftware/sas-score-mcp-serverjs 1.0.1-3 → 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 +9 -1
- package/package.json +2 -3
- package/src/oauthHandlers/callback.js +1 -1
- package/src/processHeaders.js +1 -1
- package/src/setupSkills.js +6 -3
- package/src/toolHelpers/_listLibrary.js +1 -1
- package/src/toolHelpers/_listTables.js +1 -1
- package/.skills_claude/README.md +0 -303
- package/.skills_claude/TESTING_GUIDE.md +0 -252
- package/.skills_claude/agents/sas-viya-scoring-expert.md +0 -58
- package/.skills_claude/claude-desktop-config.json +0 -16
- package/.skills_claude/claude-desktop-system-prompt.md +0 -127
- package/.skills_claude/copilot-instructions.md +0 -155
- package/.skills_claude/instructions.md +0 -184
- package/.skills_claude/skills/sas-find-library-smart/SKILL.md +0 -157
- package/.skills_claude/skills/sas-find-resource-strategy/SKILL.md +0 -105
- package/.skills_claude/skills/sas-list-resource-strategy/SKILL.md +0 -124
- package/.skills_claude/skills/sas-list-tables-smart/SKILL.md +0 -126
- package/.skills_claude/skills/sas-read-and-score/SKILL.md +0 -112
- package/.skills_claude/skills/sas-read-strategy/SKILL.md +0 -154
- package/.skills_claude/skills/sas-request-classifier/SKILL.md +0 -69
- package/.skills_claude/skills/sas-score-workflow/SKILL.md +0 -200
- package/.skills_claude/skills-index.md +0 -345
- package/.skills_github/agents/sas-viya-scoring-expert.md +0 -58
- package/.skills_github/copilot-instructions.md +0 -177
- package/.skills_github/skills/sas-find-library-smart/SKILL.md +0 -155
- package/.skills_github/skills/sas-find-resource-strategy/SKILL.md +0 -105
- package/.skills_github/skills/sas-list-resource-strategy/SKILL.md +0 -124
- package/.skills_github/skills/sas-list-tables-smart/SKILL.md +0 -128
- package/.skills_github/skills/sas-read-and-score/SKILL.md +0 -113
- package/.skills_github/skills/sas-read-strategy/SKILL.md +0 -154
- package/.skills_github/skills/sas-request-classifier/SKILL.md +0 -74
- package/.skills_github/skills/sas-score-workflow/SKILL.md +0 -314
- package/src/toolSet/.claude/settings.local.json +0 -13
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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sassoftware/sas-score-mcp-serverjs",
|
|
3
|
-
"version": "1.0.1-
|
|
3
|
+
"version": "1.0.1-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",
|
|
@@ -42,8 +42,7 @@
|
|
|
42
42
|
"openApi.json",
|
|
43
43
|
"openApi.yaml",
|
|
44
44
|
"scripts",
|
|
45
|
-
".
|
|
46
|
-
".skills_claude"
|
|
45
|
+
".skills"
|
|
47
46
|
],
|
|
48
47
|
"dependencies": {
|
|
49
48
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
@@ -75,7 +75,7 @@ async function callback(req, res, pkceStore, codeStore, appContext) {
|
|
|
75
75
|
// which was part of the payload from the client to /oauth/authorize
|
|
76
76
|
// we trust since it was associated with the valid PKCE state
|
|
77
77
|
console.error("[Note] OAuth callback complete, redirecting to MCP client");
|
|
78
|
-
console.
|
|
78
|
+
console.error(pending.clientRedirectUri.toString())
|
|
79
79
|
return res.redirect(`${pending.clientRedirectUri}?${redirectParams}`);
|
|
80
80
|
} catch (err) {
|
|
81
81
|
console.error("[Error] OAuth callback handler error:", err);
|
package/src/processHeaders.js
CHANGED
|
@@ -34,7 +34,7 @@ function processHeaders(req, res, next, cache, appContext) {
|
|
|
34
34
|
let token = (hdr != null) ? hdr.slice(7) : null;
|
|
35
35
|
//console.error("[Note] Authorization token", token);
|
|
36
36
|
debugger;
|
|
37
|
-
console.
|
|
37
|
+
console.error('>>>',appContext.AUTHFLOW);
|
|
38
38
|
if (appContext.AUTHFLOW === 'bearer') {
|
|
39
39
|
debugger;
|
|
40
40
|
let startAuth = false;
|
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}...`);
|
|
@@ -40,7 +43,7 @@ function setupSkills(clientName) {
|
|
|
40
43
|
const entries = fs.readdirSync(dir, { withFileTypes: true });
|
|
41
44
|
|
|
42
45
|
for (const entry of entries) {
|
|
43
|
-
console.
|
|
46
|
+
console.error(indent + entry.name);
|
|
44
47
|
|
|
45
48
|
if (entry.isDirectory()) {
|
|
46
49
|
listExpandedFolder(path.join(dir, entry.name), indent + " ");
|
|
@@ -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
|
};
|
package/.skills_claude/README.md
DELETED
|
@@ -1,303 +0,0 @@
|
|
|
1
|
-
# Claude Desktop — SAS Agent Setup & Deployment Guide
|
|
2
|
-
|
|
3
|
-
This guide explains how to set up the SAS agent in Claude Desktop using the `.claude` folder.
|
|
4
|
-
|
|
5
|
-
## What's Included
|
|
6
|
-
|
|
7
|
-
The `.claude` folder contains:
|
|
8
|
-
- ✅ Complete SAS agent configuration (same as `.github/` but organized for Claude)
|
|
9
|
-
- ✅ All 6 specialized SAS skills
|
|
10
|
-
- ✅ MCP server configuration template
|
|
11
|
-
- ✅ System prompt for Claude Desktop
|
|
12
|
-
- ✅ Setup and usage documentation
|
|
13
|
-
|
|
14
|
-
## Prerequisites
|
|
15
|
-
|
|
16
|
-
Before you start:
|
|
17
|
-
- ✅ Claude Desktop installed (latest version recommended)
|
|
18
|
-
- ✅ Node.js installed and in your PATH
|
|
19
|
-
- ✅ SAS Viya environment with OAuth credentials
|
|
20
|
-
- ✅ Access to your SAS Viya server from your machine
|
|
21
|
-
- ✅ (Optional) CA certificate file if using self-signed TLS
|
|
22
|
-
|
|
23
|
-
## Setup Steps
|
|
24
|
-
|
|
25
|
-
### Step 1: Gather Your SAS Viya Credentials
|
|
26
|
-
|
|
27
|
-
You'll need:
|
|
28
|
-
- **VIYA_URL** — Your SAS Viya server URL (e.g., `https://sas-viya.example.com`)
|
|
29
|
-
- **VIYA_CLIENT_ID** — OAuth client ID
|
|
30
|
-
- **VIYA_CLIENT_SECRET** — OAuth client secret
|
|
31
|
-
- **VIYA_TLS_CERT** — (Optional) Path to CA certificate file
|
|
32
|
-
|
|
33
|
-
### Step 2: Configure the MCP Server Connection
|
|
34
|
-
|
|
35
|
-
1. Open `.claude/claude-desktop-config.json`
|
|
36
|
-
2. Update the configuration with your credentials:
|
|
37
|
-
|
|
38
|
-
```json
|
|
39
|
-
{
|
|
40
|
-
"mcpServers": {
|
|
41
|
-
"sas-mcp-server": {
|
|
42
|
-
"command": "node",
|
|
43
|
-
"args": [
|
|
44
|
-
"/absolute/path/to/7-skill-integration/cli.js"
|
|
45
|
-
],
|
|
46
|
-
"env": {
|
|
47
|
-
"VIYA_URL": "https://your-sas-viya-url.com",
|
|
48
|
-
"VIYA_CLIENT_ID": "your-client-id",
|
|
49
|
-
"VIYA_CLIENT_SECRET": "your-client-secret",
|
|
50
|
-
"VIYA_TLS_CERT": "/path/to/ca-cert.pem"
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
**Important notes:**
|
|
58
|
-
- Use **absolute paths** for both the CLI path and certificate
|
|
59
|
-
- Ensure the path to `cli.js` is correct for your system
|
|
60
|
-
- Include the leading `/` for Unix/Mac paths; for Windows, use `C:\path\to\...`
|
|
61
|
-
|
|
62
|
-
### Step 3: Place Configuration in Claude Desktop Directory
|
|
63
|
-
|
|
64
|
-
Copy the updated `claude_desktop_config.json` to your Claude Desktop config location:
|
|
65
|
-
|
|
66
|
-
**macOS/Linux:**
|
|
67
|
-
```bash
|
|
68
|
-
cp /path/to/7-skill-integration/.claude/claude-desktop-config.json ~/.claude/claude_desktop_config.json
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
**Windows:**
|
|
72
|
-
```powershell
|
|
73
|
-
Copy-Item "C:\path\to\7-skill-integration\.claude\claude-desktop-config.json" "$env:APPDATA\Claude\claude_desktop_config.json"
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
**Note:** If you have other MCP servers configured, merge the `mcpServers` sections instead of replacing the entire file.
|
|
77
|
-
|
|
78
|
-
### Step 4: Add System Prompt to Claude
|
|
79
|
-
|
|
80
|
-
1. Open **Claude Desktop**
|
|
81
|
-
2. Go to **Settings** → **Custom Instructions**
|
|
82
|
-
3. Open `.claude/claude-desktop-system-prompt.md`
|
|
83
|
-
4. Copy the entire contents
|
|
84
|
-
5. Paste into the custom instructions field in Claude
|
|
85
|
-
6. Save
|
|
86
|
-
|
|
87
|
-
### Step 5: Restart Claude Desktop
|
|
88
|
-
|
|
89
|
-
Restart Claude Desktop to activate the new configuration and system prompt.
|
|
90
|
-
|
|
91
|
-
## Verification
|
|
92
|
-
|
|
93
|
-
After setup, verify the connection works:
|
|
94
|
-
|
|
95
|
-
1. Start a chat with Claude
|
|
96
|
-
2. Ask: **"list jobs"**
|
|
97
|
-
3. You should see available SAS jobs from your Viya environment
|
|
98
|
-
4. If successful, the MCP connection is working ✅
|
|
99
|
-
|
|
100
|
-
## Configuration Details
|
|
101
|
-
|
|
102
|
-
### MCP Server Configuration (claude-desktop-config.json)
|
|
103
|
-
|
|
104
|
-
The configuration tells Claude Desktop how to:
|
|
105
|
-
- Start the SAS MCP server (using Node.js)
|
|
106
|
-
- Connect to your SAS Viya environment
|
|
107
|
-
- Pass credentials securely
|
|
108
|
-
|
|
109
|
-
**Key fields:**
|
|
110
|
-
- `command` — The Node.js interpreter
|
|
111
|
-
- `args` — Path to the MCP server CLI
|
|
112
|
-
- `env` — Environment variables for authentication and TLS
|
|
113
|
-
|
|
114
|
-
### System Prompt (claude-desktop-system-prompt.md)
|
|
115
|
-
|
|
116
|
-
The system prompt instructs Claude to:
|
|
117
|
-
- Treat itself as a SAS domain specialist
|
|
118
|
-
- Load skills before using MCP tools
|
|
119
|
-
- Classify ambiguous SAS terms
|
|
120
|
-
- Verify assets before execution
|
|
121
|
-
- Never hallucinate SAS resources
|
|
122
|
-
|
|
123
|
-
## Using the SAS Agent
|
|
124
|
-
|
|
125
|
-
Once configured, you can start using the agent:
|
|
126
|
-
|
|
127
|
-
### Basic Commands
|
|
128
|
-
|
|
129
|
-
```
|
|
130
|
-
You: "Find library Public"
|
|
131
|
-
Agent: Loads sas-find-library-smart skill, checks CAS and SAS, returns result
|
|
132
|
-
|
|
133
|
-
You: "List tables in Public"
|
|
134
|
-
Agent: Loads sas-list-tables-smart skill, enumerates tables
|
|
135
|
-
|
|
136
|
-
You: "Score customers in Public.customers with model churn.mas"
|
|
137
|
-
Agent: Loads sas-read-and-score + sas-score-workflow, returns predictions
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
### Available Skills
|
|
141
|
-
|
|
142
|
-
See `skills-index.md` for quick reference, or each skill's file for details:
|
|
143
|
-
|
|
144
|
-
1. **sas-request-classifier** — Disambiguate SAS terms
|
|
145
|
-
2. **sas-find-library-smart** — Find CAS or SAS libraries
|
|
146
|
-
3. **sas-list-tables-smart** — List tables in a library
|
|
147
|
-
4. **sas-read-strategy** — Choose right read tool (raw vs. analytical)
|
|
148
|
-
5. **sas-read-and-score** — Read table data + score with model
|
|
149
|
-
6. **sas-score-workflow** — Route scoring by model type (.job, .mas, etc.)
|
|
150
|
-
|
|
151
|
-
## Troubleshooting
|
|
152
|
-
|
|
153
|
-
### "MCP Server Not Found"
|
|
154
|
-
|
|
155
|
-
**Symptom:** Claude says the MCP server can't be found.
|
|
156
|
-
|
|
157
|
-
**Solutions:**
|
|
158
|
-
1. Verify the path to `cli.js` is absolute and correct
|
|
159
|
-
2. Check that Node.js is installed: `node --version`
|
|
160
|
-
3. Ensure Node.js is in your PATH: `which node` (Mac/Linux) or `where node` (Windows)
|
|
161
|
-
4. Restart Claude Desktop
|
|
162
|
-
5. Check the file permissions on `cli.js`
|
|
163
|
-
|
|
164
|
-
### "Authentication Failed"
|
|
165
|
-
|
|
166
|
-
**Symptom:** Claude connects but SAS operations fail with auth errors.
|
|
167
|
-
|
|
168
|
-
**Solutions:**
|
|
169
|
-
1. Verify `VIYA_CLIENT_ID` and `VIYA_CLIENT_SECRET` are correct
|
|
170
|
-
2. Ensure credentials are still valid (check if they've expired)
|
|
171
|
-
3. Verify `VIYA_URL` is accessible from your machine: `curl https://your-viya-url`
|
|
172
|
-
4. Check network connectivity and firewall rules
|
|
173
|
-
5. If using a proxy, configure it in your environment
|
|
174
|
-
|
|
175
|
-
### "TLS Certificate Error"
|
|
176
|
-
|
|
177
|
-
**Symptom:** SSL/certificate verification fails.
|
|
178
|
-
|
|
179
|
-
**Solutions:**
|
|
180
|
-
1. Verify the path in `VIYA_TLS_CERT` is correct and absolute
|
|
181
|
-
2. Ensure the certificate file is readable
|
|
182
|
-
3. If using self-signed cert, try `VIYA_TLS_SKIP_VERIFY=true` (development only, not recommended for production)
|
|
183
|
-
4. Request the correct CA certificate from your SAS administrator
|
|
184
|
-
|
|
185
|
-
### "No Tools Available"
|
|
186
|
-
|
|
187
|
-
**Symptom:** Claude says no SAS tools are available.
|
|
188
|
-
|
|
189
|
-
**Solutions:**
|
|
190
|
-
1. Restart Claude Desktop
|
|
191
|
-
2. Check the MCP server logs for errors
|
|
192
|
-
3. Verify the SAS Viya server is running and accessible
|
|
193
|
-
4. Try a simple test: ask "list jobs"
|
|
194
|
-
5. Check your custom instructions are loaded correctly
|
|
195
|
-
|
|
196
|
-
### "Claude Doesn't Load Skills"
|
|
197
|
-
|
|
198
|
-
**Symptom:** Claude doesn't automatically load the right skill for your request.
|
|
199
|
-
|
|
200
|
-
**Solutions:**
|
|
201
|
-
1. Explicitly reference the skill: "Use sas-find-library-smart to find library Public"
|
|
202
|
-
2. Check that `claude-desktop-system-prompt.md` is loaded in custom instructions
|
|
203
|
-
3. Restart Claude Desktop to reload the system prompt
|
|
204
|
-
4. Verify the skill files exist in `.claude/skills/`
|
|
205
|
-
|
|
206
|
-
## Advanced Configuration
|
|
207
|
-
|
|
208
|
-
### Using Multiple MCP Servers
|
|
209
|
-
|
|
210
|
-
If you have other MCP servers configured:
|
|
211
|
-
|
|
212
|
-
```json
|
|
213
|
-
{
|
|
214
|
-
"mcpServers": {
|
|
215
|
-
"sas-mcp-server": {
|
|
216
|
-
"command": "node",
|
|
217
|
-
"args": ["/path/to/cli.js"],
|
|
218
|
-
"env": { ... }
|
|
219
|
-
},
|
|
220
|
-
"other-server": {
|
|
221
|
-
"command": "...",
|
|
222
|
-
"args": [...],
|
|
223
|
-
"env": { ... }
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
```
|
|
228
|
-
|
|
229
|
-
### Environment Variables
|
|
230
|
-
|
|
231
|
-
You can also set environment variables system-wide instead of in the config:
|
|
232
|
-
|
|
233
|
-
```bash
|
|
234
|
-
export VIYA_URL="https://your-sas-viya.com"
|
|
235
|
-
export VIYA_CLIENT_ID="your-client-id"
|
|
236
|
-
export VIYA_CLIENT_SECRET="your-client-secret"
|
|
237
|
-
export VIYA_TLS_CERT="/path/to/ca-cert.pem"
|
|
238
|
-
```
|
|
239
|
-
|
|
240
|
-
Then simplify the config to just reference `cli.js`.
|
|
241
|
-
|
|
242
|
-
### Debugging
|
|
243
|
-
|
|
244
|
-
To debug MCP server issues, check:
|
|
245
|
-
1. Claude Desktop logs: `~/Library/Logs/Claude Desktop` (Mac) or `%APPDATA%\Claude\logs` (Windows)
|
|
246
|
-
2. MCP server output: Check if there are error messages from Node.js
|
|
247
|
-
3. Test the CLI directly: `node /path/to/cli.js`
|
|
248
|
-
|
|
249
|
-
## File Structure Reference
|
|
250
|
-
|
|
251
|
-
```
|
|
252
|
-
.claude/
|
|
253
|
-
├── copilot-instructions.md ← Core SAS instructions
|
|
254
|
-
├── claude-desktop-system-prompt.md ← Claude Desktop prompt
|
|
255
|
-
├── claude-desktop-config.json ← MCP config (customize this)
|
|
256
|
-
├── README.md ← This file
|
|
257
|
-
├── instructions.md ← Usage instructions
|
|
258
|
-
├── skills-index.md ← Skills quick reference
|
|
259
|
-
├── agents/
|
|
260
|
-
│ └── sas-viya-scoring-expert.md ← Agent definition
|
|
261
|
-
└── skills/
|
|
262
|
-
├── sas-request-classifier/SKILL.md
|
|
263
|
-
├── sas-find-library-smart/SKILL.md
|
|
264
|
-
├── sas-list-tables-smart/SKILL.md
|
|
265
|
-
├── sas-read-and-score/SKILL.md
|
|
266
|
-
├── sas-read-strategy/SKILL.md
|
|
267
|
-
└── sas-score-workflow/SKILL.md
|
|
268
|
-
```
|
|
269
|
-
|
|
270
|
-
## Deployment
|
|
271
|
-
|
|
272
|
-
### Local Development
|
|
273
|
-
|
|
274
|
-
For local development:
|
|
275
|
-
1. Keep the `.claude` folder in the repository
|
|
276
|
-
2. Update `claude-desktop-config.json` locally (don't commit credentials)
|
|
277
|
-
3. Share setup steps with team members
|
|
278
|
-
|
|
279
|
-
### Production Deployment
|
|
280
|
-
|
|
281
|
-
For production use:
|
|
282
|
-
1. Store credentials in environment variables, not in config file
|
|
283
|
-
2. Use a secrets management system for OAuth credentials
|
|
284
|
-
3. Commit only the `.claude` template without sensitive data
|
|
285
|
-
4. Have users configure their own credentials locally
|
|
286
|
-
|
|
287
|
-
## Support & Documentation
|
|
288
|
-
|
|
289
|
-
- **Setup issues?** See "Troubleshooting" above
|
|
290
|
-
- **Want to use a skill?** Open `.claude/skills-index.md`
|
|
291
|
-
- **Need usage guidance?** See `.claude/instructions.md`
|
|
292
|
-
- **SAS domain details?** See `.claude/copilot-instructions.md`
|
|
293
|
-
- **Skill specifics?** Open the skill's file directly: `.claude/skills/<name>/SKILL.md`
|
|
294
|
-
|
|
295
|
-
## Next Steps
|
|
296
|
-
|
|
297
|
-
1. ✅ Complete the setup steps above
|
|
298
|
-
2. ✅ Verify the connection ("list jobs" test)
|
|
299
|
-
3. ✅ Read `instructions.md` for how to use the agent
|
|
300
|
-
4. ✅ Try a simple task: "Find library Public"
|
|
301
|
-
5. ✅ Explore skills: See `skills-index.md`
|
|
302
|
-
|
|
303
|
-
Happy SAS Viya scoring! 🎯
|
|
@@ -1,252 +0,0 @@
|
|
|
1
|
-
# Testing Guide: Local Claude Desktop Setup
|
|
2
|
-
|
|
3
|
-
This guide explains how to test the SAS agent locally by placing configuration in your home directory (`~/.claude/`).
|
|
4
|
-
|
|
5
|
-
## Quick Start
|
|
6
|
-
|
|
7
|
-
### 1. Create the `.claude` directory in your home folder
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
mkdir -p ~/.claude
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
### 2. Copy the configuration file
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
cp /path/to/7-skill-integration/.claude/claude-desktop-config.json ~/.claude/
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
### 3. Edit the configuration with your credentials
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
nano ~/.claude/claude-desktop-config.json
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
Update the following fields with your SAS Viya environment details:
|
|
26
|
-
|
|
27
|
-
```json
|
|
28
|
-
{
|
|
29
|
-
"mcpServers": {
|
|
30
|
-
"sas-mcp-server": {
|
|
31
|
-
"command": "node",
|
|
32
|
-
"args": [
|
|
33
|
-
"/absolute/path/to/7-skill-integration/cli.js"
|
|
34
|
-
],
|
|
35
|
-
"env": {
|
|
36
|
-
"VIYA_URL": "https://your-sas-viya.com",
|
|
37
|
-
"VIYA_CLIENT_ID": "your-client-id",
|
|
38
|
-
"VIYA_CLIENT_SECRET": "your-client-secret",
|
|
39
|
-
"VIYA_TLS_CERT": "/path/to/ca-cert.pem"
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
**Important:**
|
|
47
|
-
- Use the **absolute path** to `cli.js` in your repository
|
|
48
|
-
- Include the leading `/` for Unix/Mac paths; for Windows, use `C:\path\to\...`
|
|
49
|
-
|
|
50
|
-
### 4. Add the system prompt to Claude Desktop
|
|
51
|
-
|
|
52
|
-
1. Open **Claude Desktop**
|
|
53
|
-
2. Go to **Settings** → **Custom Instructions**
|
|
54
|
-
3. Open `.claude/claude-desktop-system-prompt.md` from the repository
|
|
55
|
-
4. Copy the entire contents
|
|
56
|
-
5. Paste into the custom instructions field
|
|
57
|
-
6. Save
|
|
58
|
-
|
|
59
|
-
### 5. Restart Claude Desktop
|
|
60
|
-
|
|
61
|
-
Close and reopen Claude Desktop to load the new configuration and system prompt.
|
|
62
|
-
|
|
63
|
-
### 6. Test the connection
|
|
64
|
-
|
|
65
|
-
In a chat with Claude, ask:
|
|
66
|
-
|
|
67
|
-
```
|
|
68
|
-
list jobs
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
You should see a list of available SAS jobs from your Viya environment. If successful, the MCP connection is working! ✅
|
|
72
|
-
|
|
73
|
-
---
|
|
74
|
-
|
|
75
|
-
## What Files Go Where?
|
|
76
|
-
|
|
77
|
-
### Files that must go in `~/.claude/`:
|
|
78
|
-
- ✅ `claude-desktop-config.json` — **Required** for MCP server connection
|
|
79
|
-
|
|
80
|
-
### Files that don't need to be copied:
|
|
81
|
-
- ❌ Skills files — They live in the repository and are referenced in documentation
|
|
82
|
-
- ❌ Agent definitions — Documentation only
|
|
83
|
-
- ❌ Skill markdown files — For reference, not needed for execution
|
|
84
|
-
|
|
85
|
-
### System prompt:
|
|
86
|
-
- **Option A** — Copy `claude-desktop-system-prompt.md` contents to Claude Desktop Settings → Custom Instructions (recommended)
|
|
87
|
-
- **Option B** — Keep it in the repository and reference it
|
|
88
|
-
|
|
89
|
-
---
|
|
90
|
-
|
|
91
|
-
## Directory Structure After Setup
|
|
92
|
-
|
|
93
|
-
Your home directory will look like this:
|
|
94
|
-
|
|
95
|
-
```
|
|
96
|
-
~/
|
|
97
|
-
├── .claude/
|
|
98
|
-
│ └── claude-desktop-config.json ← Your configuration
|
|
99
|
-
├── ... (other home directory files)
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
The repository stays intact:
|
|
103
|
-
|
|
104
|
-
```
|
|
105
|
-
/path/to/7-skill-integration/
|
|
106
|
-
├── .claude/
|
|
107
|
-
│ ├── README.md
|
|
108
|
-
│ ├── instructions.md
|
|
109
|
-
│ ├── skills-index.md
|
|
110
|
-
│ ├── copilot-instructions.md
|
|
111
|
-
│ ├── claude-desktop-system-prompt.md
|
|
112
|
-
│ ├── claude-desktop-config.json ← Template (not modified)
|
|
113
|
-
│ ├── agents/
|
|
114
|
-
│ └── skills/
|
|
115
|
-
├── cli.js
|
|
116
|
-
├── ... (other repo files)
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
---
|
|
120
|
-
|
|
121
|
-
## How It Works
|
|
122
|
-
|
|
123
|
-
1. Claude Desktop reads `~/.claude/claude-desktop-config.json`
|
|
124
|
-
2. It starts the MCP server (Node.js process running `cli.js`)
|
|
125
|
-
3. The MCP server connects to your SAS Viya environment using the credentials you provided
|
|
126
|
-
4. Claude loads the system prompt from custom instructions
|
|
127
|
-
5. You can now use the SAS agent with all skills available
|
|
128
|
-
|
|
129
|
-
The repository's `.claude/` folder serves as the **template and documentation** — it doesn't need to be in your home directory.
|
|
130
|
-
|
|
131
|
-
---
|
|
132
|
-
|
|
133
|
-
## Troubleshooting
|
|
134
|
-
|
|
135
|
-
### "MCP Server Not Found"
|
|
136
|
-
|
|
137
|
-
**Check:**
|
|
138
|
-
1. Verify the path to `cli.js` is absolute and correct
|
|
139
|
-
2. Test Node.js is available: `node --version`
|
|
140
|
-
3. Verify the file exists: `ls -la /path/to/cli.js`
|
|
141
|
-
4. Restart Claude Desktop
|
|
142
|
-
|
|
143
|
-
**Solution:**
|
|
144
|
-
```bash
|
|
145
|
-
# Verify the path works
|
|
146
|
-
node /absolute/path/to/7-skill-integration/cli.js --help
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
### "Authentication Failed"
|
|
150
|
-
|
|
151
|
-
**Check:**
|
|
152
|
-
1. Verify credentials in `~/.claude/claude-desktop-config.json`
|
|
153
|
-
2. Ensure SAS Viya is accessible: `curl https://your-viya-url`
|
|
154
|
-
3. Verify credentials are still valid
|
|
155
|
-
|
|
156
|
-
### "No SAS Tools Available"
|
|
157
|
-
|
|
158
|
-
**Check:**
|
|
159
|
-
1. System prompt is loaded in Claude Custom Instructions
|
|
160
|
-
2. Restart Claude Desktop after adding the system prompt
|
|
161
|
-
3. Try a simple test: "list jobs"
|
|
162
|
-
|
|
163
|
-
---
|
|
164
|
-
|
|
165
|
-
## Testing Different Configurations
|
|
166
|
-
|
|
167
|
-
### Test with a local development environment:
|
|
168
|
-
|
|
169
|
-
```json
|
|
170
|
-
{
|
|
171
|
-
"mcpServers": {
|
|
172
|
-
"sas-mcp-server": {
|
|
173
|
-
"command": "node",
|
|
174
|
-
"args": ["/Users/yourname/projects/7-skill-integration/cli.js"],
|
|
175
|
-
"env": {
|
|
176
|
-
"VIYA_URL": "http://localhost:7480",
|
|
177
|
-
"VIYA_CLIENT_ID": "dev-client",
|
|
178
|
-
"VIYA_CLIENT_SECRET": "dev-secret"
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
### Test with production environment:
|
|
186
|
-
|
|
187
|
-
```json
|
|
188
|
-
{
|
|
189
|
-
"mcpServers": {
|
|
190
|
-
"sas-mcp-server": {
|
|
191
|
-
"command": "node",
|
|
192
|
-
"args": ["/opt/7-skill-integration/cli.js"],
|
|
193
|
-
"env": {
|
|
194
|
-
"VIYA_URL": "https://sas-viya-prod.company.com",
|
|
195
|
-
"VIYA_CLIENT_ID": "prod-client-id",
|
|
196
|
-
"VIYA_CLIENT_SECRET": "prod-client-secret",
|
|
197
|
-
"VIYA_TLS_CERT": "/etc/ssl/certs/company-ca.pem"
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
```
|
|
203
|
-
|
|
204
|
-
---
|
|
205
|
-
|
|
206
|
-
## Next Steps After Testing
|
|
207
|
-
|
|
208
|
-
### If testing is successful:
|
|
209
|
-
1. Document your setup
|
|
210
|
-
2. Share the setup steps with your team (without credentials)
|
|
211
|
-
3. Consider using environment variables instead of config file for production
|
|
212
|
-
4. Document any team-specific customizations
|
|
213
|
-
|
|
214
|
-
### If testing fails:
|
|
215
|
-
1. Check troubleshooting section above
|
|
216
|
-
2. Review MCP server logs
|
|
217
|
-
3. Verify SAS Viya environment is accessible
|
|
218
|
-
4. Check credentials are correct and current
|
|
219
|
-
|
|
220
|
-
---
|
|
221
|
-
|
|
222
|
-
## Important Notes
|
|
223
|
-
|
|
224
|
-
### Security
|
|
225
|
-
|
|
226
|
-
- ⚠️ **Never commit credentials** to version control
|
|
227
|
-
- ⚠️ **Never share** your `~/.claude/claude-desktop-config.json` file
|
|
228
|
-
- ✅ Use environment variables for sensitive data when possible
|
|
229
|
-
- ✅ Use a secrets management system for team deployments
|
|
230
|
-
|
|
231
|
-
### Paths
|
|
232
|
-
|
|
233
|
-
- ✅ Use absolute paths (starting with `/` or `C:\`)
|
|
234
|
-
- ❌ Don't use relative paths like `./cli.js`
|
|
235
|
-
- ❌ Don't use `~` in the config file (Claude Desktop may not expand it correctly)
|
|
236
|
-
|
|
237
|
-
### File Permissions
|
|
238
|
-
|
|
239
|
-
Ensure the config file is readable:
|
|
240
|
-
|
|
241
|
-
```bash
|
|
242
|
-
chmod 600 ~/.claude/claude-desktop-config.json
|
|
243
|
-
```
|
|
244
|
-
|
|
245
|
-
---
|
|
246
|
-
|
|
247
|
-
## Support
|
|
248
|
-
|
|
249
|
-
- **Setup questions?** See the main `README.md` in `.claude/`
|
|
250
|
-
- **How to use the agent?** See `instructions.md` in `.claude/`
|
|
251
|
-
- **Which skill to use?** See `skills-index.md` in `.claude/`
|
|
252
|
-
- **Domain guidance?** See `copilot-instructions.md` in `.claude/`
|