The vue-llm library has introduced the useMCP feature in version 1.9, allowing developers to integrate Model Context Protocol servers into Vue-based AI chat applications. This implementation enables users to connect services like Notion and Linear directly to their chat interface, providing the model with access to external tools and databases.

The developer opted to build a custom client for the protocol rather than using the official SDK, which weighs approximately 120 KB in gzip. The custom implementation adds only 9 KB to the bundle. The library supports two operational modes: a browser-based mode for quick setup and a server-based mode designed for production environments.

During the development process, a critical security vulnerability was identified in the server-side OAuth flow. An attacker could have linked a victim's Notion account to their own user profile by manipulating the OAuth state parameter. The issue was resolved by modifying the callback process to ensure that the token exchange only occurs within the original user's session.

The library includes mechanisms to manage tool limits, as models like GPT-4o have constraints on the number of tools they can process simultaneously. For instance, Notion provides 77 tools and Linear provides 70, which exceeds the 128-tool limit of OpenAI models. Developers can now filter the list of included tools for each server to optimize performance and token usage.