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.

评论

开发工具 分类下的更多 MCP 服务器