模型上下文协议服务器

一个生产就绪的TypeScript模型上下文协议(MCP)服务器,通过标准输入输出提供实用工具、GitHub和Microsoft Teams集成功能。

  • by Ezzeay
  • TypeScript
  • 本地部署
  • 1 星标
  • 更新于
在 GitHub 查看 Ezzeay/mcp-server

使用说明

#MCP服务器

生产就绪的TypeScript模型上下文协议(MCP)服务器通过stdio公开实用程序、GitHub和Microsoft Teams工具。

为什么选择此存储库

  • 为内部自动化和集成清理MCP服务器基线
  • GitHub和Microsoft Teams在单个服务中的操作工具
  • 严格的TypeScript设置和最小的运行时表面

功能概述

效用

  • echo
  • get_time

GitHub工具

  • github_status
  • github_authenticated_user
  • github_list_repos
  • github_create_issue
  • github_list_issues
  • github_get_file
  • github_create_pull_request
  • github_request

Microsoft团队工具

  • teams_send_message (webhook)
  • teams_send_card (自适应卡webhook)
  • teams_graph_status (图形API)
  • teams_send_dm (图形API)

需求

  • Node.js 20+
  • npm 10+

快速启动(Windows)

cd mcp-server
npm install
copy .env.example .env

填充 .env 跑步前。

环境变量

GitHub工具需要

  • GITHUB_TOKEN

Teams webhook工具的可选功能

  • TEAMS_WEBHOOK_URL

Teams Graph工具的可选功能

  • TEAMS_TENANT_ID
  • TEAMS_CLIENT_ID
  • TEAMS_CLIENT_SECRET

脚本

  • npm run dev --开发模式与 tsx
  • npm run build --编译到 dist/
  • npm run start --运行已编译的服务器
  • npm run clean --删除 dist/
  • npm run inspect --打开MCP检查器

运行模式

发展:

npm run dev

构建+运行:

npm run build
npm run start

MCP stdio命令:

node dist/index.js

安全性和合规性

  • 不要承诺 .env 或秘密
  • 为GitHub和Microsoft Graph使用最低权限凭据
  • 审查 安全.md 生产使用前

贡献

看 贡献.md 和 代码_OF_CONDUCT.md.

许可证

根据MIT许可证分发。看 许可证.