MCP Ts Core logo

MCP Ts Core

Build typed, observable MCP servers in TypeScript with tools, resources, prompts, auth, storage, and stdio or HTTP transports.

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.

Install not yet sandbox-tested— we haven't run this command through our automated sandbox yet. Not a red flag; we're working through the catalog.

Overview

mcp-ts-core is a TypeScript framework for connecting APIs, datasets, and workflows to AI agents through MCP. It provides declarative builders for tools, resources, prompts, and interactive MCP Apps, with authentication, tenant-scoped state, logging, testing, and transport support. Projects can run on Bun, Node.js 24+, or Cloudflare Workers, using stdio or Streamable HTTP. Reach for it when you want shared runtime infrastructure and agent-oriented development workflows instead of implementing MCP server plumbing from scratch.

Use cases

  • Scaffold a TypeScript MCP server for an internal API
  • Expose dataset queries as typed agent tools
  • Publish application records through MCP resources
  • Add scoped access and tenant-specific server state
  • Test and lint tool contracts before release

Key features

  • Declarative TypeScript builders for MCP definitions
  • Bun, Node.js, and Cloudflare Workers runtimes
  • stdio and Streamable HTTP transports
  • JWT/OAuth scopes and tenant-scoped storage
  • Structured logging and optional OpenTelemetry
  • Definition linting, contract tests, and fuzz testing

Security & health

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

ActiveLast checked

Recent health check succeeded.

18/18 checks healthy over the last 59d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

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

Adoption & maintenance

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

GitHub stars154Stargazers on the source repository.
npm downloads83kPackage downloads in the last 30 days.
Last commit2d agoMost recent push to the default branch.
Directory activity3 viewsConfig copies, upvotes, and views on AllMCPs.

How MCP Ts Core works

What mcp-ts-core does

mcp-ts-core provides the application layer for building MCP servers in TypeScript. Your project supplies the domain logic, while the framework handles registration, request processing, authentication, storage, logging, and transport setup. It is designed for servers that expose APIs, datasets, or business workflows to AI agents.

Definitions are created in code and registered with createApp(). The available builders cover tools, resources, prompts, and interactive MCP Apps. Server instructions can be sent during initialization, and a skills directory can be exposed through the SEP-2640 Skills extension.

How it works

A tool combines a name, description, input schema, output schema, and handler. Schemas use the framework's Zod export, allowing handlers and MCP clients to work from typed contracts. Definitions can also declare read-only annotations, expected errors, recovery guidance, and additional success metadata.

Handlers receive a context for operations such as enriching results, reporting a typed failure, requesting additional input, and accessing tenant-scoped state. Declared enrichment is published alongside the main result, while declared errors describe when a failure occurs and how an agent can recover. Tool contracts are advertised through tools/list, and definition linting checks the implementation against those contracts.

Results are supplied through both MCP result surfaces: structured JSON and text content. A custom format() function can render the text representation, while the framework keeps enrichment synchronized across both forms. Without a formatter, the text content uses JSON.

Resources map URI patterns to handlers. For example, an items://{itemId} resource can validate the itemId parameter and retrieve data from an application service. Cloudflare Workers use createWorkerHandler() with the same definitions from a separate entry point.

Setup and configuration

New projects can be scaffolded with:

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

The scaffold contains source, build, and test configuration, agent instruction files, Agent Skills, and plugin metadata for Claude Code and Codex. Existing TypeScript projects can add the package with bun add @cyanheads/mcp-ts-core, then register definitions through createApp().

Servers run on Bun, Node.js 24+, or Cloudflare Workers. A local HTTP process can be built and started with bun run rebuild and bun run start:http; the resulting Streamable HTTP endpoint is http://127.0.0.1:3010/mcp. Clients can also launch the compiled server over stdio with bun /absolute/path/to/dist/index.js.

Authentication scopes are declared on definitions and checked before handlers run under JWT or OAuth. State can use in-memory or filesystem storage, or configured Supabase and Cloudflare D1, KV, or R2 backends. DuckDB, Supabase, and the OpenTelemetry SDK are optional peer dependencies.

Tools and capabilities

  • Typed builders for tools, resources, prompts, and MCP Apps
  • Input and output schemas using Zod
  • Declared errors with retry and recovery guidance
  • Result enrichment and custom text formatting
  • stdio and Streamable HTTP transports
  • JWT/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

Limitations and notes

The framework is infrastructure rather than a ready-made connector to a particular SaaS product or database. Application-specific handlers still need to call the APIs, datasets, or services that the server exposes.

MCP hosts may emphasize structured content, text content, or both. mcp-ts-core fills both surfaces, but custom formatters should include every output field; the lint:mcp format-parity rule checks this condition. Optional integrations require their corresponding peer dependencies to be installed.

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 helps developers connect APIs, datasets, and workflows to AI agents. Its main tools are typed builders for MCP tools, resources, prompts, and interactive MCP Apps, with support for authentication, storage, logging, testing, and stdio or Streamable HTTP transports.

Install it by scaffolding a project with `bunx @cyanheads/mcp-ts-core init my-mcp-server`, then run `bun install`. In an existing TypeScript project, use `bun add @cyanheads/mcp-ts-core` and register definitions with `createApp()`.

Run `bun run rebuild` followed by `bun run start:http`. The server exposes a Streamable HTTP endpoint at `http://127.0.0.1:3010/mcp`, which an MCP client can use.

Yes. The scaffold includes Claude Code plugin metadata, instruction files, and Agent Skills. Claude Code can launch the compiled server over stdio with `bun /absolute/path/to/dist/index.js`.

Yes. Cloudflare Workers are supported through a separate entry point using `createWorkerHandler()` with the same application definitions. Cloudflare D1, KV, and R2 are also available as storage backends.

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>