chatgpt-apps-sdk-nextjs-starter
Verified Safeby Nami7723
Overview
This project demonstrates building ChatGPT applications using the Model Context Protocol (MCP) with Next.js, providing tools and resources renderable natively within ChatGPT.
Installation
pnpm startEnvironment Variables
- NODE_ENV
- VERCEL_ENV
- VERCEL_PROJECT_PRODUCTION_URL
- VERCEL_BRANCH_URL
- VERCEL_URL
Security Notes
The server uses `Access-Control-Allow-Origin: *` in its middleware, which provides broad access for cross-origin requests. While this might be intended for integration with the ChatGPT host, it is generally a security risk that could be tightened for production if specific origins are known. Dynamic client-side JavaScript is injected via `app/layout.tsx` to handle OpenAI SDK integration, but the script is inline and originates from the codebase, not an external untrusted source. No direct `eval` of untrusted user input or hardcoded sensitive secrets found. The base URL is derived from environment variables, which is good practice.
Similar Servers
mcp-handler
Provides a Vercel adapter for the Model Context Protocol (MCP), enabling real-time communication between applications and AI models through Next.js or Nuxt.
next-devtools-mcp
This MCP server provides Next.js development tools for AI coding agents, including runtime diagnostics, automated upgrades, Cache Components setup, browser testing, and documentation search.
mcp
An MCP server providing a set of mathematical tools (calculator functions) for remote execution via the Model Context Protocol.
apps-sdk-template
A lightweight, type-safe starter for building ChatGPT MCP apps with Next.js and Skybridge, featuring OAuth 2.1 authentication, optional Stripe subscription support, and Drizzle ORM with PostgreSQL.