{"id":30237904,"url":"https://github.com/stainless-api/vercel-mcp-template","last_synced_at":"2025-08-15T02:57:55.576Z","repository":{"id":309117048,"uuid":"1031944812","full_name":"stainless-api/vercel-mcp-template","owner":"stainless-api","description":"Template for hosting a remote MCP server in Vercel.","archived":false,"fork":false,"pushed_at":"2025-08-08T21:27:45.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-10T00:36:58.062Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stainless-api.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-04T15:08:55.000Z","updated_at":"2025-08-04T16:58:13.000Z","dependencies_parsed_at":"2025-08-10T14:31:44.784Z","dependency_job_id":null,"html_url":"https://github.com/stainless-api/vercel-mcp-template","commit_stats":null,"previous_names":["stainless-api/vercel-mcp-template"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/stainless-api/vercel-mcp-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stainless-api%2Fvercel-mcp-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stainless-api%2Fvercel-mcp-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stainless-api%2Fvercel-mcp-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stainless-api%2Fvercel-mcp-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stainless-api","download_url":"https://codeload.github.com/stainless-api/vercel-mcp-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stainless-api%2Fvercel-mcp-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270515656,"owners_count":24598440,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-15T02:00:12.559Z","response_time":110,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-08-15T02:57:50.496Z","updated_at":"2025-08-15T02:57:55.553Z","avatar_url":"https://github.com/stainless-api.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vercel MCP Server Template\n\nThis template enables you to run a Stainless-generated MCP (Model Context Protocol) server as a remote MCP server on Vercel using the mcp-handler package.\n\n## Overview\n\nThis template provides a Next.js-based serverless application that hosts your MCP tools on Vercel with bearer token authentication. The main entry point is `app/[transport]/route.ts` which handles MCP protocol requests.\n\n## Implementation Requirements\n\n### 1. Replace Package Imports\n\nIn `app/[transport]/route.ts`, you need to replace three placeholder imports with your Stainless-generated packages:\n\n```typescript\n// Replace these imports:\nimport endpoints from 'YOUR_MCP_PACKAGE/tools';\nimport { initServer } from 'YOUR_MCP_PACKAGE/server';\nimport YourSDK from 'YOUR_SDK_PACKAGE';\n```\n\n### 2. Implement Token Verification\n\nThe `verifyToken` function must be implemented to validate bearer tokens with your identity provider:\n\n```typescript\nconst verifyToken = async (req: Request, bearerToken?: string): Promise\u003cAuthInfo | undefined\u003e =\u003e {\n  // TODO: Implement your IdP integration here\n  // Should return:\n  // {\n  //   token: string,      // The validated token\n  //   clientId: string,   // Client identifier\n  //   scopes: string[]    // Array of authorized scopes\n  // }\n  // if valid, or undefined if invalid\n};\n```\n\n### 3. Initialize Your Client\n\nReplace the placeholder client initialization with your actual SDK client:\n\n```typescript\n// Replace:\nconst client = YourSDK(\n  auth: authInfo.token,\n)\n\n// With your actual client initialization:\nconst client = new SDK({\n  auth: authInfo.token,\n  // ... other configuration\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstainless-api%2Fvercel-mcp-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstainless-api%2Fvercel-mcp-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstainless-api%2Fvercel-mcp-template/lists"}