claudenv 1.0.2 → 1.1.0

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": "claudenv",
3
- "version": "1.0.2",
3
+ "version": "1.1.0",
4
4
  "description": "One command to integrate Claude Code into any project — installs /claudenv command for AI-powered documentation generation",
5
5
  "type": "module",
6
6
  "bin": {
@@ -0,0 +1,115 @@
1
+ ---
2
+ description: Recommend and configure MCP servers based on project analysis
3
+ allowed-tools: Read, Write, Glob, Grep, Bash(curl:*), Bash(find:*), Bash(cat:*)
4
+ disable-model-invocation: true
5
+ argument-hint: [--force]
6
+ ---
7
+
8
+ # MCP Server Setup
9
+
10
+ You are configuring MCP servers for this project. Analyze the tech stack, search the official MCP Registry, verify trust signals, and generate `.mcp.json`.
11
+
12
+ ## Step 1: Analyze the Project
13
+
14
+ Understand what this project uses:
15
+
16
+ **Read existing documentation:**
17
+ - Read CLAUDE.md if it exists — it contains the tech stack summary
18
+ - Read _state.md if it exists
19
+
20
+ **Check for existing MCP config:**
21
+ - Read `.mcp.json` if it exists — you will merge new entries, not overwrite
22
+
23
+ **Scan manifest files:**
24
+ !`find . -maxdepth 3 \( -name "package.json" -o -name "pyproject.toml" -o -name "go.mod" -o -name "Cargo.toml" -o -name "Gemfile" -o -name "composer.json" -o -name "requirements.txt" \) -not -path "*/node_modules/*" -not -path "*/.venv/*" -not -path "*/vendor/*" 2>/dev/null | head -20`
25
+
26
+ **Scan framework and tooling configs:**
27
+ !`find . -maxdepth 2 \( -name "tsconfig*.json" -o -name "next.config.*" -o -name "vite.config.*" -o -name "docker-compose.*" -o -name "Dockerfile" -o -name ".env*" -o -name "prisma" -o -name "drizzle.config.*" \) -not -path "*/node_modules/*" 2>/dev/null | head -20`
28
+
29
+ Read the manifest files you found. Identify:
30
+ - Programming languages and frameworks
31
+ - Databases (PostgreSQL, MongoDB, Redis, etc.)
32
+ - Cloud services (AWS, GCP, Azure)
33
+ - External APIs (Stripe, Sentry, etc.)
34
+ - Dev tools (Docker, GitHub Actions, etc.)
35
+
36
+ ## Step 2: Search the MCP Registry
37
+
38
+ Read the MCP server reference for search and evaluation guidance:
39
+ @.claude/skills/doc-generator/templates/mcp-servers.md
40
+
41
+ For each major technology in the project, search the official MCP Registry API:
42
+ ```bash
43
+ curl -s 'https://registry.modelcontextprotocol.io/v0.1/servers?search=<tech>&version=latest&limit=10'
44
+ ```
45
+
46
+ For each candidate server with an npm package, verify trust by checking monthly downloads:
47
+ ```bash
48
+ curl -s 'https://api.npmjs.org/downloads/point/last-month/<npm-package>'
49
+ ```
50
+
51
+ Optionally check GitHub stars for additional trust signal:
52
+ ```bash
53
+ curl -s 'https://api.github.com/repos/<owner>/<repo>'
54
+ ```
55
+
56
+ **Filtering rules:**
57
+ - Remove servers with <100 monthly npm downloads
58
+ - Rank by: npm downloads (primary) + GitHub stars (secondary) + description relevance
59
+ - When multiple servers exist for the same technology, pick the one with the highest downloads
60
+
61
+ ## Step 3: Present Recommendations
62
+
63
+ Group your recommendations into three tiers:
64
+
65
+ **Essential** — servers that directly support the project's core technologies (e.g., PostgreSQL server for a project using PostgreSQL)
66
+
67
+ **Recommended** — servers that enhance the development workflow (e.g., Context7 for library docs, GitHub for repo management)
68
+
69
+ **Optional** — servers that could be useful but aren't critical (e.g., Fetch for web content, Docker if Docker is used occasionally)
70
+
71
+ For each recommendation, explain:
72
+ - **What it does** and why it's relevant to THIS project
73
+ - **Monthly npm downloads** (trust signal)
74
+ - **Environment variables required** and whether they need secrets
75
+
76
+ Ask the user which servers to configure.
77
+
78
+ If `$ARGUMENTS` includes `--force`, auto-select all Essential and Recommended servers.
79
+
80
+ ## Step 4: Generate .mcp.json
81
+
82
+ Build the `.mcp.json` file with the selected servers following the format in the MCP server reference.
83
+
84
+ **If `.mcp.json` already exists:**
85
+ - Read it and parse the existing `mcpServers` entries
86
+ - Merge new servers into the existing config — do NOT remove or overwrite existing entries
87
+ - If a server key already exists, skip it (preserve the user's existing config)
88
+
89
+ **Key rules:**
90
+ - Use `${ENV_VAR}` placeholders for ALL secret environment variables — NEVER literal values
91
+ - Non-secret env vars can use literal values when appropriate
92
+ - Use `npx -y <package>@latest` for stdio/npm servers
93
+ - Use the `type` and `url` from remotes for HTTP/SSE servers
94
+
95
+ Write the `.mcp.json` file.
96
+
97
+ ## Step 5: Update CLAUDE.md
98
+
99
+ If CLAUDE.md exists, add or update an `## MCP Servers` section listing the configured servers and what they do. Keep it concise — one line per server.
100
+
101
+ If CLAUDE.md doesn't exist, skip this step and suggest running `/claudenv` first.
102
+
103
+ ## Step 6: Environment Variables
104
+
105
+ List all required environment variables and how to configure them:
106
+
107
+ ```
108
+ To configure secrets, run:
109
+ claude config set env.VAR_NAME "your-value"
110
+
111
+ Required environment variables:
112
+ VAR_NAME — Description of what this is and where to get it
113
+ ```
114
+
115
+ Remind the user that `.mcp.json` is safe to commit — it only contains placeholders, not actual secrets.
@@ -34,6 +34,7 @@ Compare the current state against the existing documentation:
34
34
  - **New directories** not covered in Architecture section
35
35
  - **Stale references** to files or directories that no longer exist
36
36
  - **Missing conventions** based on new config files (e.g., new linter added)
37
+ - **Missing or outdated `.mcp.json`** — if `.mcp.json` doesn't exist, or if new technologies have been added that could benefit from MCP servers, suggest running `/setup-mcp`
37
38
 
38
39
  ## Step 4: Propose Updates
39
40
 
@@ -12,6 +12,7 @@ allowed-tools: Read, Write, Glob, Grep, Bash(find:*), Bash(cat:*), Bash(node:*)
12
12
  - New files detected that change the tech stack (new framework, test runner, etc.)
13
13
  - After major refactoring that changes directory structure
14
14
  - When CLAUDE.md references files or directories that no longer exist
15
+ - When `.mcp.json` is missing and the project has significant external dependencies
15
16
 
16
17
  ## Process
17
18
 
@@ -28,6 +29,7 @@ If CLAUDE.md already exists, read it and identify:
28
29
 
29
30
  ### 3. Generate or Update
30
31
  - For new documentation: generate CLAUDE.md, _state.md, .claude/rules/code-style.md, .claude/rules/testing.md, .claude/rules/workflow.md
32
+ - For MCP configuration: suggest running `/setup-mcp` to search the MCP Registry and generate `.mcp.json`
31
33
  - For updates: propose specific changes and wait for user approval
32
34
  - Always present generated content for review before writing
33
35
  - NEVER create .md files beyond the ones listed above unless the user explicitly asks
@@ -54,3 +56,4 @@ Generated CLAUDE.md should follow this structure:
54
56
  Additionally generate:
55
57
  - `_state.md` — project state tracking (decisions, focus, known issues)
56
58
  - `.claude/rules/workflow.md` — Claude Code workflow best practices
59
+ - `.mcp.json` — MCP server configuration (via `/setup-mcp`)
@@ -0,0 +1,168 @@
1
+ # MCP Server Reference — Registry Search & Configuration
2
+
3
+ ## 1. How to Search the Registry
4
+
5
+ The official MCP Registry API provides a searchable catalog of MCP servers. No authentication required.
6
+
7
+ **Endpoint**: `GET https://registry.modelcontextprotocol.io/v0.1/servers`
8
+
9
+ **Parameters**:
10
+ - `search=<term>` — case-insensitive substring match on server names and descriptions
11
+ - `version=latest` — return only the latest version of each server
12
+ - `limit=<n>` — max results per page (default ~100)
13
+
14
+ **Search strategy**:
15
+ 1. Analyze the project's tech stack from manifest files, configs, and source code
16
+ 2. Extract key technology names (languages, frameworks, databases, cloud services, tools)
17
+ 3. Search each technology individually — specific terms yield better results
18
+
19
+ **Example searches**:
20
+ ```bash
21
+ # Database
22
+ curl -s 'https://registry.modelcontextprotocol.io/v0.1/servers?search=postgres&version=latest&limit=10'
23
+
24
+ # Cloud provider
25
+ curl -s 'https://registry.modelcontextprotocol.io/v0.1/servers?search=aws&version=latest&limit=10'
26
+
27
+ # Monitoring
28
+ curl -s 'https://registry.modelcontextprotocol.io/v0.1/servers?search=sentry&version=latest&limit=10'
29
+
30
+ # Version control
31
+ curl -s 'https://registry.modelcontextprotocol.io/v0.1/servers?search=github&version=latest&limit=10'
32
+ ```
33
+
34
+ ## 2. How to Evaluate and Trust Results
35
+
36
+ ### Primary trust signal: npm download counts
37
+
38
+ For each candidate server that has an npm package, check monthly downloads:
39
+ ```bash
40
+ curl -s 'https://api.npmjs.org/downloads/point/last-month/<npm-package-name>'
41
+ # Returns: { "downloads": N, "package": "...", ... }
42
+ ```
43
+
44
+ - **Filter out** servers with <100 monthly downloads — likely unmaintained or experimental
45
+ - **Prefer** servers with 10,000+ monthly downloads — well-established and community-trusted
46
+ - **Strong signal** at 100,000+ downloads — widely adopted
47
+
48
+ ### Secondary trust signal: GitHub stars
49
+
50
+ If the server has a repository URL, check GitHub stars:
51
+ ```bash
52
+ curl -s 'https://api.github.com/repos/<owner>/<repo>'
53
+ # Check the "stargazers_count" field
54
+ ```
55
+
56
+ - Prefer repos with 100+ stars
57
+ - Stars indicate community interest but downloads are a stronger usage signal
58
+
59
+ ### Additional evaluation criteria
60
+
61
+ - **Prefer `packages` (npm/stdio) over `remotes` (hosted)** — stdio runs locally with no external dependency
62
+ - **Prefer well-known namespaces**: `io.modelcontextprotocol/*`, `io.github.modelcontextprotocol/*` are official
63
+ - **Read descriptions carefully** — pick servers that match the project's actual use case
64
+ - **Skip** servers that appear to be forks, test entries, or clearly unmaintained
65
+ - **When multiple servers exist for the same tech**, pick the one with highest npm downloads
66
+ - **Check `environmentVariables`** — servers requiring many complex env vars may be harder to set up
67
+
68
+ ## 3. How to Build .mcp.json
69
+
70
+ The `.mcp.json` file configures MCP servers for a project. It lives in the project root.
71
+
72
+ **Root structure**:
73
+ ```json
74
+ {
75
+ "mcpServers": {
76
+ "server-name": { ... }
77
+ }
78
+ }
79
+ ```
80
+
81
+ ### stdio servers (npm packages)
82
+
83
+ For servers with a `packages` entry of `registryType: "npm"`:
84
+ ```json
85
+ {
86
+ "mcpServers": {
87
+ "server-name": {
88
+ "command": "npx",
89
+ "args": ["-y", "<package-identifier>@latest"],
90
+ "env": {
91
+ "VAR_NAME": "${VAR_NAME}"
92
+ }
93
+ }
94
+ }
95
+ }
96
+ ```
97
+
98
+ - Add any `packageArguments` with `type: "positional"` to the `args` array after the package name
99
+ - Map `environmentVariables` to the `env` object
100
+ - Use `${ENV_VAR}` placeholders for all variables with `isSecret: true`
101
+ - Non-secret env vars can use literal values when the value is project-specific and non-sensitive
102
+
103
+ ### HTTP/SSE servers (remote)
104
+
105
+ For servers with a `remotes` entry:
106
+ ```json
107
+ {
108
+ "mcpServers": {
109
+ "server-name": {
110
+ "type": "streamable-http",
111
+ "url": "https://example.com/mcp"
112
+ }
113
+ }
114
+ }
115
+ ```
116
+
117
+ Use the `type` and `url` from the remote entry directly. Add `headers` if authentication is needed:
118
+ ```json
119
+ {
120
+ "type": "streamable-http",
121
+ "url": "https://example.com/mcp",
122
+ "headers": {
123
+ "Authorization": "Bearer ${API_KEY}"
124
+ }
125
+ }
126
+ ```
127
+
128
+ ## 4. Well-Known Servers
129
+
130
+ These are hints to help find the best option when search results are noisy. Always verify via the registry API — these names and packages may change.
131
+
132
+ | Technology | Search term | Known namespace | Notes |
133
+ |---|---|---|---|
134
+ | Library docs | `context7` | `io.github.upstash/context7` | Up-to-date docs for any library; useful for most projects |
135
+ | GitHub | `github` | `io.github.modelcontextprotocol/github` | Repo management, PRs, issues |
136
+ | PostgreSQL | `postgres` | `io.github.modelcontextprotocol/postgres` | Database queries; prefer read-only config |
137
+ | Filesystem | `filesystem` | `io.github.modelcontextprotocol/filesystem` | Scoped file access |
138
+ | Fetch | `fetch` | `io.github.modelcontextprotocol/fetch` | Web content retrieval |
139
+ | Sentry | `sentry` | — | Error tracking integration |
140
+ | Stripe | `stripe` | — | Payment API |
141
+ | Docker | `docker` | — | Container management |
142
+ | AWS | `aws` | — | Cloud services |
143
+ | Redis | `redis` | — | Cache and data store |
144
+ | MongoDB | `mongodb` | — | Document database |
145
+ | Slack | `slack` | — | Team communication |
146
+ | Linear | `linear` | — | Issue tracking |
147
+
148
+ ## 5. Security Rules
149
+
150
+ ### Secrets management
151
+ - **NEVER** put actual secret values in `.mcp.json` — use `${ENV_VAR}` placeholders
152
+ - Secret values go in `~/.claude.json` (user-level config, not committed to version control)
153
+ - Tell the user how to configure each secret:
154
+ ```
155
+ claude config set env.VAR_NAME "actual-value"
156
+ ```
157
+
158
+ ### Safe to commit
159
+ - `.mcp.json` is safe to commit to version control — it contains only placeholders, never real secrets
160
+ - Add `.mcp.json` to the git commit alongside other Claude Code config files
161
+
162
+ ### Database safety
163
+ - Prefer read-only database connection strings
164
+ - If read-write access is needed, document this clearly in the recommendation
165
+
166
+ ### Principle of least privilege
167
+ - Only recommend servers that the project actually needs
168
+ - Prefer servers with narrow, well-defined capabilities over general-purpose ones
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  description: Set up Claude Code documentation for this project — analyze tech stack, generate CLAUDE.md, rules, hooks, commands, and skills
3
- allowed-tools: Read, Write, Glob, Grep, Bash(find:*), Bash(cat:*), Bash(mkdir:*), Bash(cp:*), Bash(chmod:*)
3
+ allowed-tools: Read, Write, Glob, Grep, Bash(find:*), Bash(cat:*), Bash(mkdir:*), Bash(cp:*), Bash(chmod:*), Bash(curl:*)
4
4
  disable-model-invocation: true
5
5
  argument-hint: [--force]
6
6
  ---
@@ -105,13 +105,52 @@ cp ~/.claude/skills/claudenv/scaffold/.claude/commands/validate-docs.md .claude/
105
105
  cp ~/.claude/skills/claudenv/scaffold/.claude/skills/doc-generator/SKILL.md .claude/skills/doc-generator/SKILL.md
106
106
  cp ~/.claude/skills/claudenv/scaffold/.claude/skills/doc-generator/scripts/validate.sh .claude/skills/doc-generator/scripts/validate.sh
107
107
  cp ~/.claude/skills/claudenv/scaffold/.claude/skills/doc-generator/templates/detection-patterns.md .claude/skills/doc-generator/templates/detection-patterns.md
108
+ cp ~/.claude/skills/claudenv/scaffold/.claude/skills/doc-generator/templates/mcp-servers.md .claude/skills/doc-generator/templates/mcp-servers.md
109
+ cp ~/.claude/skills/claudenv/scaffold/.claude/commands/setup-mcp.md .claude/commands/setup-mcp.md
108
110
  cp ~/.claude/skills/claudenv/scaffold/.claude/agents/doc-analyzer.md .claude/agents/doc-analyzer.md
109
111
  chmod +x .claude/skills/doc-generator/scripts/validate.sh
110
112
  ```
111
113
 
112
114
  If any file already exists, **skip it** unless `$ARGUMENTS` includes `--force`.
113
115
 
114
- ## Phase 5: Validate
116
+ ## Phase 5: MCP Server Configuration
117
+
118
+ Configure MCP servers for this project by searching the official MCP Registry.
119
+
120
+ Read the MCP server reference:
121
+ @~/.claude/skills/claudenv/templates/mcp-servers.md
122
+
123
+ **5.1 Identify technologies to search for:**
124
+ Based on your Phase 1 analysis, list the key technologies that might have MCP servers (databases, cloud services, APIs, dev tools).
125
+
126
+ **5.2 Search the registry:**
127
+ For each technology, query the MCP Registry API:
128
+ ```bash
129
+ curl -s 'https://registry.modelcontextprotocol.io/v0.1/servers?search=<tech>&version=latest&limit=10'
130
+ ```
131
+
132
+ **5.3 Verify trust:**
133
+ For each candidate with an npm package, check monthly downloads:
134
+ ```bash
135
+ curl -s 'https://api.npmjs.org/downloads/point/last-month/<npm-package>'
136
+ ```
137
+ Filter out servers with <100 monthly downloads.
138
+
139
+ **5.4 Present recommendations:**
140
+ Group as Essential / Recommended / Optional. For each, explain why it's relevant and show download counts.
141
+
142
+ Ask the user which to configure. If `$ARGUMENTS` includes `--force`, auto-select Essential + Recommended.
143
+
144
+ **5.5 Generate `.mcp.json`:**
145
+ Write `.mcp.json` with selected servers using `${ENV_VAR}` placeholders for secrets. Follow the format in the MCP server reference.
146
+
147
+ **5.6 List environment variables:**
148
+ Tell the user how to configure required secrets:
149
+ ```
150
+ claude config set env.VAR_NAME "your-value"
151
+ ```
152
+
153
+ ## Phase 6: Validate
115
154
 
116
155
  Run the validation script:
117
156
  ```bash
@@ -120,7 +159,7 @@ bash .claude/skills/doc-generator/scripts/validate.sh 2>&1 || true
120
159
 
121
160
  Fix any errors found.
122
161
 
123
- ## Phase 6: Summary
162
+ ## Phase 7: Summary
124
163
 
125
164
  Print a summary of everything created:
126
165
  ```
@@ -136,15 +175,19 @@ Created:
136
175
  + .claude/commands/init-docs.md
137
176
  + .claude/commands/update-docs.md
138
177
  + .claude/commands/validate-docs.md
178
+ + .claude/commands/setup-mcp.md
139
179
  + .claude/skills/doc-generator/
140
180
  + .claude/agents/doc-analyzer.md
181
+ + .mcp.json (if MCP servers were configured)
141
182
 
142
183
  Available commands:
143
184
  /init-docs — Regenerate documentation from scratch
144
185
  /update-docs — Update docs when project changes
145
186
  /validate-docs — Check documentation completeness
187
+ /setup-mcp — Add or update MCP server configuration
146
188
 
147
189
  Next steps:
148
190
  1. Review and edit CLAUDE.md
149
- 2. git add .claude/ CLAUDE.md _state.md && git commit -m "Add Claude Code docs"
191
+ 2. Configure any required MCP secrets: claude config set env.VAR_NAME "value"
192
+ 3. git add .claude/ CLAUDE.md _state.md .mcp.json && git commit -m "Add Claude Code docs"
150
193
  ```
@@ -0,0 +1,115 @@
1
+ ---
2
+ description: Recommend and configure MCP servers based on project analysis
3
+ allowed-tools: Read, Write, Glob, Grep, Bash(curl:*), Bash(find:*), Bash(cat:*)
4
+ disable-model-invocation: true
5
+ argument-hint: [--force]
6
+ ---
7
+
8
+ # MCP Server Setup
9
+
10
+ You are configuring MCP servers for this project. Analyze the tech stack, search the official MCP Registry, verify trust signals, and generate `.mcp.json`.
11
+
12
+ ## Step 1: Analyze the Project
13
+
14
+ Understand what this project uses:
15
+
16
+ **Read existing documentation:**
17
+ - Read CLAUDE.md if it exists — it contains the tech stack summary
18
+ - Read _state.md if it exists
19
+
20
+ **Check for existing MCP config:**
21
+ - Read `.mcp.json` if it exists — you will merge new entries, not overwrite
22
+
23
+ **Scan manifest files:**
24
+ !`find . -maxdepth 3 \( -name "package.json" -o -name "pyproject.toml" -o -name "go.mod" -o -name "Cargo.toml" -o -name "Gemfile" -o -name "composer.json" -o -name "requirements.txt" \) -not -path "*/node_modules/*" -not -path "*/.venv/*" -not -path "*/vendor/*" 2>/dev/null | head -20`
25
+
26
+ **Scan framework and tooling configs:**
27
+ !`find . -maxdepth 2 \( -name "tsconfig*.json" -o -name "next.config.*" -o -name "vite.config.*" -o -name "docker-compose.*" -o -name "Dockerfile" -o -name ".env*" -o -name "prisma" -o -name "drizzle.config.*" \) -not -path "*/node_modules/*" 2>/dev/null | head -20`
28
+
29
+ Read the manifest files you found. Identify:
30
+ - Programming languages and frameworks
31
+ - Databases (PostgreSQL, MongoDB, Redis, etc.)
32
+ - Cloud services (AWS, GCP, Azure)
33
+ - External APIs (Stripe, Sentry, etc.)
34
+ - Dev tools (Docker, GitHub Actions, etc.)
35
+
36
+ ## Step 2: Search the MCP Registry
37
+
38
+ Read the MCP server reference for search and evaluation guidance:
39
+ @~/.claude/skills/claudenv/templates/mcp-servers.md
40
+
41
+ For each major technology in the project, search the official MCP Registry API:
42
+ ```bash
43
+ curl -s 'https://registry.modelcontextprotocol.io/v0.1/servers?search=<tech>&version=latest&limit=10'
44
+ ```
45
+
46
+ For each candidate server with an npm package, verify trust by checking monthly downloads:
47
+ ```bash
48
+ curl -s 'https://api.npmjs.org/downloads/point/last-month/<npm-package>'
49
+ ```
50
+
51
+ Optionally check GitHub stars for additional trust signal:
52
+ ```bash
53
+ curl -s 'https://api.github.com/repos/<owner>/<repo>'
54
+ ```
55
+
56
+ **Filtering rules:**
57
+ - Remove servers with <100 monthly npm downloads
58
+ - Rank by: npm downloads (primary) + GitHub stars (secondary) + description relevance
59
+ - When multiple servers exist for the same technology, pick the one with the highest downloads
60
+
61
+ ## Step 3: Present Recommendations
62
+
63
+ Group your recommendations into three tiers:
64
+
65
+ **Essential** — servers that directly support the project's core technologies (e.g., PostgreSQL server for a project using PostgreSQL)
66
+
67
+ **Recommended** — servers that enhance the development workflow (e.g., Context7 for library docs, GitHub for repo management)
68
+
69
+ **Optional** — servers that could be useful but aren't critical (e.g., Fetch for web content, Docker if Docker is used occasionally)
70
+
71
+ For each recommendation, explain:
72
+ - **What it does** and why it's relevant to THIS project
73
+ - **Monthly npm downloads** (trust signal)
74
+ - **Environment variables required** and whether they need secrets
75
+
76
+ Ask the user which servers to configure.
77
+
78
+ If `$ARGUMENTS` includes `--force`, auto-select all Essential and Recommended servers.
79
+
80
+ ## Step 4: Generate .mcp.json
81
+
82
+ Build the `.mcp.json` file with the selected servers following the format in the MCP server reference.
83
+
84
+ **If `.mcp.json` already exists:**
85
+ - Read it and parse the existing `mcpServers` entries
86
+ - Merge new servers into the existing config — do NOT remove or overwrite existing entries
87
+ - If a server key already exists, skip it (preserve the user's existing config)
88
+
89
+ **Key rules:**
90
+ - Use `${ENV_VAR}` placeholders for ALL secret environment variables — NEVER literal values
91
+ - Non-secret env vars can use literal values when appropriate
92
+ - Use `npx -y <package>@latest` for stdio/npm servers
93
+ - Use the `type` and `url` from remotes for HTTP/SSE servers
94
+
95
+ Write the `.mcp.json` file.
96
+
97
+ ## Step 5: Update CLAUDE.md
98
+
99
+ If CLAUDE.md exists, add or update an `## MCP Servers` section listing the configured servers and what they do. Keep it concise — one line per server.
100
+
101
+ If CLAUDE.md doesn't exist, skip this step and suggest running `/claudenv` first.
102
+
103
+ ## Step 6: Environment Variables
104
+
105
+ List all required environment variables and how to configure them:
106
+
107
+ ```
108
+ To configure secrets, run:
109
+ claude config set env.VAR_NAME "your-value"
110
+
111
+ Required environment variables:
112
+ VAR_NAME — Description of what this is and where to get it
113
+ ```
114
+
115
+ Remind the user that `.mcp.json` is safe to commit — it only contains placeholders, not actual secrets.
@@ -8,7 +8,9 @@ allowed-tools: Read, Write, Glob, Grep, Bash(find:*), Bash(cat:*), Bash(mkdir:*)
8
8
 
9
9
  ## When to auto-trigger
10
10
  - CLAUDE.md does not exist in the project root
11
+ - `.mcp.json` does not exist in a project that has CLAUDE.md
11
12
  - User mentions "documentation", "CLAUDE.md", "project setup", or "claudenv"
13
+ - User mentions "MCP", "MCP servers", or "mcp.json"
12
14
  - User asks to configure Claude Code for their project
13
15
  - After major refactoring that changes directory structure
14
16
 
@@ -26,6 +28,9 @@ When working in a project with existing documentation, watch for:
26
28
 
27
29
  When changes are detected, suggest running `/update-docs`.
28
30
 
31
+ ### MCP Configuration
32
+ When `.mcp.json` is missing in a project that already has CLAUDE.md, suggest running `/setup-mcp` to configure MCP servers. When the user mentions MCP servers, offer to run `/setup-mcp`.
33
+
29
34
  ### Validation
30
35
  After documentation changes, run the validation script:
31
36
  ```bash
@@ -37,6 +42,9 @@ bash .claude/skills/doc-generator/scripts/validate.sh 2>&1 || true
37
42
  For tech stack detection patterns, see:
38
43
  @~/.claude/skills/claudenv/templates/detection-patterns.md
39
44
 
45
+ For MCP server search, evaluation, and configuration, see:
46
+ @~/.claude/skills/claudenv/templates/mcp-servers.md
47
+
40
48
  ## Project-level scaffold
41
49
 
42
50
  The following files are available for installation into projects at `~/.claude/skills/claudenv/scaffold/`:
@@ -46,4 +54,6 @@ The following files are available for installation into projects at `~/.claude/s
46
54
  - `.claude/skills/doc-generator/SKILL.md` — Per-project doc generation skill
47
55
  - `.claude/skills/doc-generator/scripts/validate.sh` — Bash validation script
48
56
  - `.claude/skills/doc-generator/templates/detection-patterns.md` — Detection reference
57
+ - `.claude/commands/setup-mcp.md` — MCP server recommendation and setup
58
+ - `.claude/skills/doc-generator/templates/mcp-servers.md` — MCP registry reference
49
59
  - `.claude/agents/doc-analyzer.md` — Read-only analysis subagent
@@ -0,0 +1,115 @@
1
+ ---
2
+ description: Recommend and configure MCP servers based on project analysis
3
+ allowed-tools: Read, Write, Glob, Grep, Bash(curl:*), Bash(find:*), Bash(cat:*)
4
+ disable-model-invocation: true
5
+ argument-hint: [--force]
6
+ ---
7
+
8
+ # MCP Server Setup
9
+
10
+ You are configuring MCP servers for this project. Analyze the tech stack, search the official MCP Registry, verify trust signals, and generate `.mcp.json`.
11
+
12
+ ## Step 1: Analyze the Project
13
+
14
+ Understand what this project uses:
15
+
16
+ **Read existing documentation:**
17
+ - Read CLAUDE.md if it exists — it contains the tech stack summary
18
+ - Read _state.md if it exists
19
+
20
+ **Check for existing MCP config:**
21
+ - Read `.mcp.json` if it exists — you will merge new entries, not overwrite
22
+
23
+ **Scan manifest files:**
24
+ !`find . -maxdepth 3 \( -name "package.json" -o -name "pyproject.toml" -o -name "go.mod" -o -name "Cargo.toml" -o -name "Gemfile" -o -name "composer.json" -o -name "requirements.txt" \) -not -path "*/node_modules/*" -not -path "*/.venv/*" -not -path "*/vendor/*" 2>/dev/null | head -20`
25
+
26
+ **Scan framework and tooling configs:**
27
+ !`find . -maxdepth 2 \( -name "tsconfig*.json" -o -name "next.config.*" -o -name "vite.config.*" -o -name "docker-compose.*" -o -name "Dockerfile" -o -name ".env*" -o -name "prisma" -o -name "drizzle.config.*" \) -not -path "*/node_modules/*" 2>/dev/null | head -20`
28
+
29
+ Read the manifest files you found. Identify:
30
+ - Programming languages and frameworks
31
+ - Databases (PostgreSQL, MongoDB, Redis, etc.)
32
+ - Cloud services (AWS, GCP, Azure)
33
+ - External APIs (Stripe, Sentry, etc.)
34
+ - Dev tools (Docker, GitHub Actions, etc.)
35
+
36
+ ## Step 2: Search the MCP Registry
37
+
38
+ Read the MCP server reference for search and evaluation guidance:
39
+ @.claude/skills/doc-generator/templates/mcp-servers.md
40
+
41
+ For each major technology in the project, search the official MCP Registry API:
42
+ ```bash
43
+ curl -s 'https://registry.modelcontextprotocol.io/v0.1/servers?search=<tech>&version=latest&limit=10'
44
+ ```
45
+
46
+ For each candidate server with an npm package, verify trust by checking monthly downloads:
47
+ ```bash
48
+ curl -s 'https://api.npmjs.org/downloads/point/last-month/<npm-package>'
49
+ ```
50
+
51
+ Optionally check GitHub stars for additional trust signal:
52
+ ```bash
53
+ curl -s 'https://api.github.com/repos/<owner>/<repo>'
54
+ ```
55
+
56
+ **Filtering rules:**
57
+ - Remove servers with <100 monthly npm downloads
58
+ - Rank by: npm downloads (primary) + GitHub stars (secondary) + description relevance
59
+ - When multiple servers exist for the same technology, pick the one with the highest downloads
60
+
61
+ ## Step 3: Present Recommendations
62
+
63
+ Group your recommendations into three tiers:
64
+
65
+ **Essential** — servers that directly support the project's core technologies (e.g., PostgreSQL server for a project using PostgreSQL)
66
+
67
+ **Recommended** — servers that enhance the development workflow (e.g., Context7 for library docs, GitHub for repo management)
68
+
69
+ **Optional** — servers that could be useful but aren't critical (e.g., Fetch for web content, Docker if Docker is used occasionally)
70
+
71
+ For each recommendation, explain:
72
+ - **What it does** and why it's relevant to THIS project
73
+ - **Monthly npm downloads** (trust signal)
74
+ - **Environment variables required** and whether they need secrets
75
+
76
+ Ask the user which servers to configure.
77
+
78
+ If `$ARGUMENTS` includes `--force`, auto-select all Essential and Recommended servers.
79
+
80
+ ## Step 4: Generate .mcp.json
81
+
82
+ Build the `.mcp.json` file with the selected servers following the format in the MCP server reference.
83
+
84
+ **If `.mcp.json` already exists:**
85
+ - Read it and parse the existing `mcpServers` entries
86
+ - Merge new servers into the existing config — do NOT remove or overwrite existing entries
87
+ - If a server key already exists, skip it (preserve the user's existing config)
88
+
89
+ **Key rules:**
90
+ - Use `${ENV_VAR}` placeholders for ALL secret environment variables — NEVER literal values
91
+ - Non-secret env vars can use literal values when appropriate
92
+ - Use `npx -y <package>@latest` for stdio/npm servers
93
+ - Use the `type` and `url` from remotes for HTTP/SSE servers
94
+
95
+ Write the `.mcp.json` file.
96
+
97
+ ## Step 5: Update CLAUDE.md
98
+
99
+ If CLAUDE.md exists, add or update an `## MCP Servers` section listing the configured servers and what they do. Keep it concise — one line per server.
100
+
101
+ If CLAUDE.md doesn't exist, skip this step and suggest running `/claudenv` first.
102
+
103
+ ## Step 6: Environment Variables
104
+
105
+ List all required environment variables and how to configure them:
106
+
107
+ ```
108
+ To configure secrets, run:
109
+ claude config set env.VAR_NAME "your-value"
110
+
111
+ Required environment variables:
112
+ VAR_NAME — Description of what this is and where to get it
113
+ ```
114
+
115
+ Remind the user that `.mcp.json` is safe to commit — it only contains placeholders, not actual secrets.
@@ -34,6 +34,7 @@ Compare the current state against the existing documentation:
34
34
  - **New directories** not covered in Architecture section
35
35
  - **Stale references** to files or directories that no longer exist
36
36
  - **Missing conventions** based on new config files (e.g., new linter added)
37
+ - **Missing or outdated `.mcp.json`** — if `.mcp.json` doesn't exist, or if new technologies have been added that could benefit from MCP servers, suggest running `/setup-mcp`
37
38
 
38
39
  ## Step 4: Propose Updates
39
40
 
@@ -12,6 +12,7 @@ allowed-tools: Read, Write, Glob, Grep, Bash(find:*), Bash(cat:*), Bash(node:*)
12
12
  - New files detected that change the tech stack (new framework, test runner, etc.)
13
13
  - After major refactoring that changes directory structure
14
14
  - When CLAUDE.md references files or directories that no longer exist
15
+ - When `.mcp.json` is missing and the project has significant external dependencies
15
16
 
16
17
  ## Process
17
18
 
@@ -28,6 +29,7 @@ If CLAUDE.md already exists, read it and identify:
28
29
 
29
30
  ### 3. Generate or Update
30
31
  - For new documentation: generate CLAUDE.md, _state.md, .claude/rules/code-style.md, .claude/rules/testing.md, .claude/rules/workflow.md
32
+ - For MCP configuration: suggest running `/setup-mcp` to search the MCP Registry and generate `.mcp.json`
31
33
  - For updates: propose specific changes and wait for user approval
32
34
  - Always present generated content for review before writing
33
35
  - NEVER create .md files beyond the ones listed above unless the user explicitly asks
@@ -54,3 +56,4 @@ Generated CLAUDE.md should follow this structure:
54
56
  Additionally generate:
55
57
  - `_state.md` — project state tracking (decisions, focus, known issues)
56
58
  - `.claude/rules/workflow.md` — Claude Code workflow best practices
59
+ - `.mcp.json` — MCP server configuration (via `/setup-mcp`)
@@ -0,0 +1,168 @@
1
+ # MCP Server Reference — Registry Search & Configuration
2
+
3
+ ## 1. How to Search the Registry
4
+
5
+ The official MCP Registry API provides a searchable catalog of MCP servers. No authentication required.
6
+
7
+ **Endpoint**: `GET https://registry.modelcontextprotocol.io/v0.1/servers`
8
+
9
+ **Parameters**:
10
+ - `search=<term>` — case-insensitive substring match on server names and descriptions
11
+ - `version=latest` — return only the latest version of each server
12
+ - `limit=<n>` — max results per page (default ~100)
13
+
14
+ **Search strategy**:
15
+ 1. Analyze the project's tech stack from manifest files, configs, and source code
16
+ 2. Extract key technology names (languages, frameworks, databases, cloud services, tools)
17
+ 3. Search each technology individually — specific terms yield better results
18
+
19
+ **Example searches**:
20
+ ```bash
21
+ # Database
22
+ curl -s 'https://registry.modelcontextprotocol.io/v0.1/servers?search=postgres&version=latest&limit=10'
23
+
24
+ # Cloud provider
25
+ curl -s 'https://registry.modelcontextprotocol.io/v0.1/servers?search=aws&version=latest&limit=10'
26
+
27
+ # Monitoring
28
+ curl -s 'https://registry.modelcontextprotocol.io/v0.1/servers?search=sentry&version=latest&limit=10'
29
+
30
+ # Version control
31
+ curl -s 'https://registry.modelcontextprotocol.io/v0.1/servers?search=github&version=latest&limit=10'
32
+ ```
33
+
34
+ ## 2. How to Evaluate and Trust Results
35
+
36
+ ### Primary trust signal: npm download counts
37
+
38
+ For each candidate server that has an npm package, check monthly downloads:
39
+ ```bash
40
+ curl -s 'https://api.npmjs.org/downloads/point/last-month/<npm-package-name>'
41
+ # Returns: { "downloads": N, "package": "...", ... }
42
+ ```
43
+
44
+ - **Filter out** servers with <100 monthly downloads — likely unmaintained or experimental
45
+ - **Prefer** servers with 10,000+ monthly downloads — well-established and community-trusted
46
+ - **Strong signal** at 100,000+ downloads — widely adopted
47
+
48
+ ### Secondary trust signal: GitHub stars
49
+
50
+ If the server has a repository URL, check GitHub stars:
51
+ ```bash
52
+ curl -s 'https://api.github.com/repos/<owner>/<repo>'
53
+ # Check the "stargazers_count" field
54
+ ```
55
+
56
+ - Prefer repos with 100+ stars
57
+ - Stars indicate community interest but downloads are a stronger usage signal
58
+
59
+ ### Additional evaluation criteria
60
+
61
+ - **Prefer `packages` (npm/stdio) over `remotes` (hosted)** — stdio runs locally with no external dependency
62
+ - **Prefer well-known namespaces**: `io.modelcontextprotocol/*`, `io.github.modelcontextprotocol/*` are official
63
+ - **Read descriptions carefully** — pick servers that match the project's actual use case
64
+ - **Skip** servers that appear to be forks, test entries, or clearly unmaintained
65
+ - **When multiple servers exist for the same tech**, pick the one with highest npm downloads
66
+ - **Check `environmentVariables`** — servers requiring many complex env vars may be harder to set up
67
+
68
+ ## 3. How to Build .mcp.json
69
+
70
+ The `.mcp.json` file configures MCP servers for a project. It lives in the project root.
71
+
72
+ **Root structure**:
73
+ ```json
74
+ {
75
+ "mcpServers": {
76
+ "server-name": { ... }
77
+ }
78
+ }
79
+ ```
80
+
81
+ ### stdio servers (npm packages)
82
+
83
+ For servers with a `packages` entry of `registryType: "npm"`:
84
+ ```json
85
+ {
86
+ "mcpServers": {
87
+ "server-name": {
88
+ "command": "npx",
89
+ "args": ["-y", "<package-identifier>@latest"],
90
+ "env": {
91
+ "VAR_NAME": "${VAR_NAME}"
92
+ }
93
+ }
94
+ }
95
+ }
96
+ ```
97
+
98
+ - Add any `packageArguments` with `type: "positional"` to the `args` array after the package name
99
+ - Map `environmentVariables` to the `env` object
100
+ - Use `${ENV_VAR}` placeholders for all variables with `isSecret: true`
101
+ - Non-secret env vars can use literal values when the value is project-specific and non-sensitive
102
+
103
+ ### HTTP/SSE servers (remote)
104
+
105
+ For servers with a `remotes` entry:
106
+ ```json
107
+ {
108
+ "mcpServers": {
109
+ "server-name": {
110
+ "type": "streamable-http",
111
+ "url": "https://example.com/mcp"
112
+ }
113
+ }
114
+ }
115
+ ```
116
+
117
+ Use the `type` and `url` from the remote entry directly. Add `headers` if authentication is needed:
118
+ ```json
119
+ {
120
+ "type": "streamable-http",
121
+ "url": "https://example.com/mcp",
122
+ "headers": {
123
+ "Authorization": "Bearer ${API_KEY}"
124
+ }
125
+ }
126
+ ```
127
+
128
+ ## 4. Well-Known Servers
129
+
130
+ These are hints to help find the best option when search results are noisy. Always verify via the registry API — these names and packages may change.
131
+
132
+ | Technology | Search term | Known namespace | Notes |
133
+ |---|---|---|---|
134
+ | Library docs | `context7` | `io.github.upstash/context7` | Up-to-date docs for any library; useful for most projects |
135
+ | GitHub | `github` | `io.github.modelcontextprotocol/github` | Repo management, PRs, issues |
136
+ | PostgreSQL | `postgres` | `io.github.modelcontextprotocol/postgres` | Database queries; prefer read-only config |
137
+ | Filesystem | `filesystem` | `io.github.modelcontextprotocol/filesystem` | Scoped file access |
138
+ | Fetch | `fetch` | `io.github.modelcontextprotocol/fetch` | Web content retrieval |
139
+ | Sentry | `sentry` | — | Error tracking integration |
140
+ | Stripe | `stripe` | — | Payment API |
141
+ | Docker | `docker` | — | Container management |
142
+ | AWS | `aws` | — | Cloud services |
143
+ | Redis | `redis` | — | Cache and data store |
144
+ | MongoDB | `mongodb` | — | Document database |
145
+ | Slack | `slack` | — | Team communication |
146
+ | Linear | `linear` | — | Issue tracking |
147
+
148
+ ## 5. Security Rules
149
+
150
+ ### Secrets management
151
+ - **NEVER** put actual secret values in `.mcp.json` — use `${ENV_VAR}` placeholders
152
+ - Secret values go in `~/.claude.json` (user-level config, not committed to version control)
153
+ - Tell the user how to configure each secret:
154
+ ```
155
+ claude config set env.VAR_NAME "actual-value"
156
+ ```
157
+
158
+ ### Safe to commit
159
+ - `.mcp.json` is safe to commit to version control — it contains only placeholders, never real secrets
160
+ - Add `.mcp.json` to the git commit alongside other Claude Code config files
161
+
162
+ ### Database safety
163
+ - Prefer read-only database connection strings
164
+ - If read-write access is needed, document this clearly in the recommendation
165
+
166
+ ### Principle of least privilege
167
+ - Only recommend servers that the project actually needs
168
+ - Prefer servers with narrow, well-defined capabilities over general-purpose ones
@@ -0,0 +1,168 @@
1
+ # MCP Server Reference — Registry Search & Configuration
2
+
3
+ ## 1. How to Search the Registry
4
+
5
+ The official MCP Registry API provides a searchable catalog of MCP servers. No authentication required.
6
+
7
+ **Endpoint**: `GET https://registry.modelcontextprotocol.io/v0.1/servers`
8
+
9
+ **Parameters**:
10
+ - `search=<term>` — case-insensitive substring match on server names and descriptions
11
+ - `version=latest` — return only the latest version of each server
12
+ - `limit=<n>` — max results per page (default ~100)
13
+
14
+ **Search strategy**:
15
+ 1. Analyze the project's tech stack from manifest files, configs, and source code
16
+ 2. Extract key technology names (languages, frameworks, databases, cloud services, tools)
17
+ 3. Search each technology individually — specific terms yield better results
18
+
19
+ **Example searches**:
20
+ ```bash
21
+ # Database
22
+ curl -s 'https://registry.modelcontextprotocol.io/v0.1/servers?search=postgres&version=latest&limit=10'
23
+
24
+ # Cloud provider
25
+ curl -s 'https://registry.modelcontextprotocol.io/v0.1/servers?search=aws&version=latest&limit=10'
26
+
27
+ # Monitoring
28
+ curl -s 'https://registry.modelcontextprotocol.io/v0.1/servers?search=sentry&version=latest&limit=10'
29
+
30
+ # Version control
31
+ curl -s 'https://registry.modelcontextprotocol.io/v0.1/servers?search=github&version=latest&limit=10'
32
+ ```
33
+
34
+ ## 2. How to Evaluate and Trust Results
35
+
36
+ ### Primary trust signal: npm download counts
37
+
38
+ For each candidate server that has an npm package, check monthly downloads:
39
+ ```bash
40
+ curl -s 'https://api.npmjs.org/downloads/point/last-month/<npm-package-name>'
41
+ # Returns: { "downloads": N, "package": "...", ... }
42
+ ```
43
+
44
+ - **Filter out** servers with <100 monthly downloads — likely unmaintained or experimental
45
+ - **Prefer** servers with 10,000+ monthly downloads — well-established and community-trusted
46
+ - **Strong signal** at 100,000+ downloads — widely adopted
47
+
48
+ ### Secondary trust signal: GitHub stars
49
+
50
+ If the server has a repository URL, check GitHub stars:
51
+ ```bash
52
+ curl -s 'https://api.github.com/repos/<owner>/<repo>'
53
+ # Check the "stargazers_count" field
54
+ ```
55
+
56
+ - Prefer repos with 100+ stars
57
+ - Stars indicate community interest but downloads are a stronger usage signal
58
+
59
+ ### Additional evaluation criteria
60
+
61
+ - **Prefer `packages` (npm/stdio) over `remotes` (hosted)** — stdio runs locally with no external dependency
62
+ - **Prefer well-known namespaces**: `io.modelcontextprotocol/*`, `io.github.modelcontextprotocol/*` are official
63
+ - **Read descriptions carefully** — pick servers that match the project's actual use case
64
+ - **Skip** servers that appear to be forks, test entries, or clearly unmaintained
65
+ - **When multiple servers exist for the same tech**, pick the one with highest npm downloads
66
+ - **Check `environmentVariables`** — servers requiring many complex env vars may be harder to set up
67
+
68
+ ## 3. How to Build .mcp.json
69
+
70
+ The `.mcp.json` file configures MCP servers for a project. It lives in the project root.
71
+
72
+ **Root structure**:
73
+ ```json
74
+ {
75
+ "mcpServers": {
76
+ "server-name": { ... }
77
+ }
78
+ }
79
+ ```
80
+
81
+ ### stdio servers (npm packages)
82
+
83
+ For servers with a `packages` entry of `registryType: "npm"`:
84
+ ```json
85
+ {
86
+ "mcpServers": {
87
+ "server-name": {
88
+ "command": "npx",
89
+ "args": ["-y", "<package-identifier>@latest"],
90
+ "env": {
91
+ "VAR_NAME": "${VAR_NAME}"
92
+ }
93
+ }
94
+ }
95
+ }
96
+ ```
97
+
98
+ - Add any `packageArguments` with `type: "positional"` to the `args` array after the package name
99
+ - Map `environmentVariables` to the `env` object
100
+ - Use `${ENV_VAR}` placeholders for all variables with `isSecret: true`
101
+ - Non-secret env vars can use literal values when the value is project-specific and non-sensitive
102
+
103
+ ### HTTP/SSE servers (remote)
104
+
105
+ For servers with a `remotes` entry:
106
+ ```json
107
+ {
108
+ "mcpServers": {
109
+ "server-name": {
110
+ "type": "streamable-http",
111
+ "url": "https://example.com/mcp"
112
+ }
113
+ }
114
+ }
115
+ ```
116
+
117
+ Use the `type` and `url` from the remote entry directly. Add `headers` if authentication is needed:
118
+ ```json
119
+ {
120
+ "type": "streamable-http",
121
+ "url": "https://example.com/mcp",
122
+ "headers": {
123
+ "Authorization": "Bearer ${API_KEY}"
124
+ }
125
+ }
126
+ ```
127
+
128
+ ## 4. Well-Known Servers
129
+
130
+ These are hints to help find the best option when search results are noisy. Always verify via the registry API — these names and packages may change.
131
+
132
+ | Technology | Search term | Known namespace | Notes |
133
+ |---|---|---|---|
134
+ | Library docs | `context7` | `io.github.upstash/context7` | Up-to-date docs for any library; useful for most projects |
135
+ | GitHub | `github` | `io.github.modelcontextprotocol/github` | Repo management, PRs, issues |
136
+ | PostgreSQL | `postgres` | `io.github.modelcontextprotocol/postgres` | Database queries; prefer read-only config |
137
+ | Filesystem | `filesystem` | `io.github.modelcontextprotocol/filesystem` | Scoped file access |
138
+ | Fetch | `fetch` | `io.github.modelcontextprotocol/fetch` | Web content retrieval |
139
+ | Sentry | `sentry` | — | Error tracking integration |
140
+ | Stripe | `stripe` | — | Payment API |
141
+ | Docker | `docker` | — | Container management |
142
+ | AWS | `aws` | — | Cloud services |
143
+ | Redis | `redis` | — | Cache and data store |
144
+ | MongoDB | `mongodb` | — | Document database |
145
+ | Slack | `slack` | — | Team communication |
146
+ | Linear | `linear` | — | Issue tracking |
147
+
148
+ ## 5. Security Rules
149
+
150
+ ### Secrets management
151
+ - **NEVER** put actual secret values in `.mcp.json` — use `${ENV_VAR}` placeholders
152
+ - Secret values go in `~/.claude.json` (user-level config, not committed to version control)
153
+ - Tell the user how to configure each secret:
154
+ ```
155
+ claude config set env.VAR_NAME "actual-value"
156
+ ```
157
+
158
+ ### Safe to commit
159
+ - `.mcp.json` is safe to commit to version control — it contains only placeholders, never real secrets
160
+ - Add `.mcp.json` to the git commit alongside other Claude Code config files
161
+
162
+ ### Database safety
163
+ - Prefer read-only database connection strings
164
+ - If read-write access is needed, document this clearly in the recommendation
165
+
166
+ ### Principle of least privilege
167
+ - Only recommend servers that the project actually needs
168
+ - Prefer servers with narrow, well-defined capabilities over general-purpose ones