使用 TypeScript 创建 MCP 服务器

使用 TypeScript 创建 MCP 服务器

使用 TypeScript SDK 创建 MCP 服务器的源代码。

  1. 构建 Docker 镜像:运行 docker build -t mcp/test -f ./Dockerfile .
  2. 配置 MCP 服务器:创建 JSON 配置文件,定义服务器命令、参数及环境变量。
  3. 启动服务器:通过 Docker 运行镜像 mcp/test,传递必要参数和环境变量。