MCP TS Core
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.
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
Maintainer
Works with
Installation
NPM
npx -y @cyanheads/mcp-ts-coreManual Installation
npx -y @cyanheads/mcp-ts-coreConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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
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 installDefine 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] });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=filesystemAdd 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"]
}
}
}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:4318MCP 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.
MCP TS Core Alternatives — Similar Developer Tools Servers
Looking for alternatives to MCP TS Core? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
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.
Set Up MCP TS Core in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.