@uniswap/ai-toolkit-claude-mcp-helper 0.0.1 → 0.0.2

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.
Files changed (25) hide show
  1. package/README.md +331 -29
  2. package/dist/mcp-config.cjs +5133 -0
  3. package/dist/packages/mcp-config/src/commands/disable.d.ts +5 -0
  4. package/dist/packages/mcp-config/src/commands/disable.d.ts.map +1 -0
  5. package/dist/packages/mcp-config/src/commands/enable.d.ts +5 -0
  6. package/dist/packages/mcp-config/src/commands/enable.d.ts.map +1 -0
  7. package/dist/packages/mcp-config/src/commands/interactive.d.ts +5 -0
  8. package/dist/packages/mcp-config/src/commands/interactive.d.ts.map +1 -0
  9. package/dist/packages/mcp-config/src/commands/list.d.ts +5 -0
  10. package/dist/packages/mcp-config/src/commands/list.d.ts.map +1 -0
  11. package/dist/packages/mcp-config/src/commands/status.d.ts +5 -0
  12. package/dist/packages/mcp-config/src/commands/status.d.ts.map +1 -0
  13. package/dist/packages/mcp-config/src/config/reader.d.ts +46 -0
  14. package/dist/packages/mcp-config/src/config/reader.d.ts.map +1 -0
  15. package/dist/packages/mcp-config/src/config/types.d.ts +61 -0
  16. package/dist/packages/mcp-config/src/config/types.d.ts.map +1 -0
  17. package/dist/packages/mcp-config/src/config/writer.d.ts +14 -0
  18. package/dist/packages/mcp-config/src/config/writer.d.ts.map +1 -0
  19. package/dist/packages/mcp-config/src/index.d.ts +2 -0
  20. package/dist/packages/mcp-config/src/index.d.ts.map +1 -0
  21. package/dist/packages/mcp-config/src/lib/mcp-config.d.ts +2 -0
  22. package/dist/packages/mcp-config/src/lib/mcp-config.d.ts.map +1 -0
  23. package/dist/packages/mcp-config/src/utils/display.d.ts +43 -0
  24. package/dist/packages/mcp-config/src/utils/display.d.ts.map +1 -0
  25. package/package.json +67 -6
package/README.md CHANGED
@@ -1,45 +1,347 @@
1
- # @uniswap/ai-toolkit-claude-mcp-helper
1
+ # MCP Config
2
2
 
3
- ## ⚠️ IMPORTANT NOTICE ⚠️
3
+ **Package**: `@uniswap/ai-toolkit-claude-mcp-helper`
4
4
 
5
- **This package is created solely for the purpose of setting up OIDC (OpenID Connect) trusted publishing with npm.**
5
+ A standalone CLI tool to manage MCP (Model Context Protocol) servers for Claude Code workspaces.
6
6
 
7
- This is **NOT** a functional package and contains **NO** code or functionality beyond the OIDC setup configuration.
7
+ ## Features
8
8
 
9
- ## Purpose
9
+ - 📋 **List** all MCP servers with their enabled/disabled status
10
+ - ✅ **Enable/Disable** servers individually or in bulk
11
+ - 📊 **Status** view with detailed information
12
+ - 🎯 **Interactive mode** with multi-select interface
13
+ - 🔄 **Smart configuration** - local `.claude/settings.local.json` overrides global `~/.claude.json`
14
+ - 🎨 **Colorized output** for better readability
10
15
 
11
- This package exists to:
12
- 1. Configure OIDC trusted publishing for the package name `@uniswap/ai-toolkit-claude-mcp-helper`
13
- 2. Enable secure, token-less publishing from CI/CD workflows
14
- 3. Establish provenance for packages published under this name
16
+ ## Installation
15
17
 
16
- ## What is OIDC Trusted Publishing?
18
+ ### Via npm (Recommended)
17
19
 
18
- OIDC trusted publishing allows package maintainers to publish packages directly from their CI/CD workflows without needing to manage npm access tokens. Instead, it uses OpenID Connect to establish trust between the CI/CD provider (like GitHub Actions) and npm.
20
+ Install globally for easy access from anywhere:
19
21
 
20
- ## Setup Instructions
22
+ ```bash
23
+ npm install -g @uniswap/ai-toolkit-claude-mcp-helper
24
+ ```
21
25
 
22
- To properly configure OIDC trusted publishing for this package:
26
+ Or use via npx without installation:
23
27
 
