SkillsLLM
CategoriesBlogAI NewsAbout
HomeAI Agentsmcp-ts-core

mcp-ts-core

by cyanheads

Pending

TypeScript template for building Model Context Protocol (MCP) servers. Ships with declarative tools/resources, pluggable auth, multi-backend storage, OpenTelemetry observability, and first-class support for both local and edge (Cloudflare Workers) runtimes.

119stars
20forks
TypeScript
Added 3/15/2026
View on GitHubDownload ZIP
AI Agentsaicloudflare-workersllmllm-agentmcpmcp-servermodel-context-protocolmodelcontextprotocolopentelemetryoteltemplatetsvibe-coding
Installation
# Add to your Claude Code skills
git clone https://github.com/cyanheads/mcp-ts-core
README.md
<div align="center"> <h1>@cyanheads/mcp-ts-core</h1> <p><b>TypeScript framework for building Model Context Protocol (MCP) servers. Declarative tool/resource/prompt definitions, pluggable auth, multi-backend storage, OpenTelemetry observability, and support for both local (stdio/HTTP) and edge (Cloudflare Workers) runtimes.</b></p> </div> <div align="center">

Version MCP Spec MCP SDK License

TypeScript Bun

</div>

What is this?

@cyanheads/mcp-ts-core is the infrastructure layer for TypeScript MCP servers. Install it as a dependency — don't fork it. You write tools, resources, and prompts; the framework handles transports, auth, storage, config, logging, telemetry, and lifecycle.

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

const greet = tool('greet', {
  description: 'Greet someone by name and return a personalized message.',
  annotations: { readOnlyHint: true },
  input: z.object({ name: z.string().describe('Name of the person to greet') }),
  output: z.object({ message: z.string().describe('The greeting message') }),
  handler: async (input) => ({ message: `Hello, ${input.name}!` }),
});

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

That's a complete MCP server. Every tool call is automatically logged with duration, payload sizes, memory usage, and request correlation — no instrumentation code needed. createApp() handles config parsing, logger init, transport startup, signal handlers, and graceful shutdown.

Features

  • Declarative definitions — tool(), resource(), prompt() builders with Zod schemas. Framework handles registration, validation, and response formatting.
  • Unified Context — handlers receive a single ctx object with ctx.log (request-scoped logging), ctx.state (tenant-scoped storage), ctx.elicit (user prompting), ctx.sample (LLM completion), and ctx.signal (cancellation).
  • Inline auth — auth: ['scope'] on definitions. No wrapper functions. Framework checks scopes before calling your handler.
  • Task tools — task: true flag for long-running operations. Framework manages the full lifecycle (create, poll, progress, complete/fail/cancel).
  • Structured error handling — Handlers throw freely; the framework catches, classifies, and formats. Error fac...
Comments (0)
to leave a comment.

No comments yet. Be the first to share your thoughts!

Related Skills

n8n

by n8n-io

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.
179,165
55,789
TypeScript
MCP Serversaiapis
View details
gemini-cli

by google-gemini

An open-source AI agent that brings the power of Gemini directly into your terminal.
97,754
12,257
TypeScript
AI Agentsaiai-agents
View details
everything-claude-code

by affaan-m

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
76,097
9,506
JavaScript
AI Agentsai-agentsanthropic
View details
context7

by upstash

Context7 Platform -- Up-to-date code documentation for LLMs and AI code editors
49,063
2,314
TypeScript
MCP Serversllmmcp
View details
TrendRadar

by sansan0

⭐AI-driven public opinion & trend monitor with multi-platform aggregation, RSS, and smart alerts.🎯 告别信息过载,你的 AI 舆情监控助手与热点筛选工具!聚合多平台热点 + RSS 订阅,支持关键词精准筛选。AI 智能筛选新闻 + AI 翻译 + AI 分析简报直推手机,也支持接入 MCP 架构,赋能 AI 自然语言对话分析、情感洞察与趋势预测等。支持 Docker ,数据本地/云端自持。集成微信/飞书/钉钉/Telegram/邮件/ntfy/bark/slack 等渠道智能推送。
48,947
22,642
Python
MCP Serversaibark
View details
awesome-claude-skills

by ComposioHQ

A curated list of awesome Claude Skills, resources, and tools for customizing Claude AI workflows
44,141
4,446
Python
AI Agentsagent-skillsai-agents
View details