Back to MCP directory
publicPublicdnsLocal runtime

mcp-server

这是一个用于快速启动和运行MCP服务器开发环境的项目,提供TypeScript示例代码和生成工具。

article

README

🚀 开发容器快速入门

本项目提供了开发容器的快速使用指南,帮助你快速上手相关开发。默认情况下,使用示例片段存放在 samples 目录中。

🚀 快速开始

运行使用示例

root.ts 文件中提供了一个示例使用案例。在使用 SDK 时,你可以根据自身需求修改这些示例。若要执行此特定示例片段,请使用以下命令:

ts-node root.ts

生成更多使用示例

使用 speakeasy CLI 可以生成更多使用示例片段,具体方法如下:

  • 按操作 ID 生成特定操作的示例: 使用以下命令,通过提供操作 ID 来生成特定操作的示例:
speakeasy generate usage -s ./schemas/openapi.json -l typescript -i {INPUT_OPERATION_ID} -o ./samples
  • 按命名空间生成示例: 若要为整个命名空间(如标签或组名)生成示例,请使用以下命令:
speakeasy generate usage -s ./schemas/openapi.json -l typescript -n {INPUT_TAG_NAME} -o ./samples

⚠️ 重要提示

当不使用 GitHub Codespace 时,请记得关闭它!

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client