MCP Catalogs
首页

mcp-ts-core

by cyanheads·138·综合分 48

构建 MCP 服务器的 TypeScript 框架,支持认证、存储、遥测和多平台部署。

developer-toolsai-llmops-infra
24
Forks
19
活跃 Issue
本月
最近提交
2 天前
收录于

概述

@cyanheads/mcp-ts-core 是一个用于构建 MCP 服务器的全面 TypeScript 框架。它提供了声明式的工具、资源和提示定义,内置支持认证、多后端存储和可观测性。框架处理基础设施管道,如传输、配置、日志记录和遥测,使开发人员能够专注于特定领域的逻辑。它支持多种运行时,包括 Bun、Node.js 和 Cloudflare Workers,并具有可选的分析工作区 DataCanvas 功能。

试试问 AI

装完之后,这里有 6 个你可以让 AI 做的事:

:为 AI 代理构建自定义 TypeScript MCP 服务器
:使用认证和多后端存储创建工具和资源
:开发具有进度跟踪的长时间运行任务工具
:通过 OpenTelemetry 集成实现可观测性
:这个框架支持哪些平台?
:框架中的认证是如何工作的?

什么时候选它

当使用 TypeScript 构建生产级 MCP 服务器时选择此框架,特别是如果您需要开箱即用的多后端存储、认证和可观测性功能。

什么时候不要选它

如果您需要更简单的解决方案且依赖更少,或者您的服务器需要在 Bun/Node/Cloudflare Workers 之外的环境中运行,请避免使用此框架。

此 server 暴露的工具

从 README 抽取出 9 个工具
  • greet

    Greet someone by name and return a personalized message.

  • search

    Search for items by query.

  • template_echo_message

    Basic tool with format and auth options.

  • template_cat_fact

    Get external API call results with error handling.

  • template_madlibs_elicitation

    Interactive tool that asks for user input.

  • template_code_review_sampling

    Tool that uses LLM completion for code review.

  • template_image_test

    Tool that handles image content blocks.

  • template_async_countdown

    Long-running task with progress reporting.

  • template_data_explorer

    MCP Apps tool with linked UI resource.

说明:Extracted from example code snippets in the documentation showing actual tool implementations.

可对比工具

modelcontextprotocol/sdknpx create-mcp-servermcp-server-base

安装

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

对于 Claude Desktop:

{
  "mcpServers": {
    "my-mcp-server": {
      "command": "node",
      "args": ["dist/index.ts"],
      "env": {
        "MCP_TRANSPORT_TYPE": "stdio"
      }
    }
  }
}

FAQ

这个框架支持哪些平台?
该框架支持 Bun、Node.js 和 Cloudflare Workers,允许在各种环境中部署。
框架中的认证是如何工作的?
框架支持认证模式:'none'(无认证)、'jwt'(JWT 令牌)或 'oauth'(本地密钥或 JWKS)。可以在工具和资源上定义认证范围。

mcp-ts-core 对比

GitHub →

最后更新于 · 由 README + GitHub 公开数据自动生成。