my-mcp-server

my-mcp-server

Provides tools for greetings, calculations, weather, geocoding, and image generation via Hugging Face, deployable to Vercel and integrable with Cursor.

Category
Visit Server

README

my-mcp-server

Next.js + mcp-handler 기반 Streamable HTTP MCP 서버입니다. Vercel에 배포할 수 있습니다.

구조

app/
  api/[transport]/route.ts   # HTTP MCP 엔드포인트 (/api/mcp)
  page.tsx
  layout.tsx
lib/mcp/
  server.ts                  # 도구·프롬프트·리소스 등록
  helpers.ts
  request-context.ts         # x-hf-token 요청 컨텍스트

로컬 실행

npm install
npm run dev

MCP 엔드포인트: http://localhost:3000/api/mcp

MCP Inspector로 테스트

npx @modelcontextprotocol/inspector
  • Transport: Streamable HTTP
  • URL: http://localhost:3000/api/mcp

Cursor 연결

로컬:

{
  "mcpServers": {
    "my-mcp-server": {
      "url": "http://localhost:3000/api/mcp",
      "headers": {
        "x-hf-token": "hf_your_token_here"
      }
    }
  }
}

Vercel 배포 후:

{
  "mcpServers": {
    "my-mcp-server": {
      "url": "https://YOUR_PROJECT.vercel.app/api/mcp",
      "headers": {
        "x-hf-token": "hf_your_token_here"
      }
    }
  }
}

HF 토큰 (x-hf-token)

generate-image 도구는 Hugging Face Inference API를 사용합니다. 토큰 우선순위:

  1. 요청 커스텀 헤더 x-hf-token (클라이언트별 입력)
  2. 서버 환경변수 HF_TOKEN (선택적 폴백)

클라이언트에서 헤더로 넘기면 서버에 토큰을 고정 저장하지 않아도 됩니다.

Vercel 배포

npx vercel

또는 GitHub 연동 후 Vercel 대시보드에서 Import.

선택적으로 서버 공통 폴백 토큰을 쓰려면 Vercel 프로젝트에 HF_TOKEN을 설정하세요.

참고:

제공 기능

종류 이름 설명
Tool greet 인사말
Tool calculator 사칙연산
Tool get-time 타임존 현재 시간
Tool geocode 도시 → 좌표
Tool get-weather 날씨/예보
Tool generate-image FLUX.1-schnell 이미지 생성
Resource info://server 서버 정보
Prompt code-review 코드 리뷰 프롬프트

스크립트

  • npm run dev — 로컬 개발 서버
  • npm run build — 프로덕션 빌드
  • npm start — 프로덕션 서버

라이선스

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured