kimi-mcp-hub 0.1.0 → 0.2.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 +512 -110
- package/install/install.ps1 +140 -15
- package/install/install.sh +164 -22
- package/install/npm-wrapper.js +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,24 +1,35 @@
|
|
|
1
1
|
# Kimi MCP Hub
|
|
2
2
|
|
|
3
|
-
One-click MCP server and skills manager for **Kimi CLI** -- like `claude-mem` but for connecting
|
|
3
|
+
One-click MCP server and skills manager for **Kimi CLI** -- like `claude-mem` but for connecting 24 MCP servers (Jira, GitHub, Slack, Obsidian, Datadog, Perplexity, Stripe, GitLab, DBHub, etc.), 57 AI skills (7 core + 50 optional), persistent memory, and Claude Desktop import.
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
## Table of Contents
|
|
8
8
|
|
|
9
9
|
- [Install](#install)
|
|
10
|
-
- [One-liner (
|
|
11
|
-
- [
|
|
12
|
-
- [
|
|
10
|
+
- [One-liner with npx (recommended)](#one-liner-with-npx-recommended)
|
|
11
|
+
- [One-liner (curl / PowerShell)](#one-liner-curl-powershell)
|
|
12
|
+
- [From GitHub (pip) inside a venv](#from-github-pip-inside-a-venv)
|
|
13
|
+
- [From PyPI (when published)](#from-pypi-when-published)
|
|
14
|
+
- [Clone + Install (development)](#clone-install-development)
|
|
15
|
+
- [Requirements](#requirements)
|
|
13
16
|
- [Verify](#verify)
|
|
17
|
+
- [Run the wizard](#run-the-wizard)
|
|
14
18
|
- [Uninstall](#uninstall)
|
|
15
19
|
- [Quick Start](#quick-start)
|
|
20
|
+
- [Update](#update)
|
|
21
|
+
- [Managing MCP Servers and Skills](#managing-mcp-servers-and-skills)
|
|
22
|
+
- [Obsidian Local Memory](#obsidian-local-memory)
|
|
23
|
+
- [Install Claude/Codex Plugins](#install-claudecodex-plugins)
|
|
24
|
+
- [Project-Level MCP Configuration](#project-level-mcp-configuration)
|
|
25
|
+
- [Remote MCP Server Setup](docs/remote-mcp-server-setup.md)
|
|
16
26
|
- [OAuth Auto-Browser](#oauth-auto-browser)
|
|
27
|
+
- [CLAUDE.md Compatibility](#claudemd-compatibility)
|
|
17
28
|
- [All Commands](#all-commands)
|
|
18
|
-
- [
|
|
19
|
-
- [
|
|
29
|
+
- [Testing](#testing)
|
|
30
|
+
- [MCP Servers](#24-mcp-servers)
|
|
31
|
+
- [Skills](#57-skills)
|
|
20
32
|
- [Architecture](#architecture)
|
|
21
|
-
- [Ideas from Claude-Mem](#-ideas-from-claude-mem)
|
|
22
33
|
|
|
23
34
|
---
|
|
24
35
|
|
|
@@ -27,11 +38,10 @@ One-click MCP server and skills manager for **Kimi CLI** -- like `claude-mem` bu
|
|
|
27
38
|
### One-liner with npx (recommended)
|
|
28
39
|
|
|
29
40
|
```bash
|
|
30
|
-
# macOS / Linux / Windows
|
|
31
41
|
npx kimi-mcp-hub install
|
|
32
42
|
```
|
|
33
43
|
|
|
34
|
-
This creates an isolated Python virtual environment
|
|
44
|
+
This creates an isolated Python virtual environment at `~/.kimi-mcp-hub/.venv`, installs the package, and runs the interactive setup.
|
|
35
45
|
|
|
36
46
|
### One-liner (curl / PowerShell)
|
|
37
47
|
|
|
@@ -39,24 +49,37 @@ This creates an isolated Python virtual environment in `~/.kimi-mcp-hub/venv`, i
|
|
|
39
49
|
# macOS / Linux (curl + pip from GitHub)
|
|
40
50
|
curl -fsSL https://raw.githubusercontent.com/KalimeroMK/kimi-mcp-hub/main/install/install.sh | bash
|
|
41
51
|
|
|
52
|
+
# macOS / Linux with auto CLAUDE.md support
|
|
53
|
+
curl -fsSL https://raw.githubusercontent.com/KalimeroMK/kimi-mcp-hub/main/install/install.sh | bash -s -- -y
|
|
54
|
+
|
|
55
|
+
# macOS / Linux with Obsidian local memory
|
|
56
|
+
curl -fsSL https://raw.githubusercontent.com/KalimeroMK/kimi-mcp-hub/main/install/install.sh | bash -s -- --with-obsidian
|
|
57
|
+
|
|
42
58
|
# Windows (PowerShell)
|
|
43
59
|
iwr -useb https://raw.githubusercontent.com/KalimeroMK/kimi-mcp-hub/main/install/install.ps1 | iex
|
|
60
|
+
|
|
61
|
+
# Windows with auto CLAUDE.md support
|
|
62
|
+
iwr -useb https://raw.githubusercontent.com/KalimeroMK/kimi-mcp-hub/main/install/install.ps1 | & ([scriptblock]::create($_)) -Yes
|
|
63
|
+
|
|
64
|
+
# Windows with Obsidian local memory
|
|
65
|
+
iwr -useb https://raw.githubusercontent.com/KalimeroMK/kimi-mcp-hub/main/install/install.ps1 | & ([scriptblock]::create($_)) -Yes -WithObsidian
|
|
44
66
|
```
|
|
45
67
|
|
|
46
|
-
### From GitHub (pip)
|
|
68
|
+
### From GitHub (pip) inside a venv
|
|
47
69
|
|
|
48
70
|
```bash
|
|
49
71
|
# Direct from GitHub -- no clone needed
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
pip install --user --upgrade git+https://github.com/KalimeroMK/kimi-mcp-hub.git
|
|
72
|
+
python3 -m venv ~/.kimi-mcp-hub/.venv
|
|
73
|
+
~/.kimi-mcp-hub/.venv/bin/pip install --upgrade git+https://github.com/KalimeroMK/kimi-mcp-hub.git
|
|
74
|
+
ln -s ~/.kimi-mcp-hub/.venv/bin/kimi-mcp-hub ~/.local/bin/kimi-mcp-hub
|
|
54
75
|
```
|
|
55
76
|
|
|
56
77
|
### From PyPI (when published)
|
|
57
78
|
|
|
58
79
|
```bash
|
|
59
|
-
|
|
80
|
+
python3 -m venv ~/.kimi-mcp-hub/.venv
|
|
81
|
+
~/.kimi-mcp-hub/.venv/bin/pip install --upgrade kimi-mcp-hub
|
|
82
|
+
ln -s ~/.kimi-mcp-hub/.venv/bin/kimi-mcp-hub ~/.local/bin/kimi-mcp-hub
|
|
60
83
|
```
|
|
61
84
|
|
|
62
85
|
### Clone + Install (development)
|
|
@@ -64,6 +87,8 @@ pip install --user kimi-mcp-hub
|
|
|
64
87
|
```bash
|
|
65
88
|
git clone https://github.com/KalimeroMK/kimi-mcp-hub.git
|
|
66
89
|
cd kimi-mcp-hub
|
|
90
|
+
python3 -m venv .venv
|
|
91
|
+
source .venv/bin/activate
|
|
67
92
|
pip install -e .
|
|
68
93
|
```
|
|
69
94
|
|
|
@@ -84,17 +109,17 @@ kimi-mcp-hub --version
|
|
|
84
109
|
On first run you'll see:
|
|
85
110
|
|
|
86
111
|
```
|
|
87
|
-
Kimi MCP Hub v0.1.0
|
|
112
|
+
Kimi MCP Hub v0.1.0 installed successfully!
|
|
88
113
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
1 Persistent memory
|
|
114
|
+
24 MCP servers available
|
|
115
|
+
57 AI skills for better coding
|
|
116
|
+
1 Persistent memory system
|
|
92
117
|
|
|
93
|
-
|
|
94
|
-
kimi-mcp-hub init --
|
|
95
|
-
kimi-mcp-hub welcome --
|
|
96
|
-
kimi-mcp-hub status -- status
|
|
97
|
-
kimi-mcp-hub doctor --
|
|
118
|
+
To get started:
|
|
119
|
+
kimi-mcp-hub init -- interactive wizard
|
|
120
|
+
kimi-mcp-hub welcome -- detailed overview
|
|
121
|
+
kimi-mcp-hub status -- status check
|
|
122
|
+
kimi-mcp-hub doctor -- system health check
|
|
98
123
|
```
|
|
99
124
|
|
|
100
125
|
### Run the wizard
|
|
@@ -104,21 +129,23 @@ kimi-mcp-hub init
|
|
|
104
129
|
```
|
|
105
130
|
|
|
106
131
|
This walks you through:
|
|
107
|
-
1. **MCP Servers** -- pick
|
|
132
|
+
1. **MCP Servers** -- Chrome DevTools, Context7, and Playwright are auto-installed if `npx` is available; pick additional services manually
|
|
108
133
|
2. **Skills** -- install AI behavior patterns
|
|
109
134
|
3. **Memory** -- enable persistent cross-session memory
|
|
110
135
|
|
|
136
|
+
|
|
111
137
|
---
|
|
112
138
|
|
|
113
139
|
## Uninstall
|
|
114
140
|
|
|
115
141
|
```bash
|
|
116
142
|
# Full reset
|
|
117
|
-
|
|
118
|
-
rm -
|
|
119
|
-
rm -rf ~/.kimi/
|
|
120
|
-
rm -rf ~/.kimi/mcp-hub/
|
|
143
|
+
rm -f ~/.kimi-code/mcp.json
|
|
144
|
+
rm -rf ~/.kimi-code/skills/
|
|
145
|
+
rm -rf ~/.kimi-mcp-hub/
|
|
121
146
|
rm -rf ~/.config/kimi-mcp-hub/
|
|
147
|
+
rm -f ~/.local/bin/kimi-mcp-hub
|
|
148
|
+
rm -f ~/.local/bin/kmcp
|
|
122
149
|
|
|
123
150
|
# Or use the CLI
|
|
124
151
|
kimi-mcp-hub remove jira # remove one server
|
|
@@ -128,9 +155,8 @@ kimi-mcp-hub remove github # remove another
|
|
|
128
155
|
**Complete reinstall:**
|
|
129
156
|
|
|
130
157
|
```bash
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
pip install --user git+https://github.com/KalimeroMK/kimi-mcp-hub.git
|
|
158
|
+
rm -rf ~/.kimi-code/mcp.json ~/.kimi-code/skills/ ~/.kimi-mcp-hub/
|
|
159
|
+
bash -c "$(curl -fsSL https://raw.githubusercontent.com/KalimeroMK/kimi-mcp-hub/main/install/install.sh)"
|
|
134
160
|
kimi-mcp-hub init
|
|
135
161
|
```
|
|
136
162
|
|
|
@@ -148,9 +174,18 @@ kimi-mcp-hub doctor
|
|
|
148
174
|
# Full interactive setup
|
|
149
175
|
kimi-mcp-hub init
|
|
150
176
|
|
|
177
|
+
# Non-interactive setup (auto-installs core + frontend skills, memory, and claude-compat)
|
|
178
|
+
kimi-mcp-hub init --yes
|
|
179
|
+
|
|
180
|
+
# Auto-load CLAUDE.md and CLAUDE.local.md at every session start
|
|
181
|
+
kimi-mcp-hub claude-compat
|
|
182
|
+
kimi-mcp-hub claude-compat --yes
|
|
183
|
+
|
|
151
184
|
# Add servers individually
|
|
152
185
|
kimi-mcp-hub add jira
|
|
153
186
|
kimi-mcp-hub add github
|
|
187
|
+
kimi-mcp-hub add slack
|
|
188
|
+
kimi-mcp-hub add supabase
|
|
154
189
|
kimi-mcp-hub add perplexity
|
|
155
190
|
kimi-mcp-hub add gitlab
|
|
156
191
|
kimi-mcp-hub add stripe
|
|
@@ -159,20 +194,35 @@ kimi-mcp-hub add desktop-commander
|
|
|
159
194
|
kimi-mcp-hub add dbhub
|
|
160
195
|
kimi-mcp-hub add mobile
|
|
161
196
|
|
|
162
|
-
#
|
|
163
|
-
|
|
197
|
+
# Update to the latest version
|
|
198
|
+
kimi-mcp-hub update
|
|
164
199
|
|
|
165
|
-
#
|
|
166
|
-
kimi-mcp-hub
|
|
167
|
-
kimi-mcp-hub
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
kimi
|
|
200
|
+
# Add and authorize OAuth servers -- like Claude Code CLI
|
|
201
|
+
kimi-mcp-hub add github # choose oauth-device to configure and authorize
|
|
202
|
+
kimi-mcp-hub add figma
|
|
203
|
+
|
|
204
|
+
# GitLab and Stripe are official remote MCP servers; authorize via Kimi CLI:
|
|
205
|
+
# kimi mcp auth gitlab
|
|
206
|
+
# kimi mcp auth stripe
|
|
207
|
+
|
|
208
|
+
# For other official remote MCP servers, Kimi CLI handles the popup:
|
|
209
|
+
# /mcp-config login jira
|
|
210
|
+
# /mcp-config login linear
|
|
211
|
+
# /mcp-config login confluence
|
|
212
|
+
# /mcp-config login supabase
|
|
171
213
|
|
|
172
214
|
# See everything configured
|
|
173
215
|
kimi-mcp-hub list
|
|
174
216
|
kimi-mcp-hub status
|
|
175
217
|
kimi-mcp-hub welcome
|
|
218
|
+
kimi-mcp-hub notify
|
|
219
|
+
|
|
220
|
+
# Fix broken configs after package updates
|
|
221
|
+
kimi-mcp-hub repair
|
|
222
|
+
|
|
223
|
+
# Per-project MCP configuration
|
|
224
|
+
kimi-mcp-hub add --project linear # save to ./.kimi/mcp.json
|
|
225
|
+
kimi-mcp-hub sync # merge project config into global config
|
|
176
226
|
|
|
177
227
|
# Import from Claude Desktop
|
|
178
228
|
kimi-mcp-hub import-claude
|
|
@@ -183,6 +233,232 @@ kimi-mcp-hub install-skill docker-pro
|
|
|
183
233
|
|
|
184
234
|
# Test a server
|
|
185
235
|
kimi-mcp-hub test github
|
|
236
|
+
|
|
237
|
+
# Manage Obsidian vaults for local memory
|
|
238
|
+
kimi-mcp-hub obsidian status
|
|
239
|
+
kimi-mcp-hub obsidian add ~/Documents/MyVault
|
|
240
|
+
kimi-mcp-hub obsidian list
|
|
241
|
+
kimi-mcp-hub obsidian remove myvault
|
|
242
|
+
kimi-mcp-hub obsidian sync-templates myvault
|
|
243
|
+
kimi-mcp-hub obsidian sync-templates --templates-dir ./templates myvault
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
---
|
|
247
|
+
|
|
248
|
+
## Update
|
|
249
|
+
|
|
250
|
+
Update `kimi-mcp-hub` to the latest version in the isolated venv:
|
|
251
|
+
|
|
252
|
+
```bash
|
|
253
|
+
kimi-mcp-hub update
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
This upgrades the package from GitHub (preferred) or PyPI and refreshes the `~/.local/bin` symlinks. Development installs (git checkouts) are detected and skipped.
|
|
257
|
+
|
|
258
|
+
---
|
|
259
|
+
|
|
260
|
+
## Managing MCP Servers and Skills
|
|
261
|
+
|
|
262
|
+
### Skills
|
|
263
|
+
|
|
264
|
+
Skills are toggled **inside Kimi CLI**:
|
|
265
|
+
|
|
266
|
+
```text
|
|
267
|
+
/skill:caveman
|
|
268
|
+
/skill:headroom
|
|
269
|
+
/skill:code-review
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
- Core skills (`karpathy`, `superpowers`, `caveman`, `headroom`, `context-mode`, `cybersecurity`, `kimi-mcp-hub-status`) activate automatically on every Kimi start.
|
|
273
|
+
- Install more skills from the terminal:
|
|
274
|
+
```bash
|
|
275
|
+
kimi-mcp-hub install-skill docker-pro
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
### MCP Servers
|
|
279
|
+
|
|
280
|
+
MCP servers are enabled **outside Kimi CLI**, in your regular terminal:
|
|
281
|
+
|
|
282
|
+
```bash
|
|
283
|
+
# Stdio / API-key servers
|
|
284
|
+
kimi-mcp-hub add github # choose PAT or oauth-device
|
|
285
|
+
kimi-mcp-hub add slack
|
|
286
|
+
|
|
287
|
+
# Official remote OAuth servers can also be connected inside Kimi:
|
|
288
|
+
# /mcp-config login linear
|
|
289
|
+
# /mcp-config login jira
|
|
290
|
+
# /mcp-config login supabase
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
`linear` also supports an API-key stdio mode via `kimi-mcp-hub add linear` → choose `api-key`.
|
|
294
|
+
|
|
295
|
+
When you add an `npx`-based server for the first time, `kimi-mcp-hub` checks if the package is already installed and prompts to install it globally. This prevents the 30-second timeout that can happen when Kimi CLI tries to launch a not-yet-cached npx package.
|
|
296
|
+
|
|
297
|
+
After adding a server, **restart Kimi CLI** (`exit` → `kimi`) so it picks up the new config.
|
|
298
|
+
|
|
299
|
+
For a detailed walkthrough of official remote OAuth servers (Linear, Jira, Confluence, Supabase, Figma, Stripe, GitLab), see [Remote MCP Server Setup](docs/remote-mcp-server-setup.md).
|
|
300
|
+
|
|
301
|
+
---
|
|
302
|
+
|
|
303
|
+
## Obsidian Local Memory
|
|
304
|
+
|
|
305
|
+
Obsidian vaults can be used as local memory and knowledge bases. The `obsidian` command group manages vault paths without needing the full `init` wizard.
|
|
306
|
+
|
|
307
|
+
```bash
|
|
308
|
+
# Show configured vaults and their status
|
|
309
|
+
kimi-mcp-hub obsidian status
|
|
310
|
+
|
|
311
|
+
# Add a vault path (scaffolds the vault if needed)
|
|
312
|
+
kimi-mcp-hub obsidian add ~/Documents/MyVault
|
|
313
|
+
|
|
314
|
+
# List configured vaults
|
|
315
|
+
kimi-mcp-hub obsidian list
|
|
316
|
+
|
|
317
|
+
# Remove a vault from the config by slug (files are kept)
|
|
318
|
+
kimi-mcp-hub obsidian remove myvault
|
|
319
|
+
|
|
320
|
+
# Copy built-in templates into a vault
|
|
321
|
+
kimi-mcp-hub obsidian sync-templates myvault
|
|
322
|
+
|
|
323
|
+
# Copy custom templates into a vault
|
|
324
|
+
kimi-mcp-hub obsidian sync-templates --templates-dir ./templates myvault
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
The first vault added is set as the default memory vault. After adding a vault, restart Kimi CLI so the Obsidian MCP server picks it up.
|
|
328
|
+
|
|
329
|
+
---
|
|
330
|
+
|
|
331
|
+
## Install Claude/Codex Plugins
|
|
332
|
+
|
|
333
|
+
Kimi CLI now supports lifecycle hooks (`PreToolUse`, `PostToolUse`, `Stop`, etc.) via `~/.kimi-code/config.toml`. Because Kimi uses the same JSON wire protocol as Claude Code and Codex, plugins written for those agents can be adapted automatically.
|
|
334
|
+
|
|
335
|
+
```bash
|
|
336
|
+
# Install Ponytail (reduces over-engineering)
|
|
337
|
+
kimi-mcp-hub install-plugin DietrichGebert/ponytail
|
|
338
|
+
|
|
339
|
+
# From a full URL
|
|
340
|
+
kimi-mcp-hub install-plugin https://github.com/DietrichGebert/ponytail
|
|
341
|
+
|
|
342
|
+
# From a local checkout
|
|
343
|
+
kimi-mcp-hub install-plugin ./ponytail
|
|
344
|
+
|
|
345
|
+
# Non-interactive reinstall/update
|
|
346
|
+
kimi-mcp-hub install-plugin DietrichGebert/ponytail --yes
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
`install-plugin` does the following:
|
|
350
|
+
|
|
351
|
+
1. Clones the repo to `~/.config/kimi-mcp-hub/plugins/<name>/` (or copies a local directory)
|
|
352
|
+
2. Discovers the plugin manifest among supported formats:
|
|
353
|
+
- `hooks.json` / `hooks/hooks.json` / `hooks/claude-codex-hooks.json`
|
|
354
|
+
- `.claude/settings.json`
|
|
355
|
+
- `.codex/hooks.json`
|
|
356
|
+
- `.claude-plugin/plugin.json` (Claude marketplace format)
|
|
357
|
+
- `gemini-extension.json`
|
|
358
|
+
3. Converts discovered hooks to Kimi `[[hooks]]` entries in `~/.kimi-code/config.toml`
|
|
359
|
+
4. Expands `${PLUGIN_ROOT}`, `${CLAUDE_PLUGIN_ROOT}`, and `${CLAUDE_CODE_PLUGIN_ROOT}` to the install directory
|
|
360
|
+
5. Relativizes hardcoded absolute paths that still point inside the plugin directory so commands stay portable
|
|
361
|
+
6. Merges the plugin's `AGENTS.md` into `~/.kimi-code/AGENTS.md` (idempotent by marker)
|
|
362
|
+
7. Copies plugin skills into `~/.kimi-code/skills/`
|
|
363
|
+
|
|
364
|
+
**What this unlocks**
|
|
365
|
+
|
|
366
|
+
1. **Ponytail** works immediately — reduces over-engineering in every project.
|
|
367
|
+
2. **Security hooks** — block edits to `.env` files or dangerous `rm` commands.
|
|
368
|
+
3. **Auto-format / auto-lint** hooks after every `WriteFile`.
|
|
369
|
+
4. **Stop hooks** — verify tests passed before the session ends.
|
|
370
|
+
5. `kimi-mcp-hub` becomes a hub for agent extensions, not just an MCP manager.
|
|
371
|
+
|
|
372
|
+
**Tool-name mapping**
|
|
373
|
+
|
|
374
|
+
| Claude/Codex | Kimi matcher |
|
|
375
|
+
|--------------|--------------|
|
|
376
|
+
| `Write` | `WriteFile\|StrReplaceFile` |
|
|
377
|
+
| `Edit` | `Edit\|StrReplaceFile` |
|
|
378
|
+
| `Read` | `ReadFile` |
|
|
379
|
+
| `Bash` | `Shell\|Bash` |
|
|
380
|
+
|
|
381
|
+
After installing a plugin, **restart Kimi CLI** for the hooks to take effect.
|
|
382
|
+
|
|
383
|
+
### Managing installed plugins
|
|
384
|
+
|
|
385
|
+
Plugins installed from GitHub can be updated and removed through the CLI:
|
|
386
|
+
|
|
387
|
+
```bash
|
|
388
|
+
# Pull latest changes for a git plugin, or re-copy a local plugin
|
|
389
|
+
kimi-mcp-hub update-plugin ponytail
|
|
390
|
+
|
|
391
|
+
# Remove a plugin completely
|
|
392
|
+
kimi-mcp-hub uninstall-plugin ponytail
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
`update-plugin` re-runs the install merge, so new hooks, skills, and `AGENTS.md` sections are applied automatically. `uninstall-plugin` removes the plugin directory, deletes its hooks from `~/.kimi-code/config.toml`, removes any skills it installed, and removes its section from `~/.kimi-code/AGENTS.md`.
|
|
396
|
+
|
|
397
|
+
---
|
|
398
|
+
|
|
399
|
+
## Project-Level MCP Configuration
|
|
400
|
+
|
|
401
|
+
If you work on multiple projects that need different MCP accounts, you can store MCP servers inside each project. The example below adds Linear's official remote OAuth server:
|
|
402
|
+
|
|
403
|
+
```bash
|
|
404
|
+
cd my-project
|
|
405
|
+
kimi-mcp-hub add --project linear # choose the default "official-oauth" mode
|
|
406
|
+
kimi-mcp-hub sync
|
|
407
|
+
```
|
|
408
|
+
|
|
409
|
+
This creates:
|
|
410
|
+
|
|
411
|
+
```text
|
|
412
|
+
my-project/
|
|
413
|
+
└── .kimi/
|
|
414
|
+
├── mcp.json # server config
|
|
415
|
+
└── mcp.env # only needed for API-key / stdio servers (add this to .gitignore)
|
|
416
|
+
```
|
|
417
|
+
|
|
418
|
+
`.kimi/mcp.json` example (Linear official remote OAuth — no `env`):
|
|
419
|
+
|
|
420
|
+
```json
|
|
421
|
+
{
|
|
422
|
+
"mcpServers": {
|
|
423
|
+
"linear": {
|
|
424
|
+
"transport": "http",
|
|
425
|
+
"url": "https://mcp.linear.app/mcp",
|
|
426
|
+
"auth": "oauth"
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
```
|
|
431
|
+
|
|
432
|
+
`.kimi/mcp.env` is only required for servers that store secrets in environment variables (for example, API-key stdio servers such as Perplexity or a GitHub PAT). OAuth servers like Linear keep tokens inside Kimi CLI's own secure storage and do not need a project `.env` file.
|
|
433
|
+
|
|
434
|
+
### Switching between projects
|
|
435
|
+
|
|
436
|
+
When you switch projects, run `sync` to rewrite the global `~/.kimi-code/mcp.json` with that project's servers:
|
|
437
|
+
|
|
438
|
+
```bash
|
|
439
|
+
cd project-a && kimi-mcp-hub sync # global config now uses project-a's Linear
|
|
440
|
+
cd project-b && kimi-mcp-hub sync # global config now uses project-b's Linear
|
|
441
|
+
```
|
|
442
|
+
|
|
443
|
+
Project servers override global servers with the same name. Global servers that are not overridden remain available.
|
|
444
|
+
|
|
445
|
+
### Commands with --project
|
|
446
|
+
|
|
447
|
+
```bash
|
|
448
|
+
kimi-mcp-hub init --project # save wizard servers to current project
|
|
449
|
+
kimi-mcp-hub add --project perplexity # add API-key server to current project
|
|
450
|
+
kimi-mcp-hub add --project linear # add official remote OAuth server to current project
|
|
451
|
+
kimi-mcp-hub auth --project figma # authorize and save an OAuth server to current project
|
|
452
|
+
kimi-mcp-hub remove --project perplexity # remove server from current project
|
|
453
|
+
kimi-mcp-hub sync # merge current project into global config
|
|
454
|
+
kimi-mcp-hub sync /path/to/project # merge a specific project
|
|
455
|
+
```
|
|
456
|
+
|
|
457
|
+
|
|
458
|
+
If you have **Desktop Commander** installed, you can also ask Kimi to run the command for you:
|
|
459
|
+
|
|
460
|
+
```text
|
|
461
|
+
run kimi-mcp-hub add linear in the terminal
|
|
186
462
|
```
|
|
187
463
|
|
|
188
464
|
---
|
|
@@ -213,19 +489,43 @@ GitHub authorized successfully!
|
|
|
213
489
|
```
|
|
214
490
|
|
|
215
491
|
| Server | Method | Auto-browser |
|
|
216
|
-
|
|
492
|
+
|--------|------|:-----:|
|
|
217
493
|
| **GitHub** | Device Flow (or PAT fallback) | Yes |
|
|
218
|
-
| **Jira** |
|
|
219
|
-
| **Confluence** |
|
|
220
|
-
| **Slack** | Bot
|
|
494
|
+
| **Jira** | Official MCP OAuth or API token | Yes* |
|
|
495
|
+
| **Confluence** | Official MCP OAuth or API token | Yes* |
|
|
496
|
+
| **Slack** | Bot/User token (`slack-mcp-server`) | Yes |
|
|
221
497
|
| **Figma** | Official OAuth 2.1, PAT or custom OAuth 2.0 | Yes* |
|
|
222
498
|
| **Gmail** | Google OAuth 2.0 or npx | Yes |
|
|
223
499
|
| **Linear** | Official OAuth 2.1 or API key | Yes* |
|
|
224
500
|
| **Stripe** | Official OAuth 2.1 or restricted API key | Yes* |
|
|
225
501
|
| **GitLab** | Official OAuth 2.1 or PAT | Yes* |
|
|
502
|
+
| **Supabase** | Official remote OAuth or access-token stdio | Yes* |
|
|
226
503
|
| **Datadog** | API + App keys | No (manual) |
|
|
227
504
|
|
|
228
|
-
\*
|
|
505
|
+
\* Official remote OAuth 2.1 is initiated by Kimi CLI (`kimi mcp auth <server>` or `/mcp-config login <server>`) after you add the official remote MCP server. For Slack, run `kimi-mcp-hub auth slack` to start the browser-based OAuth flow.
|
|
506
|
+
|
|
507
|
+
---
|
|
508
|
+
|
|
509
|
+
## CLAUDE.md Compatibility
|
|
510
|
+
|
|
511
|
+
If you are migrating from Claude Code or want Kimi to automatically read project instructions, apply the `claude-compat` patch:
|
|
512
|
+
|
|
513
|
+
```bash
|
|
514
|
+
# Interactive
|
|
515
|
+
kimi-mcp-hub claude-compat
|
|
516
|
+
|
|
517
|
+
# Non-interactive (useful in install scripts)
|
|
518
|
+
kimi-mcp-hub claude-compat --yes
|
|
519
|
+
```
|
|
520
|
+
|
|
521
|
+
This appends a block to `~/.kimi-code/AGENTS.md` that tells Kimi to check for two files at the start of every session:
|
|
522
|
+
|
|
523
|
+
| Priority | File | Purpose |
|
|
524
|
+
|----------|------|---------|
|
|
525
|
+
| 1 | `CLAUDE.local.md` | Local overrides — machine-specific, gitignored |
|
|
526
|
+
| 2 | `CLAUDE.md` | Project-wide instructions — committed to the repo |
|
|
527
|
+
|
|
528
|
+
`CLAUDE.local.md` takes precedence over `CLAUDE.md` when they conflict.
|
|
229
529
|
|
|
230
530
|
---
|
|
231
531
|
|
|
@@ -235,23 +535,43 @@ GitHub authorized successfully!
|
|
|
235
535
|
|---------|-------------|
|
|
236
536
|
| `kimi-mcp-hub` | Show welcome banner and status |
|
|
237
537
|
| `kimi-mcp-hub --version` | Show version |
|
|
238
|
-
| `kimi-mcp-hub install` | Install
|
|
538
|
+
| `kimi-mcp-hub install` | Install or update Kimi MCP Hub |
|
|
539
|
+
| `kimi-mcp-hub update` | Update to the latest version |
|
|
239
540
|
| `kimi-mcp-hub init` | Full interactive wizard |
|
|
541
|
+
| `kimi-mcp-hub init --yes` | Non-interactive setup with defaults |
|
|
542
|
+
| `kimi-mcp-hub claude-compat` | Patch AGENTS.md for CLAUDE.md auto-load |
|
|
543
|
+
| `kimi-mcp-hub claude-compat --yes` | Apply patch without confirmation |
|
|
240
544
|
| `kimi-mcp-hub status` | Version, servers, skills, memory |
|
|
241
545
|
| `kimi-mcp-hub welcome` | Detailed welcome banner |
|
|
546
|
+
| `kimi-mcp-hub notify` | Short startup notification for shell wrappers |
|
|
242
547
|
| `kimi-mcp-hub add <server>` | Add an MCP server |
|
|
548
|
+
| `kimi-mcp-hub add obsidian` | Add Obsidian vault as local memory |
|
|
549
|
+
| `kimi-mcp-hub add --project <server>` | Add an MCP server to the current project |
|
|
243
550
|
| `kimi-mcp-hub remove <server>` | Remove an MCP server |
|
|
551
|
+
| `kimi-mcp-hub remove --project <server>` | Remove an MCP server from the current project |
|
|
244
552
|
| `kimi-mcp-hub auth <server>` | OAuth with auto-browser |
|
|
553
|
+
| `kimi-mcp-hub auth --project <server>` | OAuth and save to the current project |
|
|
554
|
+
| `kimi-mcp-hub sync` | Merge project `.kimi/mcp.json` into global config |
|
|
555
|
+
| `kimi-mcp-hub repair` | Fix broken/outdated server configs |
|
|
245
556
|
| `kimi-mcp-hub import-claude` | Import from Claude Desktop |
|
|
557
|
+
| `kimi-mcp-hub install-plugin <repo>` | Install Claude/Codex plugin into Kimi |
|
|
558
|
+
| `kimi-mcp-hub install-plugin <repo> --yes` | Install plugin without confirmation |
|
|
559
|
+
| `kimi-mcp-hub update-plugin <name>` | Update an installed plugin |
|
|
560
|
+
| `kimi-mcp-hub uninstall-plugin <name>` | Remove an installed plugin and its artifacts |
|
|
246
561
|
| `kimi-mcp-hub list` | All servers + skills + memory |
|
|
247
|
-
| `kimi-mcp-hub list-skills` | All
|
|
562
|
+
| `kimi-mcp-hub list-skills` | All 57 available skills |
|
|
248
563
|
| `kimi-mcp-hub install-skill <name>` | Install a skill |
|
|
249
|
-
| `kimi-mcp-hub test <server>` |
|
|
564
|
+
| `kimi-mcp-hub test <server>` | Check if server binary/HTTP endpoint is configured |
|
|
250
565
|
| `kimi-mcp-hub doctor` | System health check |
|
|
566
|
+
| `kimi-mcp-hub obsidian status` | Show configured Obsidian vaults |
|
|
567
|
+
| `kimi-mcp-hub obsidian add <path>` | Add an Obsidian vault path |
|
|
568
|
+
| `kimi-mcp-hub obsidian list` | List configured Obsidian vaults |
|
|
569
|
+
| `kimi-mcp-hub obsidian remove <slug>` | Remove an Obsidian vault from config |
|
|
570
|
+
| `kimi-mcp-hub obsidian sync-templates [--templates-dir PATH] <vault-slug>` | Copy templates into a vault |
|
|
251
571
|
|
|
252
572
|
---
|
|
253
573
|
|
|
254
|
-
##
|
|
574
|
+
## 24 MCP Servers
|
|
255
575
|
|
|
256
576
|
| Server | Auth | Tools | Best for |
|
|
257
577
|
|--------|------|:-----:|----------|
|
|
@@ -259,8 +579,9 @@ GitHub authorized successfully!
|
|
|
259
579
|
| **Linear** | Official OAuth 2.1 or API key | 6 | Issues, projects, teams |
|
|
260
580
|
| **Confluence** | OAuth or API token | 5 | Docs, wiki, pages |
|
|
261
581
|
| **GitHub** | Device Flow / PAT | 6 | Repos, PRs, issues, code |
|
|
262
|
-
| **Slack** |
|
|
263
|
-
| **
|
|
582
|
+
| **Slack** | Bot/User token (`slack-mcp-server`) | 5 | Channels, DMs, search |
|
|
583
|
+
| **Obsidian** | STDIO (npx) — vault path | 4 | Local memory, notes, knowledge base |
|
|
584
|
+
| **Datadog** | Official remote MCP (API + App keys) | 12 | Metrics, logs, monitors, APM |
|
|
264
585
|
| **Figma** | Official OAuth 2.1, PAT or custom OAuth | 9 | Designs, tokens, components |
|
|
265
586
|
| **Figma Context** | Figma API access token | 3 | Design-to-code implementation |
|
|
266
587
|
| **GitLab** | Official OAuth 2.1 or PAT | 8 | Repos, MRs, issues, CI/CD pipelines |
|
|
@@ -276,69 +597,141 @@ GitHub authorized successfully!
|
|
|
276
597
|
| **Playwright** | STDIO (Node.js) | 8 | Browser automation, E2E testing, screenshots |
|
|
277
598
|
| **Sentry** | Auth token + org | 6 | Error tracking, issue triage, stack traces |
|
|
278
599
|
| **Context7** | STDIO (npx) | 4 | Live library docs, version-aware API lookup |
|
|
279
|
-
| **Supabase** |
|
|
280
|
-
| **Perplexity** | **API key (
|
|
600
|
+
| **Supabase** | Official remote OAuth or access-token stdio | 6 | Database, auth, storage, realtime, edge functions |
|
|
601
|
+
| **Perplexity** | **API key (paid, $5 trial credit)** | **3** | **Real-time web search with AI summaries + citations** |
|
|
281
602
|
|
|
282
603
|
---
|
|
283
604
|
|
|
284
|
-
##
|
|
605
|
+
## 57 Skills
|
|
285
606
|
|
|
286
607
|
### Core Skills (installed by default)
|
|
287
608
|
|
|
288
|
-
| Skill | Description |
|
|
289
|
-
|
|
290
|
-
| **karpathy** | Clean, simple, readable code
|
|
291
|
-
| **superpowers** | 14 agentic
|
|
292
|
-
| **headroom** | Compress tool outputs
|
|
293
|
-
| **context-mode** | Context window optimization
|
|
294
|
-
| **cybersecurity** |
|
|
295
|
-
| **
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
| **
|
|
303
|
-
| **
|
|
304
|
-
| **
|
|
305
|
-
| **
|
|
306
|
-
| **
|
|
307
|
-
| **
|
|
308
|
-
| **
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
|
313
|
-
|
|
314
|
-
| **code-
|
|
315
|
-
| **
|
|
316
|
-
| **
|
|
317
|
-
| **
|
|
318
|
-
| **
|
|
319
|
-
| **
|
|
320
|
-
| **
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
|
609
|
+
| Skill | Description |
|
|
610
|
+
|-------|-------------|
|
|
611
|
+
| **karpathy** | Clean, simple, readable code discipline |
|
|
612
|
+
| **superpowers** | 14 agentic workflows (plan, debug, test, deploy...) |
|
|
613
|
+
| **headroom** | Compress large tool outputs to save tokens |
|
|
614
|
+
| **context-mode** | Context window optimization and token budget |
|
|
615
|
+
| **cybersecurity** | Cybersecurity expert (OWASP, cloud, IR, pentest) |
|
|
616
|
+
| **caveman** | Ultra-compressed caveman communication mode |
|
|
617
|
+
| **kimi-mcp-hub-status** | Show MCP Hub version and status |
|
|
618
|
+
|
|
619
|
+
### Frontend Skills (installed as a stack by default)
|
|
620
|
+
|
|
621
|
+
| Skill | Description |
|
|
622
|
+
|-------|-------------|
|
|
623
|
+
| **react-coder** | React 19 specialist (RSC, hooks) |
|
|
624
|
+
| **ts-coder** | TypeScript specialist (strict, generics) |
|
|
625
|
+
| **ui-engineer** | UI component implementation (Tailwind, a11y) |
|
|
626
|
+
| **ui-ux-pro-max** | UI/UX design intelligence and design systems |
|
|
627
|
+
| **vercel-react-best-practices** | React/Next.js performance optimization |
|
|
628
|
+
| **web-design-guidelines** | Audit UI code against Vercel guidelines |
|
|
629
|
+
| **agent-browser** | Browser automation for web tasks and testing |
|
|
630
|
+
|
|
631
|
+
### Code Quality & Review Skills
|
|
632
|
+
|
|
633
|
+
| Skill | Description |
|
|
634
|
+
|-------|-------------|
|
|
635
|
+
| **code-reviewer** | Quick single-agent code review |
|
|
636
|
+
| **code-review** | Multi-agent code review (explore/coder/plan) |
|
|
637
|
+
| **surgical-refactoring** | Surgical code refactoring without behavior change |
|
|
638
|
+
| **tdd** | Test-driven development with red-green-refactor |
|
|
639
|
+
| **perf-optimization** | Performance profiling and optimization |
|
|
640
|
+
| **security-audit** | Security review checklist |
|
|
641
|
+
| **security-guidance** | 3-layer security scanning guidance |
|
|
642
|
+
|
|
643
|
+
### Architecture & Design Skills
|
|
644
|
+
|
|
645
|
+
| Skill | Description |
|
|
646
|
+
|-------|-------------|
|
|
647
|
+
| **api-designer** | REST/GraphQL API design |
|
|
648
|
+
| **backend-architect** | Backend architecture and system design |
|
|
649
|
+
| **backend-typescript-architect** | TypeScript/Bun backend architecture |
|
|
650
|
+
| **codebase-design** | Design deep modules and testable interfaces |
|
|
651
|
+
| **domain-modeling** | Build domain models and ubiquitous language |
|
|
652
|
+
| **database-expert** | Database design and optimization |
|
|
653
|
+
| **design-system** | Design tokens, component specs, and systematic design systems |
|
|
654
|
+
| **api-design** | REST API design patterns |
|
|
655
|
+
|
|
656
|
+
### DevOps & Deployment Skills
|
|
657
|
+
|
|
658
|
+
| Skill | Description |
|
|
659
|
+
|-------|-------------|
|
|
660
|
+
| **docker-pro** | Docker and Kubernetes best practices |
|
|
661
|
+
| **gitnexus** | Code knowledge graph and blast radius |
|
|
662
|
+
| **resolving-merge-conflicts** | Resolve git merge/rebase conflicts |
|
|
663
|
+
| **deployment-patterns** | CI/CD and deployment best practices |
|
|
664
|
+
|
|
665
|
+
### Language / Framework Skills
|
|
666
|
+
|
|
667
|
+
| Skill | Description |
|
|
668
|
+
|-------|-------------|
|
|
669
|
+
| **python-engineer** | Python specialist (FastAPI, Django, async) |
|
|
670
|
+
| **laravel-engineer** | Laravel specialist (Eloquent, Blade, Livewire) |
|
|
671
|
+
| **php-pro** | Senior PHP development (strict typing, Laravel/Symfony, PSR) |
|
|
672
|
+
| **wp-plugin-development** | WordPress plugin development with hooks and Settings API |
|
|
673
|
+
| **react-coder** | React 19 specialist (RSC, hooks) |
|
|
674
|
+
| **ts-coder** | TypeScript specialist (strict, generics) |
|
|
675
|
+
| **ui-engineer** | UI component implementation (Tailwind, a11y) |
|
|
676
|
+
| **ui-ux-pro-max** | UI/UX design intelligence and design systems |
|
|
677
|
+
|
|
678
|
+
### Data & Migrations Skills
|
|
679
|
+
|
|
680
|
+
| Skill | Description |
|
|
681
|
+
|-------|-------------|
|
|
682
|
+
| **database-migrations** | Safe database migration patterns |
|
|
683
|
+
|
|
684
|
+
### Testing & Browser Skills
|
|
685
|
+
|
|
686
|
+
| Skill | Description |
|
|
687
|
+
|-------|-------------|
|
|
688
|
+
| **playwright-best-practices** | Playwright testing best practices |
|
|
689
|
+
| **chrome-devtools-skill** | Chrome DevTools MCP debugging and automation |
|
|
690
|
+
|
|
691
|
+
### Research & Automation Skills
|
|
692
|
+
|
|
693
|
+
| Skill | Description |
|
|
694
|
+
|-------|-------------|
|
|
695
|
+
| **search-first** | Research-before-coding workflow |
|
|
696
|
+
| **regex-vs-llm-structured-text** | Regex vs LLM parsing decision framework |
|
|
697
|
+
|
|
698
|
+
### Productivity & Meta Skills
|
|
699
|
+
|
|
700
|
+
| Skill | Description |
|
|
701
|
+
|-------|-------------|
|
|
702
|
+
| **claude-compat** | Auto-load CLAUDE.md and CLAUDE.local.md at session start |
|
|
703
|
+
| **caveman-review** | Ultra-compressed code review comments |
|
|
704
|
+
| **caveman-commit** | Ultra-compressed Conventional Commits messages |
|
|
705
|
+
| **memory-palace** | Advanced memory and context retrieval |
|
|
706
|
+
| **hindsight** | Memory that learns from past decisions |
|
|
707
|
+
| **task-master** | Task management system |
|
|
708
|
+
| **ralph** | Autonomous loop with stop-hooks |
|
|
709
|
+
| **grill-me** | Stress-test a plan or design |
|
|
710
|
+
| **visual-explainer** | HTML diagrams and slides |
|
|
711
|
+
| **research-mode** | Research-driven development |
|
|
712
|
+
| **ecc** | Engineering competence (perf, security, research) |
|
|
713
|
+
| **skill-creator** | Create and optimize agent skills |
|
|
714
|
+
| **agent-automation-recommender** | Recommend agent automations for codebases |
|
|
715
|
+
| **find-skills** | Discover and install agent skills |
|
|
716
|
+
|
|
717
|
+
### Integration Skills
|
|
718
|
+
|
|
719
|
+
| Skill | Description |
|
|
720
|
+
|-------|-------------|
|
|
721
|
+
| **stripe-best-practices** | Stripe integration best practices |
|
|
325
722
|
|
|
326
723
|
---
|
|
327
724
|
|
|
328
|
-
##
|
|
725
|
+
## Testing
|
|
329
726
|
|
|
330
|
-
|
|
727
|
+
The test suite lives in `tests/`:
|
|
728
|
+
|
|
729
|
+
```bash
|
|
730
|
+
pytest -q
|
|
731
|
+
```
|
|
331
732
|
|
|
332
|
-
|
|
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 |
|
|
733
|
+
- `tests/test_integration.py` covers end-to-end flows such as `init --yes`, server `add`, `remove`, and `test`.
|
|
734
|
+
- Unit tests cover config handling, Obsidian vault management, and the plugin installer.
|
|
342
735
|
|
|
343
736
|
---
|
|
344
737
|
|
|
@@ -351,21 +744,29 @@ Features we adopted from the 81k-star `claude-mem` project:
|
|
|
351
744
|
| | (no args) -> welcome banner | |
|
|
352
745
|
| | install -> PyPI/GitHub update | |
|
|
353
746
|
| | init -> interactive wizard | |
|
|
354
|
-
| | add -> writes ~/.kimi
|
|
747
|
+
| | add -> writes ~/.kimi-code/...| |
|
|
748
|
+
| | add --project -> writes ./.kimi| |
|
|
749
|
+
| | sync -> merge project + global | |
|
|
355
750
|
| | auth -> OAuth + auto browser | |
|
|
751
|
+
| | repair -> fix broken configs | |
|
|
356
752
|
| | import-claude -> migrate config| |
|
|
357
753
|
| | list -> pretty table of tools | |
|
|
358
754
|
| | status -> version + health | |
|
|
359
755
|
| | welcome -> full info display | |
|
|
756
|
+
| | notify -> startup notification | |
|
|
360
757
|
| +---------------------------------+ |
|
|
361
758
|
| | |
|
|
362
759
|
| +---------------------------------+ |
|
|
363
|
-
| | ~/.kimi/mcp.json
|
|
364
|
-
| |
|
|
365
|
-
| |
|
|
760
|
+
| | Global: ~/.kimi-code/mcp.json | |
|
|
761
|
+
| | Project: ./.kimi/mcp.json | |
|
|
762
|
+
| | Project secrets: ./.kimi/mcp.env| |
|
|
763
|
+
| | ~/.kimi-code/skills/ (57 skills)| |
|
|
764
|
+
| | <config-dir>/kimi-mcp-hub/ | |
|
|
765
|
+
| | tokens.json + memory.db | |
|
|
366
766
|
| +---------------------------------+ |
|
|
367
767
|
| | |
|
|
368
|
-
|
|
|
768
|
+
| Optional shell wrapper prints notify |
|
|
769
|
+
| on every `kimi` start |
|
|
369
770
|
| | |
|
|
370
771
|
| Kimi CLI reads config |
|
|
371
772
|
| | |
|
|
@@ -379,9 +780,10 @@ Features we adopted from the 81k-star `claude-mem` project:
|
|
|
379
780
|
|
|
380
781
|
## Security Notes
|
|
381
782
|
|
|
382
|
-
-
|
|
783
|
+
- On macOS and Linux, sensitive files (`tokens.json`, `memory.db`, and `~/.kimi-code/mcp.json`) are written with `chmod 600` (owner read/write only).
|
|
784
|
+
- Run `kimi-mcp-hub doctor` to detect and fix overly permissive files.
|
|
785
|
+
- OAuth tokens are still stored as plain JSON inside those files. This keeps the tool dependency-free, but a process running as your user can read them while Kimi CLI is active.
|
|
383
786
|
- 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
787
|
|
|
386
788
|
---
|
|
387
789
|
|
package/install/install.ps1
CHANGED
|
@@ -1,37 +1,60 @@
|
|
|
1
1
|
# Kimi MCP Hub - One-line installer for Windows (PowerShell)
|
|
2
|
-
# Usage:
|
|
2
|
+
# Usage:
|
|
3
|
+
# iwr -useb https://raw.githubusercontent.com/KalimeroMK/kimi-mcp-hub/main/install/install.ps1 | iex
|
|
4
|
+
# iwr -useb https://raw.githubusercontent.com/KalimeroMK/kimi-mcp-hub/main/install/install.ps1 | & ([scriptblock]::create($_)) -Yes
|
|
5
|
+
# iwr -useb https://raw.githubusercontent.com/KalimeroMK/kimi-mcp-hub/main/install/install.ps1 | & ([scriptblock]::create($_)) -Yes -WithObsidian
|
|
6
|
+
|
|
7
|
+
[CmdletBinding()]
|
|
8
|
+
param(
|
|
9
|
+
[switch]$Yes,
|
|
10
|
+
[switch]$WithObsidian,
|
|
11
|
+
[string]$ObsidianVault = "$env:USERPROFILE\Documents\Kimi-Memory"
|
|
12
|
+
)
|
|
3
13
|
|
|
4
14
|
$REPO = "KalimeroMK/kimi-mcp-hub"
|
|
5
15
|
$INSTALL_DIR = if ($env:KIMI_MCP_HUB_DIR) { $env:KIMI_MCP_HUB_DIR } else { "$env:USERPROFILE\.kimi-mcp-hub" }
|
|
16
|
+
$VENV_DIR = "$INSTALL_DIR\.venv"
|
|
6
17
|
|
|
7
18
|
function Write-Header {
|
|
8
19
|
Write-Host ""
|
|
9
20
|
Write-Host " KIMI MCP HUB" -ForegroundColor Cyan -NoNewline
|
|
10
21
|
Write-Host " - One-click MCP server & skills manager" -ForegroundColor Gray
|
|
11
|
-
Write-Host "
|
|
22
|
+
Write-Host " 24 MCP Servers | 57 AI Skills | Persistent Memory" -ForegroundColor DarkGray
|
|
12
23
|
Write-Host ""
|
|
13
24
|
}
|
|
14
25
|
|
|
15
26
|
function Check-Requirements {
|
|
16
27
|
Write-Host "Checking requirements..." -ForegroundColor Cyan
|
|
17
28
|
|
|
18
|
-
# Check Python
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
29
|
+
# Check Python (prefer 3.10+)
|
|
30
|
+
$PYTHON = $null
|
|
31
|
+
foreach ($py in @("python3.13", "python3.12", "python3.11", "python3.10", "python", "python3")) {
|
|
32
|
+
if (Get-Command $py -ErrorAction SilentlyContinue) {
|
|
33
|
+
$verStr = (& $py --version 2>&1).ToString()
|
|
34
|
+
if ($verStr -match "Python (\d+)\.(\d+)") {
|
|
35
|
+
$major = [int]$matches[1]
|
|
36
|
+
$minor = [int]$matches[2]
|
|
37
|
+
if ($major -gt 3 -or ($major -eq 3 -and $minor -ge 10)) {
|
|
38
|
+
$PYTHON = $py
|
|
39
|
+
$pyVersion = "$major.$minor"
|
|
40
|
+
break
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
if (-not $PYTHON) {
|
|
26
47
|
Write-Host " Python 3.10+ is required. Install from https://python.org/downloads" -ForegroundColor Red
|
|
27
48
|
exit 1
|
|
28
49
|
}
|
|
50
|
+
$script:PYTHON = $PYTHON
|
|
51
|
+
Write-Host " Python $pyVersion found" -ForegroundColor Green
|
|
29
52
|
|
|
30
53
|
# Check pip
|
|
31
|
-
if (
|
|
54
|
+
if (& $PYTHON -m pip --version -ErrorAction SilentlyContinue) {
|
|
32
55
|
Write-Host " pip found" -ForegroundColor Green
|
|
33
56
|
} else {
|
|
34
|
-
Write-Host " pip not found. Run:
|
|
57
|
+
Write-Host " pip not found. Run: $PYTHON -m ensurepip --upgrade" -ForegroundColor Red
|
|
35
58
|
exit 1
|
|
36
59
|
}
|
|
37
60
|
|
|
@@ -44,6 +67,29 @@ function Check-Requirements {
|
|
|
44
67
|
}
|
|
45
68
|
}
|
|
46
69
|
|
|
70
|
+
function New-VirtualEnvironment {
|
|
71
|
+
Write-Host "Ensuring isolated Python environment..." -ForegroundColor Cyan
|
|
72
|
+
New-Item -ItemType Directory -Force -Path $INSTALL_DIR | Out-Null
|
|
73
|
+
if (Test-Path $VENV_DIR) {
|
|
74
|
+
Remove-Item -Recurse -Force $VENV_DIR
|
|
75
|
+
}
|
|
76
|
+
& $script:PYTHON -m venv $VENV_DIR
|
|
77
|
+
& "$VENV_DIR\Scripts\python.exe" -m pip install --upgrade pip setuptools wheel
|
|
78
|
+
Write-Host " Virtual environment ready" -ForegroundColor Green
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function Add-ToPath {
|
|
82
|
+
$venvScripts = "$VENV_DIR\Scripts"
|
|
83
|
+
$currentPath = [Environment]::GetEnvironmentVariable("Path", "User")
|
|
84
|
+
if ($currentPath -notlike "*$venvScripts*") {
|
|
85
|
+
[Environment]::SetEnvironmentVariable("Path", "$venvScripts;$currentPath", "User")
|
|
86
|
+
Write-Host " Added $venvScripts to user PATH" -ForegroundColor Green
|
|
87
|
+
Write-Host " Restart your terminal for PATH changes to take effect." -ForegroundColor Yellow
|
|
88
|
+
}
|
|
89
|
+
# Also add to current process PATH so the rest of the script can use it
|
|
90
|
+
$env:Path = "$venvScripts;$env:Path"
|
|
91
|
+
}
|
|
92
|
+
|
|
47
93
|
function Install-FromGitHub {
|
|
48
94
|
Write-Host "Installing from GitHub..." -ForegroundColor Cyan
|
|
49
95
|
|
|
@@ -55,14 +101,17 @@ function Install-FromGitHub {
|
|
|
55
101
|
git clone --depth 1 "https://github.com/$REPO.git" $INSTALL_DIR
|
|
56
102
|
Write-Host " Cloned to $INSTALL_DIR" -ForegroundColor Green
|
|
57
103
|
|
|
58
|
-
|
|
59
|
-
|
|
104
|
+
New-VirtualEnvironment
|
|
105
|
+
& "$VENV_DIR\Scripts\pip.exe" install --upgrade -e $INSTALL_DIR
|
|
106
|
+
Add-ToPath
|
|
60
107
|
Write-Host " Package installed" -ForegroundColor Green
|
|
61
108
|
}
|
|
62
109
|
|
|
63
110
|
function Install-PipGit {
|
|
64
111
|
Write-Host "Installing directly from GitHub (pip)..." -ForegroundColor Cyan
|
|
65
|
-
|
|
112
|
+
New-VirtualEnvironment
|
|
113
|
+
& "$VENV_DIR\Scripts\pip.exe" install --upgrade "git+https://github.com/$REPO.git"
|
|
114
|
+
Add-ToPath
|
|
66
115
|
Write-Host " Installed from GitHub" -ForegroundColor Green
|
|
67
116
|
}
|
|
68
117
|
|
|
@@ -83,10 +132,86 @@ function Show-Welcome {
|
|
|
83
132
|
Write-Host " /mcp # List available tools"
|
|
84
133
|
Write-Host " /skills # List installed skills"
|
|
85
134
|
Write-Host ""
|
|
135
|
+
if ($Yes) {
|
|
136
|
+
Write-Host "Install with auto CLAUDE.md support:" -ForegroundColor Cyan
|
|
137
|
+
Write-Host " iwr -useb .../install.ps1 | & ([scriptblock]::create(`$_)) -Yes"
|
|
138
|
+
Write-Host ""
|
|
139
|
+
}
|
|
140
|
+
if ($WithObsidian) {
|
|
141
|
+
Write-Host "Install with Obsidian local memory:" -ForegroundColor Cyan
|
|
142
|
+
Write-Host " iwr -useb .../install.ps1 | & ([scriptblock]::create(`$_)) -Yes -WithObsidian"
|
|
143
|
+
Write-Host ""
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
function Apply-ClaudeCompat {
|
|
148
|
+
Write-Host "Applying claude-compat patch (auto-load CLAUDE.md and CLAUDE.local.md)..." -ForegroundColor Cyan
|
|
149
|
+
$kimi = Get-Command kimi-mcp-hub -ErrorAction SilentlyContinue
|
|
150
|
+
if ($kimi) {
|
|
151
|
+
& kimi-mcp-hub claude-compat --yes
|
|
152
|
+
} else {
|
|
153
|
+
Write-Host " kimi-mcp-hub not found in PATH. Skipping claude-compat patch." -ForegroundColor Yellow
|
|
154
|
+
Write-Host " Run manually after adding it to PATH: kimi-mcp-hub claude-compat --yes" -ForegroundColor Gray
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
function Setup-ObsidianMcp {
|
|
159
|
+
Write-Host "Setting up Obsidian as local memory..." -ForegroundColor Cyan
|
|
160
|
+
|
|
161
|
+
if (-not $Yes -and [console]::IsInputRedirected -eq $false) {
|
|
162
|
+
$inputVault = Read-Host "Obsidian vault path [$ObsidianVault]"
|
|
163
|
+
if ($inputVault) { $ObsidianVault = $inputVault }
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
New-Item -ItemType Directory -Force -Path "$ObsidianVault\.obsidian" | Out-Null
|
|
167
|
+
|
|
168
|
+
# obsidian-mcp requires at least app.json to consider this a valid vault
|
|
169
|
+
if (-not (Test-Path "$ObsidianVault\.obsidian\app.json")) {
|
|
170
|
+
'{}' | Set-Content -Path "$ObsidianVault\.obsidian\app.json" -Encoding UTF8
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
if (-not (Test-Path "$ObsidianVault\README.md")) {
|
|
174
|
+
@"
|
|
175
|
+
# Kimi Memory Vault
|
|
176
|
+
|
|
177
|
+
This vault is used by Kimi CLI as local memory.
|
|
178
|
+
|
|
179
|
+
- Notes created by Kimi are stored here.
|
|
180
|
+
- Open this folder in Obsidian to browse and edit.
|
|
181
|
+
- Source: https://obsidian.md
|
|
182
|
+
"@ | Set-Content -Path "$ObsidianVault\README.md" -Encoding UTF8
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
$mcpJson = "$env:USERPROFILE\.kimi-code\mcp.json"
|
|
186
|
+
New-Item -ItemType Directory -Force -Path (Split-Path $mcpJson) | Out-Null
|
|
187
|
+
$data = @{ mcpServers = @{} }
|
|
188
|
+
if (Test-Path $mcpJson) {
|
|
189
|
+
try {
|
|
190
|
+
$data = Get-Content $mcpJson -Raw | ConvertFrom-Json -AsHashtable
|
|
191
|
+
} catch {
|
|
192
|
+
$data = @{ mcpServers = @{} }
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
if (-not $data.ContainsKey("mcpServers")) { $data["mcpServers"] = @{} }
|
|
196
|
+
$data["mcpServers"]["obsidian"] = @{
|
|
197
|
+
command = "npx"
|
|
198
|
+
args = @("-y", "obsidian-mcp", $ObsidianVault)
|
|
199
|
+
env = @{}
|
|
200
|
+
}
|
|
201
|
+
$data | ConvertTo-Json -Depth 10 | Set-Content -Path $mcpJson -Encoding UTF8
|
|
202
|
+
|
|
203
|
+
Write-Host " Obsidian vault ready: $ObsidianVault" -ForegroundColor Green
|
|
204
|
+
Write-Host " Install Obsidian from https://obsidian.md and open this vault." -ForegroundColor Gray
|
|
86
205
|
}
|
|
87
206
|
|
|
88
207
|
# Main
|
|
89
208
|
Write-Header
|
|
90
209
|
Check-Requirements
|
|
91
210
|
Install-PipGit
|
|
211
|
+
if ($Yes) {
|
|
212
|
+
Apply-ClaudeCompat
|
|
213
|
+
}
|
|
214
|
+
if ($WithObsidian) {
|
|
215
|
+
Setup-ObsidianMcp
|
|
216
|
+
}
|
|
92
217
|
Show-Welcome
|
package/install/install.sh
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# Kimi MCP Hub - One-line installer
|
|
3
3
|
# Usage: curl -fsSL https://raw.githubusercontent.com/KalimeroMK/kimi-mcp-hub/main/install/install.sh | bash
|
|
4
|
+
# Usage with Obsidian: curl -fsSL .../install.sh | bash -s -- --with-obsidian
|
|
4
5
|
|
|
5
6
|
set -e
|
|
6
7
|
|
|
7
8
|
REPO="KalimeroMK/kimi-mcp-hub"
|
|
8
9
|
INSTALL_DIR="${KIMI_MCP_HUB_DIR:-$HOME/.kimi-mcp-hub}"
|
|
10
|
+
VENV_DIR="$INSTALL_DIR/.venv"
|
|
9
11
|
BIN_DIR="${KIMI_MCP_HUB_BIN:-$HOME/.local/bin}"
|
|
12
|
+
DEFAULT_VAULT="$HOME/Documents/Kimi-Memory"
|
|
10
13
|
|
|
11
14
|
# Colors
|
|
12
15
|
RED='\033[0;31m'
|
|
@@ -19,7 +22,7 @@ NC='\033[0m'
|
|
|
19
22
|
print_header() {
|
|
20
23
|
echo ""
|
|
21
24
|
echo -e "${CYAN} KIMI MCP HUB${NC} - One-click MCP server & skills manager"
|
|
22
|
-
echo -e "${DIM}
|
|
25
|
+
echo -e "${DIM} 24 MCP Servers | 57 AI Skills | Persistent Memory${NC}"
|
|
23
26
|
echo ""
|
|
24
27
|
}
|
|
25
28
|
|
|
@@ -42,18 +45,27 @@ print_error() {
|
|
|
42
45
|
check_requirements() {
|
|
43
46
|
print_info "Checking requirements..."
|
|
44
47
|
|
|
45
|
-
# Check Python
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
# Check Python (prefer 3.10+ specifically)
|
|
49
|
+
PYTHON=""
|
|
50
|
+
for py in python3.13 python3.12 python3.11 python3.10 python3 python; do
|
|
51
|
+
if command -v "$py" &>/dev/null; then
|
|
52
|
+
ver=$($py --version 2>&1 | cut -d' ' -f2)
|
|
53
|
+
major=$(echo "$ver" | cut -d'.' -f1)
|
|
54
|
+
minor=$(echo "$ver" | cut -d'.' -f2)
|
|
55
|
+
if [ "$major" -gt 3 ] || { [ "$major" -eq 3 ] && [ "$minor" -ge 10 ]; }; then
|
|
56
|
+
PYTHON="$py"
|
|
57
|
+
PYTHON_VERSION="$ver"
|
|
58
|
+
break
|
|
59
|
+
fi
|
|
60
|
+
fi
|
|
61
|
+
done
|
|
62
|
+
|
|
63
|
+
if [ -z "$PYTHON" ]; then
|
|
51
64
|
print_error "Python 3.10+ is required but not found."
|
|
52
65
|
echo " Install from: https://python.org/downloads"
|
|
53
66
|
exit 1
|
|
54
67
|
fi
|
|
55
68
|
|
|
56
|
-
PYTHON_VERSION=$($PYTHON --version 2>&1 | cut -d' ' -f2)
|
|
57
69
|
print_success "Python $PYTHON_VERSION found"
|
|
58
70
|
|
|
59
71
|
# Check pip
|
|
@@ -119,9 +131,31 @@ add_to_path() {
|
|
|
119
131
|
fi
|
|
120
132
|
}
|
|
121
133
|
|
|
134
|
+
create_venv() {
|
|
135
|
+
print_info "Ensuring isolated Python environment..."
|
|
136
|
+
mkdir -p "$INSTALL_DIR"
|
|
137
|
+
if [ ! -d "$VENV_DIR/bin" ]; then
|
|
138
|
+
$PYTHON -m venv "$VENV_DIR"
|
|
139
|
+
fi
|
|
140
|
+
"$VENV_DIR/bin/pip" install --upgrade pip setuptools wheel
|
|
141
|
+
print_success "Virtual environment ready"
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
link_binaries() {
|
|
145
|
+
mkdir -p "$BIN_DIR"
|
|
146
|
+
if [ -f "$VENV_DIR/bin/kimi-mcp-hub" ]; then
|
|
147
|
+
ln -sf "$VENV_DIR/bin/kimi-mcp-hub" "$BIN_DIR/kimi-mcp-hub"
|
|
148
|
+
fi
|
|
149
|
+
if [ -f "$VENV_DIR/bin/kmcp" ]; then
|
|
150
|
+
ln -sf "$VENV_DIR/bin/kmcp" "$BIN_DIR/kmcp"
|
|
151
|
+
fi
|
|
152
|
+
}
|
|
153
|
+
|
|
122
154
|
install_from_pypi() {
|
|
123
155
|
print_info "Installing kimi-mcp-hub from PyPI..."
|
|
124
|
-
|
|
156
|
+
create_venv
|
|
157
|
+
"$VENV_DIR/bin/pip" install --upgrade kimi-mcp-hub
|
|
158
|
+
link_binaries
|
|
125
159
|
print_success "Installed from PyPI"
|
|
126
160
|
}
|
|
127
161
|
|
|
@@ -137,31 +171,30 @@ install_from_github() {
|
|
|
137
171
|
print_success "Cloned to $INSTALL_DIR"
|
|
138
172
|
|
|
139
173
|
print_info "Installing package..."
|
|
140
|
-
|
|
141
|
-
$
|
|
174
|
+
create_venv
|
|
175
|
+
"$VENV_DIR/bin/pip" install --upgrade -e "$INSTALL_DIR"
|
|
176
|
+
link_binaries
|
|
142
177
|
print_success "Package installed"
|
|
143
178
|
}
|
|
144
179
|
|
|
145
180
|
install_pip_git() {
|
|
146
181
|
print_info "Installing directly from GitHub (pip)..."
|
|
147
|
-
|
|
182
|
+
create_venv
|
|
183
|
+
"$VENV_DIR/bin/pip" install --upgrade "git+https://github.com/$REPO.git"
|
|
184
|
+
link_binaries
|
|
148
185
|
print_success "Installed from GitHub"
|
|
149
186
|
}
|
|
150
187
|
|
|
151
188
|
post_install() {
|
|
152
189
|
print_info "Running post-install setup..."
|
|
153
190
|
|
|
154
|
-
# Ensure
|
|
155
|
-
|
|
191
|
+
# Ensure binaries are linked
|
|
192
|
+
link_binaries
|
|
156
193
|
|
|
157
194
|
# Check if kimi-mcp-hub is in PATH
|
|
158
195
|
if ! command -v kimi-mcp-hub &>/dev/null; then
|
|
159
|
-
|
|
160
|
-
|
|
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"
|
|
196
|
+
if [ -f "$BIN_DIR/kimi-mcp-hub" ]; then
|
|
197
|
+
print_info "Found kimi-mcp-hub at $BIN_DIR"
|
|
165
198
|
add_to_path
|
|
166
199
|
fi
|
|
167
200
|
fi
|
|
@@ -172,6 +205,63 @@ post_install() {
|
|
|
172
205
|
print_success "Setup complete"
|
|
173
206
|
}
|
|
174
207
|
|
|
208
|
+
setup_obsidian_mcp() {
|
|
209
|
+
print_info "Setting up Obsidian as local memory..."
|
|
210
|
+
|
|
211
|
+
local vault_path="${OBSIDIAN_VAULT:-$DEFAULT_VAULT}"
|
|
212
|
+
|
|
213
|
+
if [ "$AUTO_YES" = false ] && [ -t 0 ]; then
|
|
214
|
+
read -rp "Obsidian vault path [$vault_path]: " input
|
|
215
|
+
[ -n "$input" ] && vault_path="$input"
|
|
216
|
+
fi
|
|
217
|
+
|
|
218
|
+
vault_path="$(eval echo "$vault_path")"
|
|
219
|
+
mkdir -p "$vault_path/.obsidian"
|
|
220
|
+
|
|
221
|
+
# obsidian-mcp requires at least app.json to consider this a valid vault
|
|
222
|
+
if [ ! -f "$vault_path/.obsidian/app.json" ]; then
|
|
223
|
+
echo '{}' > "$vault_path/.obsidian/app.json"
|
|
224
|
+
fi
|
|
225
|
+
|
|
226
|
+
if [ ! -f "$vault_path/README.md" ]; then
|
|
227
|
+
cat > "$vault_path/README.md" << 'EOF'
|
|
228
|
+
# Kimi Memory Vault
|
|
229
|
+
|
|
230
|
+
This vault is used by Kimi CLI as local memory.
|
|
231
|
+
|
|
232
|
+
- Notes created by Kimi are stored here.
|
|
233
|
+
- Open this folder in Obsidian to browse and edit.
|
|
234
|
+
- Source: https://obsidian.md
|
|
235
|
+
EOF
|
|
236
|
+
fi
|
|
237
|
+
|
|
238
|
+
# Add Obsidian MCP server to mcp.json via Python
|
|
239
|
+
"$VENV_DIR/bin/python" - << PY
|
|
240
|
+
import json
|
|
241
|
+
from pathlib import Path
|
|
242
|
+
|
|
243
|
+
mcp_json = Path.home() / ".kimi-code" / "mcp.json"
|
|
244
|
+
mcp_json.parent.mkdir(parents=True, exist_ok=True)
|
|
245
|
+
data = {"mcpServers": {}}
|
|
246
|
+
if mcp_json.exists():
|
|
247
|
+
try:
|
|
248
|
+
data = json.loads(mcp_json.read_text(encoding="utf-8"))
|
|
249
|
+
except json.JSONDecodeError:
|
|
250
|
+
pass
|
|
251
|
+
data.setdefault("mcpServers", {})
|
|
252
|
+
data["mcpServers"]["obsidian"] = {
|
|
253
|
+
"command": "npx",
|
|
254
|
+
"args": ["-y", "obsidian-mcp", "$vault_path"],
|
|
255
|
+
"env": {}
|
|
256
|
+
}
|
|
257
|
+
mcp_json.write_text(json.dumps(data, indent=2, ensure_ascii=False), encoding="utf-8")
|
|
258
|
+
print("Obsidian MCP server configured")
|
|
259
|
+
PY
|
|
260
|
+
|
|
261
|
+
print_success "Obsidian vault ready: $vault_path"
|
|
262
|
+
print_info "Install Obsidian from https://obsidian.md and open this vault."
|
|
263
|
+
}
|
|
264
|
+
|
|
175
265
|
show_welcome() {
|
|
176
266
|
echo ""
|
|
177
267
|
echo -e "${GREEN}╔══════════════════════════════════════════════════════════╗${NC}"
|
|
@@ -192,6 +282,12 @@ show_welcome() {
|
|
|
192
282
|
echo " /mcp # List available tools"
|
|
193
283
|
echo " /skills # List installed skills"
|
|
194
284
|
echo ""
|
|
285
|
+
echo -e "${CYAN}Install with auto CLAUDE.md support:${NC}"
|
|
286
|
+
echo " curl -fsSL .../install.sh | bash -s -- -y"
|
|
287
|
+
echo ""
|
|
288
|
+
echo -e "${CYAN}Install with Obsidian local memory:${NC}"
|
|
289
|
+
echo " curl -fsSL .../install.sh | bash -s -- --with-obsidian"
|
|
290
|
+
echo ""
|
|
195
291
|
echo -e "${DIM}Need help? Run: kimi-mcp-hub --help${NC}"
|
|
196
292
|
echo ""
|
|
197
293
|
}
|
|
@@ -201,7 +297,35 @@ main() {
|
|
|
201
297
|
check_requirements
|
|
202
298
|
|
|
203
299
|
# Parse arguments
|
|
204
|
-
|
|
300
|
+
AUTO_YES=false
|
|
301
|
+
WITH_OBSIDIAN=false
|
|
302
|
+
OBSIDIAN_VAULT="$DEFAULT_VAULT"
|
|
303
|
+
METHOD="auto"
|
|
304
|
+
|
|
305
|
+
while [[ $# -gt 0 ]]; do
|
|
306
|
+
case "$1" in
|
|
307
|
+
-y|--yes)
|
|
308
|
+
AUTO_YES=true
|
|
309
|
+
shift
|
|
310
|
+
;;
|
|
311
|
+
--with-obsidian)
|
|
312
|
+
WITH_OBSIDIAN=true
|
|
313
|
+
shift
|
|
314
|
+
;;
|
|
315
|
+
--obsidian-vault)
|
|
316
|
+
OBSIDIAN_VAULT="$2"
|
|
317
|
+
shift 2
|
|
318
|
+
;;
|
|
319
|
+
--pip|--clone|--pypi|pip|clone|pypi)
|
|
320
|
+
METHOD="$1"
|
|
321
|
+
shift
|
|
322
|
+
;;
|
|
323
|
+
*)
|
|
324
|
+
print_warning "Unknown argument: $1"
|
|
325
|
+
shift
|
|
326
|
+
;;
|
|
327
|
+
esac
|
|
328
|
+
done
|
|
205
329
|
|
|
206
330
|
case "$METHOD" in
|
|
207
331
|
--pip|pip)
|
|
@@ -215,7 +339,8 @@ main() {
|
|
|
215
339
|
;;
|
|
216
340
|
*)
|
|
217
341
|
# Try PyPI first, fallback to pip+git
|
|
218
|
-
|
|
342
|
+
create_venv
|
|
343
|
+
if "$VENV_DIR/bin/pip" install --dry-run kimi-mcp-hub &>/dev/null 2>&1; then
|
|
219
344
|
install_from_pypi
|
|
220
345
|
else
|
|
221
346
|
print_info "PyPI package not found, installing from GitHub..."
|
|
@@ -225,6 +350,23 @@ main() {
|
|
|
225
350
|
esac
|
|
226
351
|
|
|
227
352
|
post_install
|
|
353
|
+
|
|
354
|
+
# Auto-apply claude-compat patch when -y is passed
|
|
355
|
+
if [ "$AUTO_YES" = true ]; then
|
|
356
|
+
if command -v kimi-mcp-hub &>/dev/null; then
|
|
357
|
+
print_info "Applying claude-compat patch (auto-load CLAUDE.md and CLAUDE.local.md)..."
|
|
358
|
+
kimi-mcp-hub claude-compat --yes
|
|
359
|
+
else
|
|
360
|
+
print_warning "kimi-mcp-hub not found in PATH. Skipping claude-compat patch."
|
|
361
|
+
print_info "Run manually after adding it to PATH: kimi-mcp-hub claude-compat --yes"
|
|
362
|
+
fi
|
|
363
|
+
fi
|
|
364
|
+
|
|
365
|
+
# Setup Obsidian MCP server
|
|
366
|
+
if [ "$WITH_OBSIDIAN" = true ]; then
|
|
367
|
+
OBSIDIAN_VAULT="$OBSIDIAN_VAULT" setup_obsidian_mcp
|
|
368
|
+
fi
|
|
369
|
+
|
|
228
370
|
show_welcome
|
|
229
371
|
}
|
|
230
372
|
|
package/install/npm-wrapper.js
CHANGED
|
@@ -11,7 +11,7 @@ const REPO = "KalimeroMK/kimi-mcp-hub";
|
|
|
11
11
|
const PYPI_NAME = "kimi-mcp-hub";
|
|
12
12
|
const PYTHON_MODULE = "kimi_mcp_hub";
|
|
13
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");
|
|
14
|
+
const VENV_DIR = process.env.KIMI_MCP_HUB_VENV || path.join(INSTALL_DIR, ".venv");
|
|
15
15
|
const LOCAL_REPO_DIR = path.resolve(path.join(__dirname, ".."));
|
|
16
16
|
|
|
17
17
|
function log(...args) {
|
|
@@ -104,7 +104,7 @@ function installPackage(python) {
|
|
|
104
104
|
// Prefer PyPI when the package is published and not running from a local repo.
|
|
105
105
|
let installArgs;
|
|
106
106
|
if (installSpec === LOCAL_REPO_DIR) {
|
|
107
|
-
installArgs = ["-m", "pip", "install", "--upgrade", installSpec];
|
|
107
|
+
installArgs = ["-m", "pip", "install", "--no-cache-dir", "--force-reinstall", "--upgrade", installSpec];
|
|
108
108
|
} else {
|
|
109
109
|
const pypiDry = spawnSync(
|
|
110
110
|
venvPy,
|
|
@@ -113,8 +113,8 @@ function installPackage(python) {
|
|
|
113
113
|
);
|
|
114
114
|
installArgs =
|
|
115
115
|
pypiDry.status === 0
|
|
116
|
-
? ["-m", "pip", "install", "--upgrade", PYPI_NAME]
|
|
117
|
-
: ["-m", "pip", "install", "--upgrade", installSpec];
|
|
116
|
+
? ["-m", "pip", "install", "--no-cache-dir", "--force-reinstall", "--upgrade", PYPI_NAME]
|
|
117
|
+
: ["-m", "pip", "install", "--no-cache-dir", "--force-reinstall", "--upgrade", installSpec];
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
const installResult = run(venvPy, installArgs);
|