# MCP Ts Template

> MCP Ts Template is an open-source MCP server for developer tools. TypeScript framework and template for building MCP servers with auth, storage and logging. It can run locally on your machine or as a hosted remote server.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, API, self-hosted, Linux, macOS, Windows
- **Repository:** https://github.com/cyanheads/mcp-ts-template
- **MCP Registry name:** io.github.cyanheads/mcp-ts-template
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools), [agent tooling](https://ai-powered.com/categories/agent-tooling)
- **Listing updated:** 2026-11-18

## About

The README describes this as a TypeScript framework (published as @cyanheads/mcp-ts-core) for turning an API, dataset or workflow into an MCP server. The developer supplies domain code while the framework handles auth, storage, logging and transports. Tools, resources and prompts are declared with typed builders and registered through a single createApp() call.

The project also ships agent skills and a scaffold with CLAUDE.md and AGENTS.md files, so a coding agent can help design, test and release the server. Servers can run on Bun, Node.js 24+ or Cloudflare Workers, over stdio or Streamable HTTP.

The template suits developers who want to build custom MCP servers in TypeScript and prefer built-in linting, contract tests and fuzz testing over assembling that tooling themselves.

## Features

- **Typed tool builders:** Tools, resources and prompts are defined with schema-validated input and output and a handler function.
- **Declared errors and enrichment:** Expected failures and success-path context are declared up front and advertised to clients before they call a tool.
- **Auth and scoped storage:** Per-definition scopes are checked under JWT or OAuth, and tenant-scoped state can use memory, filesystem, Supabase or Cloudflare storage.
- **Build-time definition linting:** A lint command checks names, schemas, scopes, annotations and format parity before deployment.
- **Testing utilities:** Mock contexts, contract checks, fast-check fuzzing and a headless MCP Apps renderer are included for tests.
- **Observability:** Pino structured logs and optional OpenTelemetry traces and metrics are supported.

## Good for

- Wrapping an internal inventory or product API as an MCP server for AI assistants
- Building a read-only search tool over a catalog or dataset for agents
- Shipping an MCP server to Cloudflare Workers from the same codebase as a local stdio server
- Keeping a bulk upstream dataset in a local SQLite mirror that tools can query

## Install

### Claude Code (Terminal)

```sh
claude mcp add mcp-ts-template -- npx -y mcp-ts-template
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "mcp-ts-template": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-ts-template"
      ]
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "mcp-ts-template": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-ts-template"
      ]
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "mcp-ts-template": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "mcp-ts-template"
      ]
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "mcp-ts-template": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-ts-template"
      ]
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "mcp-ts-template": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-ts-template"
      ]
    }
  }
}
```

## FAQ

### Which runtimes does the framework support?

The README says servers run on Bun, Node.js 24+ or Cloudflare Workers.

### How do I start a new server?

The README shows running bunx @cyanheads/mcp-ts-core init my-mcp-server, then bun install in the new directory.

### What transports are supported?

The README lists stdio and HTTP, with the HTTP endpoint on port 3010 at /mcp by default.

### Is MCP Ts Template free?

Yes. MCP Ts Template is open source, so you can use and self-host it for free.

### How do I add MCP Ts Template to Claude Code?

Run this command in your terminal: claude mcp add mcp-ts-template -- npx -y mcp-ts-template

### What are the best alternatives to MCP Ts Template?

The closest alternatives to MCP Ts Template are MCP Server Template, Skybridge Example MCP App, MCP Server Commands, Srecode Template MCP and Dotnet Template MCP.

## Where this comes from

- Description: written from the project's README and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [MCP Server Template](https://ai-powered.com/mcp/mcp-server-template): MCP Server Template is an open-source MCP server for developer tools.
- [Skybridge Example MCP App](https://ai-powered.com/mcp/skybridge-example-mcp-app): Skybridge Example MCP App is an open-source MCP server for productivity.
- [MCP Server Commands](https://ai-powered.com/mcp/mcp-server-commands): MCP Server Commands is an open-source MCP server for developer tools.
- [Srecode Template MCP](https://ai-powered.com/mcp/srecode-template-mcp): Srecode Template MCP is an open-source MCP server for developer tools.
- [Dotnet Template MCP](https://ai-powered.com/mcp/dotnet-template-mcp): Dotnet Template MCP is an open-source MCP server for developer tools.
- [Pmcp](https://ai-powered.com/mcp/pmcp-2): Pmcp is an open-source MCP server for developer tools.
- [Skybridge Capitals Example](https://ai-powered.com/mcp/skybridge-capitals-example): Skybridge Capitals Example is an open-source MCP server for developer tools.
- [mcp-agent-template](https://ai-powered.com/mcp/mcp-agent-template): mcp-agent-template is an open-source MCP server for security.

---
Source: https://ai-powered.com/mcp/mcp-ts-template
