Nightlife Search
nightlife-mcp
基于 Supabase 的夜生活活动发现 MCP 服务器。
快速开始
生产环境端点: https://api.nightlife.dev/mcp
在 nightlife.dev 获取免费 API 密钥
添加到 Claude Desktop 配置 (
claude_desktop_config.json):
{
"mcpServers": {
"nightlife": {
"url": "https://api.nightlife.dev/mcp",
"headers": {
"x-api-key": "YOUR_API_KEY"
}
}
}
}有关 curl、TypeScript SDK 及其他客户端的信息,请参阅 CLIENT_SETUP.md。
Related MCP server: EvHenter MCP
已实现功能 (v0.3)
search_eventsget_tonightget_event_detailssearch_venuesget_venue_infosearch_performersget_performer_infolog_unmet_requestcreate_vip_booking_requestget_vip_booking_statusget_vip_table_availabilityget_vip_table_chartget_recommendations(v0.2,需设置MCP_ENABLE_RECOMMENDATIONS=true)带有 API 密钥中间件的可流式 HTTP 端点
结构化工具输出模式 (
outputSchema)具有稳定错误代码的确定性工具错误负载
在
/health暴露运行时请求/工具指标
前置要求
Node.js 18+
Supabase 项目 URL + 服务角色密钥
设置
cp .env.example .env
npm install在 .env 中设置环境变量:
SUPABASE_URLSUPABASE_SERVICE_ROLE_KEY
可选:
DEFAULT_CITY(默认:tokyo)MCP_TOP_LEVEL_CITIES(默认示例:tokyo,san-francisco;控制不支持城市响应中的available_cities)DEFAULT_COUNTRY_CODE(默认:JP)NIGHTLIFE_BASE_URL(默认:https://nightlifetokyo.com)MCP_HTTP_REQUIRE_API_KEY(默认:true)MCP_HTTP_USE_DB_KEYS(默认:true)MCP_HTTP_ALLOW_ENV_KEY_FALLBACK(默认:true)MCP_HTTP_API_KEYS(逗号分隔的旧版回退密钥)MCP_ENABLE_RECOMMENDATIONS(默认:false;启用get_recommendations)
数据库 API 密钥模式(推荐)
HTTP 身份验证可以使用来自 Supabase 的持久 API 密钥以及配额跟踪。
在 Supabase SQL 编辑器中运行 SQL 迁移:
-- copy file contents from:
-- supabase/migrations/20260219094000_mcp_api_keys.sql确保在
.env中启用了数据库身份验证标志:
MCP_HTTP_REQUIRE_API_KEY=true
MCP_HTTP_USE_DB_KEYS=true
MCP_HTTP_ALLOW_ENV_KEY_FALLBACK=true创建 API 密钥记录:
npm run key:create -- --name claude-desktop --tier starter --daily-quota 1000 --minute-quota 60这将打印一次原始 api_key。请安全保存并在 MCP HTTP 调用中使用它。
如果数据库 RPC 不可用,仅当 MCP_HTTP_ALLOW_ENV_KEY_FALLBACK=true 时,回退到 MCP_HTTP_API_KEYS 才有效。
礼宾未满足请求积压
公共礼宾流程可以将不支持的用户意图记录到 Supabase。
运行迁移:
-- copy file contents from:
-- supabase/migrations/20260226_concierge_unmet_requests.sql当现有夜生活数据无法提供良好答案时,调用 MCP 工具 log_unmet_request。
VIP 预订第一阶段
VIP 卡座预订提交和状态跟踪由 Supabase 提供支持。
运行迁移:
-- copy file contents from:
-- supabase/migrations/20260227143000_vip_phase1_requests_and_queue.sql
-- supabase/migrations/20260228124500_add_vip_booking_enabled_to_venues.sql
-- and if already deployed before 2026-02-28:
-- supabase/migrations/20260228111000_vip_outward_language_defaults.sql
-- supabase/migrations/20260301010000_vip_table_availability_chart.sql
-- supabase/migrations/20260301114000_vip_table_chart_storage_bucket.sql
-- supabase/migrations/20260303093000_vip_dashboard_admin_edits.sql然后调用 MCP 工具:
create_vip_booking_requestget_vip_booking_statusget_vip_table_availability(按场地/日期范围读取每日卡座可用性)get_vip_table_chart(读取带有可选日期状态叠加层和可选layout_image_url的结构化卡座图表)
create_vip_booking_request 的对话策略:
在提交前确认场地当地时间的预订日期/时间。
使用双日期确认措辞,特别是对于深夜到达 (
00:00-05:59) 的情况。必需的确认模板:
Just to confirm: you want a table for [Night Day] night ([Night Date]), arriving around [Time] on [Arrival Day], [Arrival Date] ([Timezone]). I'll submit that as [Night Day] night with [Time] arrival. Is that correct?
如果用户给出的时间如
2am而没有日期,请询问:Do you mean 2:00 AM after Thursday night (Friday morning), or after Friday night (Saturday morning)?
如果用户更改了日期,请在提交前重新生成确认信息。
运营级会话还具有内部队列工具:
list_vip_reservations(所有未完成的预订;默认状态:submitted,in_review,confirmed)list_vip_requests_for_alerting(仅限到期提醒)mark_vip_request_alert_sentclaim_vip_request_after_ackupdate_vip_booking_status(设置confirmed/rejected/cancelled并附带审计事件)upsert_vip_venue_tables(写入场地卡座定义 + 图表坐标 + 可选卡座备注 + 可选layout_image_url)upsert_vip_table_availability(写入每日卡座状态)upload_vip_table_chart_image(将图表图片上传到存储并将layout_image_url附加到场地卡座元数据)
要首先发现可预订的场地,请使用:
search_venues并设置vip_booking_supported_only=true或
get_venue_info并检查vip_booking_supported
对于内部场地预订工作人员,通过数据库函数认领队列任务:
public.claim_next_vip_agent_task(p_agent_id text)
VIP 运营仪表板
内部仪表板路由:
GET /ops/loginPOST /ops/loginPOST /ops/logoutGET /ops/vip-dashboard
内部管理 API 路由(受 Cookie 会话保护):
GET /api/v1/admin/vip-bookingsGET /api/v1/admin/vip-bookings/:idPATCH /api/v1/admin/vip-bookings/:id
必需的环境变量:
VIP_DASHBOARD_ADMINS(逗号分隔的username:password对)
可选的环境变量:
VIP_DASHBOARD_SESSION_TTL_MINUTES(默认:720)VIP_DASHBOARD_SESSION_COOKIE_NAME(默认:vip_dashboard_session)
运行
Stdio (本地桌面客户端):
npm run dev可流式 HTTP:
npm run dev:http生产环境构建:
npm run build
npm start生产环境 HTTP:
npm run start:http已验证的生产环境冒烟测试:
NLT_API_KEY=... npm run smoke:prod:auth可选的环境变量覆盖:
NLT_MCP_URL(默认:https://api.nightlife.dev/mcp)NLT_REST_BASE_URL(默认:https://api.nightlife.dev/api/v1)NLT_SMOKE_CITY(默认:tokyo)
用于推荐的调试 Web UI:
MCP_ENABLE_RECOMMENDATIONS=true npm run dev:http
# open http://127.0.0.1:3000/debug/recommendations注意事项
日期处理支持
tonight,this_weekend,YYYY-MM-DD和YYYY-MM-DD/YYYY-MM-DD。get_recommendations返回最多 10 个具有动态城市感知回退的多样化模态槽位。场地和表演者工具包含即将举行的活动快照。
log_unmet_request将未解决的用户请求写入public.concierge_unmet_requests。VIP 第一阶段将预订提交写入
public.vip_booking_requests,并将工作队列任务写入public.vip_agent_tasks。VIP 库存将卡座定义写入
public.vip_venue_tables,并将特定日期状态写入public.vip_table_availability。search_venues和get_venue_info包含vip_booking_supported,以便客户端可以准确显示哪些场地接受 VIP 预订提交。vip_booking_supported源自public.venues.vip_booking_enabled(与guest_list_enabled分开)。create_vip_booking_request仅接受vip_booking_supported=true的场地。城市处理由
public.cities(slug, 时区和营业日截止时间) 提供支持。支持的顶级城市是环境可配置的(例如
tokyo和san-francisco),而东京可以保持为默认值。Stdio 传输:无 API 密钥检查。
HTTP 传输 (
/mcp):默认需要 API 密钥 (MCP_HTTP_REQUIRE_API_KEY=true)。API 密钥标头:
Authorization: Bearer <key>x-api-key: <key>
当启用数据库支持的身份验证时,HTTP 响应包含密钥层级/来源和速率限制标头:
X-API-Key-TierX-API-Key-SourceX-RateLimit-Daily-LimitX-RateLimit-Daily-RemainingX-RateLimit-Minute-LimitX-RateLimit-Minute-Remaining
健康检查端点:
/health。用于手动工具测试的调试页面:
/debug/recommendations。工具错误作为 JSON 文本负载返回在
result.content[0].text中:INVALID_DATE_FILTERINVALID_EVENT_IDUNSUPPORTED_EVENT_IDEVENT_NOT_FOUNDINVALID_VENUE_IDVENUE_NOT_FOUNDINVALID_PERFORMER_IDPERFORMER_NOT_FOUNDINVALID_BOOKING_REQUESTBOOKING_REQUEST_NOT_FOUNDBOOKING_STATUS_UPDATE_FAILEDVIP_TASK_NOT_AVAILABLEVIP_ALERT_UPDATE_FAILEDVIP_CLAIM_FAILEDINVALID_REQUESTREQUEST_WRITE_FAILEDDB_QUERY_FAILEDINTERNAL_ERROR
贡献与 CI
有关工作流程和规则,请参阅 CONTRIBUTING.md。AI 代理请阅读 AGENTS.md。CLAUDE.md 是架构的真理来源。
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables users to search for events, performers, and venues through the SeatGeek API. Provides event recommendations, detailed venue seating information, and performer discovery capabilities for ticketed entertainment events.43MIT
- FlicenseNot gradedqualityDmaintenanceAn event aggregation platform that enables users to search, retrieve, and create event data using a Sanity.io backend. It provides specialized tools for managing event details, locations, categories, and venues through the Model Context Protocol.
- AlicenseNot gradedqualityDmaintenancePreference-aware events discovery MCP server that aggregates events, restaurants, and cultural activities across multiple sources and re-ranks them against your personal taste profile to surface things you'd actually want to do.1MIT
- AlicenseNot gradedqualityCmaintenanceEnables querying electronic/dance music events from 19hz.info by region, with tools to list available regions and retrieve events data.7MIT
Related MCP Connectors
Live-concert discovery: 44,000+ upcoming concerts worldwide by city, artist, genre or festival.
Discover festivals worldwide by location, date, and genre. Compare options with key details like d…
Search and book theatre, attractions, tours across 681 cities. 13,090+ products.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/alcylu/nightlife-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server