apps-sdk-template
Verified Safeby axite-ai
Overview
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.
Installation
pnpm devEnvironment Variables
- DATABASE_URL
- REDIS_URL
- BETTER_AUTH_SECRET
- GOOGLE_CLIENT_ID
- GOOGLE_CLIENT_SECRET
- ENABLE_SUBSCRIPTIONS
- STRIPE_SECRET_KEY
- STRIPE_WEBHOOK_SECRET
- STRIPE_BASIC_PRICE_ID
- STRIPE_PRO_PRICE_ID
- STRIPE_ENTERPRISE_PRICE_ID
- ENABLE_PASSKEYS
- BETTER_AUTH_URL
- BETTER_AUTH_BASE_PATH
- MCP_RESOURCE_URL
- NODE_ENV
- POSTGRES_SSL
- BASE_URL
Security Notes
The `NextChatSDKBootstrap.tsx` file includes an inline script used for SDK bootstrapping within iframes. This script manipulates `window.history` and `window.fetch` to ensure proper widget behavior (e.g., external links, API calls). While inline scripts generally require careful review, this implementation appears designed to enable core functionality rather than malicious intent. The project effectively uses environment variables for sensitive configurations (`BETTER_AUTH_SECRET`, `STRIPE_SECRET_KEY`, `GOOGLE_CLIENT_SECRET`), with `lib/utils/env-validation.ts` providing startup validation to ensure critical variables are set, mitigating hardcoded secret risks. Drizzle ORM helps prevent SQL injection. Rate limiting is implemented via Redis. Overall, good security practices are in place, but the nature of embedded dynamic scripts warrants ongoing vigilance.
Similar Servers
mcp-chat
An AI chat application that leverages Pipedream's Model Context Protocol (MCP) to integrate with thousands of APIs and perform tool-based actions, serving as a reference for building powerful AI chat solutions.
mcp-tools
Provides a TypeScript library to simplify building Model Context Protocol (MCP) clients and servers, enabling AI applications to securely access private user data through OAuth-based authentication flows.
SageMCP
A scalable platform for hosting MCP servers with multi-tenant support, OAuth integration, and connector plugins for various services, deployed on Kubernetes.
leanmcp-sdk
Building production-ready Model Context Protocol (MCP) servers with TypeScript, supporting features like authentication, elicitation, and UI integration for AI agents.