MCP Ts Core logo

MCP Ts Core

TypeScript framework for defining, testing, securing, and running MCP servers on Bun, Node.js, or Cloudflare Workers.

Install MCP Ts Core

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "mcp-ts-core": {
      "command": "bunx",
      "args": [
        "@cyanheads/mcp-ts-core"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

We couldn’t confirm it starts correctly

We ran the install command but it didn't respond within our test window — this can mean a slow first-time install rather than a real problem.

bunx @cyanheads/mcp-ts-core

Process exited before answering initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked 7d ago.

Overview

The mcp-ts-core MCP server is a TypeScript framework for connecting APIs, datasets, and workflows to AI agents through MCP. It uses declarative definitions for tools, resources, prompts, and interactive MCP Apps, with typed inputs and outputs, authentication, storage, logging, and transport support. Use it when building a custom MCP server that needs consistent result handling, error guidance, testing, or deployment across Bun, Node.js, and Cloudflare Workers. Servers can run over stdio or Streamable HTTP, and existing TypeScript projects can add the package directly.

Use cases

  • Build an MCP server for an internal API
  • Expose dataset queries and workflows to agents
  • Add typed tools to an existing TypeScript project
  • Run an MCP service over stdio or Streamable HTTP
  • Test and lint MCP definitions before release

Key features

  • Typed tools, resources, prompts, and MCP Apps
  • JWT and OAuth scope enforcement
  • Tenant-scoped pluggable storage
  • stdio, HTTP, and Cloudflare Workers support
  • Structured logging and optional OpenTelemetry
  • Contract tests, fuzz testing, and definition linting

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked Today

Recent health check succeeded.

7/7 checks healthy over the last 35d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 15d ago via OSV.dev · @cyanheads/mcp-ts-core (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars152Stargazers on the source repository.
npm downloads76kPackage downloads in the last 30 days.
Last commit10d agoMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window — often a slow first install.
Directory activity2 viewsConfig copies, upvotes, and views on AllMCPs.

How MCP Ts Core works

What mcp-ts-core does

The mcp-ts-core MCP server is a framework for building MCP servers in TypeScript rather than a ready-made connection to one external service. It supplies runtime infrastructure while the application defines the domain behavior. A project can expose API operations, dataset queries, workflows, or other application logic to an AI agent through MCP.

Definitions cover tools, resources, prompts, and interactive MCP Apps. Tools declare schemas, descriptions, annotations, outputs, enrichment fields, and expected errors. Resources expose data at URI patterns, while server instructions can provide composition guidance to clients during initialization.

How it works

Applications register their definitions with createApp(). Tool handlers receive validated input and a context object that can enrich results, report typed failures, request additional input, and access tenant-scoped state. Declared success and error contracts are advertised through tools/list, allowing clients to inspect them before invocation.

The framework produces both structured JSON and text result surfaces so clients that consume either MCP representation receive equivalent data. A custom formatter can render the text response, and linting checks that output fields are represented in that format. Declared errors can include recovery guidance, retryability, and a JSON-RPC error code; tool failures also carry the request ID associated with server logs.

The mcp-ts-core MCP server supports stdio and HTTP transports on Bun and Node.js. A separate createWorkerHandler() entry point uses the same definitions for Cloudflare Workers. Authentication can enforce per-definition scopes under JWT or OAuth, and state can use in-memory, filesystem, Supabase, or Cloudflare D1, KV, and R2 backends.

Setup and configuration

Create a project with:

bash
bunx @cyanheads/mcp-ts-core init my-mcp-server
cd my-mcp-server
bun install

The generated project includes source, build, and test configuration, agent guidance files, Agent Skills, and plugin metadata for Claude Code and Codex. To add the framework to an existing TypeScript project, install it with bun add @cyanheads/mcp-ts-core and register definitions with createApp().

Build and start an HTTP server with bun run rebuild followed by bun run start:http. The resulting endpoint is available at /mcp; clients can also launch the compiled entry point over stdio. Servers run on Bun, Node.js 24+, or Cloudflare Workers.

Tools and capabilities

  • Typed builders for tools, resources, prompts, and interactive MCP Apps
  • Zod-based input and output schemas
  • Result enrichment and declared recovery-oriented errors
  • JWT and OAuth scope checks
  • Tenant-scoped storage with replaceable backends
  • Structured logging and optional OpenTelemetry
  • Definition linting, contract tests, and fuzz testing
  • Agent Skills for design, testing, security review, releases, and maintenance

Optional DuckDB, Supabase, and OpenTelemetry SDK integrations are peer dependencies and must be installed when needed.

Limitations and notes

The package provides the framework and runtime; application-specific handlers and domain integrations remain the developer's responsibility. Cloudflare Workers use a separate entry point, and HTTP compatibility is described for the 2026-07-28 MCP clients. The mcp-ts-core MCP server is licensed under Apache-2.0.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about MCP Ts Core

mcp-ts-core is an MCP server that provides a TypeScript framework for connecting APIs, datasets, and workflows to AI agents. Its main capabilities are typed builders for tools, resources, prompts, and interactive MCP Apps, plus authentication, storage, logging, testing, and stdio or HTTP transport support.

Install it with `bunx @cyanheads/mcp-ts-core init my-mcp-server` for a new project, or run `bun add @cyanheads/mcp-ts-core` in an existing TypeScript project. Register definitions with `createApp()` and install dependencies with Bun.

Run `bun run rebuild` and then `bun run start:http` from the generated project.

Yes, it can be used with Cursor through its standard MCP transports. The framework supports stdio and Streamable HTTP, so a client can launch the compiled entry point or connect to the `/mcp` endpoint.

Yes, Cloudflare Workers are supported through a separate `createWorkerHandler()` entry point. It accepts the same tool, resource, and prompt definitions used by `createApp()`.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewMCP Ts Core AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/mcp-ts-core?style=directory)](https://allmcps.com/mcp/mcp-ts-core)
HTML Embed
<a href="https://allmcps.com/mcp/mcp-ts-core"><img src="https://allmcps.com/api/badge/mcp-ts-core?style=directory" alt="MCP Ts Core on AllMCPs" /></a>