vercel-ai-mcp-client

This repository provides an example client implementation using the Vercel AI SDK and Model Context Protocol SDK to streamline LLM chat interactions within a browser environment, including tool discovery and usage.

6
0

This repository provides an example implementation of client-side code for the Model Context Protocol (MCP) SDK, leveraging the Vercel AI SDK to streamline LLM chat interactions within a browser environment. It complements the MCP server creation guide.

How It Works

  1. The application establishes a Server-Sent Events (SSE) connection to an MCP server, configured through the user interface. Refer to creating MCP servers with SSE for server setup details.
  2. The system dynamically identifies and registers available tools exposed by the MCP server.
  3. Users can then instruct the LLM to utilize these discovered tools within the chat context.

Getting Started

To run this example:

# Install dependencies
npm install

# Run the development server
npm run dev

Access the application at http://localhost:3000.

Repository

QU
QuantGeekDev

QuantGeekDev/vercel-ai-mcp-client

Created

February 21, 2025

Updated

March 17, 2025

Language

TypeScript

Category

AI