MCP任务管理服务器

MCP任务管理服务器

一个用TypeScript编写的任务管理API服务器,支持STDIO和HTTP+SSE两种模式。

快速开始

前置条件

  • 安装Node.js 16.x或更高版本
  • 使用npm或pnpm包管理工具

安装步骤

  1. 克隆仓库: git clone https://github.com/yourusername/mcp-template-ts.git cd mcp-template-ts
  2. 安装依赖: npm install 或 pnpm install
  3. 创建 .env 文件并添加Task API凭据: TASK_MANAGER_API_BASE_URL=https://your-task-api-url.com/api TASK_MANAGER_API_KEY=your_api_key_here TASK_MANAGER_HTTP_PORT=3000
  4. 构建项目: npm run build

启动服务器

  • STDIO模式: npm start 或 node dist/index.js
  • HTTP模式: npm run start:http 或 node dist/http-server.js

测试

运行测试套件以验证功能: npm test