This is a sample Model Context Protocol (MCP) server designed to work with ChatGPT's Deep Research feature. It provides semantic search through OpenAI's Vector Store API and document retrieval capabilities, demonstrating how to build custom MCP servers that can extend ChatGPT with company-specific knowledge and tools.
This sample app uses the mcp-handler that allows you to drop in an MCP server on a group of routes in any Next.js project.
Update app/mcp/route.ts
with your tools, prompts, and resources following the MCP TypeScript SDK documentation.
Install dependencies:
pnpm i
Run the development server:
pnpm dev
http://your-domain/mcp
script/test-client.mjs
contains a sample client to try invocations.
node scripts/test-client.mjs https://mcp-for-next-js.vercel.app