Sample MCP Server for ChatGPT Deep Research is a Vercel Labs starter template that runs a Model Context Protocol (MCP) server inside a Next.js app, exposing semantic search and document retrieval tools that ChatGPT's Deep Research feature can call.
What is the MCP Server for ChatGPT Deep Research?
This template is a working sample MCP server built on Next.js and the mcp-handler npm package, published by Vercel Labs to show how ChatGPT can be extended with company-specific knowledge and tools. It receives MCP tool calls over HTTP at a route such as /mcp and returns either ranked semantic search hits or a single complete document with its metadata, sourced from an OpenAI Vector Store through the Vector Store API. Tool, prompt, and resource definitions live in app/mcp/route.ts, which you edit to match your own data. The repository ships with five sample documents covering technical topics so the server responds out of the box, and it is designed to be deployed to Vercel.
What makes this template stand out?
- Search tool — performs semantic search against the OpenAI Vector Store API and returns matching results to the calling assistant.
- Fetch tool — retrieves a complete document by ID, returning the full content plus its metadata rather than an excerpt.
- Five sample documents — seeded content across several technical topics so the search and fetch tools can be exercised immediately.
- MCP specification compliance — follows OpenAI's MCP specification for deep research integration, so servers built from it are connectable through ChatGPT's Connectors settings.
mcp-handlerintegration — lets you drop an MCP server onto a group of routes in any Next.js project; tool, prompt, and resource definitions go inapp/mcp/route.tsfollowing the MCP TypeScript SDK documentation.- One-click Vercel deployment — a clone/deploy flow is provided, and Vercel's Fluid compute must be enabled for efficient execution.
- Sample test client —
scripts/test-client.mjsinvokes a deployed server, for examplenode scripts/test-client.mjs https://mcp-for-next-js.vercel.app. - pnpm workflow — install dependencies with
pnpm iand start the dev server withpnpm dev.
Who should use this template?
- Next.js developers who want to add an MCP endpoint to an existing app route group instead of writing a protocol server from scratch.
- AI engineers wiring internal knowledge into ChatGPT who need a search-and-fetch pattern backed by an OpenAI Vector Store.
- Vercel users prototyping connectors who want a deployable reference server and a test client before committing to a hosted implementation.
- Developer advocates and teams evaluating MCP who need a minimal, readable example of the specification in practice.
What can you do with the template?
- Expose private documentation to Deep Research: replace the five sample documents with your own vector-store content so ChatGPT can search and cite internal material.
- Prototype a custom connector: stand up a server locally, register the URL under ChatGPT Settings, then Connectors, and verify it appears as available for deep research.
- Smoke-test MCP servers: point
scripts/test-client.mjsat any deployed server URL to confirm tool invocations return data.
How does the template work?
- Install dependencies with
pnpm iand start the dev server withpnpm dev. - Edit
app/mcp/route.tsto define your tools, prompts, and resources per the MCP TypeScript SDK documentation. - Add your server URL (for example
http://your-domain/mcp) in ChatGPT under Settings, then the Connectors tab, and test the connection.
FAQ
What does this MCP server actually do?
It exposes two tools to ChatGPT Deep Research: a search tool that queries the OpenAI Vector Store API semantically, and a fetch tool that returns a complete document by ID with its metadata. Five bundled sample documents let the tools return results before you load your own data.
Can I run it on Vercel?
Yes. The repository includes a one-click Vercel deploy flow, and Vercel's documentation notes that Fluid compute should be enabled for efficient execution. You can also run it locally with pnpm and point ChatGPT at your own domain.
How do I connect it to ChatGPT Deep Research?
Open ChatGPT settings, go to the Connectors tab, add your server URL in the form http://your-domain/mcp, and test the connection. Once accepted, the server appears as available for deep research sessions.
Does the template include my data?
No. It ships with five sample documents covering technical topics. To serve real knowledge you replace those documents and wire the tools to your own OpenAI Vector Store, or rewrite the tool handlers in app/mcp/route.ts.








