Skip to main content
Glama
amkyawdev
by amkyawdev
README.md
# ๐Ÿ‡ฒ๐Ÿ‡ฒ Myanmar MCP Server

<div align="center">

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![TypeScript](https://img.shields.io/badge/TypeScript-5.3-blue.svg)](https://www.typescriptlang.org/)
[![Node.js 18+](https://img.shields.io/badge/Node.js-18+-green.svg)](https://nodejs.org/)

**A Model Context Protocol (MCP) server with built-in animation system for Myanmar applications**

</div>

---

## โœจ Features

| Feature | Description |
|---------|-------------|
| **๐Ÿค– MCP Protocol** | Full MCP SDK implementation with stdio transport |
| **๐ŸŽฌ Animation System** | Timeline-based animation engine with keyframes & triggers |
| **๐Ÿ”ง Extensible Tools** | GitHub integration, filesystem operations, custom tools |
| **๐Ÿ“ฆ TypeScript** | Full type safety with strict mode |
| **๐Ÿงช Testing** | Jest test suite with coverage reports |
| **๐Ÿณ Docker** | Containerized deployment ready |

---

## ๐Ÿš€ Quick Start

### Installation

```bash
# 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
```

### Development

```bash
# Run with hot reload
npm run dev

# Run tests
npm test

# Lint code
npm run lint

# Format code
npm run format
```

---

## โš™๏ธ Configuration

Create a `.env` file from the example:

```bash
cp .env.example .env
```

### Environment Variables

| Variable | Description | Default |
|----------|-------------|---------|
| `PORT` | Server port | `3000` |
| `HOST` | Server host | `localhost` |
| `LOG_LEVEL` | Logging level (`debug`, `info`, `warn`, `error`) | `info` |
| `GITHUB_TOKEN` | GitHub API token | - |
| `ENABLE_ANIMATION` | Enable animation system | `true` |
| `ENABLE_FILESYSTEM` | Enable filesystem tools | `true` |
| `ENABLE_GITHUB` | Enable GitHub tools | `true` |

---

## ๐ŸŽฌ Animation System

The heart of Myanmar MCP Server - a powerful timeline-based animation system.

### Usage Example

```typescript
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();
```

### Available Presets

| Preset | Description |
|--------|-------------|
| `fadeIn` | Simple opacity fade in |
| `slideInLeft` | Slide from left with fade |
| `bounce` | Bouncy vertical movement |
| `pulse` | Scale pulsing effect |
| `spin` | 360ยฐ rotation |
| `typewriter` | Text reveal effect |
| `wave` | Wave-like oscillation |

### Easing Functions

| Function | Use Case |
|----------|----------|
| `linear` | Constant speed |
| `ease-in` | Start slow, end fast |
| `ease-out` | Start fast, end slow |
| `ease-in-out` | Slow start and end |
| `bounce` | Bouncy effect |
| `elastic` | Spring-like motion |

### Triggers

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

### Animation JSON Format

```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": {}
}
```

---

## ๐Ÿ› ๏ธ Available Tools

### GitHub Tool

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

**Actions:** `get_user`, `get_repo`, `list_repos`, `create_issue`

### Filesystem Tool

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

**Actions:** `read_file`, `write_file`, `list_dir`, `create_dir`, `delete`

### Animation Tool

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

**Actions:** `play`, `stop`, `pause`, `seek`, `get_state`, `list_presets`, `get_preset`, `run_script`

---

## ๐Ÿณ Docker

```bash
# Build and run
docker-compose up -d

# View logs
docker-compose logs -f

# Stop
docker-compose down
```

### Manual Docker Build

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

---

## ๐Ÿ“ Project Structure

```
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
```

---

## ๐Ÿ“Š Scripts

| Command | Description |
|---------|-------------|
| `npm run dev` | Development with hot reload |
| `npm run build` | Build for production |
| `npm start` | Run production build |
| `npm test` | Run test suite |
| `npm run test:coverage` | Run with coverage report |
| `npm run lint` | Lint with ESLint |
| `npm run lint:fix` | Auto-fix linting issues |
| `npm run format` | Format with Prettier |
| `npm run typecheck` | TypeScript type checking |

---

## ๐Ÿงช Testing

```bash
# Run all tests
npm test

# Watch mode
npm run test:watch

# Coverage report
npm run test:coverage
```

---

## ๐Ÿ‘จโ€๐Ÿ’ผ Admin / Maintainer

| Role | Name | GitHub |
|------|------|--------|
| **Owner & Maintainer** | Aung Myat Kyaw | [@amkyawdev](https://github.com/amkyawdev) |

### Responsibilities

- Code review and merge approvals
- Release management
- Security vulnerability handling
- Community support and issue triage

### Contact

- **GitHub Issues:** For bug reports and feature requests
- **Email:** (Coming soon)

---

## ๐Ÿค Contributing

Contributions are welcome! Please see [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines.

1. Fork the repository
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'feat: add amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request

---

## ๐Ÿ”’ Security

If you discover a security vulnerability, please report it via:

1. **GitHub Security Advisories** - Preferred method
2. **Email** - (Coming soon)

Please do not disclose security issues publicly until a fix is available.

---

## ๐Ÿ“ License

MIT ยฉ 2024 [amkyawdev](https://github.com/amkyawdev)

---

<div align="center">

**Made with โค๏ธ for Myanmar developers**

</div>