Files
claude-code/mcp-server/api/index.ts
nirholas c0b205208d Add Dockerfile and Vercel integration for MCP server
 Implement x402 payment handling in WebFetchTool
📝 Refactor count increment logic in X402 payment tracker
 Introduce feature flag management in Bun build
 Create macro for package versioning and issue reporting
 Add preload script for Bun bundler features
2026-03-31 10:45:43 +00:00

22 lines
805 B
TypeScript

/**
* Vercel serverless function — proxies requests to the Express HTTP server.
*
* This file re-exports the Express app as a Vercel serverless handler.
* Vercel automatically routes /api/* to this function.
*
* Deploy:
* cd mcp-server && npx vercel
*
* Environment variables (set in Vercel dashboard):
* CLAUDE_CODE_SRC_ROOT — absolute path where src/ is deployed
* MCP_API_KEY — optional bearer token for auth
*
* NOTE: Vercel serverless functions are stateless, so the Streamable HTTP
* transport (which requires sessions) won't persist across invocations.
* For production use with session-based MCP clients, prefer Railway/Render/VPS.
* The legacy SSE transport and stateless tool calls work fine on Vercel.
*/
export { app as default } from "./vercelApp.js";