MCP.so
ログイン

MCP TypeScript Template

@cyanheads

基本情報

カテゴリ

開発者ツール

ライセンス

Apache-2.0

トランスポート

stdio

作者

cyanheads

MCP TypeScript Template について

Agent-native TypeScript framework for building MCP servers. Declarative definitions with auth, multi-backend storage, OpenTelemetry, and first-class support for Bun/Node/Cloudflare Workers.

MCP TypeScript Template の設定

以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。

{
  "mcpServers": {
    "mcp-ts-template": {
      "command": "bun",
      "args": [
        "run",
        "rebuild",
        "#",
        "clean",
        "+",
        "build",
        "(scripts/clean.ts",
        "+",
        "scripts/build.ts)"
      ]
    }
  }
}

MCP TypeScript Template のツール

ツール一覧はまだありません

この掲載には表示できるツール一覧がまだありません。サーバーにツールがないという意味ではありません。対応機能はプロジェクトのドキュメントをご確認ください。

ツールは README から自動的に抽出されます。メンテナーは ## Tools という見出しの下に記載することで、このタブに反映できます。

概要

What is MCP TypeScript Template 🚀?

The MCP TypeScript Template is an agent-native TypeScript framework and starter project for building MCP servers. It provides declarative tool, resource, and prompt definitions with built-in auth, multi-backend storage, OpenTelemetry observability, and first-class support for Bun, Node.js, and Cloudflare Workers. It is designed to let developers focus on domain logic while the framework handles infrastructure.

How to use MCP TypeScript Template 🚀?

Run bunx @cyanheads/mcp-ts-core init my-mcp-server to scaffold a new project, then cd my-mcp-server && bun install. Use the tool(), resource(), and prompt() builders to define your server’s capabilities and call createApp() in the entry point. Configuration is done via environment variables.

Key features of MCP TypeScript Template 🚀

  • Declarative tool, resource, and prompt builders with Zod schemas
  • Unified context for logging, storage, elicitation, and cancellation
  • Auth modes: none, JWT, or OAuth, checked automatically
  • Typed error contracts that publish in tools/list
  • Multi‑backend storage: in‑memory, filesystem, Supabase, Cloudflare D1/KV/R2
  • Observability with Pino logging and optional OpenTelemetry
  • Agent‑friendly developer experience with CLAUDE.md and Agent Skills

Use cases of MCP TypeScript Template 🚀

  • Build a search tool that queries an external API and returns structured results
  • Expose a database as MCP resources with automatic caching and access control
  • Create long‑running task tools for operations like data export or report generation
  • Deploy an MCP server on Cloudflare Workers using the same definitions

よくある質問

1

What runtimes does the template support?

It supports Bun (v1.3.0+), Node.js, and Cloudflare Workers. Scaffolded projects can use either the standard `createApp()` or `createWorkerHandler()` for Workers.

2

What transports and auth modes are available?

Transports: `stdio` (default) and `http` (port configurable via `MCP_HTTP_PORT`). Auth modes: `none`, `jwt`, or `oauth` (configured with `MCP_AUTH_MODE` and related variables).

3

Which storage backends can I use?

Storage providers: `in‑memory` (default), `filesystem`, `supabase`, `cloudflare‑d1`, `cloudflare‑kv`, and `cloudflare‑r2`. Switch via the `STORAGE_PROVIDER_TYPE` env var.

4

How do I define a tool with structured output?

Use the `tool()` builder with a Zod `output` schema. Structured content is available to clients that support it. Add a `format()` method to render markdown for clients that only read `content[]`. A linter (run via `lint:mcp`) checks parity between the two surfaces.

5

Can I deploy on Cloudflare Workers?

Yes. The framework provides `createWorkerHandler()`, which returns an `ExportedHandler`. Use the same tool, resource, and prompt definitions — only the entry point differs.

コメント

「開発者ツール」の他のコンテンツ