Full Spec MCP: Hidden Capabilities of the MCP spec — Harald Kirschner, Microsoft/VSCode
By AI Engineer
Key Concepts
MCP (Model Context Protocol), tools, dynamic discovery, resources, sampling, roots, prompts, clients, servers, stateful interactions, developer experience, spec compliance, streamable HTTP, community registry, elicitations, progressive enhancement.
Tools and Their Limitations
- Tools in MCP represent well-defined actions, easily mapped to function calls. Example: Playwright tool to take a screenshot.
- Over-reliance on tools leads to quality problems:
- Too many tools confuse the AI.
- Too many domains of tools with varying properties confuse the AI.
- Repetition in tool usage increases the chance of errors. Research from Langchain supports this.
- Clients offer controls to mitigate these issues:
- VS Code allows per-chat tool selection via a "tool picker."
- Keyword accessibility for tool invocation.
- User-defined tool sets for reusable workflows (e.g., "front-end testing flow").
Dynamic Discovery
- Dynamic discovery allows servers to provide tools on the fly, based on context.
- Example: GitHub MUD MCP demonstrates this. The agent is put into a game master prompt and has the Mud MCP installed.
- The agent is aware of the current room in the game.
- The "battle" tool only appears when a monster is present.
- This enables context-aware tool availability.
Resources
- Resources provide a semantic layer for data exchange between servers and clients.
- Instead of returning a giant file, servers can return a reference to the file.
- Use cases:
- Exposing files to both the LLM and the user (e.g., a screenshot).
- Understanding the Python environment and settings for customization.
- Customizing to a React vs. Svelte setup by inspecting installed packages.
- Connecting the end-to-end developer experience via CI/CD pipelines.
Sampling
- Sampling allows the server to request LLM completions from the client.
- A permission dialog appears, allowing the server to access the LLM (default: GPT-4).
- Enables progressive enhancement: start with a "kitchen sink" approach and refine with sampling.
- Use cases:
- Summarizing resources into tangible information.
- Formatting a website into markdown for the LLM.
- Agentic server tools that run via the LLM from the client.
Dynamic Updates and Pain Points
- Roots, tools, resources, and prompts can be updated dynamically.
- The client sends new roots as the VS Code workspace changes.
- Servers can send new tools and prompts as they update.
- Pain points:
- Developer experience: debugging and logging MCP servers.
- VS Code now has a "dev mode" with a console and debugger attached. This works for Python and Node.js.
Spec Compliance and Future Directions
- Staying up-to-date with the latest MCP spec is crucial.
- Feedback on draft specifications is essential for their stabilization.
- Updated Auth Spec: Provides enterprise-grade authorization. A talk on building protected MCP servers is recommended.
- Streamable HTTP: Supported in VS Code for two versions, but needs server adoption. Avoids stateful churn.
- Community Registry: Addresses the discovery problem. Located at
model contracts protocolregistry
on GitHub. - Elicitations: Coming in the next draft spec. Allows tools to request specific input from the user directly.
Call to Action
- Progressive enhancement in MCP is possible.
- Clients support the latest spec.
- Users should showcase stateful servers and outline best practices.
- Contribute to the ecosystem:
- Read open RFCs (e.g., namespaces, search).
- Follow issues in SDKs.
- Provide feedback.
- File issues.
Synthesis/Conclusion
The presentation emphasizes the importance of leveraging the full MCP specification to unlock the potential for rich, stateful interactions between agents. While tools are a common starting point, the speaker advocates for adopting dynamic discovery, resources, and sampling to create more context-aware and semantic-aware services. Addressing developer experience pain points and contributing to the evolving spec and ecosystem are crucial for realizing the transformative potential of MCP. The speaker encourages developers to use the available clients, provide feedback, and actively shape the future of the protocol.
Chat with this Video
AI-PoweredHi! I can answer questions about this video "Full Spec MCP: Hidden Capabilities of the MCP spec — Harald Kirschner, Microsoft/VSCode". What would you like to know?