MCP TypeScript Template 🚀
@cyanheads
About 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.
Basic information
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"mcp-ts-template": {
"command": "bun",
"args": [
"run",
"rebuild",
"#",
"clean",
"+",
"build",
"(scripts/clean.ts",
"+",
"scripts/build.ts)"
]
}
}
}Tools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
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
FAQ from MCP TypeScript Template 🚀
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.
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).
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.
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.
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.
More Developer Tools MCP servers
Code Index MCP
johnhuang316A Model Context Protocol (MCP) server that helps large language models index, search, and analyze code repositories with minimal setup
MCP Containers
metorialConnect any AI model to 1200+ integrations (MCP, CLI, API)
Unity MCP (Server + Plugin)
IvanMurzakAI Skills, MCP Tools, and CLI for Unity Engine. Full AI develop and test loop. Use cli for quick setup. Efficient token usage, advanced tools. Any C# method may be turned into a tool by a single line. Works with Claude Code, Gemini, Copilot, Cursor and any other absolutely for fr
MCP-Scan: An MCP Security Scanner
invariantlabs-aiSecurity scanner for AI agents, MCP servers and agent skills.
nuxt-mcp / vite-plugin-mcp
antfuMCP server helping models to understand your Vite/Nuxt app better.
Comments