Skip to content

Commit f7c9363

Browse files
njb90claude
andcommitted
docs: add design spec for configure-ai-tools v2
Covers remote MCP servers, IDE picker reorder, and annotated QuickPick for re-entry visibility. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 5892eb6 commit f7c9363

1 file changed

Lines changed: 101 additions & 0 deletions

File tree

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# Configure AI Tools v2 — Design Spec
2+
3+
## Goal
4+
5+
Two improvements to the existing `configureAiTools` command:
6+
7+
1. Switch MCP server configs from local `npx` processes to remote OAuth URLs (MediaFlows keeps headers-based auth).
8+
2. Add status annotations to every QuickPick so users can see what's already installed and make informed choices on re-entry.
9+
10+
## Changes to `src/commands/configureAiTools.ts` only
11+
12+
No other files need modification.
13+
14+
---
15+
16+
## Remote MCP Server Configs
17+
18+
Replace all `cursorConfig` / `vscodeConfig` entries for the four Cloudinary LLM MCP servers with remote URL entries. Both formats are identical — no `type` field needed since editors infer remote from the presence of `url`.
19+
20+
| Server | URL |
21+
|--------|-----|
22+
| cloudinary-asset-mgmt | `https://asset-management.mcp.cloudinary.com/mcp` |
23+
| cloudinary-env-config | `https://environment-config.mcp.cloudinary.com/mcp` |
24+
| cloudinary-smd | `https://structured-metadata.mcp.cloudinary.com/mcp` |
25+
| cloudinary-analysis | `https://analysis.mcp.cloudinary.com/sse` |
26+
27+
These use OAuth — no credentials in the config file.
28+
29+
MediaFlows keeps the headers-based format unchanged (it does not use OAuth):
30+
31+
```json
32+
{
33+
"url": "https://mediaflows.mcp.cloudinary.com/v2/mcp",
34+
"headers": {
35+
"cld-cloud-name": "your_cloud_name",
36+
"cld-api-key": "your_api_key",
37+
"cld-secret": "your_api_secret"
38+
}
39+
}
40+
```
41+
42+
The VS Code (`"servers"`) vs Cursor/others (`"mcpServers"`) root key distinction is unchanged.
43+
44+
---
45+
46+
## Flow Reorder: IDE Picker Before Skills Picker
47+
48+
The IDE target QuickPick moves **before** the skills picker. This is required so the correct install path is known when checking what's already installed.
49+
50+
New skills flow order:
51+
1. IDE target picker (single-select, pre-selected via `detectEditor()`)
52+
2. Skills picker (multi-select, annotated with install status for the selected IDE)
53+
54+
---
55+
56+
## Status Annotations
57+
58+
### Two new helpers
59+
60+
**`readInstalledSkillDirNames(rootUri, ideTarget)`**`Set<string>`
61+
62+
Checks which skill `dirName` values are already present for the given IDE:
63+
- Claude Code: `.claude/skills/<dirName>/SKILL.md` exists
64+
- Cursor: `.cursor/rules/<dirName>.mdc` exists
65+
- VS Code Copilot: `.github/copilot-instructions.md` contains `## <skillName>` (use the frontmatter `name`, not dirName)
66+
67+
Returns a Set of the dirNames (or skill names for Copilot) that are installed.
68+
69+
**`readConfiguredMcpServerKeys(rootUri, mcpFilePath, rootKey)`**`Set<string>`
70+
71+
Reads the existing MCP config file, parses JSON, returns the keys present under `rootKey` (`"servers"` or `"mcpServers"`). Returns empty Set if the file doesn't exist or can't be parsed.
72+
73+
### Skills QuickPick annotations
74+
75+
After calling `readInstalledSkillDirNames`, build each QuickPick item:
76+
77+
```
78+
label: skill.name
79+
description: skill.description
80+
detail: "✓ installed" OR "Not installed"
81+
picked: true (always — user decides whether to re-install)
82+
```
83+
84+
### MCP servers QuickPick annotations
85+
86+
After calling `readConfiguredMcpServerKeys`, build each QuickPick item:
87+
88+
```
89+
label: server.label
90+
description: server.description
91+
detail: "✓ already configured" OR "Not configured"
92+
picked: false if already configured, true if not configured
93+
```
94+
95+
Already-configured MCP servers default to **unchecked** to protect credentials (especially MediaFlows placeholder values) from silent overwrite on re-run. Status is still visible so the user knows what's there.
96+
97+
---
98+
99+
## Error Handling
100+
101+
No changes to existing error handling. `readInstalledSkillDirNames` and `readConfiguredMcpServerKeys` swallow errors silently (treat as "not installed/configured") — failure to read status is non-fatal.

0 commit comments

Comments
 (0)