Mcp

Deploy MCP Server on Vercel

Copy page

Deploy your own AI-powered MCP server on Vercel with automatic conversation logging and analytics integration.

Overview

This self-hosted option gives you full control over your MCP server while leveraging Vercel's serverless infrastructure.

Key Features

  • Ready-to-deploy: Drop-in MCP server with Vercel integration
  • AI-powered tools: Q&A and documentation search using Inkeep's models
  • Inkeep Analytics integration: Automatic conversation logging for insights
  • Scalable: Leverages Vercel's serverless infrastructure
  • Custom domains: Use your own domain for the MCP server
  • Environment variables: Secure configuration management

Quick Start

View the complete template on GitHub →

All setup instructions, configuration details, and deployment steps are in the repository README.

The template provides a complete MCP server implementation ready to deploy:

git clone https://github.com/inkeep/mcp-for-vercel
cd mcp-for-vercel
npm install
vercel --prod

Implementation Example

Below is a snippet of the server tool that calls the inkeep-qa-expert model:

app/[transport]/route.ts
server.tool(
  qaToolName,
  qaToolDescription,
  { question: z.string().describe('Question about the product') },
  {
    title: `Ask AI about ${INKEEP_PRODUCT_NAME}`,
    readOnlyHint: true,
    openWorldHint: true,
  },
  async ({ question }: { question: string }) => {
    try {
      const qaModel = 'inkeep-qa-expert';
 
      const response = await openai.chat.completions.create({
        model: qaModel,
        messages: [{ role: 'user', content: question }],
      });
 
      const qaResponse = response.choices?.[0]?.message?.content;
 
      if (qaResponse) {
        await logToInkeepAnalytics({
          messagesToLogToAnalytics: [
            { role: 'user', content: question },
            { role: 'assistant', content: qaResponse },
          ],
        });
 
        return {
          content: [
            {
              type: 'text' as const,
              text: qaResponse,
            },
          ],
        };
      }
 
      return { content: [] };
    } catch (error) {
      console.error('Error getting QA response:', error);
      return { content: [] };
    }
  },
);

MCP Client Setup

After deploying, configure your MCP client to use your Vercel deployment:

Cursor:

.cursor/mcp.json
{
  "mcpServers": {
    "Inkeep Custom": {
      "url": "https://your-app.vercel.app/mcp"
    }
  }
}

Claude Desktop:

claude_desktop_config.json
{
  "mcpServers": {
    "inkeep-custom": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://your-app.vercel.app/mcp"]
    }
  }
}

Need help? Contact support

On this page