Feature Request: On-demand/lazy loading for MCP servers

Resolved 💬 2 comments Opened Jan 16, 2026 by mkswyfft Closed Feb 28, 2026

Summary

Request the ability to load MCP servers on-demand rather than all at startup. This would reduce startup time and context window usage for servers that are only occasionally needed.

Problem

Currently, all MCP servers defined in .mcp.json are loaded when Claude Code starts. Some servers (like @softeria/ms-365-mcp-server) expose 100+ tools, which:

  1. Increases startup time - Server must initialize even if not used
  2. Consumes context window - Tool definitions take up tokens
  3. Adds noise - Many tools shown that aren't relevant to current task

Proposed Solutions

Option A: Lazy Loading Flag

Add a lazy or onDemand flag to server config:

{
  "mcpServers": {
    "ms365": {
      "command": "npx",
      "args": ["-y", "@softeria/ms-365-mcp-server"],
      "lazy": true
    }
  }
}

Lazy servers would only start when one of their tools is first invoked.

Option B: Tool Filtering

Allow specifying which tools to expose from a server:

{
  "mcpServers": {
    "ms365": {
      "command": "npx",
      "args": ["-y", "@softeria/ms-365-mcp-server"],
      "tools": ["list-plan-tasks", "create-planner-task", "update-planner-task"]
    }
  }
}

Option C: Skill-Triggered Loading

Allow skills to declare MCP server dependencies that load when the skill is invoked:

---
name: planner-sync
requires_mcp: ["ms365"]
---

Current Workaround

We're using a naming convention to "disable" servers:

  • Rename "ms365" to "_ms365_disabled" (underscore prefix)
  • Claude Code ignores keys that don't match expected format
  • Manually edit .mcp.json and restart to enable

This works but requires manual editing and a full restart.

Use Case

Our project uses MS365 MCP for occasional Planner task management (syncing with GitHub issues). 95% of sessions don't need it, but we pay the startup/context cost every time.

Environment

  • Claude Code CLI
  • Windows 11
  • Multiple MCP servers configured (mssql, github, puppeteer, ms365)

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