@acampkin/mcc 2.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/README.md +227 -0
- package/dist/index.mjs +705 -0
- package/dist-v1/index.mjs +580 -0
- package/package.json +108 -0
package/README.md
ADDED
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
# MCC - Multi-Client Coder for Claude
|
|
2
|
+
|
|
3
|
+
A session-aware launcher for Claude Code that enables seamless switching between multiple AI providers with secure credential management, session recovery, and autopilot mode.
|
|
4
|
+
|
|
5
|
+
**[npm](https://www.npmjs.com/package/@velocity-digital/mcc)** | **[GitHub](https://github.com/velocity-digital/mcc)** | **[Documentation](https://github.com/velocity-digital/mcc#readme)**
|
|
6
|
+
|
|
7
|
+
## v2.1 Features
|
|
8
|
+
|
|
9
|
+
- **Multi-Provider Support**: Claude Max, Z.AI GLM, MiniMax, DeepInfra, local LLMs, and custom endpoints
|
|
10
|
+
- **Claude Agent SDK Integration**: Native support for Anthropic Agent SDK with full tool support
|
|
11
|
+
- **Interactive Setup Wizard**: Guided first-run experience for new users
|
|
12
|
+
- **Latest Models**: Pre-configured with Claude 4.6 (Opus 4.6, Sonnet 4.6)
|
|
13
|
+
- **Session Recovery**: Save and resume sessions with full context transfer
|
|
14
|
+
- **Autopilot Mode**: Fully autonomous execution from idea to working code
|
|
15
|
+
- **Secure Credential Storage**: AES-256-GCM encrypted local storage with environment variable fallback
|
|
16
|
+
- **Simplified UI**: Compact, efficient interactive menu
|
|
17
|
+
- **Workspace Awareness**: Git-aware session detection and organization
|
|
18
|
+
- **Health Monitoring**: Real-time provider status with detailed diagnostics
|
|
19
|
+
|
|
20
|
+
## Installation
|
|
21
|
+
|
|
22
|
+
### From npm (Recommended)
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npm install -g @velocity-digital/mcc
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### From Source
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
git clone https://github.com/velocity-digital/mcc.git
|
|
32
|
+
cd mcc/mcc
|
|
33
|
+
npm install
|
|
34
|
+
npm run build:bundle
|
|
35
|
+
npm link
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### One-Line Install (macOS/Linux)
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
curl -fsSL https://raw.githubusercontent.com/velocity-digital/mcc/main/release/install.sh | sh
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Quick Start
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
# First run - guided setup wizard
|
|
48
|
+
mcc
|
|
49
|
+
|
|
50
|
+
# Quick launch with specific provider
|
|
51
|
+
mcc launch claude-max
|
|
52
|
+
|
|
53
|
+
# Run setup wizard manually
|
|
54
|
+
mcc setup
|
|
55
|
+
|
|
56
|
+
# List all providers
|
|
57
|
+
mcc list
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Commands
|
|
61
|
+
|
|
62
|
+
| Command | Description |
|
|
63
|
+
|---------|-------------|
|
|
64
|
+
| `mcc` | Interactive menu (default) |
|
|
65
|
+
| `mcc setup` | Run guided setup wizard |
|
|
66
|
+
| `mcc launch [id]` | Launch Claude with provider |
|
|
67
|
+
| `mcc list` | List all providers |
|
|
68
|
+
| `mcc health [id]` | Check provider health |
|
|
69
|
+
| `mcc switch [id]` | Switch active provider without restarting |
|
|
70
|
+
| `mcc status` | Show current provider status |
|
|
71
|
+
| `mcc resume [id]` | Resume previous session |
|
|
72
|
+
| `mcc sessions ls` | List all sessions |
|
|
73
|
+
| `mcc sessions export <id>` | Export session to file |
|
|
74
|
+
| `mcc sessions import <file>` | Import session from file |
|
|
75
|
+
| `mcc sessions clean [days]` | Remove old sessions |
|
|
76
|
+
| `mcc autopilot <prompt>` | Fully autonomous execution |
|
|
77
|
+
| `mcc update` | Check for and install updates |
|
|
78
|
+
|
|
79
|
+
## Prepopulated Providers
|
|
80
|
+
|
|
81
|
+
MCC comes with these providers pre-configured (disabled by default):
|
|
82
|
+
|
|
83
|
+
| Provider | ID | Default Model | Auth |
|
|
84
|
+
|----------|-----|---------------|------|
|
|
85
|
+
| **Claude Max** | `claude-max` | claude-sonnet-4-6-20250219 | Bearer token |
|
|
86
|
+
| **Z.AI GLM** | `zai-coding-plan` | glm-5 | Bearer token |
|
|
87
|
+
| **MiniMax** | `minimax-coding-plan` | MiniMax-M2.5-highspeed | API key |
|
|
88
|
+
| **DeepInfra** | `deepinfra` | claude-sonnet-4-5-20250929 | API key |
|
|
89
|
+
| **LM Studio** | `lm-studio` | custom-model | None |
|
|
90
|
+
| **GLM-4.7** | `glm-local` | zai-org/glm-4.7-flash | None |
|
|
91
|
+
|
|
92
|
+
### Setting Up Claude Max
|
|
93
|
+
|
|
94
|
+
1. Run `claude setup-token` in a separate terminal
|
|
95
|
+
2. Launch MCC: `mcc`
|
|
96
|
+
3. Select provider from menu
|
|
97
|
+
4. Enter your bearer token when prompted
|
|
98
|
+
|
|
99
|
+
### Setting Up Z.AI or MiniMax
|
|
100
|
+
|
|
101
|
+
1. Get API key from [z.ai](https://z.ai) or [platform.minimax.io](https://platform.minimax.io)
|
|
102
|
+
2. Launch MCC: `mcc`
|
|
103
|
+
3. Select provider from menu
|
|
104
|
+
4. Enter your API key when prompted
|
|
105
|
+
|
|
106
|
+
## Credential Management
|
|
107
|
+
|
|
108
|
+
MCC stores credentials in `~/.config/mcc/.credentials` with AES-256-GCM encryption.
|
|
109
|
+
|
|
110
|
+
### Priority Order
|
|
111
|
+
1. **Encrypted store** (primary) - Secure, persistent
|
|
112
|
+
2. **Environment variables** (fallback) - For CI/CD or system-level config
|
|
113
|
+
|
|
114
|
+
### Environment Variables
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
export ANTHROPIC_AUTH_TOKEN="sk-ant-..."
|
|
118
|
+
export ZAI_API_KEY="your-zai-key"
|
|
119
|
+
export MINIMAX_API_KEY="your-minimax-key"
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## Configuration
|
|
123
|
+
|
|
124
|
+
Config location: `~/.config/mcc/config.yaml`
|
|
125
|
+
|
|
126
|
+
### Example Provider
|
|
127
|
+
|
|
128
|
+
```yaml
|
|
129
|
+
providers:
|
|
130
|
+
- id: claude-max
|
|
131
|
+
name: Claude Max Subscription
|
|
132
|
+
type: anthropic
|
|
133
|
+
enabled: true
|
|
134
|
+
auth:
|
|
135
|
+
method: bearer
|
|
136
|
+
tokenEnv: ANTHROPIC_AUTH_TOKEN
|
|
137
|
+
defaultModel: claude-sonnet-4-5-20250929
|
|
138
|
+
models:
|
|
139
|
+
- claude-opus-4-5-20251101
|
|
140
|
+
- claude-sonnet-4-5-20250929
|
|
141
|
+
- claude-haiku-4-5-20251001
|
|
142
|
+
timeout: 120000
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
## Directory Structure
|
|
146
|
+
|
|
147
|
+
```
|
|
148
|
+
~/.config/mcc/
|
|
149
|
+
├── config.yaml # Provider configuration
|
|
150
|
+
├── .credentials # Encrypted credential store
|
|
151
|
+
├── .active-session.json # Current session pointer
|
|
152
|
+
└── sessions/ # Session files
|
|
153
|
+
├── abc12345.json
|
|
154
|
+
└── def67890.json
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
## Autopilot Mode (Coming Soon)
|
|
158
|
+
|
|
159
|
+
Autopilot enables fully autonomous execution:
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
mcc autopilot "add dark mode to the app"
|
|
163
|
+
mcc autopilot "fix the login bug" --provider zai
|
|
164
|
+
mcc autopilot "refactor auth" --export
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
Flow:
|
|
168
|
+
1. **Planning**: Break down prompt into tasks
|
|
169
|
+
2. **Execution**: Run tasks with verification
|
|
170
|
+
3. **Self-Correction**: Fix issues automatically
|
|
171
|
+
4. **Completion**: Export session with summary
|
|
172
|
+
|
|
173
|
+
## Multi-Provider Switching
|
|
174
|
+
|
|
175
|
+
Switch providers without restarting Claude Code:
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
# Launch Claude with multi-provider proxy
|
|
179
|
+
mcc launch claude-max
|
|
180
|
+
|
|
181
|
+
# In another terminal, switch providers
|
|
182
|
+
mcc switch # Interactive selection
|
|
183
|
+
mcc switch zai-coding-plan # Direct selection
|
|
184
|
+
mcc status # Show current status
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
How it works:
|
|
188
|
+
1. MCC runs a local proxy between Claude and providers
|
|
189
|
+
2. All enabled providers are loaded at launch
|
|
190
|
+
3. The `mcc switch` command updates the proxy's active provider
|
|
191
|
+
4. Next request from Claude routes to the new provider seamlessly
|
|
192
|
+
|
|
193
|
+
This is useful for:
|
|
194
|
+
- Comparing outputs from different providers
|
|
195
|
+
- Using cheaper providers for simple tasks
|
|
196
|
+
- Switching to specialized providers for specific workloads
|
|
197
|
+
|
|
198
|
+
## Troubleshooting
|
|
199
|
+
|
|
200
|
+
### "No credentials configured"
|
|
201
|
+
|
|
202
|
+
1. For Claude Max: Run `claude setup-token` first
|
|
203
|
+
2. Use interactive menu to enter credentials
|
|
204
|
+
3. Or set environment variable
|
|
205
|
+
|
|
206
|
+
### Provider not responding
|
|
207
|
+
|
|
208
|
+
1. Run `mcc health -v` for diagnostics
|
|
209
|
+
2. Check endpoint is accessible
|
|
210
|
+
3. Increase timeout in config
|
|
211
|
+
|
|
212
|
+
## Development
|
|
213
|
+
|
|
214
|
+
```bash
|
|
215
|
+
npm run dev # Development mode
|
|
216
|
+
npm run build # Build
|
|
217
|
+
npm run link # Link globally
|
|
218
|
+
npm run test # Run tests
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
## License
|
|
222
|
+
|
|
223
|
+
MIT
|
|
224
|
+
|
|
225
|
+
---
|
|
226
|
+
|
|
227
|
+
Built by [Velocity Digital](https://velocitydigi.com)
|