Skip to content

Feature Request:Dynamic Loading/Unloading of MCP Servers and Skills During Active Sessions #1708

@zzddkk

Description

@zzddkk

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/remove which modifies mcp.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:

  1. Exploratory development: Realizing mid-conversation that a specific MCP tool is needed (database, browser automation, etc.) — /reload forces reconnection of all existing MCP servers just to add one new one
  2. Skill iteration: Writing/debugging a SKILL.md and wanting changes to take effect immediately — /reload restarts the entire tool/skill registration pipeline
  3. SDK/Wire integration: External UI clients needing to dynamically inject MCP configurations based on user actions during a session — Wire mode has no post-initialize tool 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions