sakenowa-mcp-vercel

sakenowa-mcp-vercel

Enables querying Japanese sake data (prefectures, sakes, flavors, rankings) via MCP protocol, deployed as a Vercel serverless function.

Category
Visit Server

README

sakenowa-mcp-vercel

Vercel deploy wrapper for @yawaragi/sakenowa-mcp. Exposes the MCP streamable-HTTP endpoint as a Next.js Pages-API function, so the OSS MCP server (which natively wants a long-lived http.Server.listen()) can run on Vercel's serverless model.

The endpoint is at /api/mcp. Point any MCP client (the Vercel AI SDK's @ai-sdk/mcp, Claude Desktop, etc.) at https://<your-deploy>/mcp (with the /api path prefix configured in the wrapper, see below — MCP_HTTP_PATH style env var coming in a follow-up).

How it works

@yawaragi/sakenowa-mcp@0.1.0 ships a streamable-HTTP transport that is already stateless per request — a fresh Server + StreamableHTTPServerTransport is constructed inside every invocation, then closed when the response stream ends. The published createMcpHttpServer(...) wrapper just plugs that per-request handler into Node's http.createServer.

This project does the same thing, but plugs the per-request handler into a Next.js Pages-API function instead. Result: each Vercel function invocation does the equivalent of one stock sakenowa-mcp request, with no state shared between invocations except the pg connection pool (which Vercel keeps warm across requests on the same function container).

The handler lives at pages/api/mcp.ts and mirrors sakenowa-mcp's internal handleRequest (@yawaragi/sakenowa-mcp/dist/http.js) closely.

Deploy

  1. Connect this repo to a Vercel project in the Vercel dashboard. Set the project name to sakenowa-mcp (or whatever — the deploy URL is what matters downstream).

  2. Set the project region to fra1 (Frankfurt, EU) for DPA continuity with the Supabase mirror. Already pinned in vercel.json.

  3. Set the environment variable DATABASE_URL to the Sakenowa-mirrored Postgres connection string. Use the EU pooler URL (aws-1-eu-central-1.pooler.supabase.com:5432), NOT the direct DB URL — serverless concurrency would otherwise blow through max_connections. See .env.example.

  4. Deploy. Vercel auto-deploys on push.

  5. Smoke-test the deployment:

    curl -s -X POST https://<your-deploy>.vercel.app/api/mcp \
      -H "Content-Type: application/json" \
      -H "Accept: application/json, text/event-stream" \
      -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | jq
    

    Expected: a JSON-RPC response advertising the six tools (list_prefectures, search_sakes_by_name, find_similar_sakes, get_sake_details, find_sakes_by_flavor, get_top_ranked).

  6. Point the yawaragi app at the deploy — set MCP_SAKENOWA_URL=https://<your-deploy>.vercel.app/api/mcp on the yawaragi Vercel project (Production + Preview).

Auth

@yawaragi/sakenowa-mcp v0.1.0 ships with no built-in authentication — the OSS asset's contract is "anyone with DATABASE_URL can query, anyone with the HTTP endpoint can query." The data is public-domain Sakenowa data, and no PII / user-state ever passes through the server.

If you want to restrict access, layer auth in front: Vercel rewrite with a bearer token, Cloudflare Tunnel with mTLS, etc. Not built into this wrapper.

Caveats

  • enableJsonResponse: true — the wrapper requests plain application/json responses, not the SSE-streamed variant. All six tools are short synchronous reads; streaming would only matter if a future tool added long-running work.
  • Cold-start cost: ~200–500ms to construct the pg pool + first MCP Server. Subsequent warm invocations are near-instant.
  • Subpath imports (@yawaragi/sakenowa-mcp/dist/server.js): brittle because v0.1.0 has no public exports field. A patch-level follow-up against sakenowa-mcp to add exports mapping is tracked separately; once that ships, switch to named subpath imports here.
  • Pool sizing: default Pool has max: 10. Vercel can spawn many parallel function containers; the Supabase pooler handles that fine, but if you switch to a direct DB URL you'd need to tune.

Local dev

pnpm install
DATABASE_URL=postgresql://... pnpm dev   # binds on :3030 by default

# In another terminal
curl -s -X POST http://localhost:3030/api/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

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