examples
Verified Safeby Cronos402
Overview
A Next.js application demonstrating how to build an OpenAI Apps SDK compatible MCP server with widget rendering in ChatGPT.
Installation
npm run devEnvironment Variables
- VERCEL_ENV
- VERCEL_PROJECT_PRODUCTION_URL
- VERCEL_BRANCH_URL
- VERCEL_URL
- NEXT_PUBLIC_AUTH_URL
Security Notes
The application uses broad CORS headers (`Access-Control-Allow-Origin: *`) and patches browser APIs (`history.pushState`, `window.fetch`, `MutationObserver` for `<html>`) to function within a ChatGPT iframe. While these are necessary for the specific integration, they inherently increase the attack surface and complexity compared to a standard web application. The `baseURL` is derived from Vercel environment variables, reducing direct user manipulation risk. The `auth-example` relies on an external authentication service via `NEXT_PUBLIC_AUTH_URL` and forwards cookies for session management. No obvious malicious code patterns or critical hardcoded secrets were identified in the provided snippets for the server operations.
Similar Servers
ncp
NCP acts as a universal adapter and orchestrator for Model Context Protocol (MCP) servers and tools. It provides a unified interface for discovery, execution, and management of diverse tools (local CLI, HTTP APIs, internal plugins/Photons, AI skills) through natural language and structured code interaction, enabling AI agents to interact with the broader digital ecosystem.
hono-oauth-mcp
A Hono-based Model Context Protocol (MCP) server that integrates with any MCP-compliant OAuth2 server for authentication, deployable across Supabase Edge Functions, Cloudflare Workers, and Deno Deploy.
ping-mcp
A Model Context Protocol (MCP) server for Solana blockchain interactions, enhancing DApp development with agentic capabilities.
mcp_server
This server implements the Model Context Protocol (MCP) to expose developer-defined tools as a HTTP API, specifically demonstrating a task creation tool.