-
Notifications
You must be signed in to change notification settings - Fork 801
Feature Request:Dynamic Loading/Unloading of MCP Servers and Skills During Active Sessions #1708
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or request
Description
What feature would you like to see?
Motivation
Currently, both MCP Servers and Skills are loaded once during the KimiCLI.create() startup phase:
- MCP: Configured via
kimi mcp add/removewhich modifiesmcp.json, requires CLI restart to take effect - Skills: Discovered from filesystem directories (KLIP-8 layered lookup:
~/.config/agents/skills/→.agents/skills/), scanned and registered as slash commands at startup
During long-running interactive sessions, if I want to temporarily connect an MCP Server (e.g., adding Playwright MCP for debugging) or create a new Skill file and use it immediately, the only option is /reload. While /reload does preserve the session (the _reload_loop re-enters _run with the same session_id), it triggers a full KimiCLI.create() rebuild — disconnecting all existing MCP connections, tearing down the entire toolset, and re-initializing everything from scratch.
This is particularly painful in the following scenarios:
- Exploratory development: Realizing mid-conversation that a specific MCP tool is needed (database, browser automation, etc.) —
/reloadforces reconnection of all existing MCP servers just to add one new one - Skill iteration: Writing/debugging a
SKILL.mdand wanting changes to take effect immediately —/reloadrestarts the entire tool/skill registration pipeline - SDK/Wire integration: External UI clients needing to dynamically inject MCP configurations based on user actions during a session — Wire mode has no post-
initializetool management
Proposal
1. In-Session MCP Management Slash Commands
/mcp add <name> <command/url> [--transport stdio|http] [--env K=V]
/mcp remove <name>
/mcp list
/mcp reload [name] # reconnect specified or all MCP Servers
2. Skill Hot-Reload
/skill reload # re-scan skill directories, register new skills, remove deleted ones
/skill list # list currently loaded skills
Additional information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request