kimi-mcp-hub 0.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 +390 -0
- package/install/install.ps1 +92 -0
- package/install/install.sh +231 -0
- package/install/npm-wrapper.js +156 -0
- package/package.json +34 -0
package/README.md
ADDED
|
@@ -0,0 +1,390 @@
|
|
|
1
|
+
# Kimi MCP Hub
|
|
2
|
+
|
|
3
|
+
One-click MCP server and skills manager for **Kimi CLI** -- like `claude-mem` but for connecting 23 MCP servers (Jira, GitHub, Slack, Datadog, Perplexity, Stripe, GitLab, DBHub, etc.), 34 AI skills (6 core + 28 optional), persistent memory, and Claude Desktop import.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Table of Contents
|
|
8
|
+
|
|
9
|
+
- [Install](#install)
|
|
10
|
+
- [One-liner (no clone)](#one-liner-no-clone)
|
|
11
|
+
- [From GitHub (pip)](#from-github-pip)
|
|
12
|
+
- [Clone + Install](#clone--install)
|
|
13
|
+
- [Verify](#verify)
|
|
14
|
+
- [Uninstall](#uninstall)
|
|
15
|
+
- [Quick Start](#quick-start)
|
|
16
|
+
- [OAuth Auto-Browser](#oauth-auto-browser)
|
|
17
|
+
- [All Commands](#all-commands)
|
|
18
|
+
- [MCP Servers](#17-mcp-servers)
|
|
19
|
+
- [Skills](#34-skills)
|
|
20
|
+
- [Architecture](#architecture)
|
|
21
|
+
- [Ideas from Claude-Mem](#-ideas-from-claude-mem)
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Install
|
|
26
|
+
|
|
27
|
+
### One-liner with npx (recommended)
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
# macOS / Linux / Windows
|
|
31
|
+
npx kimi-mcp-hub install
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
This creates an isolated Python virtual environment in `~/.kimi-mcp-hub/venv`, installs the package, and runs the interactive setup wizard.
|
|
35
|
+
|
|
36
|
+
### One-liner (curl / PowerShell)
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
# macOS / Linux (curl + pip from GitHub)
|
|
40
|
+
curl -fsSL https://raw.githubusercontent.com/KalimeroMK/kimi-mcp-hub/main/install/install.sh | bash
|
|
41
|
+
|
|
42
|
+
# Windows (PowerShell)
|
|
43
|
+
iwr -useb https://raw.githubusercontent.com/KalimeroMK/kimi-mcp-hub/main/install/install.ps1 | iex
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### From GitHub (pip)
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
# Direct from GitHub -- no clone needed
|
|
50
|
+
pip install --user git+https://github.com/KalimeroMK/kimi-mcp-hub.git
|
|
51
|
+
|
|
52
|
+
# Upgrade
|
|
53
|
+
pip install --user --upgrade git+https://github.com/KalimeroMK/kimi-mcp-hub.git
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### From PyPI (when published)
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
pip install --user kimi-mcp-hub
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Clone + Install (development)
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
git clone https://github.com/KalimeroMK/kimi-mcp-hub.git
|
|
66
|
+
cd kimi-mcp-hub
|
|
67
|
+
pip install -e .
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Requirements
|
|
71
|
+
|
|
72
|
+
- **Python** 3.10+
|
|
73
|
+
- **Node.js** + **npm/npx** (for MCP servers that need it)
|
|
74
|
+
- **Kimi CLI** installed
|
|
75
|
+
- Optional: **Docker** (for some servers)
|
|
76
|
+
|
|
77
|
+
### Verify
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
kimi-mcp-hub --version
|
|
81
|
+
# -> kimi-mcp-hub, version 0.1.0
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
On first run you'll see:
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
Kimi MCP Hub v0.1.0 e uspeshno instaliran!
|
|
88
|
+
|
|
89
|
+
23 MCP serveri dostapni
|
|
90
|
+
34 AI skills za podobro kodiranje
|
|
91
|
+
1 Persistent memory sistem
|
|
92
|
+
|
|
93
|
+
Za da zapochnesh:
|
|
94
|
+
kimi-mcp-hub init -- interaktiven wizard
|
|
95
|
+
kimi-mcp-hub welcome -- detalen pregled
|
|
96
|
+
kimi-mcp-hub status -- status proverka
|
|
97
|
+
kimi-mcp-hub doctor -- zdravje na sistemot
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Run the wizard
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
kimi-mcp-hub init
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
This walks you through:
|
|
107
|
+
1. **MCP Servers** -- pick which services to connect
|
|
108
|
+
2. **Skills** -- install AI behavior patterns
|
|
109
|
+
3. **Memory** -- enable persistent cross-session memory
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## Uninstall
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
# Full reset
|
|
117
|
+
pip uninstall kimi-mcp-hub
|
|
118
|
+
rm -f ~/.kimi/mcp.json
|
|
119
|
+
rm -rf ~/.kimi/skills/
|
|
120
|
+
rm -rf ~/.kimi/mcp-hub/
|
|
121
|
+
rm -rf ~/.config/kimi-mcp-hub/
|
|
122
|
+
|
|
123
|
+
# Or use the CLI
|
|
124
|
+
kimi-mcp-hub remove jira # remove one server
|
|
125
|
+
kimi-mcp-hub remove github # remove another
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
**Complete reinstall:**
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
pip uninstall kimi-mcp-hub
|
|
132
|
+
rm -rf ~/.kimi/mcp.json ~/.kimi/skills/ ~/.kimi/mcp-hub/
|
|
133
|
+
pip install --user git+https://github.com/KalimeroMK/kimi-mcp-hub.git
|
|
134
|
+
kimi-mcp-hub init
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## Quick Start
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
# Show welcome banner + status
|
|
143
|
+
kimi-mcp-hub
|
|
144
|
+
|
|
145
|
+
# Check system health
|
|
146
|
+
kimi-mcp-hub doctor
|
|
147
|
+
|
|
148
|
+
# Full interactive setup
|
|
149
|
+
kimi-mcp-hub init
|
|
150
|
+
|
|
151
|
+
# Add servers individually
|
|
152
|
+
kimi-mcp-hub add jira
|
|
153
|
+
kimi-mcp-hub add github
|
|
154
|
+
kimi-mcp-hub add perplexity
|
|
155
|
+
kimi-mcp-hub add gitlab
|
|
156
|
+
kimi-mcp-hub add stripe
|
|
157
|
+
kimi-mcp-hub add figma-context
|
|
158
|
+
kimi-mcp-hub add desktop-commander
|
|
159
|
+
kimi-mcp-hub add dbhub
|
|
160
|
+
kimi-mcp-hub add mobile
|
|
161
|
+
|
|
162
|
+
# Or use npx without installing Node package globally:
|
|
163
|
+
# npx kimi-mcp-hub status
|
|
164
|
+
|
|
165
|
+
# Auth with auto-browser (OAuth) -- like Claude Code CLI
|
|
166
|
+
kimi-mcp-hub auth github
|
|
167
|
+
kimi-mcp-hub auth slack
|
|
168
|
+
kimi-mcp-hub auth figma
|
|
169
|
+
kimi-mcp-hub auth gitlab
|
|
170
|
+
kimi-mcp-hub auth stripe
|
|
171
|
+
|
|
172
|
+
# See everything configured
|
|
173
|
+
kimi-mcp-hub list
|
|
174
|
+
kimi-mcp-hub status
|
|
175
|
+
kimi-mcp-hub welcome
|
|
176
|
+
|
|
177
|
+
# Import from Claude Desktop
|
|
178
|
+
kimi-mcp-hub import-claude
|
|
179
|
+
|
|
180
|
+
# Manage skills
|
|
181
|
+
kimi-mcp-hub list-skills
|
|
182
|
+
kimi-mcp-hub install-skill docker-pro
|
|
183
|
+
|
|
184
|
+
# Test a server
|
|
185
|
+
kimi-mcp-hub test github
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
## OAuth Auto-Browser
|
|
191
|
+
|
|
192
|
+
Like Claude Code CLI, `kimi-mcp-hub` automatically opens your browser for OAuth:
|
|
193
|
+
|
|
194
|
+
```bash
|
|
195
|
+
$ kimi-mcp-hub auth github
|
|
196
|
+
|
|
197
|
+
> Github Authorization
|
|
198
|
+
Auto-browser mode (like Claude Code CLI)
|
|
199
|
+
|
|
200
|
+
Method: Device Flow -- auto browser + code
|
|
201
|
+
|
|
202
|
+
Your verification code: ABCD-1234
|
|
203
|
+
Opening browser...
|
|
204
|
+
|
|
205
|
+
If browser didn't open:
|
|
206
|
+
1. Go to: https://github.com/login/device
|
|
207
|
+
2. Enter code: ABCD-1234
|
|
208
|
+
3. Click 'Authorize'
|
|
209
|
+
|
|
210
|
+
Waiting for you to authorize in browser...
|
|
211
|
+
|
|
212
|
+
GitHub authorized successfully!
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
| Server | Method | Auto-browser |
|
|
216
|
+
|--------|--------|:------------:|
|
|
217
|
+
| **GitHub** | Device Flow (or PAT fallback) | Yes |
|
|
218
|
+
| **Jira** | API Token or Official MCP OAuth | Yes |
|
|
219
|
+
| **Confluence** | API Token or Official MCP OAuth | Yes |
|
|
220
|
+
| **Slack** | Bot Token or OAuth 2.0 | Yes |
|
|
221
|
+
| **Figma** | Official OAuth 2.1, PAT or custom OAuth 2.0 | Yes* |
|
|
222
|
+
| **Gmail** | Google OAuth 2.0 or npx | Yes |
|
|
223
|
+
| **Linear** | Official OAuth 2.1 or API key | Yes* |
|
|
224
|
+
| **Stripe** | Official OAuth 2.1 or restricted API key | Yes* |
|
|
225
|
+
| **GitLab** | Official OAuth 2.1 or PAT | Yes* |
|
|
226
|
+
| **Datadog** | API + App keys | No (manual) |
|
|
227
|
+
|
|
228
|
+
\* Linear/Figma/Stripe/GitLab OAuth 2.1 се иницира од Kimi CLI (`kimi mcp auth <server>`) откако ќе го додадете официјалниот remote MCP сервер.
|
|
229
|
+
|
|
230
|
+
---
|
|
231
|
+
|
|
232
|
+
## All Commands
|
|
233
|
+
|
|
234
|
+
| Command | Description |
|
|
235
|
+
|---------|-------------|
|
|
236
|
+
| `kimi-mcp-hub` | Show welcome banner and status |
|
|
237
|
+
| `kimi-mcp-hub --version` | Show version |
|
|
238
|
+
| `kimi-mcp-hub install` | Install/update from PyPI/GitHub |
|
|
239
|
+
| `kimi-mcp-hub init` | Full interactive wizard |
|
|
240
|
+
| `kimi-mcp-hub status` | Version, servers, skills, memory |
|
|
241
|
+
| `kimi-mcp-hub welcome` | Detailed welcome banner |
|
|
242
|
+
| `kimi-mcp-hub add <server>` | Add an MCP server |
|
|
243
|
+
| `kimi-mcp-hub remove <server>` | Remove an MCP server |
|
|
244
|
+
| `kimi-mcp-hub auth <server>` | OAuth with auto-browser |
|
|
245
|
+
| `kimi-mcp-hub import-claude` | Import from Claude Desktop |
|
|
246
|
+
| `kimi-mcp-hub list` | All servers + skills + memory |
|
|
247
|
+
| `kimi-mcp-hub list-skills` | All 34 available skills |
|
|
248
|
+
| `kimi-mcp-hub install-skill <name>` | Install a skill |
|
|
249
|
+
| `kimi-mcp-hub test <server>` | Test if server responds |
|
|
250
|
+
| `kimi-mcp-hub doctor` | System health check |
|
|
251
|
+
|
|
252
|
+
---
|
|
253
|
+
|
|
254
|
+
## 23 MCP Servers
|
|
255
|
+
|
|
256
|
+
| Server | Auth | Tools | Best for |
|
|
257
|
+
|--------|------|:-----:|----------|
|
|
258
|
+
| **Jira** | OAuth (Cloud) or API token | 8 | Tickets, sprints, worklogs |
|
|
259
|
+
| **Linear** | Official OAuth 2.1 or API key | 6 | Issues, projects, teams |
|
|
260
|
+
| **Confluence** | OAuth or API token | 5 | Docs, wiki, pages |
|
|
261
|
+
| **GitHub** | Device Flow / PAT | 6 | Repos, PRs, issues, code |
|
|
262
|
+
| **Slack** | OAuth or token | 7 | Channels, DMs, search |
|
|
263
|
+
| **Datadog** | API + App keys | 12 | Metrics, logs, monitors, APM |
|
|
264
|
+
| **Figma** | Official OAuth 2.1, PAT or custom OAuth | 9 | Designs, tokens, components |
|
|
265
|
+
| **Figma Context** | Figma API access token | 3 | Design-to-code implementation |
|
|
266
|
+
| **GitLab** | Official OAuth 2.1 or PAT | 8 | Repos, MRs, issues, CI/CD pipelines |
|
|
267
|
+
| **Gmail** | OAuth (npx), Chrome bridge, or Python SDK | 8 | Read, search, send emails |
|
|
268
|
+
| **HubSpot** | Private App token | 9 | CRM contacts, deals, companies |
|
|
269
|
+
| **Stripe** | Official OAuth 2.1 or restricted API key | 8 | Payments, customers, subscriptions, invoices |
|
|
270
|
+
| **Desktop Commander** | STDIO (npx/Docker) | 8 | Terminal commands, file ops, process management |
|
|
271
|
+
| **DBHub** | DSN string (read-only optional) | 2 | Multi-database gateway (PG, MySQL, SQLite, etc.) |
|
|
272
|
+
| **Mobile MCP** | STDIO (npx) | 9 | iOS/Android automation on simulators and real devices |
|
|
273
|
+
| **Grain** | Browser automation | 2 | Meeting transcripts |
|
|
274
|
+
| **Chrome DevTools** | STDIO (Node 22+ required) | 10 | Performance, network, screenshots, console |
|
|
275
|
+
| **PostgreSQL** | DSN string | 6 | SQL queries, schema, slow query analysis |
|
|
276
|
+
| **Playwright** | STDIO (Node.js) | 8 | Browser automation, E2E testing, screenshots |
|
|
277
|
+
| **Sentry** | Auth token + org | 6 | Error tracking, issue triage, stack traces |
|
|
278
|
+
| **Context7** | STDIO (npx) | 4 | Live library docs, version-aware API lookup |
|
|
279
|
+
| **Supabase** | URL + API key | 6 | Database, auth, storage, realtime, edge functions |
|
|
280
|
+
| **Perplexity** | **API key (free tier)** | **3** | **Real-time web search with AI summaries + citations** |
|
|
281
|
+
|
|
282
|
+
---
|
|
283
|
+
|
|
284
|
+
## 34 Skills
|
|
285
|
+
|
|
286
|
+
### Core Skills (installed by default)
|
|
287
|
+
|
|
288
|
+
| Skill | Description | Trigger |
|
|
289
|
+
|-------|-------------|---------|
|
|
290
|
+
| **karpathy** | Clean, simple, readable code | Any code generation |
|
|
291
|
+
| **superpowers** | 14 agentic dev skills (plan, debug, test, deploy...) | "plan", "debug", "architect" |
|
|
292
|
+
| **headroom** | Compress tool outputs (save tokens) | Large outputs, "compress" |
|
|
293
|
+
| **context-mode** | Context window optimization | "context limit", "token budget" |
|
|
294
|
+
| **cybersecurity** | Security expert (OWASP, cloud, IR, pentest) | "security", "hack", "OWASP" |
|
|
295
|
+
| **kimi-mcp-hub-status** | Shows MCP Hub version/status in Kimi CLI | Session start |
|
|
296
|
+
|
|
297
|
+
### Optional Skills
|
|
298
|
+
|
|
299
|
+
| Skill | Description | Trigger |
|
|
300
|
+
|-------|-------------|---------|
|
|
301
|
+
| **caveman** | Terse mode (75% token reduction) | "caveman", "terse", "brief" |
|
|
302
|
+
| **ecc** | Engineering Competence (perf, security, research) | "optimize", "secure", "research" |
|
|
303
|
+
| **ui-ux-pro-max** | Design intelligence (Tailwind, accessibility) | "design", "UI", "CSS" |
|
|
304
|
+
| **visual-explainer** | HTML diagrams and slides | "visualize", "diagram" |
|
|
305
|
+
| **task-master** | Task management system | "task", "todo", "backlog" |
|
|
306
|
+
| **gitnexus** | Code knowledge graph (git blame, blast radius) | "who wrote this", "impact" |
|
|
307
|
+
| **ralph** | Autonomous loop with stop-hooks | "keep going", "continue" |
|
|
308
|
+
| **security-audit** | Security review checklist | "security", "audit", "vulnerability" |
|
|
309
|
+
| **security-guidance** | 3-layer security scanning (Anthropic-style) | File edits, "security scan" |
|
|
310
|
+
| **research-mode** | Research-driven development | "research", "compare", "benchmark" |
|
|
311
|
+
| **perf-optimization** | Performance profiling and fixes | "slow", "profile", "benchmark" |
|
|
312
|
+
| **memory-palace** | Advanced context management | "remember", "previous session" |
|
|
313
|
+
| **code-reviewer** | Code review assistant | "review", "CR", "feedback" |
|
|
314
|
+
| **code-review-anthropic** | Multi-agent PR review (sub-agents) | "PR review", "deep review" |
|
|
315
|
+
| **api-designer** | REST/GraphQL API design | "API", "endpoint", "REST" |
|
|
316
|
+
| **docker-pro** | Docker and Kubernetes best practices | "docker", "container", "k8s" |
|
|
317
|
+
| **database-expert** | Database design and optimization | "database", "SQL", "schema" |
|
|
318
|
+
| **backend-architect** | Backend architecture (API, DB, scale) | "design API", "system design" |
|
|
319
|
+
| **python-engineer** | Python specialist (FastAPI, Django, async) | "Python", "FastAPI", "Django" |
|
|
320
|
+
| **react-coder** | React 19 specialist (RSC, hooks) | "React", "component", "Next.js" |
|
|
321
|
+
| **ts-coder** | TypeScript specialist (strict, generics) | "TypeScript", "TS", "generic" |
|
|
322
|
+
| **ui-engineer** | UI/UX engineer (Tailwind, a11y, responsive) | "UI", "Tailwind", "responsive" |
|
|
323
|
+
| **laravel-engineer** | Laravel specialist (Eloquent, Blade, Livewire, Queues) | "Laravel", "Eloquent", "PHP" |
|
|
324
|
+
| **find-skills** | Discover and install agent skills from the open ecosystem | "find skill", "install skill" |
|
|
325
|
+
|
|
326
|
+
---
|
|
327
|
+
|
|
328
|
+
## Ideas from Claude-Mem
|
|
329
|
+
|
|
330
|
+
Features we adopted from the 81k-star `claude-mem` project:
|
|
331
|
+
|
|
332
|
+
| Feature | Claude-Mem | Kimi MCP Hub |
|
|
333
|
+
|---------|-----------|-------------|
|
|
334
|
+
| **One-line install** | `npx claude-mem install` | `curl .../install.sh \| bash` |
|
|
335
|
+
| **Auto-detect CLI** | `--ide gemini-cli`, `--ide opencode` | Auto-detect `kimi` CLI |
|
|
336
|
+
| **Persistent memory** | AI-compressed observations | SQLite + FTS5 |
|
|
337
|
+
| **Web viewer UI** | `http://localhost:37777` | Coming soon |
|
|
338
|
+
| **Skills / memory search** | `mem-search` skill | Built-in `memory_palace` skill |
|
|
339
|
+
| **Privacy tags** | `<private>` content exclusion | Planned |
|
|
340
|
+
| **Plugin hooks** | `.claude/`, `.codex/` hooks | `~/.kimi/skills/` directory |
|
|
341
|
+
| **Import from other tools** | - | Claude Desktop import |
|
|
342
|
+
|
|
343
|
+
---
|
|
344
|
+
|
|
345
|
+
## Architecture
|
|
346
|
+
|
|
347
|
+
```
|
|
348
|
+
+-----------------------------------------+
|
|
349
|
+
| kimi-mcp-hub CLI |
|
|
350
|
+
| +---------------------------------+ |
|
|
351
|
+
| | (no args) -> welcome banner | |
|
|
352
|
+
| | install -> PyPI/GitHub update | |
|
|
353
|
+
| | init -> interactive wizard | |
|
|
354
|
+
| | add -> writes ~/.kimi/mcp.json| |
|
|
355
|
+
| | auth -> OAuth + auto browser | |
|
|
356
|
+
| | import-claude -> migrate config| |
|
|
357
|
+
| | list -> pretty table of tools | |
|
|
358
|
+
| | status -> version + health | |
|
|
359
|
+
| | welcome -> full info display | |
|
|
360
|
+
| +---------------------------------+ |
|
|
361
|
+
| | |
|
|
362
|
+
| +---------------------------------+ |
|
|
363
|
+
| | ~/.kimi/mcp.json | |
|
|
364
|
+
| | ~/.kimi-code/skills/ (34 skills) | |
|
|
365
|
+
| | ~/.kimi/mcp-hub/memory.db | |
|
|
366
|
+
| +---------------------------------+ |
|
|
367
|
+
| | |
|
|
368
|
+
| First-run welcome message (auto) |
|
|
369
|
+
| | |
|
|
370
|
+
| Kimi CLI reads config |
|
|
371
|
+
| | |
|
|
372
|
+
| /mcp shows tools |
|
|
373
|
+
| Skills auto-activate |
|
|
374
|
+
| Memory persists context |
|
|
375
|
+
+-----------------------------------------+
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
---
|
|
379
|
+
|
|
380
|
+
## Security Notes
|
|
381
|
+
|
|
382
|
+
- OAuth tokens are stored as plain JSON in `~/.config/kimi-mcp-hub/tokens.json`. This keeps the tool dependency-free, but means anyone with access to your user account can read them.
|
|
383
|
+
- By default GitHub authentication uses a public OAuth app (`kimi-mcp-hub`). You can supply your own GitHub/Atlassian OAuth Client ID when running `kimi-mcp-hub auth <server>`.
|
|
384
|
+
- API keys and PATs are written to `~/.kimi/mcp.json`. Protect that file accordingly.
|
|
385
|
+
|
|
386
|
+
---
|
|
387
|
+
|
|
388
|
+
## License
|
|
389
|
+
|
|
390
|
+
MIT
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# Kimi MCP Hub - One-line installer for Windows (PowerShell)
|
|
2
|
+
# Usage: iwr -useb https://raw.githubusercontent.com/KalimeroMK/kimi-mcp-hub/main/install/install.ps1 | iex
|
|
3
|
+
|
|
4
|
+
$REPO = "KalimeroMK/kimi-mcp-hub"
|
|
5
|
+
$INSTALL_DIR = if ($env:KIMI_MCP_HUB_DIR) { $env:KIMI_MCP_HUB_DIR } else { "$env:USERPROFILE\.kimi-mcp-hub" }
|
|
6
|
+
|
|
7
|
+
function Write-Header {
|
|
8
|
+
Write-Host ""
|
|
9
|
+
Write-Host " KIMI MCP HUB" -ForegroundColor Cyan -NoNewline
|
|
10
|
+
Write-Host " - One-click MCP server & skills manager" -ForegroundColor Gray
|
|
11
|
+
Write-Host " 23 MCP Servers | 34 AI Skills | Persistent Memory" -ForegroundColor DarkGray
|
|
12
|
+
Write-Host ""
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function Check-Requirements {
|
|
16
|
+
Write-Host "Checking requirements..." -ForegroundColor Cyan
|
|
17
|
+
|
|
18
|
+
# Check Python
|
|
19
|
+
if (Get-Command python -ErrorAction SilentlyContinue) {
|
|
20
|
+
$pyVersion = (python --version 2>&1).ToString().Split()[1]
|
|
21
|
+
Write-Host " Python $pyVersion found" -ForegroundColor Green
|
|
22
|
+
} elseif (Get-Command python3 -ErrorAction SilentlyContinue) {
|
|
23
|
+
$pyVersion = (python3 --version 2>&1).ToString().Split()[1]
|
|
24
|
+
Write-Host " Python $pyVersion found" -ForegroundColor Green
|
|
25
|
+
} else {
|
|
26
|
+
Write-Host " Python 3.10+ is required. Install from https://python.org/downloads" -ForegroundColor Red
|
|
27
|
+
exit 1
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
# Check pip
|
|
31
|
+
if (python -m pip --version -ErrorAction SilentlyContinue) {
|
|
32
|
+
Write-Host " pip found" -ForegroundColor Green
|
|
33
|
+
} else {
|
|
34
|
+
Write-Host " pip not found. Run: python -m ensurepip --upgrade" -ForegroundColor Red
|
|
35
|
+
exit 1
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
# Check Node.js (optional)
|
|
39
|
+
if (Get-Command node -ErrorAction SilentlyContinue) {
|
|
40
|
+
$nodeVersion = (node --version 2>$null)
|
|
41
|
+
Write-Host " Node.js $nodeVersion found" -ForegroundColor Green
|
|
42
|
+
} else {
|
|
43
|
+
Write-Host " Node.js not found (needed for some MCP servers)" -ForegroundColor Yellow
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function Install-FromGitHub {
|
|
48
|
+
Write-Host "Installing from GitHub..." -ForegroundColor Cyan
|
|
49
|
+
|
|
50
|
+
# Remove old install if exists
|
|
51
|
+
if (Test-Path $INSTALL_DIR) {
|
|
52
|
+
Remove-Item -Recurse -Force $INSTALL_DIR
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
git clone --depth 1 "https://github.com/$REPO.git" $INSTALL_DIR
|
|
56
|
+
Write-Host " Cloned to $INSTALL_DIR" -ForegroundColor Green
|
|
57
|
+
|
|
58
|
+
Set-Location $INSTALL_DIR
|
|
59
|
+
python -m pip install --upgrade --user -e .
|
|
60
|
+
Write-Host " Package installed" -ForegroundColor Green
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function Install-PipGit {
|
|
64
|
+
Write-Host "Installing directly from GitHub (pip)..." -ForegroundColor Cyan
|
|
65
|
+
python -m pip install --upgrade --user "git+https://github.com/$REPO.git"
|
|
66
|
+
Write-Host " Installed from GitHub" -ForegroundColor Green
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
function Show-Welcome {
|
|
70
|
+
Write-Host ""
|
|
71
|
+
Write-Host "Kimi MCP Hub installed successfully!" -ForegroundColor Green
|
|
72
|
+
Write-Host ""
|
|
73
|
+
Write-Host "Quick start:" -ForegroundColor Cyan
|
|
74
|
+
Write-Host " kimi-mcp-hub init # Run interactive setup wizard"
|
|
75
|
+
Write-Host " kimi-mcp-hub status # Check installation status"
|
|
76
|
+
Write-Host " kimi-mcp-hub doctor # Check system health"
|
|
77
|
+
Write-Host ""
|
|
78
|
+
Write-Host "Add your first server:" -ForegroundColor Cyan
|
|
79
|
+
Write-Host " kimi-mcp-hub add github"
|
|
80
|
+
Write-Host " kimi-mcp-hub auth github # Auto-browser OAuth"
|
|
81
|
+
Write-Host ""
|
|
82
|
+
Write-Host "Use in Kimi CLI:" -ForegroundColor Cyan
|
|
83
|
+
Write-Host " /mcp # List available tools"
|
|
84
|
+
Write-Host " /skills # List installed skills"
|
|
85
|
+
Write-Host ""
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
# Main
|
|
89
|
+
Write-Header
|
|
90
|
+
Check-Requirements
|
|
91
|
+
Install-PipGit
|
|
92
|
+
Show-Welcome
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Kimi MCP Hub - One-line installer
|
|
3
|
+
# Usage: curl -fsSL https://raw.githubusercontent.com/KalimeroMK/kimi-mcp-hub/main/install/install.sh | bash
|
|
4
|
+
|
|
5
|
+
set -e
|
|
6
|
+
|
|
7
|
+
REPO="KalimeroMK/kimi-mcp-hub"
|
|
8
|
+
INSTALL_DIR="${KIMI_MCP_HUB_DIR:-$HOME/.kimi-mcp-hub}"
|
|
9
|
+
BIN_DIR="${KIMI_MCP_HUB_BIN:-$HOME/.local/bin}"
|
|
10
|
+
|
|
11
|
+
# Colors
|
|
12
|
+
RED='\033[0;31m'
|
|
13
|
+
GREEN='\033[0;32m'
|
|
14
|
+
YELLOW='\033[1;33m'
|
|
15
|
+
CYAN='\033[0;36m'
|
|
16
|
+
DIM='\033[0;90m'
|
|
17
|
+
NC='\033[0m'
|
|
18
|
+
|
|
19
|
+
print_header() {
|
|
20
|
+
echo ""
|
|
21
|
+
echo -e "${CYAN} KIMI MCP HUB${NC} - One-click MCP server & skills manager"
|
|
22
|
+
echo -e "${DIM} 23 MCP Servers | 34 AI Skills | Persistent Memory${NC}"
|
|
23
|
+
echo ""
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
print_success() {
|
|
27
|
+
echo -e "${GREEN}✓${NC} $1"
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
print_info() {
|
|
31
|
+
echo -e "${CYAN}→${NC} $1"
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
print_warning() {
|
|
35
|
+
echo -e "${YELLOW}⚠${NC} $1"
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
print_error() {
|
|
39
|
+
echo -e "${RED}✗${NC} $1"
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
check_requirements() {
|
|
43
|
+
print_info "Checking requirements..."
|
|
44
|
+
|
|
45
|
+
# Check Python
|
|
46
|
+
if command -v python3 &>/dev/null; then
|
|
47
|
+
PYTHON="python3"
|
|
48
|
+
elif command -v python &>/dev/null; then
|
|
49
|
+
PYTHON="python"
|
|
50
|
+
else
|
|
51
|
+
print_error "Python 3.10+ is required but not found."
|
|
52
|
+
echo " Install from: https://python.org/downloads"
|
|
53
|
+
exit 1
|
|
54
|
+
fi
|
|
55
|
+
|
|
56
|
+
PYTHON_VERSION=$($PYTHON --version 2>&1 | cut -d' ' -f2)
|
|
57
|
+
print_success "Python $PYTHON_VERSION found"
|
|
58
|
+
|
|
59
|
+
# Check pip
|
|
60
|
+
if ! $PYTHON -m pip --version &>/dev/null 2>&1; then
|
|
61
|
+
print_error "pip is required but not found."
|
|
62
|
+
echo " Install: $PYTHON -m ensurepip --upgrade"
|
|
63
|
+
exit 1
|
|
64
|
+
fi
|
|
65
|
+
print_success "pip found"
|
|
66
|
+
|
|
67
|
+
# Check Node.js (optional, for MCP servers)
|
|
68
|
+
if command -v node &>/dev/null; then
|
|
69
|
+
NODE_VERSION=$(node --version 2>/dev/null || echo "?")
|
|
70
|
+
print_success "Node.js $NODE_VERSION found (for MCP servers)"
|
|
71
|
+
else
|
|
72
|
+
print_warning "Node.js not found (needed for some MCP servers)"
|
|
73
|
+
echo " Install from: https://nodejs.org"
|
|
74
|
+
fi
|
|
75
|
+
|
|
76
|
+
# Check npx (optional)
|
|
77
|
+
if command -v npx &>/dev/null; then
|
|
78
|
+
print_success "npx found"
|
|
79
|
+
else
|
|
80
|
+
print_warning "npx not found (needed for some MCP servers)"
|
|
81
|
+
fi
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
detect_shell() {
|
|
85
|
+
case "$(basename "$SHELL")" in
|
|
86
|
+
bash) echo "bash" ;;
|
|
87
|
+
zsh) echo "zsh" ;;
|
|
88
|
+
fish) echo "fish" ;;
|
|
89
|
+
*) echo "unknown" ;;
|
|
90
|
+
esac
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
add_to_path() {
|
|
94
|
+
local shell_rc=""
|
|
95
|
+
local shell_name=$(detect_shell)
|
|
96
|
+
|
|
97
|
+
case "$shell_name" in
|
|
98
|
+
bash) shell_rc="$HOME/.bashrc" ;;
|
|
99
|
+
zsh) shell_rc="$HOME/.zshrc" ;;
|
|
100
|
+
fish) shell_rc="$HOME/.config/fish/config.fish" ;;
|
|
101
|
+
*) shell_rc="$HOME/.profile" ;;
|
|
102
|
+
esac
|
|
103
|
+
|
|
104
|
+
# Check if already in PATH
|
|
105
|
+
if [[ ":$PATH:" == *":$BIN_DIR:"* ]]; then
|
|
106
|
+
return 0
|
|
107
|
+
fi
|
|
108
|
+
|
|
109
|
+
if [ -f "$shell_rc" ]; then
|
|
110
|
+
echo "" >> "$shell_rc"
|
|
111
|
+
echo "# Added by Kimi MCP Hub installer" >> "$shell_rc"
|
|
112
|
+
if [ "$shell_name" = "fish" ]; then
|
|
113
|
+
echo "set -x PATH $BIN_DIR \$PATH" >> "$shell_rc"
|
|
114
|
+
else
|
|
115
|
+
echo "export PATH=\"$BIN_DIR:\$PATH\"" >> "$shell_rc"
|
|
116
|
+
fi
|
|
117
|
+
print_info "Added $BIN_DIR to PATH in $shell_rc"
|
|
118
|
+
print_warning "Run: source $shell_rc (or restart your terminal)"
|
|
119
|
+
fi
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
install_from_pypi() {
|
|
123
|
+
print_info "Installing kimi-mcp-hub from PyPI..."
|
|
124
|
+
$PYTHON -m pip install --upgrade --user kimi-mcp-hub
|
|
125
|
+
print_success "Installed from PyPI"
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
install_from_github() {
|
|
129
|
+
print_info "Cloning repository..."
|
|
130
|
+
|
|
131
|
+
# Remove old install if exists
|
|
132
|
+
if [ -d "$INSTALL_DIR" ]; then
|
|
133
|
+
rm -rf "$INSTALL_DIR"
|
|
134
|
+
fi
|
|
135
|
+
|
|
136
|
+
git clone --depth 1 "https://github.com/$REPO.git" "$INSTALL_DIR"
|
|
137
|
+
print_success "Cloned to $INSTALL_DIR"
|
|
138
|
+
|
|
139
|
+
print_info "Installing package..."
|
|
140
|
+
cd "$INSTALL_DIR"
|
|
141
|
+
$PYTHON -m pip install --upgrade --user -e .
|
|
142
|
+
print_success "Package installed"
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
install_pip_git() {
|
|
146
|
+
print_info "Installing directly from GitHub (pip)..."
|
|
147
|
+
$PYTHON -m pip install --upgrade --user "git+https://github.com/$REPO.git"
|
|
148
|
+
print_success "Installed from GitHub"
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
post_install() {
|
|
152
|
+
print_info "Running post-install setup..."
|
|
153
|
+
|
|
154
|
+
# Ensure bin directory exists
|
|
155
|
+
mkdir -p "$BIN_DIR"
|
|
156
|
+
|
|
157
|
+
# Check if kimi-mcp-hub is in PATH
|
|
158
|
+
if ! command -v kimi-mcp-hub &>/dev/null; then
|
|
159
|
+
# Try to find the installed script
|
|
160
|
+
USER_BASE=$($PYTHON -m site --user-base 2>/dev/null || echo "$HOME/.local")
|
|
161
|
+
SCRIPT_DIR="$USER_BASE/bin"
|
|
162
|
+
|
|
163
|
+
if [ -f "$SCRIPT_DIR/kimi-mcp-hub" ]; then
|
|
164
|
+
print_info "Found kimi-mcp-hub at $SCRIPT_DIR"
|
|
165
|
+
add_to_path
|
|
166
|
+
fi
|
|
167
|
+
fi
|
|
168
|
+
|
|
169
|
+
# Create ~/.kimi directory
|
|
170
|
+
mkdir -p "$HOME/.kimi"
|
|
171
|
+
|
|
172
|
+
print_success "Setup complete"
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
show_welcome() {
|
|
176
|
+
echo ""
|
|
177
|
+
echo -e "${GREEN}╔══════════════════════════════════════════════════════════╗${NC}"
|
|
178
|
+
echo -e "${GREEN}║${NC} ${CYAN}Kimi MCP Hub${NC} installed successfully! ${GREEN}║${NC}"
|
|
179
|
+
echo -e "${GREEN}╚══════════════════════════════════════════════════════════╝${NC}"
|
|
180
|
+
echo ""
|
|
181
|
+
echo -e "${CYAN}Quick start:${NC}"
|
|
182
|
+
echo " kimi-mcp-hub init # Run interactive setup wizard"
|
|
183
|
+
echo " kimi-mcp-hub status # Check installation status"
|
|
184
|
+
echo " kimi-mcp-hub welcome # Show welcome banner"
|
|
185
|
+
echo " kimi-mcp-hub doctor # Check system health"
|
|
186
|
+
echo ""
|
|
187
|
+
echo -e "${CYAN}Add your first server:${NC}"
|
|
188
|
+
echo " kimi-mcp-hub add github"
|
|
189
|
+
echo " kimi-mcp-hub auth github # Auto-browser OAuth"
|
|
190
|
+
echo ""
|
|
191
|
+
echo -e "${CYAN}Use in Kimi CLI:${NC}"
|
|
192
|
+
echo " /mcp # List available tools"
|
|
193
|
+
echo " /skills # List installed skills"
|
|
194
|
+
echo ""
|
|
195
|
+
echo -e "${DIM}Need help? Run: kimi-mcp-hub --help${NC}"
|
|
196
|
+
echo ""
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
main() {
|
|
200
|
+
print_header
|
|
201
|
+
check_requirements
|
|
202
|
+
|
|
203
|
+
# Parse arguments
|
|
204
|
+
METHOD="${1:-auto}"
|
|
205
|
+
|
|
206
|
+
case "$METHOD" in
|
|
207
|
+
--pip|pip)
|
|
208
|
+
install_pip_git
|
|
209
|
+
;;
|
|
210
|
+
--clone|clone)
|
|
211
|
+
install_from_github
|
|
212
|
+
;;
|
|
213
|
+
--pypi|pypi)
|
|
214
|
+
install_from_pypi
|
|
215
|
+
;;
|
|
216
|
+
*)
|
|
217
|
+
# Try PyPI first, fallback to pip+git
|
|
218
|
+
if $PYTHON -m pip install --dry-run kimi-mcp-hub &>/dev/null 2>&1; then
|
|
219
|
+
install_from_pypi
|
|
220
|
+
else
|
|
221
|
+
print_info "PyPI package not found, installing from GitHub..."
|
|
222
|
+
install_pip_git
|
|
223
|
+
fi
|
|
224
|
+
;;
|
|
225
|
+
esac
|
|
226
|
+
|
|
227
|
+
post_install
|
|
228
|
+
show_welcome
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
main "$@"
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
const { spawnSync } = require("child_process");
|
|
5
|
+
const process = require("process");
|
|
6
|
+
const fs = require("fs");
|
|
7
|
+
const path = require("path");
|
|
8
|
+
const os = require("os");
|
|
9
|
+
|
|
10
|
+
const REPO = "KalimeroMK/kimi-mcp-hub";
|
|
11
|
+
const PYPI_NAME = "kimi-mcp-hub";
|
|
12
|
+
const PYTHON_MODULE = "kimi_mcp_hub";
|
|
13
|
+
const INSTALL_DIR = path.join(os.homedir(), ".kimi-mcp-hub");
|
|
14
|
+
const VENV_DIR = process.env.KIMI_MCP_HUB_VENV || path.join(INSTALL_DIR, "venv");
|
|
15
|
+
const LOCAL_REPO_DIR = path.resolve(path.join(__dirname, ".."));
|
|
16
|
+
|
|
17
|
+
function log(...args) {
|
|
18
|
+
console.log("[kimi-mcp-hub]", ...args);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function error(...args) {
|
|
22
|
+
console.error("[kimi-mcp-hub]", ...args);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function getPythonVersion(cmd) {
|
|
26
|
+
const result = spawnSync(cmd, ["--version"], { stdio: "pipe", shell: false });
|
|
27
|
+
if (result.status !== 0) return null;
|
|
28
|
+
const match = String(result.stdout || result.stderr).match(/(\d+)\.(\d+)/);
|
|
29
|
+
if (!match) return null;
|
|
30
|
+
return { major: parseInt(match[1], 10), minor: parseInt(match[2], 10) };
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function findPython() {
|
|
34
|
+
for (const cmd of ["python3.13", "python3.12", "python3.11", "python3.10", "python3", "python"]) {
|
|
35
|
+
const version = getPythonVersion(cmd);
|
|
36
|
+
if (version && version.major === 3 && version.minor >= 10) return cmd;
|
|
37
|
+
}
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function venvPython() {
|
|
42
|
+
return process.platform === "win32"
|
|
43
|
+
? path.join(VENV_DIR, "Scripts", "python.exe")
|
|
44
|
+
: path.join(VENV_DIR, "bin", "python");
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function run(cmd, args, options = {}) {
|
|
48
|
+
const result = spawnSync(cmd, args, {
|
|
49
|
+
stdio: "inherit",
|
|
50
|
+
shell: false,
|
|
51
|
+
...options,
|
|
52
|
+
});
|
|
53
|
+
return result.status ?? 1;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function moduleAvailable(python) {
|
|
57
|
+
const result = spawnSync(
|
|
58
|
+
python,
|
|
59
|
+
["-c", `import ${PYTHON_MODULE}; print(${PYTHON_MODULE}.__version__)`],
|
|
60
|
+
{ stdio: "pipe", shell: false }
|
|
61
|
+
);
|
|
62
|
+
return result.status === 0;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function isLocalRepo() {
|
|
66
|
+
return (
|
|
67
|
+
fs.existsSync(path.join(LOCAL_REPO_DIR, "pyproject.toml")) &&
|
|
68
|
+
fs.existsSync(path.join(LOCAL_REPO_DIR, "src", PYTHON_MODULE))
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
function getInstallSpec() {
|
|
73
|
+
if (isLocalRepo()) {
|
|
74
|
+
log("Using local repository at", LOCAL_REPO_DIR);
|
|
75
|
+
return LOCAL_REPO_DIR;
|
|
76
|
+
}
|
|
77
|
+
return `git+https://github.com/${REPO}.git`;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function ensureVenv(python) {
|
|
81
|
+
if (fs.existsSync(venvPython())) {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
log("Creating isolated Python environment...");
|
|
85
|
+
fs.mkdirSync(INSTALL_DIR, { recursive: true });
|
|
86
|
+
const createResult = run(python, ["-m", "venv", VENV_DIR]);
|
|
87
|
+
if (createResult !== 0) {
|
|
88
|
+
error("Failed to create virtual environment.");
|
|
89
|
+
process.exit(1);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function installPackage(python) {
|
|
94
|
+
ensureVenv(python);
|
|
95
|
+
const venvPy = venvPython();
|
|
96
|
+
|
|
97
|
+
log("Installing Kimi MCP Hub...");
|
|
98
|
+
|
|
99
|
+
// Upgrade pip first to avoid build issues.
|
|
100
|
+
run(venvPy, ["-m", "pip", "install", "--upgrade", "pip"]);
|
|
101
|
+
|
|
102
|
+
const installSpec = getInstallSpec();
|
|
103
|
+
|
|
104
|
+
// Prefer PyPI when the package is published and not running from a local repo.
|
|
105
|
+
let installArgs;
|
|
106
|
+
if (installSpec === LOCAL_REPO_DIR) {
|
|
107
|
+
installArgs = ["-m", "pip", "install", "--upgrade", installSpec];
|
|
108
|
+
} else {
|
|
109
|
+
const pypiDry = spawnSync(
|
|
110
|
+
venvPy,
|
|
111
|
+
["-m", "pip", "install", "--dry-run", PYPI_NAME],
|
|
112
|
+
{ stdio: "pipe", shell: false }
|
|
113
|
+
);
|
|
114
|
+
installArgs =
|
|
115
|
+
pypiDry.status === 0
|
|
116
|
+
? ["-m", "pip", "install", "--upgrade", PYPI_NAME]
|
|
117
|
+
: ["-m", "pip", "install", "--upgrade", installSpec];
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
const installResult = run(venvPy, installArgs);
|
|
121
|
+
if (installResult !== 0) {
|
|
122
|
+
error("Failed to install the Python package.");
|
|
123
|
+
process.exit(1);
|
|
124
|
+
}
|
|
125
|
+
log("Kimi MCP Hub installed.");
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
function main() {
|
|
129
|
+
const args = process.argv.slice(2);
|
|
130
|
+
const command = args[0];
|
|
131
|
+
|
|
132
|
+
const python = findPython();
|
|
133
|
+
if (!python) {
|
|
134
|
+
error("Python 3.10+ is required but not found. Install it from https://python.org/downloads");
|
|
135
|
+
process.exit(1);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
const venvPy = venvPython();
|
|
139
|
+
|
|
140
|
+
if (command === "install" || command === undefined) {
|
|
141
|
+
installPackage(python);
|
|
142
|
+
log("Running interactive setup...");
|
|
143
|
+
const initResult = run(venvPy, ["-m", PYTHON_MODULE, "init"]);
|
|
144
|
+
process.exit(initResult);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
if (!moduleAvailable(venvPy)) {
|
|
148
|
+
log("Kimi MCP Hub not found. Installing first...");
|
|
149
|
+
installPackage(python);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
const result = run(venvPy, ["-m", PYTHON_MODULE, ...args]);
|
|
153
|
+
process.exit(result);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
main();
|
package/package.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "kimi-mcp-hub",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "One-click MCP server and skills manager for Kimi CLI",
|
|
5
|
+
"main": "install/npm-wrapper.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"kimi-mcp-hub": "install/npm-wrapper.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"install/",
|
|
11
|
+
"README.md"
|
|
12
|
+
],
|
|
13
|
+
"scripts": {
|
|
14
|
+
"test": "echo 'Run Python tests: python -m pytest'"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"kimi",
|
|
18
|
+
"mcp",
|
|
19
|
+
"cli",
|
|
20
|
+
"installer"
|
|
21
|
+
],
|
|
22
|
+
"author": "KalimeroMK",
|
|
23
|
+
"license": "MIT",
|
|
24
|
+
"repository": {
|
|
25
|
+
"type": "git",
|
|
26
|
+
"url": "git+https://github.com/KalimeroMK/kimi-mcp-hub.git"
|
|
27
|
+
},
|
|
28
|
+
"engines": {
|
|
29
|
+
"node": ">=18"
|
|
30
|
+
},
|
|
31
|
+
"publishConfig": {
|
|
32
|
+
"access": "public"
|
|
33
|
+
}
|
|
34
|
+
}
|