MCP TS Core

v0.9.1Developer Toolsstable

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.

agent-nativeaicloudflare-workersframeworkllm
Share:
139
Stars
0
Downloads
0
Weekly
0/5

What is MCP TS Core?

MCP TS Core is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to 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.

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.

This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Agent-native TypeScript framework for building MCP servers.

Use Cases

Build MCP servers with TypeScript natively
Deploy to Cloudflare Workers and serverless
Handle authentication and multi-backend storage
cyanheads

Maintainer

LicenseApache-2.0
Languagetypescript
Versionv0.9.1
UpdatedMay 20, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

NPM

npx -y @cyanheads/mcp-ts-core

Manual Installation

npx -y @cyanheads/mcp-ts-core

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use MCP TS Core

MCP TS Core is an agent-native TypeScript framework for building production-grade MCP servers with minimal boilerplate. It provides declarative tool, resource, and prompt builders with Zod schema validation, scope-based authentication (JWT/OAuth), pluggable multi-backend storage (in-memory, filesystem, Supabase, Cloudflare D1/KV/R2), and built-in OpenTelemetry tracing. Targeting Bun, Node.js, and Cloudflare Workers, it is designed for developers who want to ship MCP servers to serverless or edge environments without hand-rolling transport, auth, or observability code.

Prerequisites

  • Bun 1.0+ (recommended) or Node.js 18+ installed
  • An MCP-compatible client such as Claude Desktop or Cursor for testing the built server
  • An OpenRouter or OpenAI API key if your server needs LLM access (OPENROUTER_API_KEY)
  • Optional: a Supabase project or Cloudflare account if using cloud storage backends
1

Scaffold a new MCP server project

Use the built-in init command to generate a starter project with the correct structure and dependencies.

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

Define a tool using the declarative API

Use the `tool()` builder with a Zod input/output schema and an async handler. The framework handles schema serialization, validation, and error propagation automatically.

import { createApp, tool, z } from '@cyanheads/mcp-ts-core';

const greet = tool('greet', {
  description: 'Return a greeting for the given name.',
  input: z.object({ name: z.string() }),
  output: z.object({ message: z.string() }),
  handler: async (input, ctx) => {
    ctx.log.info('Greeting', { name: input.name });
    return { message: `Hello, ${input.name}!` };
  },
});

await createApp({ tools: [greet] });
3

Configure transport and auth via environment variables

Set environment variables to control the transport (stdio for local clients, http for remote), authentication mode, and storage provider. For local development, the defaults (stdio, no auth, in-memory storage) require no configuration.

# For HTTP transport with JWT auth:
export MCP_TRANSPORT_TYPE=http
export MCP_HTTP_PORT=3010
export MCP_AUTH_MODE=jwt
export MCP_AUTH_SECRET_KEY=your-jwt-secret
export STORAGE_PROVIDER_TYPE=filesystem
4

Add the server to your MCP client configuration

Register the built server in your claude_desktop_config.json. Use stdio transport for local use.

{
  "mcpServers": {
    "my-mcp-server": {
      "command": "bun",
      "args": ["run", "/path/to/my-mcp-server/src/index.ts"]
    }
  }
}
5

Enable OpenTelemetry tracing (optional)

Turn on built-in tracing to get automatic request correlation and span data exported to your OTEL collector.

export OTEL_ENABLED=true
export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318

MCP TS Core Examples

Client configuration

claude_desktop_config.json entry for a server built with mcp-ts-core, running locally with Bun.

{
  "mcpServers": {
    "my-mcp-server": {
      "command": "bun",
      "args": ["run", "/path/to/my-mcp-server/src/index.ts"],
      "env": {
        "MCP_TRANSPORT_TYPE": "stdio",
        "STORAGE_PROVIDER_TYPE": "in-memory"
      }
    }
  }
}

Prompts to try

Prompts for interacting with an MCP server built on mcp-ts-core once it exposes custom tools.

- "Call the 'greet' tool with my name and show the response"
- "List all available tools on this MCP server"
- "Store the value 'project=alpha' in the server's persistent storage"
- "Retrieve the stored project context from the last session"

Troubleshooting MCP TS Core

bunx init fails with 'command not found'

Install Bun from https://bun.sh with `curl -fsSL https://bun.sh/install | bash`. Alternatively, use `npx @cyanheads/mcp-ts-core init my-mcp-server` with Node.js 18+.

JWT authentication rejects all requests

Ensure MCP_AUTH_SECRET_KEY is set to the same value on both the server and in any token-issuing utility. The key must be at least 32 characters for HS256. Temporarily set MCP_AUTH_MODE=none to bypass auth while debugging.

Cloudflare Workers deployment fails with module compatibility errors

Set the `nodejs_compat` compatibility flag in your wrangler.toml and use the `STORAGE_PROVIDER_TYPE=cloudflare-kv` or `cloudflare-d1` backend. Node-specific APIs (fs, crypto) are shimmed automatically when the flag is enabled.

Frequently Asked Questions about MCP TS Core

What is MCP TS Core?

MCP TS Core is a Model Context Protocol (MCP) server that 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. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install MCP TS Core?

Install via npm with the command: npx -y @cyanheads/mcp-ts-core. Then add the server configuration to your AI client's JSON config file (e.g., claude_desktop_config.json or .cursor/mcp.json).

Which AI clients work with MCP TS Core?

MCP TS Core works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is MCP TS Core free to use?

Yes, MCP TS Core is open source and available under the Apache-2.0 license. You can use it freely in both personal and commercial projects.

Browse More Developer Tools MCP Servers

Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "mcp-ts-core": { "command": "npx", "args": ["-y", "@cyanheads/mcp-ts-core"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use MCP TS Core?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides