Worker配置类型生成工具

用于基于Cloudflare Worker配置生成和同步类型的工具,支持在Hono框架中实例化时传递CloudflareBindings作为泛型。

  • by tetsuzawa
  • TypeScript
  • 本地部署
  • 更新于
在 GitHub 查看 tetsuzawa/mcp-server-auth-v20250618

使用说明

npm install
npm run dev
npm run deploy

For generating/synchronizing types based on your Worker configuration run:

npm run cf-typegen

Pass the CloudflareBindings as generics when instantiation Hono:

// src/index.ts
const app = new Hono<{ Bindings: CloudflareBindings }>()

InspectorでMCPを確認する場合

Auth が未実装なので

DANGEROUSLY_OMIT_AUTH=true pnpx @modelcontextprotocol/inspector

で起動し、

  • Transport Type: Streamable HTTP
  • URL: http://localhost:8787/mcp

で実行できた。