Get the FREE Ultimate OpenClaw Setup Guide →

VercelGenUI_MCP

Proof of concept chat AI combining the Model Context Protocol (MCP) with Vercel's AI SDK UI

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio jamessloan-vercelgenui_mcp node ./src/server.js \
  --env MCP_LOG_LEVEL="info" \
  --env NEXT_PUBLIC_MCP_ENABLED="true"

How to use

This MCP server provides an integration between the Model Context Protocol (MCP) and Vercel's AI SDK UI to create interactive AI applications with structured context enrichment and tool integrations. The project leverages Next.js for the frontend and API routes, with TypeScript for type safety, enabling a modern, responsive UI that can stream AI responses in real time. The MCP layer allows you to wire in extensible data sources and tooling so your AI model can access rich context and perform actions via tools, all while presenting a polished UI powered by Vercel's AI SDK UI components. You can use the included tooling to experiment with chat interfaces, data visualizations, and security features, then extend the tool registry to add custom integrations as needed.

How to install

Prerequisites:

  • Node.js (LTS) and npm installed on your machine
  • Git installed

Step-by-step installation:

  1. Clone the repository git clone [repository-url] cd [repository-name]

  2. Install dependencies npm install

  3. Copy and configure environment variables cp .env.example .env.local

    Edit .env.local with your configuration (API keys, endpoints, etc.)

  4. Start the development server npm run dev

  5. Open the application

Notes:

  • If you modify server or API code, restart the dev server to apply changes.
  • Ensure any external API keys or secrets are added to .env.local and not committed to source control.

Additional notes

Tips and common issues:

  • Environment variables: Keep sensitive keys in .env.local and never commit them. Common keys include VERCEL_AI_API_KEY, MCP_BASE_URL, and NEXT_PUBLIC_* keys used by the UI.
  • If the UI components fail to load, verify that the Next.js dev server is running and that the MCP server entrypoint (src/server.js) is accessible.
  • For production deployment, ensure environment variables are set in your hosting environment and that the Next.js build is optimized.
  • Tool registry: The MCP tool system is extensible; you can register additional tools to enrich context or perform actions. Document your new tools with commands and expected inputs/outputs.
  • Real-time streaming: If you enable streaming, ensure your client supports server-sent events or WebSocket streaming as configured in the UI SDK.

Related MCP Servers

Sponsor this space

Reach thousands of developers