Skip to main content
Glama

Vercel에서 MCP 서버 실행하기

사용법

MCP TypeScript SDK 문서에 따라 api/server.ts를 업데이트하여 도구, 프롬프트 및 리소스를 추가하세요.

이 템플릿의 Next.js 버전도 있습니다

Related MCP server: Next.js MCP Server Template

MCP 클라이언트 통합

이 서버를 MCP 클라이언트 애플리케이션에 추가할 때는 배포 URL 뒤에 /mcp를 붙여 사용하세요:

https://your-deployment-url.vercel.app/mcp

예제 도구

이 템플릿에는 시작을 돕기 위한 두 가지 예제 도구가 포함되어 있습니다:

  • roll_dice - N면체 주사위를 굴립니다 (최소 2면)

  • get_weather - 위도, 경도, 도시 이름을 사용하여 (API를 통해) 현재 날씨 데이터를 가져옵니다

이 도구들은 기본적인 기능과 API 통합 패턴을 보여줍니다. 이를 여러분만의 도구로 교체하세요.

Vercel 실행 시 참고 사항

  • 효율적인 실행을 위해 Fluid compute가 활성화되어 있는지 확인하세요.

  • Fluid compute를 활성화한 후, Vercel Pro 또는 Enterprise 계정을 사용하는 경우 vercel.json을 열어 최대 지속 시간(max duration)을 800으로 조정하세요.

  • MCP 템플릿 배포하기

로컬 개발

  • 로컬 개발을 위해 vercel dev를 실행하세요.

  • 또는, 원하는 서버 프레임워크에 시스템을 통합하세요.

샘플 클라이언트

scripts/test-streamable-http-client.mjs에는 호출을 테스트할 수 있는 샘플 클라이언트가 포함되어 있습니다.

node scripts/test-streamable-http-client.mjs https://mcp-on-vercel.vercel.app

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    Not graded
    maintenance
    A template for running Model Context Protocol servers on Vercel with Redis support, allowing developers to deploy their custom tools, prompts, and resources using the MCP TypeScript SDK.
    -
  • -
    license
    Not graded
    quality
    Not graded
    maintenance
    A template for building MCP servers in Next.js applications using the Vercel MCP Adapter. Provides a foundation for adding custom tools, prompts, and resources to any Next.js project with deployment support on Vercel.
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    A template for deploying MCP servers on Vercel with example tools for rolling dice and getting weather data. Provides a foundation for building custom MCP servers with tools, prompts, and resources that can be deployed to Vercel's serverless platform.
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    A template for deploying Model Context Protocol servers as Next.js routes using the mcp-handler adapter, enabling easy integration of MCP tools, prompts, and resources into any Next.js application.
    MIT