IV

ivanamador/vercel-ai-docs-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

50 stars 13 forks 质量 59 趋势 0

ivanamador/vercel-ai-docs-mcp 是从 https://github.com/ivanamador/vercel-ai-docs-mcp. 导入的 MCP 服务器候选服务器。

概览

ivanamador/vercel-ai-docs-mcp 是从 https://github.com/ivanamador/vercel-ai-docs-mcp. 导入的 MCP 服务器候选服务器。

概述(AI 翻译)

一个模型上下文协议(MCP)服务器,为Vercel AI SDK文档提供AI驱动的搜索和查询功能。该项目使开发者能够提出关于Vercel AI SDK的问题,并基于官方文档获得准确、有上下文的回答。

特色

  • 直接文档搜索:直接使用相似度搜索查询Vercel AI SDK文档索引
  • AI驱动代理:提出关于Vercel AI SDK的自然语言问题,获得全面答案
  • 会话管理:在多个查询中保持对话上下文
  • 自动索引:包含获取、处理和索引最新Vercel AI SDK文档的工具

建筑

该系统由几个关键组成部分组成:

  1. MCP 服务器:通过模型上下文协议(Model Context Protocol)展示工具,用于与 AI 助手集成
  2. DocumentFetcher:爬取并处理Vercel AI SDK文档
  3. VectorStoreManager:创建和管理FAISS语义搜索向量索引
  4. AgentService:利用谷歌Gemini模型为AI驱动的问题提供答案

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

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-here

You’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-agent
    
  2. Install dependencies

    npm install
    
  3. Build the project

    npm run build
    
  4. Build the documentation index

    npm run build:index
    
  5. Start the MCP server

    npm run start
    

Integration 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",
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "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" } } } }