24
- 1. Go to [npmjs.com](https://www.npmjs.com/) and navigate to your package settings
25
- 2. Configure the trusted publisher (e.g., GitHub Actions)
26
- 3. Specify the repository and workflow that should be allowed to publish
27
- 4. Use the configured workflow to publish your actual package
28
+ ```bash
29
+ npx @uniswap/ai-toolkit-claude-mcp-helper list
30
+ ```
28
31
 
29
- ## DO NOT USE THIS PACKAGE
32
+ ### Build from Source
30
33
 
31
- This package is a placeholder for OIDC configuration only. It:
32
- - Contains no executable code
33
- - Provides no functionality
34
- - Should not be installed as a dependency
35
- - Exists only for administrative purposes
34
+ If you're developing or contributing to this package:
36
35
 
37
- ## More Information
36
+ ```bash
37
+ # From the ai-toolkit monorepo root
38
+ npx nx build mcp-config
38
39
 
39
- For more details about npm's trusted publishing feature, see:
40
- - [npm Trusted Publishing Documentation](https://docs.npmjs.com/generating-provenance-statements)
41
- - [GitHub Actions OIDC Documentation](https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect)
40
+ # The executable will be at: packages/mcp-config/dist/mcp-config.cjs
41
+ ```
42
42
 
43
- ---
43
+ ### Set Up Shell Alias (Development)
44
44
 
45
- **Maintained for OIDC setup purposes only**
45
+ Add an alias to your shell configuration for easy access from anywhere:
46
+
47
+ #### Bash (~/.bashrc or ~/.bash_profile)
48
+
49
+ ```bash
50
+ alias mcp-config="/absolute/path/to/ai-toolkit/packages/mcp-config/dist/mcp-config.cjs"
51
+ ```
52
+
53
+ #### Zsh (~/.zshrc)
54
+
55
+ ```bash
56
+ alias mcp-config="/absolute/path/to/ai-toolkit/packages/mcp-config/dist/mcp-config.cjs"
57
+ ```
58
+
59
+ #### Fish (~/.config/fish/config.fish)
60
+
61
+ ```fish
62
+ alias mcp-config="/absolute/path/to/ai-toolkit/packages/mcp-config/dist/mcp-config.cjs"
63
+ ```
64
+
65
+ After adding the alias, reload your shell configuration:
66
+
67
+ ```bash
68
+ # Bash/Zsh
69
+ source ~/.zshrc # or ~/.bashrc
70
+
71
+ # Fish
72
+ source ~/.config/fish/config.fish
73
+ ```
74
+
75
+ ## Usage
76
+
77
+ ### Interactive Mode (Recommended)
78
+
79
+ Simply run `mcp-config` without arguments to enter interactive mode:
80
+
81
+ ```bash
82
+ mcp-config
83
+ ```
84
+
85
+ This will show a multi-select interface where you can:
86
+
87
+ - Use ↑/↓ arrows to navigate
88
+ - Press Space to toggle selection
89
+ - Press 'a' to toggle all
90
+ - Press Enter to save
91
+
92
+ ### List Servers
93
+
94
+ View all MCP servers and their status:
95
+
96
+ ```bash
97
+ mcp-config list
98
+ ```
99
+
100
+ Output example:
101
+
102
+ ```text
103
+ ✓ Enabled Servers:
104
+ ✓ github
105
+ ✓ linear
106
+ ✓ notion
107
+
108
+ ✗ Disabled Servers:
109
+ ✗ chrome-devtools (local)
110
+ ✗ claude-historian (global)
111
+
112
+ 3 enabled, 2 disabled
113
+ ```
114
+
115
+ ### Enable Servers
116
+
117
+ Enable one or more servers:
118
+
119
+ ```bash
120
+ # Enable single server
121
+ mcp-config enable github
122
+
123
+ # Enable multiple servers
124
+ mcp-config enable github linear notion
125
+ ```
126
+
127
+ ### Disable Servers
128
+
129
+ Disable one or more servers:
130
+
131
+ ```bash
132
+ # Disable single server
133
+ mcp-config disable chrome-devtools
134
+
135
+ # Disable multiple servers
136
+ mcp-config disable chrome-devtools claude-historian
137
+ ```
138
+
139
+ ### Detailed Status
140
+
141
+ Show comprehensive status information:
142
+
143
+ ```bash
144
+ mcp-config status
145
+ ```
146
+
147
+ ## Configuration
148
+
149
+ ### How It Works
150
+
151
+ MCP Config discovers MCP servers from multiple sources and manages their enabled/disabled state:
152
+
153
+ #### MCP Server Sources
154
+
155
+ 1. **Global Config** (`~/.claude.json`)
156
+
157
+ - User-wide MCP server definitions in `mcpServers` object
158
+ - Accessible across all projects
159
+
160
+ 2. **Project-Specific Config** (`~/.claude.json` → `projects[cwd].mcpServers`)
161
+
162
+ - Project-specific MCP server definitions within global config
163
+ - Scoped to specific working directories
164
+
165
+ 3. **Project-Local Config** (`./.mcp.json`)
166
+ - Project-committed MCP server definitions
167
+ - Allows teams to share configurations via version control
168
+
169
+ #### Enabled/Disabled State
170
+
171
+ **Local Settings** (`./.claude/settings.local.json`)
172
+
173
+ - Project-specific settings that control which discovered servers are enabled/disabled
174
+ - `deniedMcpServers` array lists disabled servers
175
+ - **Takes precedence over all server sources**
176
+
177
+ ### Configuration Priority
178
+
179
+ - Servers are discovered from all three sources (global, project-specific, and .mcp.json)
180
+ - Local settings in `.claude/settings.local.json` control enabled/disabled state
181
+ - If a server is in `deniedMcpServers`, it's disabled regardless of where it was discovered
182
+ - If a server is not in `deniedMcpServers`, it's enabled by default
183
+
184
+ ### DeniedMcpServers Format
185
+
186
+ The `deniedMcpServers` array uses an **object format**:
187
+
188
+ ```json
189
+ {
190
+ "deniedMcpServers": [
191
+ { "serverName": "chrome-devtools" },
192
+ { "serverName": "claude-historian" }
193
+ ]
194
+ }
195
+ ```
196
+
197
+ ## Examples
198
+
199
+ ### Scenario: Disable a Server Locally
200
+
201
+ You want to disable `chrome-devtools` only in the current project:
202
+
203
+ ```bash
204
+ cd /path/to/your/project
205
+ mcp-config disable chrome-devtools
206
+ ```
207
+
208
+ This adds the server to `./.claude/settings.local.json`:
209
+
210
+ ```json
211
+ {
212
+ "deniedMcpServers": [{ "serverName": "chrome-devtools" }]
213
+ }
214
+ ```
215
+
216
+ ### Scenario: Enable All Servers in Project
217
+
218
+ ```bash
219
+ mcp-config interactive
220
+ # Select all servers (press 'a')
221
+ # Press Enter to save
222
+ ```
223
+
224
+ This removes all entries from `./.claude/settings.local.json.deniedMcpServers`.
225
+
226
+ ### Scenario: Share Team MCP Servers via .mcp.json
227
+
228
+ Create a `.mcp.json` file in your project root to share MCP server configurations with your team:
229
+
230
+ ```json
231
+ {
232
+ "mcpServers": {
233
+ "team-tool": {
234
+ "command": "npx",
235
+ "args": ["-y", "@your-org/team-mcp-server@latest"]
236
+ },
237
+ "project-specific": {
238
+ "command": "node",
239
+ "args": ["./scripts/mcp-server.js"]
240
+ }
241
+ }
242
+ }
243
+ ```
244
+
245
+ Commit this file to version control. Team members running `mcp-config` will see these servers alongside their personal global servers.
246
+
247
+ ### Scenario: Check What's Enabled
248
+
249
+ ```bash
250
+ mcp-config list
251
+ ```
252
+
253
+ Shows:
254
+
255
+ - ✓ for enabled servers
256
+ - ✗ for disabled servers
257
+ - (local) or (global) indicator for disabled servers
258
+
259
+ ## Development
260
+
261
+ ### Project Structure
262
+
263
+ ```text
264
+ packages/mcp-config/
265
+ ├── src/
266
+ │ ├── index.ts # CLI entry point
267
+ │ ├── commands/
268
+ │ │ ├── list.ts # List command
269
+ │ │ ├── enable.ts # Enable command
270
+ │ │ ├── disable.ts # Disable command
271
+ │ │ ├── status.ts # Status command
272
+ │ │ └── interactive.ts # Interactive mode
273
+ │ ├── config/
274
+ │ │ ├── types.ts # TypeScript interfaces
275
+ │ │ ├── reader.ts # Config reading logic
276
+ │ │ └── writer.ts # Config writing logic
277
+ │ └── utils/
278
+ │ └── display.ts # Console output formatting
279
+ ├── package.json
280
+ ├── tsconfig.json
281
+ └── README.md
282
+ ```
283
+
284
+ ### Building
285
+
286
+ ```bash
287
+ npx nx build mcp-config
288
+ ```
289
+
290
+ The build process:
291
+
292
+ 1. Compiles TypeScript to CommonJS
293
+ 2. Bundles all dependencies with esbuild
294
+ 3. Adds shebang (`#!/usr/bin/env node`)
295
+ 4. Makes output executable via postbuild script
296
+
297
+ ### Testing Locally
298
+
299
+ ```bash
300
+ # Build
301
+ npx nx build mcp-config
302
+
303
+ # Run directly
304
+ packages/mcp-config/dist/mcp-config.cjs list
305
+
306
+ # Or use alias after setting it up
307
+ mcp-config list
308
+ ```
309
+
310
+ ## Troubleshooting
311
+
312
+ ### "No MCP servers configured"
313
+
314
+ This means your `~/.claude.json` doesn't have any `mcpServers` defined.
315
+
316
+ **Solution**: Add MCP servers to your global config:
317
+
318
+ ```json
319
+ {
320
+ "mcpServers": {
321
+ "github": {
322
+ "command": "npx",
323
+ "args": ["-y", "@modelcontextprotocol/server-github"]
324
+ },
325
+ "linear": {
326
+ "command": "npx",
327
+ "args": ["-y", "@modelcontextprotocol/server-linear"]
328
+ }
329
+ }
330
+ }
331
+ ```
332
+
333
+ ### Changes Not Taking Effect
334
+
335
+ Make sure you:
336
+
337
+ 1. Saved the configuration
338
+ 2. Restarted Claude Code
339
+ 3. Are in the correct directory (for local configs)
340
+
341
+ ### Permission Denied
342
+
343
+ If you get permission errors when running the tool:
344
+
345
+ ```bash
346
+ chmod +x packages/mcp-config/dist/mcp-config.cjs
347
+ ```