Feature request: Lazy/on-demand MCP loading triggered by skills

Open 💬 0 comments Opened Jun 12, 2026 by rmootha

Summary

Support lazy (on-demand) MCP loading so that tool schemas are only injected into context when first needed — ideally triggered by a skill invocation — rather than loading all configured MCPs at session startup.

Problem

Currently all configured MCPs are loaded at session startup and their full tool schemas are included in every request for the entire session, regardless of whether those tools are used. For infrequently-used MCPs (e.g. Atlassian/Jira, only needed when creating a ticket), this adds significant token overhead to every turn.

Skills are a token-efficient alternative — their full content is only loaded on invocation. But skills that depend on an MCP have no way to ensure that MCP is available when invoked. If the MCP isn't connected at startup, the skill fails with no graceful path forward.

Proposed solution

Allow a skill (or any invocation context) to declare required MCPs. Claude Code would lazily load the MCP's tool schemas into context only when the skill is first invoked, rather than at startup. Something like a frontmatter declaration in SKILL.md:

---
name: jira-ticket
requires_mcp:
  - atlassian
---

On invocation, Claude Code checks if atlassian MCP tools are loaded; if not, connects the server and injects the schemas on-demand for that turn.

Benefits

  • Significant token savings for sessions that never use certain MCPs
  • Skills become self-sufficient — no need for manual MCP pre-configuration or session restarts
  • Better developer experience: skills "just work" regardless of which MCPs were connected at startup

Current workaround

Skills use ToolSearch to detect MCP availability and instruct the user to run /mcp to authenticate, then retry. This works but interrupts the flow.

View original on GitHub ↗