在 Next.js App Router 上使用 mcp-handler 提供单 URL 的 Streamable HTTP 连接器端点,无需重定向
small-business-mcp-starter — Next.js 目录站模板
作者 ModernMustardSeed
基于 Next.js 与 mcp-handler 的远程 MCP 连接器模板,内置工具约定校验、SSRF 安全抓取、限流、评测与提交清单,帮助通过 Claude 目录审核。
看看你的网站会是什么样
浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。
全部页面与视图 2
截图用于了解视觉与布局,交互效果请以实际项目为准。
值得关注的模板亮点
从已有项目资料中,快速了解它的特点。
加载时校验工具约定:标题、readOnlyHint 或 destructiveHint、snake_case 名称不超过 64 字符、描述性说明,违反则测试失败
针对 Claude 共享出口网段设计的限流,不按 IP 计数,也不返回 HTTP 429
为读取用户提供 URL 的工具提供 SSRF 安全抓取,包含公网地址限制、受控 DNS 查询、重定向检查、字节上限与超时
无模型、无 API 密钥的评测工具,可对运行中的 URL 执行真实提示用例
由单一配置文件驱动的文档、隐私、条款、支持页面与 security.txt,并附目录提交清单
模板详细介绍
这是一个面向 Claude 远程 MCP 连接器的 Next.js 启动模板,由 Modern Mustard Seed 维护,采用 MIT 许可。它把生产连接器常用的模式整理成可复制的项目结构:在 Next.js App Router 上通过 mcp-handler 以 Streamable HTTP 在一个 URL 暴露连接器,不依赖重定向。模板在加载时强制工具约定,包括每个工具必须有标题、readOnlyHint 或 destructiveHint、snake_case 且不超过 64 字符的名称,以及描述性而非引导性的说明,违反约定会让 pnpm test 失败。它还提供具体错误信息、输出大小上限、针对 Claude 共享出口网段设计的限流(不按 IP 计数、不返回 429)、面向用户提供 URL 的 SSRF 安全抓取、无模型与 API 密钥的评测工具,以及由单一配置文件驱动的文档、隐私、条款、支持页面和 security.txt。仓库附带一个可运行的示例连接器:美国联邦假日与工作日日历,包含五个只读工具,覆盖 2021 至 2100 年,不发起网络请求也不存储数据。模板还提供与目录表单对应的提交清单和模式说明文档。使用前需要 Node 22.6 或更高版本、pnpm 以及可运行 Next.js 的托管环境;示例本身不需要环境变量,可选配置站点 URL 与 Upstash Redis 以启用跨实例的全局限流和缓存。
适合你的项目吗?
适用场景
- 为 Claude 构建并提交远程 MCP 连接器,需要满足目录审核的工具约定与页面要求
- 在 Next.js 项目中快速搭建符合 MCP 规范的连接器端点与工具注册结构
- 为读取用户提供 URL 的工具加入 SSRF 防护、输出大小上限与限流逻辑
- 用真实提示对已部署的连接器运行评测,并执行提交前检查
- 参考美国联邦假日与工作日日历示例,实现只读工具与对应评测
适合人群
- 需要向 Claude 目录提交远程 MCP 连接器的开发者或小团队
- 使用 Next.js 并希望复用工具约定、限流与安全抓取模式的工程师
- 需要为连接器准备文档、隐私、条款与支持页面的项目维护者
- 希望用无模型评测和提交清单降低审核返工风险的团队
上手与定制指南
结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。
- 1
需要 Node 22.6 或更高版本、pnpm,以及可运行 Next.js 的托管环境(如 Vercel)
- 2
示例运行不需要环境变量;可选设置 SITE_URL 指定公开源,或配置 Upstash Redis 以启用跨实例全局限流与缓存
- 3
部署后应运行 pnpm preflight 与 pnpm evals 检查 HTTPS、无重定向、无 403 或 429、页面返回 200 以及 MCP 握手与注解规则
- 4
为 MCP 路径关闭 Attack Challenge Mode 和机器人防护规则,避免向 Claude 返回挑战页面
- 5
替换 app/icon.svg 与 app/apple-icon.png,并编辑 lib/site.ts 中的公司、支持与安全联系信息及政策日期
授权与来源资料
使用条件与限制
免费使用 · 保留许可声明本次收录的是公开仓库中采用 MIT 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。
使用时需要遵守
- 允许免费使用、修改、商用和分发该版本代码。
- 分发代码副本或实质性部分时,保留原作者版权声明和完整 MIT 许可声明。
- 代码按现状提供;担保与责任限制以原许可证及适用法律为准。
额外费用与待核对事项
- 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
- 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
- 使用前需要 Node 22.6 或更高版本、pnpm,以及可运行 Next.js 的托管环境(如 Vercel 账户)。
- 部署时须为 MCP 路径关闭 Attack Challenge Mode 及机器人防护规则,否则会向 Claude 返回挑战页面。
- 未配置 Redis 时,各实例仅在内存中按全局数值的十分之一自行限流,无法实现跨实例全局限流。
- 该工具包与 Anthropic 无关联或背书关系,Claude 为 Anthropic, PBC 的商标。
查看原文依据
Permission is hereby granted, free of charge
许可证原文
You need Node 22.6 or later, pnpm, and a Vercel account (any host that runs Next.js works).
README 原文
Leave Attack Challenge Mode and any bot-protection rule off for your MCP paths: they answer Claude with a challenge page.
README 原文
Without Redis, each instance limits itself in memory at one tenth of the global numbers.
README 原文
https://github.com/ModernMustardSeed/small-business-mcp-starter/blob/main/LICENSEhttps://github.com/ModernMustardSeed/small-business-mcp-starter/blob/main/README.mdThis kit is not affiliated with or endorsed by Anthropic. "Claude" is a trademark of Anthropic, PBC.
README 原文
DeepSeek 根据仓库许可证和 README 整理 ·2026-10-12。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。
项目核对记录与介绍依据
模板资料
- 来源平台
- GitHub
- 资料与维护参考分
- 资料较完整 · 85 / 100
- 技术栈
- Next.js · React
- 网站类型
- 目录站 · 启动器
这个分数如何计算
本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。
这个项目需要核对什么
- 记录的仓库更新时间
- 2026-10-12
- 截图检查日期
- 2026-10-12
已收录演示链接。请用你的内容与屏幕尺寸检查;有演示不代表表单、认证或支付已经可用。
目录记录的主要技术栈是 Next.js。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。
查看具体选型方法 →介绍的制作与核对状态
介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。
审核声明: [email protected] · 2026-10-13
查看当时使用的来源资料
SHA-256: cd0b6ff7fd80262436fa492b7eaf8d222313277cc8e571488ae59f3858e40cc7
2026-10-12T09:21:28.954Z
来源文件 / 仓库# Small Business MCP Starter Kit by Modern Mustard Seed Ship a remote MCP connector for Claude that is built to pass Anthropic's directory review on the first try. This kit is the set of patterns Modern Mustard Seed uses for the connectors it runs in production, pulled out into a clean Next.js project you can fork: - **A route template** on Next.js App Router and [`mcp-handler`](https://www.npmjs.com/package/mcp-handler), serving Streamable HTTP at one URL per connector, with no redirect. - **Tool conventions enforced at load time**: a title, `readOnlyHint` or `destructiveHint` on every tool, snake_case names of 64 characters or fewer, and descriptions that describe instead of steer. Break a rule and `pnpm test` fails, long before a reviewer sees it. - **Specific error messages** instead of "Bad Request", and **output size caps** under Claude's limits. - **Rate limiting built for Claude's shared egress range.** Every claude.ai user arrives from `160.79.104.0/21`, so nothing is keyed by IP and nothing returns HTTP 429. - **An SSRF-safe fetch** for any tool that reads a URL a user supplied, with tests that prove a listening loopback server receives zero requests. - **An eval harness** that runs real prompts against your live URL, with no model and no API key. - **Docs, privacy, terms and support page templates** plus `/.well-known/security.txt`, all driven by one config file. - **A submission checklist** mapped to the directory form's 10 steps and its seven policy acknowledgments, with every rule linked to Anthropic's documentation. - **A worked example**: a U.S. federal holiday and business-day calendar with five read-only tools that passes all 35 of its own evals. MIT licensed. Built by [Modern Mustard Seed](https://modernmustardseed.com). ## Working demo The example connector runs live, deployed from this repository with no changes: - Connector URL: `https://starter.modernmustardseed.com/holidays` (add it in Claude under **Customize > Connectors > Add custom connector**) - Docs page reviewers read: https://starter.modernmustardseed.com/docs/holidays - Privacy, terms and support: https://starter.modernmustardseed.com/privacy, [/terms](https://starter.modernmustardseed.com/terms), [/support](https://starter.modernmustardseed.com/support) - Official MCP Registry entry: `com.modernmustardseed/holiday-calendar` Run the evals against it yourself: `node eval/holidays.eval.mjs https://starter.modernmustardseed.com` ## Quickstart: 10 minutes You need Node 22.6 or later, pnpm, and a Vercel account (any host that runs Next.js works). **1. Make your copy.** (1 minute) ```sh gh repo create my-connector --template ModernMustardSeed/small-business-mcp-starter --public --clone cd my-connector pnpm install ``` Or select **Use this template** on GitHub. **2. Run it and prove it works.** (2 minutes) ```sh pnpm dev ``` In a second terminal: ```sh pnpm test pnpm evals http://localhost:3000 ``` You should see `32 pass` from the unit tests and `35 of 35 passed` from the evals. Open http://localhost:3000/docs/holidays to see the docs page reviewers read. **3. Make it yours.** (2 minutes) Edit `lib/site.ts`: company name, location, website, support inbox, security inbox, and the policy date. Every public page and `security.txt` read from it. Replace `app/icon.svg` and `app/apple-icon.png` with your own mark; the directory listing asks for an icon. **4. Deploy.** (3 minutes) Import the repository at [vercel.com/new](https://vercel.com/new), or from the terminal: ```sh vercel deploy --prod ``` Vercel sets `VERCEL_PROJECT_PRODUCTION_URL`, which the pages use for their links. Leave Attack Challenge Mode and any bot-protection rule off for your MCP paths: they answer Claude with a challenge page. **5. Check the deployment.** (1 minute) ```sh pnpm preflight https://your-project.vercel.app pnpm evals https://your-project.vercel.app npx @modelcontextprotocol/inspector --cli https://your-project.vercel.app/holidays --transport http --method tools/list ``` Preflight checks HTTPS, no redirect, no 403 or 429, every public page returning 200, the MCP handshake and the annotation rules. **6. Try it in Claude.** (1 minute) In Claude, open **Customize > Connectors > Add custom connector** and paste `https://your-project.vercel.app/holidays`. Ask: "An invoice dated 2026-11-20 is due in 10 business days. What date is that?" In Claude Code: ```sh claude mcp add --transport http holidays https://your-project.vercel.app/holidays ``` ## Build your own connector 1. Copy `lib/holidays/tools.ts` to `lib/<yours>/tools.ts`. Declare each tool as a `ToolSpec`: name, title, description, zod input schema, annotations, a per-minute limit, optional global limits, the fields that are safe to log, and a `run` function that returns `ok(data)` or `fail(code, sentence)`. 2. Copy `app/holidays/route.ts` to `app/<yours>/route.ts` and point it at your tools. 3. Copy `app/docs/holidays/page.tsx` to `app/docs/<yours>/page.tsx`. Keep the "For reviewers" section: you paste it into the form. 4. Rewrite `app/privacy/page.tsx` so every sentence is true of your tools: what they receive, what they read, what you keep and for how long, who else touches it. 5. Copy `eval/holidays.eval.mjs`. Write 20 to 50 cases from prompts real users type, with expected values from an authority outside your code. Include the error cases. 6. If a tool fetches a URL a user gave you, use `safeFetch` from `lib/mcp/safe-fetch.ts`. Never `fetch` a user-supplied URL directly. 7. Deploy, run `pnpm preflight` and `pnpm evals` against production, test every tool in Claude, then work through [docs/SUBMISSION-CHECKLIST.md](docs/SUBMISSION-CHECKLIST.md). Why each pattern exists, with the rule it answers: [docs/PATTERNS.md](docs/PATTERNS.md). ## What is in the box | Path | What it does | |---|---| | `app/holidays/route.ts` | The connector endpoint. One file per connector. | | `lib/mcp/tool.ts` | `ToolSpec`, `registerTools`, `runTool`: conventions, limits, errors, size cap, logging. | | `lib/mcp/limits.ts` | Per-instance and global limits, never by IP; Redis with an in-memory fallback; a small cache. | | `lib/mcp/safe-fetch.ts` | SSRF-safe fetch: public addresses only, guarded DNS lookup, five checked redirects, byte cap, deadline. | | `lib/holidays/` | The example connector: the holiday engine and its five tools. | | `lib/site.ts` | Company, support and security contacts, policy date. Edit first. | | `app/docs`, `app/privacy`, `app/terms`, `app/support` | The pages reviewers and users open. | | `app/.well-known/security.txt` | RFC 9116 security contact. | | `eval/` | Dependency-free MCP client and the example's 35 checks against a live URL. | | `scripts/preflight.mjs` | Pre-submission checks against a deployed URL. | | `scripts/check-prose.mjs` | Fails on em and en dashes in tracked files. | | `test/` | Unit tests for conventions, limits, SSRF guard and the example engine. | | `docs/` | The submission checklist and the pattern notes. | ## Environment The example runs with no environment variables. Optional: | Variable | Purpose | |---|---| | `SITE_URL` | Public origin, if you are not on Vercel or want a custom domain in page links. | | `UPSTASH_REDIS_REST_URL`, `UPSTASH_REDIS_REST_TOKEN` | Global rate limits and cache shared across instances. The Vercel Marketplace integration sets `KV_REST_API_URL` and `KV_REST_API_TOKEN` instead; both are read. Without Redis, each instance limits itself in memory at one tenth of the global numbers. | ## Commands | Command | What it does | |---|---| | `pnpm dev` | Local server on port 3000. | | `pnpm test` | Unit tests (Node's built-in runner). | | `pnpm evals <url>` | The example's evals against a running server. | | `pnpm preflight <url>` | Pre-submission checks against a deployed URL. | | `pnpm typecheck`, `pnpm lint`, `pnpm build` | The usual. | | `pnpm check:prose` | No em or en dashes in tracked files. | ## About the example The Holiday Calendar computes the eleven U.S. federal holidays from 5 U.S.C. 6103, a public-domain statute, with the observance rule federal offices follow: Saturday holidays move to the Friday before, Sunday holidays to the Monday after. It covers 2021 through 2100. Its tools list a year of holidays, find the next ones, check whether a date is a business day, add business days to a date, and count business days in a span. It makes no network calls and stores nothing. The evals check its answers against the Office of Personnel Management's published schedules. ## Contributing and security Issues and pull requests are welcome; see [CONTRIBUTING.md](CONTRIBUTING.md). Report vulnerabilities privately as described in [SECURITY.md](SECURITY.md). This kit is not affiliated with or endorsed by Anthropic. "Claude" is a trademark of Anthropic, PBC. Directory rules change; the checklist links every rule to Anthropic's documentation so you can confirm it before you submit. ## License [MIT](LICENSE), Copyright (c) 2026 Modern Mustard Seed LLC.
看看同类模板
对比同技术栈与用途的模板,找到更适合的视觉与内容结构。

ai-website-cloner-template
Clone any website with one command using AI coding agents
Next.js · 启动器

Next.js SaaS Starter
Next.js SaaS Starter 是 Next.js 官方维护的 SaaS 起点模板,定位介于学习资源和可直接部署的脚手架之间。
Next.js · SaaS

Next.js Commerce
Next.js Commerce 是 Vercel 团队维护的电商启动模板,基于 Next.js App Router 构建,采用服务端渲染、React Server Components、Server Actions …
Next.js · 电商

Next-js-Boilerplate
Next-js-Boilerplate 是一个面向 Next.js 16、Tailwind CSS 4 和 TypeScript 的启动器,核心定位是开发者体验优先。
Next.js · 启动器

tailwind-nextjs-starter-blog
tailwind-nextjs-starter-blog 是一个面向个人技术博客的 Next.js 与 Tailwind CSS 启动模板,其 v2 版本基于 App Router 与 React Server Comp…
Next.js · 博客

next-forge
Production-grade Turborepo template for Next.js apps.
Next.js · 启动器
