Basic information

Runtime
TypeScript
Version
1.0.0
Category
License
Apache-2.0
Transports
stdio
Author
cyanheads
Submitted by
Community
Quality
55
Stars
145

About mcp-ts-core Server

TypeScript framework for building MCP servers with auth, storage, OpenTelemetry, and support for Bun/Node/Cloudflare Workers.

mcp-ts-core is a MCP server in the Search Web category listed in the AddMCP.net directory, published by cyanheads. It exposes 1 tool, including greet. Supported transport: stdio. Runtime: TypeScript. License: Apache-2.0. The repository has 145 GitHub stars. Source code is hosted on github.com. Related topics: community, llm, llm-agent, mcp, mcp-server.

Setup

{
    "mcpServers": {
        "mcp-ts-core": {
            "command": "npx",
            "args": [
                "-y",
                "@cyanheads/mcp-ts-core"
            ],
            "env": {
                "MCP_TRANSPORT_TYPE": "stdio",
                "MCP_AUTH_MODE": "none",
                "STORAGE_PROVIDER_TYPE": "in-memory",
                "OTEL_ENABLED": "false"
            }
        }
    }
}

mcp-ts-core config

Add this server to your MCP-compatible client using the configuration below.

{
    "mcpServers": {
        "mcp-ts-core": {
            "command": "npx",
            "args": [
                "-y",
                "@cyanheads/mcp-ts-core"
            ],
            "env": {
                "MCP_TRANSPORT_TYPE": "stdio",
                "MCP_AUTH_MODE": "none",
                "STORAGE_PROVIDER_TYPE": "in-memory",
                "OTEL_ENABLED": "false"
            }
        }
    }
}

mcp-ts-core tools

  • greet — Greet someone by name and return a personalized message

Overview

What is mcp-ts-core?

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-ts-core?

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-ts-core

  • 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-ts-core

  • 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

Frequently asked questions

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.

Videos

Tutorials, guides, and showcases related to mcp-ts-core. The player loads when you press play.

Videos belong to their creators. Relevance is approximate; check the channel and description before following setup steps.

Comments

No comments yet

Be the first to share feedback about this listing. Sign in to leave a comment.

Sign In

Feedback 💬