# Neon MCP Server - Landing & Remote Server
This directory contains:
1. **Landing Page**: Marketing site for the Neon MCP Server
2. **Remote MCP Server**: Vercel-hosted serverless MCP server accessible at `mcp.neon.tech`
## Architecture
The remote MCP server is deployed on Vercel's serverless infrastructure using Next.js App Router.
### Key Components
- **`app/api/[transport]/route.ts`**: Main MCP handler supporting both SSE and Streamable HTTP transports
- **`app/api/authorize/`, `callback/`, `token/`, `revoke/`**: OAuth 2.0 flow endpoints
- **`app/.well-known/`**: OAuth discovery endpoints
- **`mcp-src/`**: MCP server implementation adapted for Vercel's bundler
- **`lib/`**: Next.js-compatible utilities (config, OAuth)
## Development
```bash
# Install dependencies
bun install
# Run development server
bun dev
# Build for production
bun run build
```
## Environment Variables
Required for the remote MCP server:
| Variable | Description |
|----------|-------------|
| `SERVER_HOST` | Server URL (defaults to `VERCEL_URL`) |
| `UPSTREAM_OAUTH_HOST` | Neon OAuth provider URL |
| `CLIENT_ID` | OAuth client ID |
| `CLIENT_SECRET` | OAuth client secret |
| `COOKIE_SECRET` | Secret for signed cookies |
| `KV_URL` | Vercel KV (Upstash Redis) URL |
| `OAUTH_DATABASE_URL` | Postgres URL for token storage |
## Deployment
The server is automatically deployed to Vercel on push to the main branch. Preview deployments are created for pull requests.
See `vercel-migration.md` for detailed migration documentation from the previous Express-based deployment.