vercel-ai-docs-mcp
A Model Context Protocol (MCP) server that provides AI-powered search and querying capabilities for the Vercel AI SDK documentation. This project enables developers to ask questions about the Vercel AI SDK and receive accurate, contextualized responses based on the official documentation.
Documentation
Vercel AI SDK Documentation MCP Agent
A Model Context Protocol (MCP) server that provides AI-powered search and querying capabilities for the Vercel AI SDK documentation. This project enables developers to ask questions about the Vercel AI SDK and receive accurate, contextualized responses based on the official documentation.
Features
- Direct Documentation Search: Query the Vercel AI SDK documentation index directly using similarity search
- AI-Powered Agent: Ask natural language questions about the Vercel AI SDK and receive comprehensive answers
- Session Management: Maintain conversation context across multiple queries
- Automated Indexing: Includes tools to fetch, process, and index the latest Vercel AI SDK documentation
Architecture
This system consists of several key components:
1. MCP Server: Exposes tools via the Model Context Protocol for integration with AI assistants
2. DocumentFetcher: Crawls and processes the Vercel AI SDK documentation
3. VectorStoreManager: Creates and manages the FAISS vector index for semantic search
4. AgentService: Provides AI-powered answers to questions using the Google Gemini model
5. DirectQueryService: Offers direct semantic search of the documentation
Setup Instructions
Prerequisites
- Node.js 18+
- npm
- A Google API key for Gemini model access
Environment Variables
Create a `.env` file in the project root with the following variables:
GOOGLE_GENERATIVE_AI_API_KEY=your-google-api-key-hereYou'll need to obtain a Google Gemini API key from the Google AI Studio.
Installation
1. Clone the repository
git clone https://github.com/IvanAmador/vercel-ai-docs-mcp.git
cd vercel-ai-docs-mcp-agent2. Install dependencies
npm install3. Build the project
npm run build4. Build the documentation index
npm run build:index5. Start the MCP server
npm run startIntegration with Claude Desktop
Claude Desktop is a powerful AI assistant that supports MCP servers. To connect the Vercel AI SDK Documentation MCP agent with Claude Desktop:
1. First, install Claude Desktop if you don't have it already.
2. Open Claude Desktop settings (via the application menu, not within the chat interface).
3. Navigate to the "Developer" tab and click "Edit Config".
4. Add the Vercel AI Docs MCP server to your configuration:
{
"mcpServers": {
"vercel-ai-docs": {
"command": "node",
"args": ["ABSOLUTE_PATH_TO_PROJECT/dist/main.js"],
"env": {
"GOOGLE_GENERATIVE_AI_API_KEY": "your-google-api-key-here"
}
}
}
}Make sure to replace:
- `ABSOLUTE_PATH_TO_PROJECT` with the actual path to your project folder
- `your-google-api-key-here` with your Google Gemini API key
5. Save the config file and restart Claude Desktop.
6. To verify the server is connected, look for the hammer ๐จ icon in the Claude chat interface.
For more detailed information about setting up MCP servers with Claude Desktop, visit the MCP Quickstart Guide.
Integration with Other MCP Clients
This MCP server is compatible with any client that implements the Model Context Protocol. Here are a few examples:
Cursor
Cursor is an AI-powered code editor that supports MCP servers. To integrate with Cursor:
1. Add a `.cursor/mcp.json` file to your project directory (for project-specific configuration) or a `~/.cursor/mcp.json` file in your home directory (for global configuration).
2. Add the following to your configuration file:
{
"mcpServers": {
"vercel-ai-docs": {
"command": "node",
"args": ["ABSOLUTE_PATH_TO_PROJECT/dist/main.js"],
"env": {
"GOOGLE_GENERATIVE_AI_API_KEY": "your-google-api-key-here"
}
}
}
}For more information about using MCP with Cursor, refer to the Cursor MCP documentation.
Usage
The MCP server exposes three primary tools:
1. agent-query
Query the Vercel AI SDK documentation using an AI agent that can search and synthesize information.
{
"name": "agent-query",
"arguments": {
"query": "How do I use the streamText function?",
"sessionId": "unique-session-id"
}
}2. direct-query
Perform a direct similarity search against the Vercel AI SDK documentation index.
{
"name": "direct-query",
"arguments": {
"query": "streamText usage",
"limit": 5
}
}3. clear-memory
Clears the conversation memory for a specific session or all sessions.
{
"name": "clear-memory",
"arguments": {
"sessionId": "unique-session-id"
}
}To clear all sessions, omit the sessionId parameter.
Development
Project Structure
โโโ config/ # Configuration settings
โโโ core/ # Core functionality
โ โโโ indexing/ # Document indexing and vector store
โ โโโ query/ # Query services (agent and direct)
โโโ files/ # Storage directories
โ โโโ docs/ # Processed documentation
โ โโโ faiss_index/ # Vector index files
โ โโโ sessions/ # Session data
โโโ mcp/ # MCP server and tools
โ โโโ server.ts # MCP server implementation
โ โโโ tools/ # MCP tool definitions
โโโ scripts/ # Build and utility scripts
โโโ utils/ # Helper utilitiesBuild Scripts
- `npm run build`: Compile TypeScript files
- `npm run build:index`: Build the documentation index
- `npm run dev:index`: Build and index in development mode
- `npm run dev`: Build and start in development mode
Troubleshooting
Common Issues
1. Index not found or failed to load
Run `npm run build:index` to create the index before starting the server.
2. API rate limits
When exceeding Google API rate limits, the agent service may return errors. Implement appropriate backoff strategies.
3. Model connection issues
Ensure your Google API key is valid and has access to the specified Gemini model.
4. Claude Desktop not showing MCP server
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT
Frequently asked questions
What is vercel-ai-docs-mcp?
vercel-ai-docs-mcp is A Model Context Protocol (MCP) server that provides AI-powered search and querying capabilities for the Vercel AI SDK documentation. This project enables developers to ask questions about the Vercel AI SDK and receive accurate, contextualized responses based on the official documentation.
How do I install vercel-ai-docs-mcp?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is vercel-ai-docs-mcp open source?
Yes โ it is hosted on GitHub at https://github.com/IvanAmador/vercel-ai-docs-mcp and has 40 stars.
Related MCP tools
๐ Cherry Studio is a desktop client that supports for multiple LLM providers. Built for the Model Context Protocol to enhance AI capabilities.
Enhanced ChatGPT Clone: Features Agents, MCP, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini...
FastGPT is a knowledge-based platform built on the LLMs, offers a comprehensive suite of out-of-the-box capabilities such as data processing, RAG retrieval, ...
Composio equips your AI agents & LLMs with 100+ high-quality integrations via function calling for the Model Context Protocol. Enhance AI assistants with powerf
๐ฆ Repomix is a powerful tool that packs your entire repository into a single, AI-friendly file. Perfect for when you need to feed your codebase to Large Lan...
AI Agents & MCPs & AI Workflow Automation โข (~400 MCP servers for AI agents) โข AI Automation / AI Agent with MCPs โข AI Workflows & AI Agents โข MCPs for AI Ag...
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP