Skip to main content
Glama
amkyawdev
by amkyawdev

🇲🇲 Myanmar MCP Server

License: MIT TypeScript Node.js 18+

一个内置动画系统的缅甸应用程序模型上下文协议(MCP)服务器


✨ 功能特性

功能

描述

🤖 MCP 协议

完整的 MCP SDK 实现,支持 stdio 传输

🎬 动画系统

基于时间线的动画引擎,支持关键帧和触发器

🔧 可扩展工具

GitHub 集成、文件系统操作、自定义工具

📦 TypeScript

严格模式下的完整类型安全

🧪 测试

Jest 测试套件,带覆盖率报告

🐳 Docker

支持容器化部署


Related MCP server: Maya MCP

🚀 快速开始

安装

# Clone the repository
git clone https://github.com/amkyawdev/myanmar-mcp-server.git
cd myanmar-mcp-server

# Install dependencies
npm install

# Build for production
npm run build

开发

# Run with hot reload
npm run dev

# Run tests
npm test

# Lint code
npm run lint

# Format code
npm run format

⚙️ 配置

从示例创建 .env 文件:

cp .env.example .env

环境变量

变量

描述

默认值

PORT

服务器端口

3000

HOST

服务器主机

localhost

LOG_LEVEL

日志级别(debug、info、warn、error)

info

GITHUB_TOKEN

GitHub API 令牌

-

ENABLE_ANIMATION

启用动画系统

true

ENABLE_FILESYSTEM

启用文件系统工具

true

ENABLE_GITHUB

启用 GitHub 工具

true


🎬 动画系统

Myanmar MCP Server 的核心——一个强大的基于时间线的动画系统。

使用示例

import { AnimationEngine, getPreset } from './animation';

// Load a preset
const engine = new AnimationEngine();
engine.load(getPreset('bounce'));
engine.play();

// Or load a custom script
engine.load({
  version: '1.0',
  name: 'My Animation',
  tracks: [{
    id: 'opacity',
    property: 'opacity',
    duration: 1000,
    keyframes: [
      { time: 0, value: 0 },
      { time: 1000, value: 1, easing: 'ease-out' }
    ]
  }]
});

engine.play();

可用预设

预设

描述

fadeIn

简单的透明度淡入

slideInLeft

从左侧滑入并淡入

bounce

弹跳式垂直运动

pulse

缩放脉冲效果

spin

360° 旋转

typewriter

文字显示效果

wave

波浪式振荡

缓动函数

函数

使用场景

linear

匀速

ease-in

慢速开始,快速结束

ease-out

快速开始,慢速结束

ease-in-out

开始和结束都慢

bounce

弹跳效果

elastic

弹簧式运动

触发器

{
  "triggers": [
    { "type": "time", "time": 1000, "action": "onComplete" },
    { "type": "condition", "condition": "progress >= 0.5", "action": "onMidpoint" },
    { "type": "event", "event": "userClick", "action": "pauseAnimation" }
  ]
}

动画 JSON 格式

{
  "version": "1.0",
  "name": "My Animation",
  "description": "Animation description",
  "tracks": [
    {
      "id": "unique-track-id",
      "property": "opacity",
      "duration": 2000,
      "keyframes": [
        { "time": 0, "value": 0 },
        { "time": 1000, "value": 1, "easing": "ease-out" }
      ]
    }
  ],
  "triggers": [],
  "metadata": {}
}

🛠️ 可用工具

GitHub 工具

{
  "action": "get_user",
  "username": "amkyawdev"
}

操作: get_user、get_repo、list_repos、create_issue

文件系统工具

{
  "action": "read_file",
  "path": "/path/to/file.txt"
}

操作: read_file、write_file、list_dir、create_dir、delete

动画工具

{
  "action": "run_script",
  "script": "{ ... }",
  "output": "console"
}

操作: play、stop、pause、seek、get_state、list_presets、get_preset、run_script


🐳 Docker

# Build and run
docker-compose up -d

# View logs
docker-compose logs -f

# Stop
docker-compose down

手动 Docker 构建

docker build -t myanmar-mcp-server .
docker run -p 3000:3000 --env-file .env myanmar-mcp-server

📁 项目结构

myanmar-mcp-server/
├── src/
│   ├── index.ts              # Entry point
│   ├── server.ts             # MCP server class
│   ├── tools/                # Tool implementations
│   │   ├── github.tool.ts
│   │   ├── filesystem.tool.ts
│   │   └── index.ts
│   ├── animation/            # Animation system ✨
│   │   ├── engine.ts         # Animation engine
│   │   ├── timeline.ts       # Timeline management
│   │   ├── keyframes.ts      # Keyframe interpolation
│   │   ├── interpolators.ts  # Easing functions
│   │   ├── triggers.ts       # Event triggers
│   │   ├── renderer.ts       # Output renderers
│   │   ├── presets.ts        # Built-in presets
│   │   └── types.ts          # Type definitions
│   ├── types/                # Shared types
│   ├── utils/                # Utilities
│   │   ├── logger.ts
│   │   └── config.ts
│   ├── middleware/            # Request middleware
│   ├── errors/                # Error classes
│   ├── validators/            # Zod schemas
│   └── services/              # Business logic
├── tests/                     # Test files
├── examples/                  # Animation examples
├── dist/                      # Build output
└── package.json

📊 脚本

命令

描述

npm run dev

开发模式,支持热重载

npm run build

构建生产版本

npm start

运行生产构建

npm test

运行测试套件

npm run test:coverage

运行并生成覆盖率报告

npm run lint

使用 ESLint 进行代码检查

npm run lint:fix

自动修复代码检查问题

npm run format

使用 Prettier 格式化

npm run typecheck

TypeScript 类型检查


🧪 测试

# Run all tests
npm test

# Watch mode
npm run test:watch

# Coverage report
npm run test:coverage

👨💼 管理员 / 维护者

角色

名称

GitHub

所有者与维护者

Aung Myat Kyaw

@amkyawdev

职责

  • 代码审查和合并审批

  • 发布管理

  • 安全漏洞处理

  • 社区支持和问题分类

联系方式

  • GitHub Issues: 用于错误报告和功能请求

  • 邮箱:(即将推出)


🤝 贡献

欢迎贡献!请参阅 CONTRIBUTING.md 了解指南。

  1. Fork 仓库

  2. 创建功能分支(git checkout -b feature/amazing-feature)

  3. 提交更改(git commit -m 'feat: add amazing feature')

  4. 推送到分支(git push origin feature/amazing-feature)

  5. 打开拉取请求


🔒 安全

如果您发现安全漏洞,请通过以下方式报告:

  1. GitHub 安全公告 - 首选方式

  2. 邮箱 -(即将推出)

在修复可用之前,请勿公开披露安全问题。


📝 许可证

MIT © 2024 amkyawdev


为缅甸开发者用心制作 ❤️

Related MCP Connectors

Related MCP Servers