vscode官方Blog 07月16日 16:20
The Complete MCP Experience: Full Specification Support in VS Code
index_new5.html
../../../zaker_core/zaker_tpl_static/wap/tpl_guoji1.html

 

VS Code 现已全面支持模型上下文协议 (MCP) 规范,为开发者提供了更强大的 AI 代理集成能力。通过新增的授权、提示、资源和采样功能,MCP 从一系列独立工具转变为一个综合标准。新版本在安全性方面进行了重大提升,采用了新的授权规范,允许开发者委托身份验证给现有身份提供商。此外,VS Code 还支持流式 HTTP 传输,实现了远程 MCP 服务器的独立扩展和企业级安全。开发者现在可以利用 GitHub MCP 服务器等工具,体验丰富的提示和资源,并构建自己的 MCP 服务器,从而实现更复杂的推理和多代理协作。

🔑 **全新授权机制:** 新的授权规范是MCP的重要进步,它将 MCP 服务器分离为资源提供者和授权服务器,允许开发者将身份验证委托给现有的身份提供商,而不是从头开始构建 OAuth 实现。

🚀 **增强的提示功能:** 提示功能不再是静态模板,而是动态的、上下文感知的起始点,服务器可以根据当前工作区和项目状态进行定制。当服务器提供提示时,它们会直接出现在 VS Code 的斜杠命令中。

🖼️ **丰富的资源交互:** 资源代表可以与之直接交互的语义信息。例如,Playwright MCP 服务器截取的网页应用程序的屏幕截图可以成为一个资源,可以拖放到工作区中、进行注释或与队友共享。调试工具返回的日志也可以在 VS Code 中直接流式传输实时更新。

💡 **强大的采样能力:** 采样功能允许 MCP 服务器发出自己的语言模型请求。服务器可以使用现有的模型订阅,而不是管理自己的 AI SDK 和 API 密钥。这使得复杂的推理和多代理协调成为可能,同时用户可以控制安全性、隐私和成本。

The Complete MCP Experience: Full Specification Support in VS Code

June 12, 2025 by Harald Kirschner, Connor Peet, and Tyler Leonhardt

VS Code now supports the complete Model Context Protocol specification.

MCP co-creator David Soria Parra reflects on this milestone:

I'm excited to see what developers will build now that they have access to the full spectrum of MCP features within VS Code. The community continually impresses me with their creativity and drive to push the boundaries of what's possible.

Beyond the initial tools and workspace awareness we introduced in May, you can now use authorization, prompts, resources, and sampling. These additions transform MCP from a set of individual tools into a comprehensive standard for AI agent integrations.

Security-First: The New Authorization Foundation

The new authorization specification is the biggest leap forward. Microsoft, Anthropic, and the broader identity community—including Okta/Auth0, Stytch, and Descope—collaborated on this effort. The new specification cleanly separates MCP servers as Resource Providers from Authorization Servers, allowing developers to delegate authentication to existing identity providers rather than building their own OAuth implementations from scratch. For the technical details on how the new authorization flow works, check out Den Delimarsky's comprehensive overview.

Combined with streamable HTTP transport (which landed in our previous version), this enables remote MCP servers that can scale independently while maintaining enterprise-grade security. The GitHub MCP Server demonstrates this evolution perfectly—it's now available as a remote server with proper OAuth integration that uses VS Code's existing GitHub authentication and account management, so you can securely connect repositories and issue tracking.

While tools handle individual actions, Prompts deliver complete workflows. These aren't static templates—they're dynamic, context-aware starting points that servers can tailor to your current workspace and project state. When a server provides prompts, they appear directly in VS Code's slash commands next to your user-defined prompts, letting you invoke sophisticated workflows with a simple /mcp.servername.promptname

Resources represent semantic information that you can interact with directly. For example, when the Playwright MCP server takes a screenshot of a web application, that image can become a resource that you can drag into your workspace, annotate, or share with teammates. When debugging tools return logs, those logs can https://code.visualstudio.com/assets/blogs/2025/06/12/mcp-resources-context-small.png="/assets/blogs/2025/06/12/mcp-resources-context-small.png" alt="Screenshot of the context picker, highlighting the option to select an MCP resource." loading="lazy">

Perhaps the most upvoted MCP capability is Sampling, the ability for MCP servers to make their own language model requests. Instead of servers managing their own AI SDKs and API keys, they can use your existing model subscription. This enables complex reasoning and multi-agent coordihttps://code.visualstudio.comhttps://code.visualstudio.com/assets/blogs/2025/06/12/mcp-sampling-pick-models.pngvacy, and costs.

Ready to Explore

The complete MCP experience is available now in VS Code. Try the GitHub MCP server with its new remote capabilities and VS Code authentication integration, explore servers that provide rich prompts and resources, or build your own server that takes advantage of the full specification.

To get started, check out the VS Code MCP documentation, browse the official server repository, or dive into the Model Context Protocol specification.

The MCP ecosystem now has a client that provides the complete foundation to build on.

Happy Coding!

Fish AI Reader

Fish AI Reader

AI辅助创作,多种专业模板,深度分析,高质量内容生成。从观点提取到深度思考,FishAI为您提供全方位的创作支持。新版本引入自定义参数,让您的创作更加个性化和精准。

FishAI

FishAI

鱼阅,AI 时代的下一个智能信息助手,助你摆脱信息焦虑

联系邮箱 441953276@qq.com

相关标签

VS Code MCP AI集成 授权 提示
相关文章