mcp-ts-core
活跃·★ 140·Apache-2.0·更新于 2026-05-29
★ 时下流行★ RAG / 知识库★ 可观测性
用于构建模型上下文协议 (MCP) 服务器的 TypeScript 框架,提供声明式工具/资源/提示定义、可插拔认证、多后端存储、OpenTelemetry 可观测性,并支持本地和边缘运行时。
@cyanheads/mcp-ts-core 是一个用于构建 MCP 服务器的 TypeScript 框架。它提供带有 Zod 模式的声明式工具/资源/提示定义、可插拔认证、多后端存储、OpenTelemetry 可观测性,并支持本地(stdio/HTTP)和边缘(Cloudflare Workers)运行时。框架处理基础设施问题如传输、认证、存储、配置、日志和生命周期,使开发者能够专注于业务逻辑。
#人工智能#cloudflare-workers#大语言模型#llm-agent#MCP 协议#MCP 服务器#MCP 服务器#模型上下文协议
01
功能特性
01基于 Zod 模式的声明式工具、资源和提示定义
02统一上下文对象,包含日志、状态、用户提示、LLM 采样和取消功能
03在定义中内联授权作用域
04支持任务型工具,管理长时间运行操作的生命周期
05多后端存储(内存、文件系统、Supabase、Cloudflare D1/KV/R2)
02
兼容性
Node.js
Node.js (stdio/HTTP)
已通过文档验证
Cloudflare Workers
Cloudflare Workers
已通过文档验证
03
快速开始
1
$ bunx @cyanheads/mcp-ts-core init my-mcp-server
2
$ cd my-mcp-server
3
$ bun install
04
使用场景
↳为 AI 工具和智能体构建 MCP 服务器
↳开发用于 LLM 交互的声明式工具、资源和提示定义
↳在本地环境或 Cloudflare Workers 等边缘平台部署 MCP 服务器
05
同类工具
相关搜索
评论
登录后发表评论
- Avery Rivera2026年5月16日
Production-ready TypeScript MCP server template with logging, error handling baked in.
- PPeyton Lewis2026年4月27日
Good starting point for teams building MCP servers who want best practices from the start.
- Elliot Chen2026年4月5日
Well-structured, easy to extend for specific MCP server use cases.
- RRowan Harris2026年3月16日
Ships with the boilerplate nobody wants to write but everyone needs.