Skip to main content
Glama
6amdev

6amdev-server-mcp

Official
by 6amdev
README.md
# 6AMDev MCP Server

MCP (Model Context Protocol) Server สำหรับจัดการ Ubuntu Server พร้อม AI Integration

## Features

- **System Management**: ดู CPU, RAM, Disk, Processes, Logs
- **Docker Control**: จัดการ containers (start, stop, logs, exec)
- **Gitea Integration**: จัดการ Git repositories และ Issues
- **Ollama Tools**: ควบคุม Local LLM models
- **Workspace Management**: จัดการไฟล์และโปรเจกต์
- **Claude Code Integration**: AI-powered coding assistant

## Architecture

```
┌─────────────────┐     MCP Protocol      ┌─────────────────────────────────┐
│  Windows PC     │◄────────────────────► │  Ubuntu Server (192.168.80.203) │
│  (Cursor/Claude)│     (stdio)           │                                 │
└─────────────────┘                       │  ┌─────────────────────────────┐│
                                          │  │  MCP Server (Node.js)       ││
                                          │  │  - System Tools             ││
                                          │  │  - Docker Tools             ││
                                          │  │  - Gitea Tools              ││
                                          │  │  - Ollama Tools             ││
                                          │  │  - Workspace Tools          ││
                                          │  │  - Claude Code Tools        ││
                                          │  └─────────────────────────────┘│
                                          └─────────────────────────────────┘
```

## Quick Start

### 1. Clone Repository

```bash
cd ~/workspace
git clone http://192.168.80.203:3000/wit/6amdev-mcp-server.git
cd 6amdev-mcp-server
```

### 2. Install Dependencies

```bash
npm install
```

### 3. Configure Environment

```bash
cp .env.example .env
nano .env  # Edit with your values
```

### 4. Install Claude Code (Optional)

```bash
chmod +x scripts/install-claude-code.sh
./scripts/install-claude-code.sh
```

### 5. Build & Run

```bash
npm run build
npm start
```

### 6. Setup as Systemd Service (Optional)

```bash
chmod +x scripts/setup-systemd.sh
sudo ./scripts/setup-systemd.sh
```

## Client Configuration

### Cursor / Claude Desktop

Add to your MCP configuration file:

**Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
**macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`

```json
{
  "mcpServers": {
    "6amdev": {
      "command": "ssh",
      "args": ["-tt", "wit@192.168.80.203", "cd ~/workspace/6amdev-mcp-server && node dist/index.js"]
    }
  }
}
```

## Available Tools

### System Tools
| Tool | Description |
|------|-------------|
| `system_status` | ดูสถานะ CPU, RAM, Disk |
| `system_processes` | ดู process ที่ทำงานอยู่ |
| `system_logs` | ดู system logs |
| `system_uptime` | ดู uptime และ load |

### Docker Tools
| Tool | Description |
|------|-------------|
| `docker_list` | แสดง containers ทั้งหมด |
| `docker_start` | Start container |
| `docker_stop` | Stop container |
| `docker_restart` | Restart container |
| `docker_logs` | ดู container logs |
| `docker_exec` | รัน command ใน container |
| `docker_stats` | ดูสถิติ resource usage |
| `docker_images` | แสดง images |

### Gitea Tools
| Tool | Description |
|------|-------------|
| `gitea_repos` | List repositories |
| `gitea_repo_info` | ดูข้อมูล repository |
| `gitea_issues` | List/manage issues |
| `gitea_create_issue` | สร้าง issue ใหม่ |
| `gitea_branches` | List branches |

### Ollama Tools
| Tool | Description |
|------|-------------|
| `ollama_list` | แสดง models ที่มี |
| `ollama_status` | ดูสถานะ Ollama service |
| `ollama_run` | รัน prompt กับ model |
| `ollama_pull` | Download model ใหม่ |
| `ollama_info` | ดูข้อมูล model |
| `ollama_delete` | ลบ model |

### Workspace Tools
| Tool | Description |
|------|-------------|
| `workspace_list` | List projects |
| `workspace_tree` | แสดงโครงสร้างโปรเจกต์ |
| `workspace_read` | อ่านไฟล์ |
| `workspace_write` | เขียนไฟล์ |
| `workspace_search` | ค้นหาไฟล์/content |
| `workspace_git` | รัน git commands |

### Claude Code Tools
| Tool | Description |
|------|-------------|
| `claude_ask` | ถามคำถาม Claude Code |
| `claude_task` | สั่งให้ทำ task |
| `claude_review` | Review code |
| `claude_explain` | อธิบายโค้ด |
| `claude_status` | เช็คสถานะ Claude Code |

## Environment Variables

| Variable | Description | Default |
|----------|-------------|---------|
| `WORKSPACE_ROOT` | Root directory for workspace | `/home/wit/workspace` |
| `GITEA_URL` | Gitea server URL | `http://localhost:3000` |
| `GITEA_TOKEN` | Gitea API token | - |
| `OLLAMA_URL` | Ollama API URL | `http://localhost:11434` |
| `ANTHROPIC_API_KEY` | Claude API key | - |
| `LOG_LEVEL` | Logging level | `info` |

## Development

```bash
# Run in development mode (auto-reload)
npm run dev

# Build
npm run build

# Lint
npm run lint
```

## License

MIT © 6AMDev

TDQS

B3.1/5.0

Scored across 34 tools

Disambiguation4/5

Tools are grouped by domain (system, docker, gitea, ollama, workspace, claude) which makes them fairly distinct. However, the system_* and docker_* tools have some overlap in purpose (e.g., system_status vs docker_stats both report resource usage), which could cause minor confusion for an agent.

Naming Consistency4/5

All tool names use a consistent pattern of domain_prefix_action (e.g., docker_list, gitea_issues). This makes the set predictable. Minor inconsistency: the workspace tools use git as part of workspace_git rather than git_*, and claude tools are not prefixed uniformly (e.g., claude_ask vs claude_status).

Tool Count3/5

With 34 tools, the server covers six domains, but this is on the heavy side for a single server. The claude and ollama domains add 5-6 tools each which feels excessive given that many tasks could be combined (e.g., claude_ask, claude_task, claude_review, claude_explain all serve similar purposes with vague boundaries).

Completeness3/5

Each domain has reasonable coverage: system has monitoring, docker has basic lifecycle, gitea has listing and issue creation, ollama has model management. Notable gaps: gitea lacks repo creation/update/deletion and commit reading; workspace lacks file deletion or listing by type; no tool for restarting services or managing users.

Maintenance

ActivityInactive
ResponsivenessNo issues